/* =========================================================
   Arin's Snake Avoidance Training
   Desert / Texas Hill Country / rattlesnake theme
   ========================================================= */

:root {
  --bg:        #f1e6d0;   /* warm sand */
  --bg-2:      #e3d3b3;   /* deeper sand */
  --bg-dark:   #2a1810;   /* burnt umber */
  --bg-night:  #1a0e08;   /* near-black */
  --ink:       #2b1810;
  --ink-soft:  #5a3a23;
  --muted:     #8a6a4a;
  --line:      #c9b48f;

  --accent:    #a23b1f;   /* terracotta / dried blood */
  --accent-2:  #c45a35;   /* rust orange */
  --accent-3:  #d97032;   /* sunset */

  --olive:     #6b6b35;   /* sage / mesquite */
  --olive-2:   #4d4d22;

  --rattle:    #d4a437;   /* warning yellow */
  --rattle-2:  #b08820;

  --cream:     #fff8e6;
  --card:      #fffaf0;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

body {
  font-family: 'Crimson Text', 'Iowan Old Style', Georgia, serif;
  font-size: 18px;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
}

h1, h2, h3 {
  font-family: 'Cinzel', 'Trajan Pro', Georgia, serif;
  letter-spacing: 0.03em;
  color: var(--ink);
  margin: 0 0 .5em;
  line-height: 1.15;
}
h1 { font-size: clamp(2.4rem, 6vw, 4.4rem); font-weight: 700; }
h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); font-weight: 700; }
h3 { font-size: 1.2rem; font-weight: 500; color: var(--ink-soft); }
p  { margin: 0 0 1em; }
em { font-style: italic; color: var(--accent); font-weight: 600; }

.container { max-width: 1040px; margin: 0 auto; padding: 0 1.5rem; }
.small { font-size: .85rem; }
.muted { color: var(--muted); }
code   { background: var(--bg-2); padding: 0 .35em; border-radius: 3px; font-size: .9em; }

/* =========================================================
   Diamondback stripe — rattlesnake skin pattern at top
   ========================================================= */
.caution-stripe {
  height: 26px;
  background-color: #1a0e08;
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='26' viewBox='0 0 28 26'%3E%3Crect width='28' height='26' fill='%231a0e08'/%3E%3Cpath d='M14 0 L28 13 L14 26 L0 13 Z' fill='%23a23b1f'/%3E%3Cpath d='M14 4 L24 13 L14 22 L4 13 Z' fill='%238a3b2a'/%3E%3Cpath d='M14 8 L20 13 L14 18 L8 13 Z' fill='none' stroke='%23d4a437' stroke-width='1.1'/%3E%3Cpath d='M14 11 L16 13 L14 15 L12 13 Z' fill='%23d4a437'/%3E%3C/svg%3E");
  background-repeat: repeat-x;
  background-size: auto 26px;
  box-shadow: 0 2px 8px rgba(0,0,0,.35);
  position: relative;
  z-index: 3;
}

/* =========================================================
   HERO
   ========================================================= */
.hero {
  position: relative;
  min-height: 78vh;
  background:
    radial-gradient(ellipse at 50% 100%, rgba(217, 112, 50, 0.5), transparent 60%),
    linear-gradient(180deg, #3a2110 0%, #1a0e08 70%, #0d0704 100%);
  color: var(--cream);
  display: flex;
  align-items: center;
  overflow: hidden;
}

/* hero background image (after photos uploaded) */
.hero::before {
  content: "";
  position: absolute; inset: 0;
  background: url('/images/hero.jpg') center/cover no-repeat;
  opacity: 0.32;
  filter: contrast(1.05) saturate(1.1);
  z-index: 0;
}

/* Scales pattern overlay */
.hero-scales {
  position: absolute; inset: 0;
  color: var(--rattle);
  opacity: 0.08;
  z-index: 1;
  pointer-events: none;
}

.hero-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(26,14,8,0.35) 0%, rgba(26,14,8,0.65) 100%);
  z-index: 1;
}

.hero-inner {
  position: relative;
  z-index: 2;
  max-width: 1040px;
  margin: 0 auto;
  padding: 5rem 1.5rem 6rem;
  text-align: center;
  width: 100%;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.35em;
  font-size: .8rem;
  color: var(--rattle);
  margin-bottom: 1.2em;
  font-weight: 600;
}

.hero h1 {
  color: var(--cream);
  text-shadow: 0 3px 12px rgba(0,0,0,0.6), 0 1px 0 #000;
  margin-bottom: .15em;
}
.hero h1 .amp {
  font-family: 'Rye', 'Georgia', serif;
  color: var(--rattle);
  font-size: 0.85em;
  font-weight: 400;
  margin: 0 .15em;
  display: inline-block;
  transform: translateY(0.05em);
}

.tagline {
  font-size: clamp(1.05rem, 1.6vw, 1.3rem);
  font-style: italic;
  color: #f5dfb0;
  margin: 1.2em auto 2em;
  max-width: 620px;
  text-shadow: 0 2px 6px rgba(0,0,0,0.4);
}

.hero-subnote {
  margin-top: 1.6em;
  color: #d8c089;
  font-size: .95rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

/* Flanking hero photos */
.hero-photo {
  position: absolute;
  top: 50%;
  width: clamp(200px, 20vw, 300px);
  aspect-ratio: 3 / 4;
  background: var(--bg-night);
  padding: 10px;
  z-index: 2;
  box-shadow:
    0 0 0 1px var(--rattle),
    0 0 0 4px var(--bg-night),
    0 18px 40px rgba(0,0,0,0.6);
  overflow: hidden;
  transition: transform .35s ease;
}
.hero-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: sepia(0.18) contrast(1.05);
}
.hero-photo-left {
  left: 4%;
  transform: translateY(-50%) rotate(-4deg);
}
.hero-photo-right {
  right: 4%;
  transform: translateY(-50%) rotate(4deg);
}
.hero-photo-left:hover  { transform: translateY(-50%) rotate(-1deg) scale(1.03); }
.hero-photo-right:hover { transform: translateY(-50%) rotate( 1deg) scale(1.03); }

/* Hide flanking photos on narrower screens (avoid crashing into text) */
@media (max-width: 1080px) {
  .hero-photo { display: none; }
}

.hero-snake {
  width: 130px; height: 130px;
  margin: 0 auto 1rem;
  color: var(--rattle);
  filter: drop-shadow(0 4px 12px rgba(0,0,0,0.5));
  animation: sway 5s ease-in-out infinite;
}
.hero-snake svg { width: 100%; height: 100%; }

@keyframes sway {
  0%, 100% { transform: rotate(-3deg); }
  50%      { transform: rotate(3deg); }
}

/* Animated rattle dots — bottom of hero */
.hero-rattle {
  position: absolute;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 6px;
  z-index: 2;
}
.hero-rattle span {
  width: 8px; height: 8px;
  background: var(--rattle);
  border-radius: 50%;
  opacity: 0.4;
  animation: rattle 1.4s ease-in-out infinite;
}
.hero-rattle span:nth-child(2) { animation-delay: 0.15s; }
.hero-rattle span:nth-child(3) { animation-delay: 0.30s; }
.hero-rattle span:nth-child(4) { animation-delay: 0.45s; }

@keyframes rattle {
  0%, 100% { opacity: 0.3; transform: scale(0.85); }
  50%      { opacity: 1;   transform: scale(1.15); }
}

/* =========================================================
   BUTTONS
   ========================================================= */
.btn-primary {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  padding: 1em 2.2em;
  text-decoration: none;
  border: 2px solid transparent;
  border-radius: 2px;
  font-family: 'Cinzel', Georgia, serif;
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all .2s;
  box-shadow: 0 4px 0 #6b2614, 0 6px 14px rgba(0,0,0,0.25);
  position: relative;
}
.btn-primary:hover {
  background: var(--accent-2);
  transform: translateY(-1px);
  box-shadow: 0 5px 0 #6b2614, 0 8px 16px rgba(0,0,0,0.3);
}
.btn-primary:active {
  transform: translateY(2px);
  box-shadow: 0 2px 0 #6b2614, 0 3px 8px rgba(0,0,0,0.2);
}
.btn-primary:disabled {
  background: #b5a892;
  color: #f1e6d0;
  cursor: not-allowed;
  box-shadow: 0 2px 0 #8a7e6a;
  transform: none;
}

/* =========================================================
   DIVIDERS — slithering snake between sections
   ========================================================= */
.divider {
  background: var(--bg);
  text-align: center;
  padding: 1.5rem 0 0.5rem;
  color: var(--accent);
  opacity: 0.65;
}
.divider svg {
  width: clamp(180px, 30vw, 280px);
  height: 30px;
}
.divider-flip svg { transform: scaleX(-1); }

/* =========================================================
   SECTIONS
   ========================================================= */
section { padding: 4rem 0; position: relative; }
.about      { background: var(--bg); }
.instructor { background: var(--bg-2); }
.photos     { background: var(--bg); }
.details    { background: var(--bg-2); }
.book       { background: var(--bg); position: relative; }

/* Subtle scales bg on the book section */
.book::before {
  content: "";
  position: absolute; inset: 0;
  background-image:
    radial-gradient(ellipse at 50% 0%, transparent 60%, rgba(162, 59, 31, 0.04) 100%);
  pointer-events: none;
}

/* Inline diamond next to h2 */
.dia {
  display: inline-flex;
  width: 14px; height: 14px;
  margin-right: .55em;
  color: var(--accent);
  vertical-align: middle;
  transform: translateY(-2px);
}
.dia svg { width: 100%; height: 100%; }

/* =========================================================
   INSTRUCTOR SECTION
   ========================================================= */
.instructor-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  margin-top: 1.5rem;
  align-items: start;
}
@media (min-width: 760px) {
  .instructor-grid { grid-template-columns: minmax(220px, 320px) 1fr; gap: 2.5rem; }
}

.instructor-portrait {
  position: relative;
  background: var(--bg-night);
  padding: 10px;
  border-radius: 2px;
  box-shadow:
    0 0 0 1px var(--rattle),
    0 0 0 4px var(--bg-night),
    0 12px 28px rgba(0,0,0,0.25);
  transform: rotate(-1.5deg);
  transition: transform .3s;
}
.instructor-portrait:hover { transform: rotate(0); }
.instructor-portrait img {
  display: block;
  width: 100%;
  height: auto;
  filter: sepia(0.15) contrast(1.05);
}
.portrait-caption {
  position: absolute;
  bottom: -1.4rem;
  left: 50%;
  transform: translateX(-50%) rotate(0deg);
  background: var(--rattle);
  color: var(--bg-night);
  padding: .25em 1em;
  font-family: 'Cinzel', Georgia, serif;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  white-space: nowrap;
  box-shadow: 0 3px 8px rgba(0,0,0,0.2);
}

.instructor-bio { padding-top: .5rem; }
.bio-lede {
  font-size: 1.3rem;
  font-family: 'Cinzel', Georgia, serif;
  color: var(--ink);
  border-left: 4px solid var(--accent);
  padding-left: 1em;
  margin-bottom: 1.2em;
  line-height: 1.4;
}
.bio-lede em {
  font-style: normal;
  background: linear-gradient(180deg, transparent 60%, rgba(212, 164, 55, 0.45) 60%);
  padding: 0 .15em;
  color: var(--ink);
  font-weight: 700;
}

.bio-facts {
  list-style: none;
  padding: 0;
  margin: 1.5em 0 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: .5rem 1.5rem;
  border-top: 1px dashed var(--line);
  padding-top: 1.25em;
}
.bio-facts li {
  font-size: .92rem;
  color: var(--ink-soft);
}
.bio-facts strong {
  display: block;
  color: var(--accent);
  font-family: 'Cinzel', Georgia, serif;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: .15em;
}

/* =========================================================
   PHOTO GRID
   ========================================================= */
.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.25rem;
  margin-bottom: 1rem;
}
.photo-card {
  aspect-ratio: 4 / 3;
  background-color: #b5a37e;
  background-image:
    linear-gradient(135deg, rgba(255,255,255,0.05), rgba(0,0,0,0.15)),
    linear-gradient(45deg, #b5a37e 25%, #a89370 25%, #a89370 50%, #b5a37e 50%, #b5a37e 75%, #a89370 75%);
  background-size: cover, 16px 16px;
  background-position: center;
  background-repeat: no-repeat, repeat;
  border: 3px solid var(--bg);
  border-radius: 2px;
  box-shadow: 0 3px 10px rgba(0,0,0,0.18);
  transition: transform .25s, box-shadow .25s;
}
.photo-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.22);
}

/* =========================================================
   DETAILS GRID
   ========================================================= */
.details-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  margin-top: 1.5rem;
}
.detail-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-left: 4px solid var(--accent);
  border-radius: 2px;
  padding: 1.25rem 1.25rem 1rem;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
  transition: transform .2s, box-shadow .2s;
}
.detail-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 14px rgba(0,0,0,0.1);
}
.detail-card h3 {
  font-size: 1.1rem;
  color: var(--ink);
  margin-bottom: .3em;
}
.detail-card p {
  font-size: .95rem;
  color: var(--ink-soft);
  margin: 0;
}
.detail-icon {
  font-size: 1.75rem;
  line-height: 1;
  margin-bottom: .5rem;
  color: var(--accent);
}
.warn-card {
  border-left-color: var(--rattle-2);
  background: linear-gradient(180deg, #fffaee 0%, #fff5d6 100%);
}
.warn-card .detail-icon { color: var(--rattle-2); }

/* =========================================================
   BOOKING SECTION
   ========================================================= */
.book-intro {
  text-align: center;
  font-style: italic;
  color: var(--ink-soft);
  margin-bottom: 2.5rem;
  font-size: 1.05rem;
}

.booker {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: 1fr;
  position: relative;
  z-index: 1;
}
@media (min-width: 760px) {
  .booker { grid-template-columns: 1fr 1fr; }
  .step-form { grid-column: 1 / -1; }
}

.step {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 1.5rem;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
  position: relative;
}
.step h3 {
  display: flex;
  align-items: center;
  gap: .6em;
  font-family: 'Cinzel', Georgia, serif;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--ink);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 1rem;
  padding-bottom: .75rem;
  border-bottom: 1px dashed var(--line);
}
.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px; height: 28px;
  background: var(--accent);
  color: #fff;
  border-radius: 50%;
  font-size: .9rem;
  font-weight: 700;
}

/* CALENDAR */
.cal-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
  font-family: 'Cinzel', Georgia, serif;
  font-weight: 700;
  color: var(--ink-soft);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: .95rem;
}
.cal-controls button {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 2px;
  padding: .35em .8em;
  cursor: pointer;
  font: inherit;
  color: var(--accent);
  font-size: 1.1rem;
  transition: background .15s;
}
.cal-controls button:hover { background: var(--bg-2); }

.calendar {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
  font-size: .92rem;
}
.cal-head {
  text-align: center;
  font-weight: 700;
  color: var(--muted);
  padding: .4em 0;
  font-size: .8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.cal-day {
  text-align: center;
  padding: .65em 0;
  background: var(--bg);
  border-radius: 2px;
  cursor: pointer;
  user-select: none;
  border: 1px solid transparent;
  font-weight: 600;
  color: var(--ink);
  transition: all .15s;
}
.cal-day:hover:not(.disabled):not(.empty) {
  background: var(--bg-2);
  border-color: var(--accent-3);
}
.cal-day.disabled { color: var(--line); cursor: not-allowed; background: transparent; }
.cal-day.empty    { background: transparent; cursor: default; }
.cal-day.selected {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
  box-shadow: 0 2px 6px rgba(162, 59, 31, 0.4);
}

/* TIME SLOTS */
.slots {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(95px, 1fr));
  gap: .55rem;
}
.slot-btn {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 2px;
  padding: .7em .4em;
  font: inherit;
  font-family: 'Cinzel', Georgia, serif;
  font-size: .88rem;
  font-weight: 600;
  cursor: pointer;
  color: var(--ink);
  transition: all .15s;
  letter-spacing: 0.05em;
}
.slot-btn:hover:not(:disabled) {
  background: var(--bg-2);
  border-color: var(--accent-3);
}
.slot-btn.selected {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
  box-shadow: 0 2px 6px rgba(162, 59, 31, 0.4);
}
.slot-btn:disabled {
  color: var(--line);
  cursor: not-allowed;
  text-decoration: line-through;
  background: transparent;
}

/* FORM */
.form-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0 1rem;
}
@media (min-width: 600px) {
  .form-grid { grid-template-columns: 1fr 1fr; }
}

form label {
  display: block;
  margin-bottom: 1rem;
  font-size: .85rem;
  font-weight: 600;
  color: var(--ink-soft);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
form input, form textarea {
  display: block;
  width: 100%;
  margin-top: .35em;
  padding: .7em .9em;
  border: 1px solid var(--line);
  border-radius: 2px;
  font: inherit;
  font-family: 'Crimson Text', Georgia, serif;
  font-size: 1rem;
  background: var(--cream);
  color: var(--ink);
  text-transform: none;
  letter-spacing: normal;
  font-weight: 400;
  transition: border-color .15s, box-shadow .15s;
}
form input:focus, form textarea:focus {
  outline: none;
  border-color: var(--accent-2);
  box-shadow: 0 0 0 3px rgba(196, 90, 53, 0.18);
}
form textarea { resize: vertical; min-height: 70px; }

.msg { margin-top: .75em; min-height: 1.3em; font-size: .95rem; }
.msg.ok  { color: var(--olive-2); font-weight: 600; }
.msg.err { color: var(--accent); font-weight: 600; }

/* =========================================================
   FOOTER
   ========================================================= */
footer {
  background: var(--bg-night);
  color: #c9b48f;
  padding: 2rem 0 2.5rem;
  text-align: center;
  position: relative;
  border-top: 4px solid var(--accent);
}
footer p { margin: .3em 0; }
footer strong {
  font-family: 'Cinzel', Georgia, serif;
  color: var(--rattle);
  letter-spacing: 0.1em;
  font-size: 1.05rem;
}
.footer-snake {
  width: 240px;
  margin: -1.5rem auto 1rem;
  color: var(--accent);
  opacity: 0.7;
}
.footer-snake svg { width: 100%; height: 40px; }

/* =========================================================
   RESPONSIVE TWEAKS
   ========================================================= */
@media (max-width: 600px) {
  .hero-inner { padding: 3.5rem 1.25rem 5rem; }
  .hero-snake { width: 90px; height: 90px; }
  .eyebrow { font-size: .7rem; letter-spacing: 0.25em; }
  section { padding: 3rem 0; }
  .step { padding: 1.25rem; }
}
