/* ==========================================================================
   Affinity Home Assets — single-page lead capture
   Direction: "Warm Editorial" · Palette: "Desert Pool"
   All design tokens recreated from the handoff (kearl-team/README.md).
   ========================================================================== */

/* ---- Design tokens ------------------------------------------------------ */
:root {
  --card:    #F7FBFA; /* page / card background (near-white, teal-tinted) */
  --bg:      #EBF5F2; /* alternating section background (pool tint)        */
  --brand:   #0E8C84; /* primary brand — CTAs, accents, chips             */
  --brand-d: #0B746D; /* brand hover / darker band                        */
  --accent:  #F1693C; /* sunset-coral accent                              */
  --ink:     #102A28; /* primary text & footer background                 */
  --muted:   #5E7A75; /* secondary text                                   */
  --line:    #D6E7E2; /* hairline borders, inputs, dividers               */

  --maxw: 1440px;       /* content max-width                              */
  --pad-x: 56px;        /* desktop horizontal section padding             */
  --serif: 'Newsreader', Georgia, serif;
  --sans:  'Figtree', system-ui, -apple-system, sans-serif;

  --r-pill: 999px;
  --r-card: 18px;
  --r-input: 11px;

  --shadow-card: 0 14px 30px rgba(16, 42, 40, .1);
  --t: .2s; /* base transition duration */
}

/* ---- Reset / base ------------------------------------------------------- */
* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--card);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

a { color: inherit; }

h1, h2, h3 { font-family: var(--serif); font-weight: 400; margin: 0; }

em { font-style: italic; color: var(--brand); }

/* shared transition helper (matches the prototype's `.lk`) */
.lk {
  transition: color var(--t), background var(--t), transform var(--t),
              box-shadow var(--t), border-color var(--t);
}

/* Accessible-but-visible focus ring everywhere */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

/* Skip link for keyboard users */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--ink);
  color: #fff;
  padding: 12px 18px;
  border-radius: 0 0 8px 0;
  z-index: 100;
  font-weight: 600;
}
.skip-link:focus { left: 0; }

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

/* ---- Layout primitives -------------------------------------------------- */
.inner { max-width: var(--maxw); margin: 0 auto; }

.section--card { background: var(--card); }
.section--bg   { background: var(--bg); }

/* anchor targets clear the sticky nav when jumped to */
#about, #lead { scroll-margin-top: 90px; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 16px;
}
.eyebrow .rule { width: 26px; height: 1px; background: var(--accent); }

/* ---- Buttons ------------------------------------------------------------ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--sans);
  font-weight: 600;
  font-size: 16px;
  line-height: 1;
  text-decoration: none;
  border-radius: var(--r-pill);
  cursor: pointer;
  border: 1.5px solid transparent;
}
.btn--primary {
  background: var(--brand);
  color: #fff;
  padding: 16px 28px;
}
.btn--primary:hover { background: var(--brand-d); transform: translateY(-1px); }

.btn--outline {
  background: transparent;
  color: var(--ink);
  padding: 15px 24px;
  border-color: var(--ink);
}
.btn--outline:hover { background: var(--ink); color: var(--card); }

/* ==========================================================================
   NAV — logo left, About + Contact anchors + Call button right
   ========================================================================== */
.nav {
  position: sticky;
  top: 0;
  z-index: 30;
  background: var(--card);
  border-bottom: 1px solid var(--line);
}
.nav__inner {
  max-width: var(--maxw);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px var(--pad-x);
}
.brand {
  display: inline-flex;
  align-items: baseline;
  gap: 12px;
  text-decoration: none;
}
.brand__name {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 23px;
  line-height: 1;
  letter-spacing: .01em;
  color: var(--brand);
}
.brand__sub {
  font-family: var(--sans);
  font-weight: 600;
  font-size: 10px;
  line-height: 1;
  letter-spacing: .26em;
  text-transform: uppercase;
  color: var(--accent);
}

.nav__right { display: flex; align-items: center; gap: 22px; }

.nav__contact {
  font-weight: 500;
  font-size: 15px;
  line-height: 1;
  color: var(--ink);
  text-decoration: none;
}
.nav__contact:hover { color: var(--accent); }

.nav__call {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  background: var(--brand);
  color: #fff;
  padding: 11px 20px;
  border-radius: var(--r-pill);
  font-weight: 600;
  font-size: 15px;
  line-height: 1;
  text-decoration: none;
}
.nav__call:hover { background: var(--brand-d); }

/* mobile-only control — hidden on desktop, revealed in the mobile media query */
.nav__phone-circle { display: none; }

/* ==========================================================================
   HERO — copy left, lead form right (the primary ask, above the fold)
   ========================================================================== */
.hero {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 56px;
  align-items: center;
  padding: 72px var(--pad-x) 80px;
  max-width: var(--maxw);
  margin: 0 auto;
  background: linear-gradient(180deg, var(--card), var(--bg));
}
.hero__h1 {
  font-size: 62px;
  line-height: 1.03;
  letter-spacing: -.01em;
  margin: 0 0 22px;
  color: var(--ink);
}
.hero__sub {
  font-size: 20px;
  line-height: 1.6;
  color: var(--muted);
  margin: 0 0 32px;
  max-width: 480px;
}
.hero__ctas {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  align-items: center;
}
.hero__media { position: relative; }
.hero__photo {
  width: 100%;
  height: 480px;
  object-fit: cover;
  border-radius: 20px;
}

/* ==========================================================================
   ABOUT / MEET PAIGE
   ========================================================================== */
.about {
  display: grid;
  grid-template-columns: .85fr 1fr;
  gap: 60px;
  align-items: center;
  padding: 84px var(--pad-x);
  max-width: var(--maxw);
  margin: 0 auto;
}
.about__media { position: relative; }
.about__frame {
  position: absolute;
  inset: 18px -18px -18px 18px;
  border: 1.5px solid var(--accent);
  border-radius: 20px;
}
.about__photo {
  position: relative;
  width: 100%;
  height: 480px;
  object-fit: cover;
  object-position: 32% center; /* keep Paige (left of frame) centred in the crop */
  border-radius: 20px;
}
.about__h2 {
  font-size: 42px;
  line-height: 1.1;
  margin: 0 0 18px;
  color: var(--ink);
}
.about__body {
  font-size: 17px;
  line-height: 1.65;
  color: var(--muted);
  margin: 0;
  max-width: 480px;
}

/* ==========================================================================
   LEAD SECTION — reassurance copy + phone left, form card right
   ========================================================================== */
.lead {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: center;
  padding: 84px var(--pad-x);
  max-width: var(--maxw);
  margin: 0 auto;
}
.lead__h2 {
  font-size: 40px;
  line-height: 1.12;
  margin: 0 0 16px;
  color: var(--ink);
}
.lead__body {
  font-size: 17px;
  line-height: 1.65;
  color: var(--muted);
  margin: 0 0 24px;
  max-width: 420px;
}
.lead__phone {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--serif);
  font-weight: 500;
  font-size: 20px;
  line-height: 1;
  color: var(--brand);
  text-decoration: none;
}
.lead__phone:hover { color: var(--accent); }

/* ==========================================================================
   LEAD FORM
   ========================================================================== */
.form-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 34px;
  box-shadow: 0 16px 40px rgba(16, 42, 40, .1);
}
.form { display: flex; flex-direction: column; gap: 14px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field > label {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
}
.field__optional { font-weight: 400; color: var(--muted); }
.field input,
.field select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--r-input);
  padding: 15px 16px;
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.3;
  background: var(--bg);
  color: var(--ink);
}
.field input::placeholder { color: var(--muted); }
.field input[aria-invalid="true"] { border-color: var(--accent); }
.field__error {
  font-size: 12.5px;
  color: var(--accent);
  min-height: 0;
}
.form__submit {
  margin-top: 4px;
  background: var(--brand);
  color: #fff;
  border: none;
  border-radius: var(--r-input);
  padding: 16px;
  font-family: var(--sans);
  font-weight: 600;
  font-size: 16px;
  cursor: pointer;
}
.form__submit:hover { background: var(--brand-d); }
.form__submit:disabled { opacity: .65; cursor: default; }
.form__note {
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--muted);
  text-align: center;
}
/* success state */
.form__success {
  display: none;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--r-input);
  padding: 28px 24px;
  text-align: center;
  color: var(--ink);
}
.form__success strong {
  display: block;
  font-family: var(--serif);
  font-size: 22px;
  color: var(--brand);
  margin-bottom: 6px;
}
.form.is-success > :not(.form__success) { display: none; }
.form.is-success .form__success { display: block; }

/* ==========================================================================
   FOOTER
   ========================================================================== */
.footer {
  padding: 48px var(--pad-x) 32px;
  background: var(--ink);
  color: rgba(255, 255, 255, .72);
}
.footer__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 18px;
  padding-bottom: 24px;
  border-bottom: 1px solid rgba(255, 255, 255, .12);
}
.footer .brand__name { color: #fff; }
.footer__list { font-size: 14.5px; line-height: 1.8; }
.footer__list a { color: #fff; text-decoration: none; }
.footer__list a:hover { color: var(--accent); }
.footer__dot { color: rgba(255, 255, 255, .35); margin: 0 6px; }
.footer__areas {
  font-size: 14px;
  line-height: 1.6;
  margin: 20px 0 0;
}
.footer__bottom {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  padding-top: 20px;
  font-size: 12px;
  line-height: 1.6;
  color: rgba(255, 255, 255, .5);
}

/* ==========================================================================
   MOTION PREFERENCE
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
  .btn--primary:hover { transform: none; }
}

/* ==========================================================================
   RESPONSIVE — tablet
   ========================================================================== */
@media (max-width: 1080px) {
  /* hero collapses to one column; copy leads, placeholder photo follows
     (DOM order) — a real hero image can be reprioritised later */
  .hero { grid-template-columns: 1fr; gap: 34px; }
  .about { gap: 40px; }
  .lead { gap: 40px; }
}

/* ==========================================================================
   RESPONSIVE — mobile (≤ 760px) — follows README "A · Mobile" frame
   ========================================================================== */
@media (max-width: 760px) {
  :root { --pad-x: 22px; }

  body { font-size: 16px; }

  /* --- nav: logo + About/Contact links + circular phone --- */
  .nav__inner { padding: 16px var(--pad-x); }
  .nav__right { gap: 14px; }
  .nav__call { display: none; }    /* replaced by the circle */
  /* pad the text links to a ~44px touch height, aligned with the circle */
  .nav__contact { padding: 14px 0; }

  /* 44px minimum — this is the primary call action on a phone */
  .nav__phone-circle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px; height: 44px;
    border-radius: var(--r-pill);
    background: var(--brand);
    color: #fff;
    text-decoration: none;
  }
  .nav__phone-circle:hover { background: var(--brand-d); }

  /* --- hero: copy, then photo --- */
  .hero { padding: 30px var(--pad-x) 34px; gap: 24px; }
  .hero__h1 { font-size: 38px; }
  .hero__sub { font-size: 16px; margin-bottom: 20px; }
  .hero__ctas { flex-direction: column; align-items: stretch; }
  .hero__ctas .btn { justify-content: center; }
  .hero__photo { height: 230px; }

  .form-card { padding: 24px 20px; }

  /* --- about: photo on top, frame hidden to avoid overflow --- */
  .about { grid-template-columns: 1fr; padding: 40px var(--pad-x); }
  .about__frame { display: none; }
  .about__media { order: -1; }
  .about__photo { height: 300px; }
  .about__h2 { font-size: 28px; }

  /* --- lead: copy on top, form below --- */
  .lead { grid-template-columns: 1fr; padding: 40px var(--pad-x); gap: 24px; }
  .lead__h2 { font-size: 28px; }

  /* footer stacks — contact details go one per line so the inline
     separators never wrap into an orphaned leading dot */
  .footer__top { flex-direction: column; align-items: flex-start; gap: 14px; }
  .footer__list a,
  .footer__list { display: block; }
  .footer__dot { display: none; }
  .footer__bottom { flex-direction: column; }
}

/* ==========================================================================
   FLYER / HOME-TOUR PAGE  (home-tour.html only — additive, does not touch
   the landing page). Reuses tokens, .nav, .footer, .lead, .form, .btn.
   ========================================================================== */

/* textarea in the reused form (landing page has no textarea) */
.field textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--r-input);
  padding: 15px 16px;
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.4;
  background: var(--bg);
  color: var(--ink);
  resize: vertical;
  min-height: 84px;
}
.field textarea::placeholder { color: var(--muted); }
.field textarea[aria-invalid="true"] { border-color: var(--accent); }

/* ---- Hero + gallery ----------------------------------------------------- */
.tour-hero {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 48px;
  align-items: start;
  padding: 48px var(--pad-x) 56px;
  max-width: var(--maxw);
  margin: 0 auto;
  background: linear-gradient(180deg, var(--card), var(--bg));
}
/* let the grid tracks shrink below content so the thumb strip scrolls
   (overflow-x) instead of forcing the column wider than the viewport */
.tour-gallery,
.tour-hero__info { min-width: 0; }
.tour-gallery__main {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  border-radius: var(--r-card);
  overflow: hidden;
  cursor: zoom-in;
  background: var(--line);
  box-shadow: var(--shadow-card);
}
.tour-gallery__main-img {
  width: 100%;
  height: 460px;
  object-fit: cover;
  display: block;
}
.tour-gallery__hint {
  position: absolute;
  right: 14px;
  bottom: 14px;
  background: rgba(16, 42, 40, .72);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  padding: 7px 12px;
  border-radius: var(--r-pill);
}
.tour-badge {
  position: absolute;
  top: 14px;
  left: 14px;
  padding: 7px 14px;
  border-radius: var(--r-pill);
  font-weight: 600;
  font-size: 12px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #fff;
  background: var(--brand);
}
.tour-badge[data-status="pending"]    { background: var(--accent); }
.tour-badge[data-status="open-house"] { background: var(--ink); }

.tour-gallery__thumbs {
  display: flex;
  gap: 10px;
  list-style: none;
  padding: 0;
  margin: 12px 0 0;
  overflow-x: auto;
}
.tour-thumb {
  flex: 0 0 auto;
  width: 96px;
  height: 68px;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 10px;
  overflow: hidden;
  cursor: pointer;
  background: var(--line);
}
.tour-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tour-thumb--active { border-color: var(--accent); }

/* ---- Hero info ---------------------------------------------------------- */
.tour-address {
  font-size: 34px;
  line-height: 1.12;
  color: var(--ink);
  margin: 0 0 10px;
}
.tour-price {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 30px;
  line-height: 1;
  color: var(--brand);
  margin-bottom: 18px;
}
.tour-specs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  list-style: none;
  padding: 0;
  margin: 0 0 28px;
  font-weight: 600;
  font-size: 15px;
  color: var(--ink);
}
.tour-specs__item { display: inline-flex; align-items: center; }
.tour-specs__item:not(:first-child)::before {
  content: "·";
  margin-right: 16px;
  color: var(--muted);
  font-weight: 400;
}
.tour-hero__ctas { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }

/* ---- Body sections (description + details) ------------------------------ */
.tour-body {
  max-width: 900px;
  margin: 0 auto;
  padding: 56px var(--pad-x);
}
.tour-h2 {
  font-size: 30px;
  line-height: 1.12;
  color: var(--ink);
  margin: 0 0 20px;
}
.tour-desc__p {
  font-size: 17px;
  line-height: 1.7;
  color: var(--muted);
  margin: 0 0 16px;
  max-width: 720px;
}
.tour-desc__p:last-child { margin-bottom: 0; }

.tour-details {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 0 28px;
  margin: 0;
}
.tour-details__label,
.tour-details__value {
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  font-size: 15px;
}
.tour-details__label { color: var(--muted); font-weight: 600; }
.tour-details__value { color: var(--ink); margin: 0; text-align: right; }

/* ---- Lightbox ----------------------------------------------------------- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(16, 42, 40, .93);
  padding: 24px;
}
.lightbox[hidden] { display: none; }
.lightbox__img {
  max-width: 92vw;
  max-height: 82vh;
  object-fit: contain;
  border-radius: 8px;
  display: block;
}
.lightbox__close,
.lightbox__nav {
  position: absolute;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: var(--r-pill);
  background: rgba(255, 255, 255, .14);
  color: #fff;
  cursor: pointer;
}
.lightbox__close:hover,
.lightbox__nav:hover { background: rgba(255, 255, 255, .28); }
.lightbox__close { top: 18px; right: 18px; }
.lightbox__prev { left: 18px; top: 50%; transform: translateY(-50%); }
.lightbox__next { right: 18px; top: 50%; transform: translateY(-50%); }
.lightbox__counter {
  position: absolute;
  bottom: 20px;
  left: 0;
  right: 0;
  text-align: center;
  color: rgba(255, 255, 255, .85);
  font-size: 13px;
  font-weight: 600;
  margin: 0;
}
body.tour-noscroll { overflow: hidden; }

/* ---- Flyer responsive --------------------------------------------------- */
@media (max-width: 1080px) {
  .tour-hero { grid-template-columns: 1fr; gap: 28px; }
}
@media (max-width: 760px) {
  .tour-hero { padding: 24px var(--pad-x) 32px; gap: 22px; }
  .tour-gallery__main-img { height: 260px; }
  .tour-address { font-size: 26px; }
  .tour-price { font-size: 26px; }
  .tour-hero__ctas { flex-direction: column; align-items: stretch; }
  .tour-hero__ctas .btn { justify-content: center; }
  .tour-body { padding: 36px var(--pad-x); }
  .tour-h2 { font-size: 24px; }
  .lightbox__prev { left: 8px; }
  .lightbox__next { right: 8px; }
}

/* ==========================================================================
   BRAND + EHO LOGOS (image marks) — additive; nav/footer only
   ========================================================================== */
.brand__logo {
  display: block;
  height: 48px;              /* fits the nav; scales with width:auto for retina */
  width: auto;
}
.brand__logo--footer { height: 64px; }

/* Co-branded nav lockup: Affinity logo + divider + The Kearl Team logo */
.nav__brands { display: flex; align-items: center; gap: 16px; }
.nav__brands > * { flex: none; }   /* logos keep intrinsic size, never collapse */
.nav__brand-divider { width: 1px; height: 32px; background: var(--line); }
.brand__logo--kt { height: 40px; }

.footer__eho { display: inline-flex; align-items: center; gap: 8px; }
.footer__eho-mark { display: block; height: 22px; width: auto; }

/* Two logos need the space the text links occupy, so below the desktop width
   the About/Contact links drop out of the header (the page is a short scroll
   and the Call button remains). */
@media (max-width: 900px) {
  .nav__contact { display: none; }
}
@media (max-width: 760px) {
  .brand__logo { height: 30px; }
  .brand__logo--kt { height: 26px; }
  .brand__logo--footer { height: 50px; }
  .nav__brands { gap: 10px; }
  .nav__brand-divider { height: 22px; }
}

