/* ============================================================
   Causeway — single stylesheet
   Per DESIGN.md. OKLCH palette, single Funnel family,
   modern-classified lane (not editorial-typographic).
   ============================================================ */

:root {
  /* Color (OKLCH; see DESIGN.md) */
  --bg:           oklch(98.2% 0.008 75);
  --bg-tint:      oklch(95.8% 0.012 72);
  --rule:         oklch(82% 0.015 70);
  --ink:          oklch(22% 0.012 250);
  --ink-mute:     oklch(48% 0.015 250);
  --accent:       oklch(58% 0.12 55);
  --accent-deep:  oklch(40% 0.10 55);
  --functional:   oklch(40% 0.08 200);

  /* Type */
  --display: 'Funnel Display', ui-sans-serif, system-ui, sans-serif;
  --sans:    'Funnel Sans', ui-sans-serif, system-ui, sans-serif;
  --mono:    'Departure Mono', ui-monospace, 'SF Mono', Menlo, monospace;

  /* Spacing scale (4pt base) */
  --s-1: 4px;  --s-2: 8px;  --s-3: 12px;
  --s-4: 16px; --s-5: 24px; --s-6: 32px;
  --s-7: 48px; --s-8: 64px; --s-9: 96px;
  --s-10: 128px; --s-11: 192px;

  /* Easing */
  --ease-out-expo:  cubic-bezier(0.16, 1, 0.3, 1);
  --ease-out-quart: cubic-bezier(0.25, 1, 0.5, 1);

  /* Page widths */
  --w-read: min(680px, 92vw);
  --w-grid: min(1280px, 94vw);
}

*, *::before, *::after { box-sizing: border-box; }
html, body {
  margin: 0; padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-kerning: normal;
  font-optical-sizing: auto;
  overflow-x: hidden;            /* mobile guard */
}

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

a { color: inherit; text-decoration: none; }
a:focus-visible {
  outline: 2px solid var(--functional);
  outline-offset: 3px;
}

::selection { background: var(--accent); color: var(--bg); }

/* ============ Reusable type tokens ============ */
.eyebrow {
  font-family: var(--display);
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-mute);
  margin: 0 0 var(--s-3);
}
.lotnum {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(48px, 7.4vw, 92px);
  letter-spacing: -0.02em;
  line-height: 0.95;
  color: var(--ink);
  margin: 0 0 var(--s-3);
  font-variant-numeric: tabular-nums;
}
.spec {
  font-family: var(--sans);
  font-weight: 500;
  font-size: 15px;
  letter-spacing: 0.005em;
  color: var(--ink-mute);
  margin: var(--s-3) 0 var(--s-5);
  font-variant-numeric: tabular-nums;
}
.lede {
  font-family: var(--sans);
  font-weight: 400;
  font-size: 19px;
  line-height: 1.55;
  color: var(--ink);
  max-width: 56ch;
  margin: 0 0 var(--s-6);
  text-wrap: pretty;
}

.price__num {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(28px, 3.4vw, 38px);
  letter-spacing: -0.01em;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.price__dot {
  color: var(--accent);
  margin-right: 0.18em;
  font-weight: 700;
}
.price { margin: 0 0 var(--s-6); }

/* ============ Buttons ============ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  font-family: var(--display);
  font-weight: 600;
  font-size: 16px;
  letter-spacing: 0.005em;
  cursor: pointer;
  transition: background 200ms var(--ease-out-quart), color 200ms var(--ease-out-quart);
  text-decoration: none;
}
.btn--primary {
  background: var(--accent);
  color: var(--bg);
  padding: 14px 22px;
  border: 0;
  border-radius: 0;
}
.btn--primary:hover { background: var(--accent-deep); }
.btn--primary:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
.btn--primary::after {
  content: '→';
  display: inline-block;
  transition: transform 250ms var(--ease-out-expo);
}
.btn--primary:hover::after { transform: translateX(3px); }

.btn--ghost {
  color: var(--ink);
  border: 0;
  padding: 12px 0;
  background: transparent;
}
.btn--ghost { position: relative; }
.btn--ghost::before {
  content: '';
  position: absolute;
  left: 0; right: 100%;
  bottom: 6px;
  height: 1px;
  background: var(--functional);
  transition: right 350ms var(--ease-out-expo);
}
.btn--ghost:hover::before { right: 0; }

/* ============ Header ============ */
.nav {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: var(--s-5) clamp(20px, 4vw, 56px);
  position: relative;
  z-index: 5;
}
.wordmark {
  font-family: var(--display);
  font-weight: 700;
  font-size: 22px;
  letter-spacing: -0.01em;
  color: var(--ink);
  display: inline-flex;
  align-items: baseline;
}
.wordmark__dot {
  color: var(--accent);
  margin-left: 1px;
}
.nav__links {
  display: flex;
  gap: var(--s-5);
}
.nav__links a {
  font-family: var(--sans);
  font-weight: 500;
  font-size: 15px;
  color: var(--ink);
  position: relative;
  padding: 4px 0;
}
.nav__links a:hover { color: var(--accent-deep); }

/* ============ Hero / Featured lot ============ */
.hero {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--s-6);
  padding: var(--s-6) clamp(20px, 4vw, 56px) var(--s-9);
  align-items: center;
}
.hero__photo {
  order: -1;
  overflow: hidden;
  background: var(--bg-tint);
  aspect-ratio: 4 / 3;
}
.hero__photo img {
  width: 100%; height: 100%; object-fit: cover;
  opacity: 0;
  transition: opacity 800ms var(--ease-out-expo);
}
.hero__photo img.is-loaded { opacity: 1; }

.hero__copy {
  max-width: 540px;
}
.hero__title {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(34px, 5.2vw, 56px);
  line-height: 1.04;
  letter-spacing: -0.018em;
  margin: 0 0 var(--s-4);
  text-wrap: balance;
}

@media (min-width: 880px) {
  .hero {
    grid-template-columns: minmax(360px, 5fr) minmax(320px, 4fr);
    gap: clamp(40px, 6vw, 96px);
    padding: var(--s-9) clamp(20px, 4vw, 56px) var(--s-11);
    align-items: end;
  }
  .hero__photo { order: 0; aspect-ratio: 3 / 2; }
  .hero__copy { padding-bottom: var(--s-7); }
}

/* ============ Inventory ============ */
.inventory {
  padding: var(--s-9) clamp(20px, 4vw, 56px) var(--s-9);
  max-width: var(--w-grid);
  margin: 0 auto;
}
.inventory__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--s-3);
  margin-bottom: var(--s-7);
}
.inventory__head h2 {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(28px, 4vw, 44px);
  letter-spacing: -0.015em;
  margin: 0;
  line-height: 1.05;
}
.inventory__sub {
  font-family: var(--sans);
  font-weight: 400;
  font-size: 15px;
  color: var(--ink-mute);
  margin: 0;
  font-variant-numeric: tabular-nums;
}

.lots {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--s-7) var(--s-5);
}
@media (min-width: 640px) {
  .lots { grid-template-columns: repeat(2, 1fr); gap: var(--s-7) var(--s-5); }
  .lot--wide { grid-column: span 2; }
}
@media (min-width: 1000px) {
  .lots { grid-template-columns: repeat(3, 1fr); gap: var(--s-8) var(--s-6); }
  .lot--wide { grid-column: span 2; }
}

.lot { margin: 0; }
.lot__link {
  display: block;
  color: inherit;
  text-decoration: none;
}
.lot__photo {
  overflow: hidden;
  background: var(--bg-tint);
  aspect-ratio: 3 / 2;
  margin-bottom: var(--s-3);
}
.lot__photo img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 600ms var(--ease-out-expo);
}
@media (hover: hover) {
  .lot__link:hover .lot__photo img { transform: scale(1.03); }
}
/* Mobile-first: stack the lot meta. Eyebrow line then a name+price row.   */
.lot__meta {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: baseline;
  column-gap: var(--s-4);
  row-gap: var(--s-1);
  padding-top: var(--s-3);
}
.lot__num {
  grid-column: 1 / -1;
  font-family: var(--display);
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-mute);
  font-variant-numeric: tabular-nums;
}
.lot__name {
  grid-column: 1;
  font-family: var(--sans);
  font-weight: 500;
  font-size: 17px;
  color: var(--ink);
  line-height: 1.3;
}
.lot__price {
  grid-column: 2;
  grid-row: 2;             /* mobile: same row as name */
  font-family: var(--display);
  font-weight: 700;
  font-size: 18px;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
  white-space: nowrap;
  text-align: right;
  align-self: baseline;
}
.lot__detail {
  grid-column: 1 / -1;
  font-family: var(--sans);
  font-weight: 400;
  font-size: 14px;
  color: var(--ink-mute);
  font-variant-numeric: tabular-nums;
  margin-top: 2px;
}

@media (min-width: 1000px) {
  .lot--wide .lot__name { font-size: 22px; }
  .lot--wide .lot__price { font-size: 22px; }
}

.inventory__foot {
  margin-top: var(--s-8);
  display: flex;
  justify-content: flex-start;
}
.inventory__more {
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.55;
  color: var(--ink);
  margin: 0;
  max-width: 64ch;
}
.link {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--functional);
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
  transition: color 200ms var(--ease-out-quart);
}
.link:hover { color: var(--accent-deep); }

/* ============ Hairline rule ============ */
.rule {
  border: 0;
  height: 1px;
  background: var(--rule);
  margin: 0;
  width: 100%;
}

/* ============ About / Process ============ */
.about {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--s-7);
  padding: var(--s-9) clamp(20px, 4vw, 56px);
  max-width: var(--w-grid);
  margin: 0 auto;
  align-items: start;
}
@media (min-width: 900px) {
  .about {
    grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
    gap: clamp(48px, 6vw, 96px);
    padding-top: var(--s-11);
    padding-bottom: var(--s-11);
  }
}
.about__copy h2 {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(32px, 4.6vw, 52px);
  line-height: 1.05;
  letter-spacing: -0.018em;
  margin: 0 0 var(--s-5);
  text-wrap: balance;
}
.about__copy p {
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  margin: 0 0 var(--s-4);
  color: var(--ink);
  max-width: 56ch;
}

.inspection {
  background: var(--bg-tint);
  padding: var(--s-6);
  margin: 0;
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.7;
  color: var(--ink);
  overflow-x: auto;
  white-space: pre;
  border: 0;
  border-radius: 0;
  font-variant-numeric: tabular-nums;
}
.inspection code {
  font-family: inherit;
  white-space: pre;
}

/* ============ Visit ============ */
.visit {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--s-7);
  padding: var(--s-9) clamp(20px, 4vw, 56px) var(--s-11);
  max-width: var(--w-grid);
  margin: 0 auto;
}
.visit__photo {
  overflow: hidden;
  background: var(--bg-tint);
  aspect-ratio: 4 / 3;
}
.visit__photo img { width: 100%; height: 100%; object-fit: cover; }

@media (min-width: 900px) {
  .visit {
    grid-template-columns: minmax(0, 6fr) minmax(0, 5fr);
    gap: clamp(48px, 6vw, 96px);
    align-items: start;
  }
  .visit__photo { aspect-ratio: 4 / 3; order: 2; }
  .visit__copy { order: 1; padding-top: var(--s-5); }
}

.visit__copy h2 {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(32px, 4.6vw, 52px);
  line-height: 1.05;
  letter-spacing: -0.018em;
  margin: 0 0 var(--s-4);
  text-wrap: balance;
}
.visit__copy p {
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  margin: 0 0 var(--s-6);
  max-width: 52ch;
}
.visit__details {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--s-5);
  margin: 0 0 var(--s-6);
  font-family: var(--sans);
}
@media (min-width: 600px) {
  .visit__details { grid-template-columns: repeat(3, 1fr); gap: var(--s-5); }
}
.visit__details > div {}
.visit__details dt {
  font-family: var(--display);
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-mute);
  margin: 0 0 var(--s-2);
}
.visit__details dd {
  margin: 0;
  font-size: 15px;
  line-height: 1.5;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

/* ============ Footer ============ */
.foot {
  border-top: 1px solid var(--rule);
  padding: var(--s-7) clamp(20px, 4vw, 56px) var(--s-7);
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--s-3);
  max-width: var(--w-grid);
  margin: 0 auto;
}
.foot__mark {
  font-family: var(--display);
  font-weight: 700;
  font-size: 18px;
  letter-spacing: -0.01em;
  margin: 0;
}
.foot__tagline {
  font-family: var(--sans);
  font-size: 15px;
  color: var(--ink);
  margin: 0;
}
.foot__legal {
  font-family: var(--sans);
  font-size: 13px;
  color: var(--ink-mute);
  margin: var(--s-4) 0 0;
  line-height: 1.5;
}
.foot__legal a {
  color: var(--functional);
  text-decoration: underline;
  text-underline-offset: 3px;
}
@media (min-width: 760px) {
  .foot {
    grid-template-columns: auto 1fr auto;
    align-items: baseline;
    gap: var(--s-7);
  }
  .foot__legal { grid-column: 1 / -1; margin-top: var(--s-5); }
}

/* ============ Reveal-on-scroll (progressive enhancement) ============
   Default state: tiles visible. No-JS users and bots see real content.
   When JS loads it adds `js` to <html>, which hides tiles until the
   IntersectionObserver marks each as `.is-visible`.                      */
.lot {
  transition: opacity 700ms var(--ease-out-expo), transform 700ms var(--ease-out-expo);
  transition-delay: calc(var(--i, 0) * 60ms);
}
html.js .lot {
  opacity: 0;
  transform: translateY(8px);
}
html.js .lot.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* iOS form input fix (per CLAUDE.md / feedback memory): no auto-zoom */
input, select, textarea, button {
  font-size: max(16px, 1rem);
  font-family: inherit;
}

/* ============ Reduced motion ============ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  .lot { opacity: 1; transform: none; }
  .hero__photo img { opacity: 1; }
  .lot__link:hover .lot__photo img { transform: none; }
  .btn--primary:hover::after { transform: none; }
}
