/* The Vantage — Phase 1 site styles.
   Reimplements the handful of design-system components (Button, Field, Input,
   Textarea, Radio, Header) as plain CSS, matching the prototype's rendered
   output. All values reference the token files in css/tokens/. */

html { scroll-behavior: smooth; }
body { margin: 0; background: var(--vt-paper); }

a { color: var(--text-link); text-decoration: none; }
a:hover { color: var(--text-link-hover); }

/* Anchor targets land clear of the sticky nav. */
section[id] { scroll-margin-top: 92px; }
@media (max-width: 1100px) { section[id] { scroll-margin-top: 84px; } }
@media (max-width: 900px)  { section[id] { scroll-margin-top: 72px; } }

/* ---- Type utilities ---- */
.eyebrow {
  font-family: var(--font-eyebrow);
  font-size: 12px;
  letter-spacing: var(--tracking-eyebrow);
  text-transform: uppercase;
  color: var(--text-muted);
}
.eyebrow--ondark { color: var(--text-on-dark-muted); }
.eyebrow--tan { color: var(--vt-tower-tan); }

.caption { font-size: 13px; line-height: 1.5; color: var(--text-muted); }
.caption--ondark { color: var(--text-on-dark-muted); }

/* ---- Button (DS: components/core/Button.jsx) ---- */
.btn {
  font-family: var(--font-eyebrow);
  font-size: 12px;
  letter-spacing: var(--tracking-button);
  text-transform: uppercase;
  border: 1px solid transparent;
  border-radius: var(--radius-none);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
  padding: 15px 32px;
  min-height: 48px;
  box-sizing: border-box;
  line-height: 1;
  white-space: nowrap;
  text-decoration: none;
  appearance: none;
  background: none;
  transition: background-color var(--dur-base) var(--ease-standard),
              color var(--dur-base) var(--ease-standard),
              border-color var(--dur-base) var(--ease-standard),
              opacity var(--dur-base) var(--ease-standard);
}
.btn:active { opacity: .82; }
.btn--sm { padding: 10px 20px; font-size: 11px; min-height: 40px; }
.btn--primary { background: var(--vt-eucalyptus); color: var(--vt-bone); border-color: var(--vt-eucalyptus); }
.btn--primary:hover { background: var(--vt-eucalyptus-dark); border-color: var(--vt-eucalyptus-dark); color: var(--vt-bone); }
.btn--accent { background: var(--vt-tower-tan); color: var(--vt-bone); border-color: var(--vt-tower-tan); }
.btn--accent:hover { background: #96684c; border-color: #96684c; color: var(--vt-bone); }
.btn--ondark { background: transparent; color: var(--vt-bone); border-color: var(--border-on-dark); }
.btn--ondark:hover { background: var(--vt-bone); color: var(--vt-eucalyptus); border-color: var(--vt-bone); }

/* ---- Field / Input / Textarea (underline only, no box) ---- */
.field { display: flex; flex-direction: column; gap: var(--space-2); }
.field > label {
  font-family: var(--font-eyebrow);
  font-size: 12px;
  letter-spacing: var(--tracking-eyebrow);
  text-transform: uppercase;
  color: var(--text-muted);
}
.field--light > label { color: var(--text-on-dark-muted); }

.input, .textarea {
  width: 100%;
  box-sizing: border-box;
  font-family: var(--font-text);
  font-size: var(--fs-body-s);
  line-height: 1.4;
  padding: 14px 0;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--border-hairline);
  border-radius: 0;
  color: var(--text-body);
  transition: border-color var(--dur-base) var(--ease-standard);
}
.textarea { line-height: 1.6; resize: vertical; }
.input:focus, .textarea:focus { border-bottom-color: var(--vt-eucalyptus); }
.input::placeholder, .textarea::placeholder { color: var(--text-muted); }
.input--light { border-bottom-color: var(--border-on-dark); color: var(--text-on-dark); }
.input--light:focus { border-bottom-color: var(--vt-bone); }
.input--light::placeholder { color: var(--text-on-dark-muted); }

/* ---- Radio — the only round element in the system ---- */
.radio { display: inline-flex; align-items: center; gap: var(--space-3); cursor: pointer; min-height: 44px; }
.radio input { position: absolute; opacity: 0; width: 0; height: 0; }
.radio-dot {
  width: 18px; height: 18px; flex: 0 0 18px;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  display: inline-flex; align-items: center; justify-content: center;
  transition: var(--transition-base);
}
.radio-dot::after {
  content: ""; width: 9px; height: 9px; border-radius: 999px;
  background: var(--vt-eucalyptus);
  transform: scale(0);
  transition: transform var(--dur-quick) var(--ease-standard);
}
.radio input:checked + .radio-dot { border-color: var(--vt-eucalyptus); }
.radio input:checked + .radio-dot::after { transform: scale(1); }
.radio input:focus-visible + .radio-dot { outline: 2px solid var(--focus-ring); outline-offset: 3px; }
.radio-label { font-size: var(--fs-body-s); color: var(--text-body); }

/* ---- Selector tabs (suites / retreats) ---- */
.tabs {
  display: flex;
  gap: clamp(20px, 4vw, 40px);
  overflow-x: auto;
  border-bottom: 1px solid var(--border-hairline);
  scrollbar-width: none;
}
.tabs::-webkit-scrollbar { display: none; }
.tab {
  appearance: none; background: none; border: 0;
  border-bottom: 2px solid transparent;
  padding: 0 0 14px;
  cursor: pointer;
  white-space: nowrap;
  min-height: 44px;
  font-family: var(--font-eyebrow);
  font-size: 12px;
  letter-spacing: var(--tracking-eyebrow);
  text-transform: uppercase;
  color: var(--text-muted);
  transition: color var(--dur-base) var(--ease-standard),
              border-color var(--dur-base) var(--ease-standard);
}
.tab.is-active { color: var(--text-heading); border-bottom-color: var(--vt-tower-tan); }

.selector-panel { animation: vt-fade var(--dur-base) var(--ease-standard); }
/* Global: many elements (selector panels, form state blocks) carry their
   layout as an inline display style, which would otherwise override the
   hidden attribute's display: none. */
[hidden] { display: none !important; }
@keyframes vt-fade { from { opacity: 0; } to { opacity: 1; } }

.spec-row {
  display: flex; justify-content: space-between; align-items: baseline;
  gap: 24px; padding: 14px 0;
  border-top: 1px solid var(--border-hairline);
}
.spec-row .spec-label {
  font-family: var(--font-eyebrow); font-size: 12px;
  letter-spacing: var(--tracking-eyebrow); text-transform: uppercase;
  color: var(--text-muted); white-space: nowrap;
}
.spec-row .spec-value { font-size: 17px; line-height: 1.5; text-align: right; }

.time-row {
  display: flex; justify-content: space-between; align-items: baseline;
  gap: 24px; padding: 14px 0;
  border-top: 1px solid var(--border-hairline);
  font-size: 17px; line-height: 1.5;
}
.time-row .time { white-space: nowrap; color: var(--text-muted); }

/* ---- Imagery ---- */
.imgbox { border: 1px solid var(--border-hairline); overflow: hidden; background: var(--vt-sandstone-30); }
.imgbox > img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  transition: transform var(--dur-cinematic) var(--ease-standard);
}
.imgbox:hover > img { transform: scale(1.03); }

/* ---- Sticky nav ---- */
.navbar {
  position: sticky; top: 0; z-index: 40;
  background: var(--vt-eucalyptus);
  border-bottom: 1px solid var(--border-on-dark);
}
.nav-desktop { position: relative; max-width: 1240px; width: 100%; margin: 0 auto; box-sizing: border-box; }
.nav-desktop header {
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px; padding: 24px 32px; flex-wrap: wrap;
}
.nav-desktop header > img { height: 42px; width: auto; display: block; }
.nav-desktop nav { display: flex; align-items: center; gap: 48px; flex-wrap: wrap; }
.nav-link {
  font-family: var(--font-eyebrow); font-size: 12px;
  letter-spacing: var(--tracking-eyebrow); text-transform: uppercase;
  color: var(--text-on-dark-muted);
  border-bottom: none;
  transition: color var(--dur-base) var(--ease-standard);
}
.nav-link:hover { color: var(--vt-bone); }
@media (max-width: 1100px) {
  .nav-desktop header { padding: 20px clamp(20px, 5vw, 32px); }
  .nav-desktop nav { gap: 20px; }
}

.nav-mobile {
  display: none;
  position: relative; z-index: 3;
  align-items: center; justify-content: space-between;
  gap: 16px; padding: 20px clamp(20px, 5vw, 32px);
}
.nav-mobile img { height: 30px; width: auto; display: block; }
.hamburger {
  appearance: none; background: none; border: 0;
  padding: 12px; margin: -12px; cursor: pointer;
  display: flex; flex-direction: column; gap: 7px;
  width: 44px; height: 44px; box-sizing: content-box;
  align-items: flex-end; justify-content: center;
}
.hamburger span { display: block; height: 1px; background: var(--vt-bone); }
.hamburger span:nth-child(1), .hamburger span:nth-child(2) { width: 26px; }
.hamburger span:nth-child(3) { width: 18px; }

@media (max-width: 900px) {
  .nav-desktop { display: none; }
  .nav-mobile { display: flex; }
  a[href^="mailto"] { overflow-wrap: anywhere; }
}

/* ---- Mobile drawer ---- */
.drawer {
  position: fixed; inset: 0; z-index: 50;
  background: var(--vt-eucalyptus);
  display: flex; flex-direction: column;
  overflow-y: auto; -webkit-overflow-scrolling: touch;
}
.drawer[hidden] { display: none; }
.drawer-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 20px clamp(20px, 5vw, 32px); }
.drawer-head img { height: 30px; width: auto; display: block; }
.drawer-close {
  appearance: none; background: none; border: 0;
  padding: 12px; margin: -12px; cursor: pointer;
  width: 44px; height: 44px; box-sizing: content-box;
  display: grid; place-items: center;
  font-family: var(--font-text); font-size: 26px; line-height: 1;
  color: var(--vt-bone);
}
.drawer nav {
  flex: 1 0 auto;
  display: flex; flex-direction: column; justify-content: center;
  gap: 4px;
  padding: clamp(16px, 4vh, 48px) clamp(20px, 5vw, 32px) 40px;
}
.drawer-link {
  padding: 14px 0;
  border-bottom: 1px solid var(--border-on-dark);
  font-family: var(--font-display); font-weight: 300;
  font-size: clamp(26px, 5.2vh, 38px); line-height: 1.1;
  color: var(--vt-bone);
}
.drawer-link:hover { color: var(--vt-bone); }
.drawer-foot {
  flex: none;
  padding: 0 clamp(20px, 5vw, 32px) calc(40px + env(safe-area-inset-bottom));
  font-family: var(--font-eyebrow); font-size: 12px;
  letter-spacing: var(--tracking-eyebrow); text-transform: uppercase;
  color: var(--text-on-dark-muted);
}
body.drawer-open { overflow: hidden; }

/* ---- Hero ---- */
.hero-img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: 100% 36%;
}
.hero-scrim { position: absolute; inset: 0; background: rgba(20,30,16,.28); }
@media (max-width: 1280px) {
  .hero-img { object-position: 68% 30%; }
  .hero-scrim { background: rgba(20,30,16,.44); }
}

/* ---- Forms: honeypot ---- */
.hp { position: absolute; left: -9999px; opacity: 0; height: 0; overflow: hidden; }

/* ---- Motion preferences ---- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .imgbox > img { transition: none; }
  .selector-panel { animation: none; }
}
