/* VAYRAH — shared styles. Page layout lives inline in each page (from the design); this file holds
   the responsive scale, the mobile menu and the form controls. */
:root {
  --gx: 56px;      /* side padding */
  --sy: 1;         /* vertical section spacing scale */
  --sg: 1;         /* large gap scale */
  --hero-max: 9999px;
}
@media (max-width: 960px) {
  :root { --gx: 36px; --sy: 0.75; --sg: 0.7; }
}
@media (max-width: 640px) {
  :root { --gx: 22px; --sy: 0.55; --sg: 0.55; --hero-max: 680px; }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
img { max-width: 100%; }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 2px solid #8A5A3B; outline-offset: 3px; }

/* ---- navigation ---- */
.nav-toggle { display: none; }
.site-nav .lang a[aria-current] { cursor: default; }

@media (max-width: 900px) {
  .site-nav { position: relative; z-index: 5; }
  .nav-toggle {
    display: inline-flex; flex-direction: column; justify-content: center; gap: 7px;
    width: 44px; height: 44px; padding: 0 9px; margin-left: auto;
    background: transparent; border: 1px solid rgba(243, 238, 230, 0.5); border-radius: 999px; cursor: pointer;
  }
  .nav-toggle span:not(.sr) { display: block; height: 1.5px; background: #F3EEE6; transition: transform .2s; }
  .site-nav.open .nav-toggle span:nth-child(1) { transform: translateY(4.25px) rotate(45deg); }
  .site-nav.open .nav-toggle span:nth-child(2) { transform: translateY(-4.25px) rotate(-45deg); }
  .site-nav .nav-links { display: none !important; }
  .site-nav.open .nav-links {
    display: flex !important; flex-direction: column; align-items: flex-start; gap: 22px !important;
    width: 100%; padding: 12px 0 8px;
  }
  .site-nav .lang { margin-left: 0 !important; padding-left: 0 !important; border-left: 0 !important; }
}

/* ---- headings never overflow a phone ---- */
@media (max-width: 640px) {
  h1 { font-size: clamp(40px, 11vw, 64px) !important; }
  h2 { font-size: clamp(30px, 8.4vw, 44px) !important; }
  h3 { overflow-wrap: anywhere; }
}

/* ---- forms (rendered from the Wix Forms schema) ---- */
.f-loading { margin: 0; opacity: 0.7; font-size: 14px; }
.f-field { display: flex; flex-direction: column; gap: 8px; flex: 1 1 100%; min-width: 0; }
.f-field.half { flex: 1 1 240px; }
.f-label { font-size: 12px; letter-spacing: 0.16em; text-transform: uppercase; color: #6B5A4E; }
.f-input {
  height: 52px; padding: 0 16px; border: 1px solid #BFAF9C; background: #FBF8F4;
  font: inherit; color: #2B1F18; border-radius: 0; width: 100%;
}
select.f-input { appearance: auto; }
textarea.f-input { height: auto; min-height: 132px; padding: 14px 16px; resize: vertical; }
.f-input[aria-invalid="true"] { border-color: #9B2C1F; }
.f-group { border: 0; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; flex: 1 1 100%; }
.f-group legend { font-size: 12px; letter-spacing: 0.16em; text-transform: uppercase; color: #6B5A4E; margin-bottom: 12px; padding: 0; }
.f-options { display: flex; flex-wrap: wrap; gap: 12px 28px; }
.f-check { display: flex; align-items: center; gap: 10px; min-height: 44px; font-size: 15px; cursor: pointer; }
.f-check input { width: 20px; height: 20px; margin: 0; accent-color: #8A5A3B; flex: none; }
.f-error { margin: 0; font-size: 13px; color: #9B2C1F; }
.f-form-error { flex: 1 1 100%; margin: 0; color: #9B2C1F; }
.f-thanks { margin: 0; font-family: 'EB Garamond', serif; font-size: 26px; line-height: 1.3; }
.f-submit { cursor: pointer; }
.f-submit[disabled] { opacity: 0.6; cursor: progress; }

/* pill forms (newsletter, waitlist) sit on dark backgrounds */
form[data-variant="pill"] .f-row { display: flex; flex-wrap: wrap; gap: 10px; }
form[data-variant="pill"] .f-check { font-size: 14px; }
form[data-variant="pill"] .f-error,
form[data-variant="pill"] .f-form-error { color: #F2C4B3; }
form[data-variant="pill"] .f-thanks { font-size: 22px; }
form[data-variant="pill"] input[type="email"]::placeholder,
form[data-variant="pill"] input[type="text"]::placeholder { color: rgba(243, 238, 230, 0.6); }

/* membership logo (Dude Ranchers' Association) sits on a cream tile in the dark footer */
.dra { display: flex; flex-direction: column; gap: 10px; margin-top: 6px; }
.dra-cap { font-size: 10px; letter-spacing: 0.2em; text-transform: uppercase; color: rgba(243,238,230,0.5); }
.dra-link { display: block; align-self: flex-start; }
.dra-logo, img[alt^="Member of the Dude"] { display: block; width: 132px !important; height: auto; }
/* older pages: hide the text wordmark until site.js swaps in the logo */
[data-t="nav-vayrah"], a[data-t="footer-vayrah"] { visibility: hidden; }
/* footer: on narrow screens the link and newsletter columns line up on the left */
@media (max-width: 900px) { footer div:has(> [data-nl-col]) { justify-content: flex-start !important; } }
/* homepage Instagram strip: six equal squares in one row, as in the design */
[data-ig-grid], section div[style*="minmax(200px, 1fr)"] { grid-template-columns: repeat(6, minmax(0, 1fr)) !important; }
@media (max-width: 900px) { [data-ig-grid], section div[style*="minmax(200px, 1fr)"] { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; } }
/* homepage "three ways in": the cards share rows, so eyebrows, titles, texts and links line up */
section[aria-label="Three ways in"] > div { display: grid !important; grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: 24px; row-gap: 10px !important; }
section[aria-label="Three ways in"] > div > a { display: grid !important; grid-row: span 5; grid-template-rows: subgrid; row-gap: 10px !important; }
section[aria-label="Three ways in"] > div > a > div:last-child { display: contents !important; }
section[aria-label="Three ways in"] > div > a > :first-child { margin-bottom: 12px; }
section[aria-label="Three ways in"] > div > a > div:last-child > span:last-child { padding-top: 8px; }
@media (max-width: 900px) { section[aria-label="Three ways in"] > div { grid-template-columns: minmax(0, 1fr); } section[aria-label="Three ways in"] > div > a { margin-bottom: 40px; } }
/* cookie banner (first visit; "Cookie settings" in the footer reopens it) */
.cookie { position: fixed; left: 32px; bottom: 32px; z-index: 50; max-width: 460px; background: #2B1F18; color: #E3D8CB; padding: 28px 30px 26px; border: 1px solid rgba(243,238,230,.16); box-shadow: 0 18px 50px rgba(20,12,8,.35); font-family: 'Work Sans', system-ui, sans-serif; font-size: 15px; line-height: 1.6; display: flex; flex-direction: column; gap: 14px; }
.cookie p { margin: 0; }
.cookie-eyebrow { font-size: 11px; letter-spacing: .22em; text-transform: uppercase; color: #B9A794; }
.cookie-title { font-family: 'EB Garamond', serif; font-size: 28px; line-height: 1.15; color: #F3EEE6; }
.cookie a { color: #F3EEE6; }
.cookie-btns { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 6px; }
.cookie-btns button { flex: 1 1 140px; height: 48px; padding: 0 24px; border: 1px solid rgba(243,238,230,.55); border-radius: 999px; background: transparent; color: #F3EEE6; font: inherit; font-size: 12px; letter-spacing: .16em; text-transform: uppercase; cursor: pointer; }
.cookie-btns button[data-c="accept"] { background: #F3EEE6; border-color: #F3EEE6; color: #2B1F18; }
.cookie-link { background: none; border: 0; padding: 0; font: inherit; color: #B9A794; text-decoration: underline; cursor: pointer; }
@media (max-width: 640px) { .cookie { left: 12px; right: 12px; bottom: 12px; max-width: none; padding: 22px 20px 20px; } .cookie-title { font-size: 24px; } }
/* language menu: the current language; the others open below it */
.site-nav details.lang { position: relative; margin-left: -8px; font-size: 12px; letter-spacing: 0.14em; }
.site-nav details.lang summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 6px; padding: 8px 2px; color: #F3EEE6; font-weight: 600; }
.site-nav details.lang summary::-webkit-details-marker { display: none; }
.site-nav details.lang[open] summary svg { transform: rotate(180deg); }
.lang-menu { position: absolute; right: 0; top: calc(100% + 10px); z-index: 20; min-width: 150px; background: #F3EEE6; padding: 8px 0; box-shadow: 0 14px 34px rgba(20,12,8,.28); display: flex; flex-direction: column; text-transform: none; letter-spacing: .02em; font-size: 14px; }
.lang-menu a { color: #2B1F18 !important; text-decoration: none; padding: 9px 18px; }
.lang-menu a[aria-current] { font-weight: 600; }
.lang-menu a:hover { background: #E8DFD3; }
@media (max-width: 900px) { .site-nav details.lang { margin-left: 0; } .lang-menu { position: static; box-shadow: none; background: transparent; padding: 4px 0 0; min-width: 0; } .lang-menu a { color: #F3EEE6 !important; padding: 8px 0; } .lang-menu a:hover { background: transparent; } }

/* hover: gentle movement so the pages feel less flat */
@media (hover: hover) {
  a, button, article, img { transition: color .3s ease, background-color .3s ease, background-size .35s ease, border-color .3s ease, opacity .3s ease, transform .4s ease, box-shadow .4s ease, filter .4s ease; }
  a[style*="border-radius: 999px"]:hover, button[style*="border-radius: 999px"]:hover { transform: translateY(-2px); box-shadow: 0 10px 22px rgba(20, 12, 8, .22); }
  nav > div > a:not([style*="border-radius"]) { background-image: linear-gradient(currentColor, currentColor); background-repeat: no-repeat; background-position: 0 100%; background-size: 0% 1px; padding-bottom: 4px; }
  nav > div > a:not([style*="border-radius"]):hover { background-size: 100% 1px; }
  section[aria-label="Three ways in"] > div > a:hover { transform: translateY(-6px); }
  section[aria-label="Three ways in"] > div > a:hover img { filter: brightness(1.06) saturate(1.1); box-shadow: 0 18px 40px rgba(43, 31, 24, .18); }
  section[aria-label="Three ways in"] > div > a span { transition: text-underline-offset .3s ease, color .3s ease; }
  section[aria-label="Three ways in"] > div > a:hover span:last-child { text-underline-offset: 10px; }
  [data-ig-grid] a, section div[style*="minmax(200px, 1fr)"] > a { display: block; overflow: hidden; }
  [data-ig-grid] a:hover img, section div[style*="minmax(200px, 1fr)"] > a:hover img { transform: scale(1.06); filter: brightness(.9); }
  article[style*="border: 1px solid"]:hover { transform: translateY(-6px); box-shadow: 0 22px 48px rgba(0, 0, 0, .28); border-color: rgba(243, 238, 230, .55) !important; }
  article[style*="border-top: 1px solid"]:hover { border-top-color: rgba(243, 238, 230, .7) !important; }
  footer a[style*="text-decoration: none"]:hover, footer a[href*="duderanch"]:hover { opacity: .65; }
  .steps summary { transition: opacity .3s ease; }
  .steps summary:hover { opacity: .75; }
}


/* ---- mobile header + hero labels identical on every page ---- */
@media (max-width: 640px) {
  .site-nav > a:first-child { gap: 10px !important; min-width: 0; }
  .site-nav > a:first-child img { height: 22px !important; }
  .site-nav > a:first-child span { font-size: 10px !important; letter-spacing: 0.2em !important; white-space: nowrap; }
  header p:has(+ h1), header [data-block="cons-hero-labels"] p { font-size: 11px !important; letter-spacing: 0.16em !important; }
}
@media (max-width: 440px) { /* narrow phones */
  header p:has(+ h1), header [data-block="cons-hero-labels"] p { font-size: 10px !important; letter-spacing: 0.12em !important; }
  .site-nav > a:first-child span { font-size: 9px !important; letter-spacing: 0.16em !important; }
}
@media (max-width: 370px) {
  .site-nav > a:first-child img { height: 20px !important; }
  .site-nav > a:first-child { gap: 8px !important; }
}
@media (max-width: 640px) { /* hero headings share one box */
  header h1[data-t$="hero-2"] { min-height: 3.06em; }
}
@media (max-width: 370px) {
  header h1[data-t$="hero-2"] { font-size: 37px !important; }
}
@media (max-width: 380px) { /* 360px spanish/italian */
  header p:has(+ h1), header [data-block="cons-hero-labels"] p { letter-spacing: 0.08em !important; }
  html[lang="es"] [data-t="experience-hero-3"], html[lang="es"] [data-t="conservation-hero-3"], html[lang="es"] [data-block="home-hero-spacer"], html[lang="es"] [data-block="our-story-hero-spacer"],
  html[lang="it"] [data-t="experience-hero-3"], html[lang="it"] [data-t="conservation-hero-3"], html[lang="it"] [data-block="home-hero-spacer"], html[lang="it"] [data-block="our-story-hero-spacer"] { min-height: 9.6em !important; }
}

/* ---- every pill button matches the header button ---- */
main a[style*="border-radius: 999px"], body > section a[style*="border-radius: 999px"], body > header > div a[style*="border-radius: 999px"], body > footer a[style*="border-radius: 999px"], section a[style*="border-radius: 999px"], button[style*="border-radius: 999px"]:not([style*="height"]) {
  font-size: 11px !important; padding: 10px 18px !important; letter-spacing: 0.18em !important; line-height: 1.6 !important;
}
section a[style*="border: 1px solid"][style*="border-radius: 999px"], body > header > div a[style*="border: 1px solid"][style*="border-radius: 999px"], footer a[style*="border: 1px solid"][style*="border-radius: 999px"] { padding: 9px 18px !important; }

/* ---- taller phone heroes so the menu opens without a jump ---- */
@media (max-width: 640px) {
  header[style*="min-height: min(820px"] { min-height: 800px !important; }
  html[lang="es"] header[style*="min-height: min(820px"], html[lang="it"] header[style*="min-height: min(820px"] { min-height: 845px !important; }
}

/* ---- home phone hero: no empty space under the heading ---- */
@media (max-width: 640px) {
  [data-block="home-hero-spacer"] { display: none !important; }
  header:has([data-block="home-hero-spacer"]) { min-height: 650px !important; }
  html[lang="es"] header:has([data-block="home-hero-spacer"]), html[lang="it"] header:has([data-block="home-hero-spacer"]) { min-height: 665px !important; }
}
@media (max-width: 380px) {
  html[lang="es"] header:has([data-block="home-hero-spacer"]), html[lang="it"] header:has([data-block="home-hero-spacer"]) { min-height: 635px !important; }
}
