/* ============================================================
   AK CUSTOM HOMES — v2 LIGHT THEME
   Companion sheet for the 2.0 home pages. Load AFTER style.css:
   it keeps the type scale, animations and layout primitives from
   the original and re-tones everything that assumed a black page.
   ============================================================ */

:root {
  /* Warm paper tones — the cream ground the whole 2.0 sits on */
  --cream:       #F7F4EF;
  --cream-2:     #F1ECE4;
  --cream-3:     #EAE3D8;
  --ink:         #171513;   /* near-black with a warm cast, for body copy */
  --ink-soft:    #4A4540;
  --ink-mute:    #7C746C;
  --line:        rgba(23,21,19,0.10);
  --line-soft:   rgba(23,21,19,0.06);

  /* Faint grid ground */
  --grid-line:   rgba(23,21,19,0.045);
}

/* The 2.0 pages opt in with class="v2" so 1.0 is untouched. */
body.v2 {
  background: var(--cream);
  color: var(--ink);
}

/* ────────────────────────────────────────
   Faint grid ground
   A single square grid at one scale, barely there. No drawing behind the
   copy — anything more legible than this competes with the content on top.
──────────────────────────────────────── */
.bp {
  position: relative;
  background-color: var(--cream);
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 88px 88px;
}
.bp-2 { background-color: var(--cream-2); }
.bp > * { position: relative; z-index: 1; }

/* ────────────────────────────────────────
   Glass — the mirrored panel from the reference site.
   Blur + saturate behind, a lit top edge, a dark bottom edge.
──────────────────────────────────────── */
.glass {
  background: rgba(255,255,255,0.55);
  backdrop-filter: blur(22px) saturate(160%);
  -webkit-backdrop-filter: blur(22px) saturate(160%);
  border: 1px solid rgba(255,255,255,0.75);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.9),
    inset 0 -1px 0 rgba(23,21,19,0.05),
    0 20px 60px rgba(23,21,19,0.08);
}
/* Dark variant — for glass sitting over photography or video */
.glass-dark {
  background: rgba(18,17,16,0.42);
  backdrop-filter: blur(20px) saturate(150%);
  -webkit-backdrop-filter: blur(20px) saturate(150%);
  border: 1px solid rgba(255,255,255,0.14);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.22),
    inset 0 -1px 0 rgba(0,0,0,0.25),
    0 24px 70px rgba(0,0,0,0.30);
}
/* Vertical hairlines between glass cells, as on the reference nav */
.glass-split > * + * { border-left: 1px solid rgba(255,255,255,0.55); }
.glass-dark.glass-split > * + * { border-left: 1px solid rgba(255,255,255,0.13); }

/* ────────────────────────────────────────
   Navigation — light
──────────────────────────────────────── */
.v2 #navbar { border-bottom: 1px solid transparent; }
.v2 #navbar.nav-transparent { background: transparent; }
.v2 #navbar.nav-scrolled {
  background: rgba(247,244,239,0.72);
  backdrop-filter: blur(24px) saturate(160%);
  -webkit-backdrop-filter: blur(24px) saturate(160%);
  border-bottom-color: var(--line);
  box-shadow: 0 4px 30px rgba(23,21,19,0.05);
}
/* Over the video the links stay white; once scrolled onto cream they invert. */
.v2 #navbar.nav-transparent .nav-links a { color: rgba(255,255,255,0.86); }
.v2 #navbar.nav-transparent .nav-links a:hover,
.v2 #navbar.nav-transparent .nav-links a.active { color: #fff; }
.v2 #navbar.nav-scrolled .nav-links a { color: var(--ink-soft); }
.v2 #navbar.nav-scrolled .nav-links a:hover,
.v2 #navbar.nav-scrolled .nav-links a.active { color: var(--ink); }

.v2 #navbar.nav-transparent .nav-contact {
  color: #fff !important;
  border-color: rgba(255,255,255,0.45) !important;
}
.v2 #navbar.nav-scrolled .nav-contact {
  color: var(--ink) !important;
  border-color: rgba(23,21,19,0.28) !important;
}
.v2 .nav-contact:hover {
  background: var(--red) !important;
  border-color: var(--red) !important;
  color: #fff !important;
}
.v2 #navbar.nav-scrolled .nav-toggle span { background: var(--ink); }

/* The mark is dark-on-transparent, so it needs lifting off the video */
.v2 #navbar.nav-transparent .nav-logo img {
  filter: drop-shadow(0 2px 10px rgba(0,0,0,0.55));
}

.v2 .nav-mobile {
  background: rgba(247,244,239,0.96);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-top: 1px solid var(--line);
}
.v2 .nav-mobile a { color: var(--ink-soft); }
.v2 .nav-mobile a:hover { color: var(--ink); }

/* ────────────────────────────────────────
   Buttons on cream
──────────────────────────────────────── */
.v2 .btn-ink {
  display: inline-block;
  font-family: var(--font-sans);
  font-size: 10.5px; font-weight: 500; letter-spacing: 3px;
  text-transform: uppercase; padding: 16px 40px;
  color: var(--ink); border: 1px solid rgba(23,21,19,0.30);
  transition: var(--t);
}
.v2 .btn-ink:hover { background: var(--ink); color: var(--cream); border-color: var(--ink); }
.v2 .btn-solid {
  display: inline-block;
  font-family: var(--font-sans);
  font-size: 10.5px; font-weight: 500; letter-spacing: 3px;
  text-transform: uppercase; padding: 16px 40px;
  color: var(--cream); background: var(--ink); border: 1px solid var(--ink);
  transition: var(--t);
}
.v2 .btn-solid:hover { background: var(--red); border-color: var(--red); }
.v2 .btn-arrow.ink { color: var(--ink); }

/* ────────────────────────────────────────
   Section labels & rules on cream
──────────────────────────────────────── */
.v2 .label { color: var(--red); }
.v2 .rule-ink { width: 100%; height: 1px; background: var(--line); margin: 16px 0 40px; }

/* ────────────────────────────────────────
   PROPERTY MAP
──────────────────────────────────────── */
.map-section { padding: 130px 64px; position: relative; overflow: hidden; }
.map-inner { max-width: 1400px; margin: 0 auto; }
.map-head { display: grid; grid-template-columns: 1fr auto; gap: 48px; align-items: end; margin-bottom: 48px; }
.map-head h2 {
  font-family: var(--font-serif); font-size: clamp(38px,4.6vw,64px);
  font-weight: 400; line-height: 1.02; color: var(--ink);
}
.map-head h2 em { font-style: italic; color: var(--red); }
.map-head-meta { text-align: right; font-size: 13px; line-height: 1.9; color: var(--ink-mute); }
.map-head-meta strong {
  display: block; font-family: var(--font-serif);
  font-size: 40px; font-weight: 400; color: var(--ink); line-height: 1;
}

/* Map + rail sit in one rounded, glassed frame */
.map-frame {
  display: grid; grid-template-columns: 1fr 340px;
  /* Fixed height so the 24-entry rail scrolls inside the frame rather than
     stretching the row and leaving dead space beside the map. */
  height: 640px;
  border-radius: 22px; overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: 0 30px 80px rgba(23,21,19,0.10);
  background: #fff;
}
#akMap { height: 100%; width: 100%; background: var(--cream-2); }
/* Leaflet paints its own attribution/controls — tone them to the page */
.leaflet-container { font-family: var(--font-sans); background: var(--cream-2) !important; }
/* OSM tiles are far too saturated for this palette — desaturate and warm them
   so the basemap reads as paper the pins sit on. */
.leaflet-tile-pane {
  filter: grayscale(0.92) brightness(1.06) contrast(0.88) sepia(0.14);
}
.leaflet-control-attribution {
  background: rgba(255,255,255,0.78) !important;
  font-size: 10px !important; color: var(--ink-mute) !important;
}
.leaflet-control-attribution a { color: var(--ink-soft) !important; }
.leaflet-bar a {
  color: var(--ink) !important; border-color: var(--line) !important;
  background: rgba(255,255,255,0.9) !important;
}

/* Pin — a numbered dot that grows into the active state */
.ak-pin {
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--ink); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 600; letter-spacing: 0;
  border: 2px solid #fff;
  box-shadow: 0 6px 18px rgba(23,21,19,0.35);
  transition: transform 0.22s var(--ease), background 0.22s var(--ease);
  cursor: pointer;
}
.ak-pin:hover { transform: scale(1.18); }
.ak-pin.is-active { background: var(--red); transform: scale(1.28); }
.ak-pin.is-featured { background: var(--red); width: 36px; height: 36px; font-size: 12px; }

/* Popup — thumbnail card that links through to the project page */
.leaflet-popup-content-wrapper {
  border-radius: 14px !important; padding: 0 !important;
  overflow: hidden; box-shadow: 0 20px 50px rgba(23,21,19,0.22) !important;
}
.leaflet-popup-content { margin: 0 !important; width: 248px !important; }
.leaflet-popup-tip { box-shadow: none !important; }
.map-pop-img { height: 140px; background-size: cover; background-position: center; background-color: var(--cream-3); }
.map-pop-body { padding: 16px 18px 18px; background: #fff; }
.map-pop-body .hood {
  font-size: 9.5px; letter-spacing: 2.6px; text-transform: uppercase;
  color: var(--red); display: block; margin-bottom: 8px;
}
.map-pop-body h4 {
  font-family: var(--font-serif); font-size: 21px; font-weight: 500;
  color: var(--ink); line-height: 1.15; margin-bottom: 10px;
}
.map-pop-body .meta { font-size: 12.5px; color: var(--ink-mute); margin-bottom: 14px; }
.map-pop-body .go {
  font-size: 9.5px; letter-spacing: 2.4px; text-transform: uppercase;
  color: var(--ink); display: inline-flex; gap: 9px; align-items: center;
  border-bottom: 1px solid var(--line); padding-bottom: 4px;
}
.map-pop-body .go:hover { color: var(--red); border-color: rgba(197,59,42,0.5); }

/* Side rail — every project, scrollable, synced to the pins */
.map-rail { border-left: 1px solid var(--line); display: flex; flex-direction: column; background: #fff; min-height: 0; }
.map-rail-head {
  padding: 20px 24px; border-bottom: 1px solid var(--line);
  font-size: 9.5px; letter-spacing: 2.8px; text-transform: uppercase; color: var(--ink-mute);
  display: flex; justify-content: space-between; align-items: center;
}
.map-rail-list { overflow-y: auto; flex: 1 1 auto; min-height: 0; }
.map-rail-item {
  display: grid; grid-template-columns: 62px 1fr; gap: 14px; align-items: center;
  padding: 13px 22px; border-bottom: 1px solid var(--line-soft);
  cursor: pointer; transition: background var(--tf);
  width: 100%; text-align: left;
}
.map-rail-item:hover, .map-rail-item.is-active { background: var(--cream-2); }
.map-rail-item.is-active { box-shadow: inset 3px 0 0 var(--red); }
.map-rail-thumb {
  width: 62px; height: 46px; border-radius: 7px;
  background-size: cover; background-position: center; background-color: var(--cream-3);
}
.map-rail-addr { display: block; font-size: 13.5px; font-weight: 500; color: var(--ink); line-height: 1.3; }
.map-rail-hood {
  display: block;
  font-size: 9.5px; letter-spacing: 1.8px; text-transform: uppercase;
  color: var(--ink-mute); margin-top: 4px;
}

/* ────────────────────────────────────────
   Footer — light, with a glass base bar
──────────────────────────────────────── */
.v2 footer { background: var(--cream-2); border-top: 1px solid var(--line); color: var(--ink); }
.v2 .footer-grid { border-bottom: 1px solid var(--line); }
.v2 .footer-brand p { color: var(--ink-mute); }
.v2 .footer-col h5 { color: var(--ink-mute); }
.v2 .footer-col a, .v2 .footer-col p { color: var(--ink-soft); }
.v2 .footer-col a:hover { color: var(--red); }
.v2 .footer-bottom p { color: rgba(23,21,19,0.40); }
/* The glass slab the footer sits on */
.v2 .footer-glass {
  max-width: 1400px; margin: 0 auto 40px;
  border-radius: 18px; padding: 22px 32px;
  display: flex; justify-content: space-between; align-items: center; gap: 24px;
  flex-wrap: wrap;
}
.v2 .footer-glass p {
  font-family: var(--font-serif); font-size: 22px; color: var(--ink); font-weight: 400;
}

/* ────────────────────────────────────────
   PROJECT DETAIL PAGES
──────────────────────────────────────── */
.proj-hero {
  padding-top: var(--nav-h);
  min-height: 62vh; display: flex; align-items: flex-end;
  position: relative; overflow: hidden; background: var(--cream-2);
}
.proj-hero-img { position: absolute; inset: 0; background-size: cover; background-position: center; }
.proj-hero-img::after {
  content: ''; position: absolute; inset: 0;
  /* Bottom wash for the title, plus a top wash so the nav reads over a
     bright facade. */
  background:
    linear-gradient(to top, rgba(12,11,10,0.88) 0%, rgba(12,11,10,0.34) 46%, rgba(12,11,10,0.00) 78%),
    linear-gradient(to bottom, rgba(12,11,10,0.55) 0%, rgba(12,11,10,0.10) 22%, rgba(12,11,10,0.00) 40%);
}
.proj-hero-inner { position: relative; z-index: 2; max-width: 1400px; width: 100%; margin: 0 auto; padding: 64px; }
.proj-crumb { font-size: 10px; letter-spacing: 3px; text-transform: uppercase; color: rgba(255,255,255,0.6); margin-bottom: 18px; }
.proj-crumb a:hover { color: #fff; }
.proj-crumb span { color: var(--red); }
.proj-hero h1 {
  font-family: var(--font-serif); font-size: clamp(42px,6.4vw,84px);
  font-weight: 400; line-height: 0.98; color: #fff; margin-bottom: 22px;
}
.proj-tags { display: flex; gap: 10px; flex-wrap: wrap; }
.proj-tag {
  font-size: 9.5px; letter-spacing: 2.4px; text-transform: uppercase;
  padding: 9px 16px; border-radius: 999px; color: #fff;
}
.proj-tag.is-status { background: var(--red); border-color: var(--red); }

.proj-body { padding: 100px 64px 120px; }
.proj-inner { max-width: 1400px; margin: 0 auto; display: grid; grid-template-columns: 1.35fr 1fr; gap: 88px; align-items: start; }
.proj-lede { font-family: var(--font-serif); font-size: 27px; line-height: 1.45; color: var(--ink); margin-bottom: 40px; font-weight: 400; }
.proj-specs-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(120px,1fr));
  gap: 1px; background: var(--line); border: 1px solid var(--line);
  border-radius: 14px; overflow: hidden; margin-bottom: 44px;
}
.proj-spec { background: var(--cream); padding: 24px 22px; }
.proj-spec b { display: block; font-family: var(--font-serif); font-size: 34px; font-weight: 400; color: var(--ink); line-height: 1; margin-bottom: 8px; }
.proj-spec span { font-size: 9.5px; letter-spacing: 2.4px; text-transform: uppercase; color: var(--ink-mute); }
.proj-feats li {
  font-size: 15px; line-height: 1.6; color: var(--ink-soft);
  padding: 14px 0 14px 22px; border-bottom: 1px solid var(--line-soft); position: relative;
}
.proj-feats li::before {
  content: ''; position: absolute; left: 0; top: 22px;
  width: 5px; height: 5px; border-radius: 50%; background: var(--red);
}
.proj-aside { border-radius: 18px; padding: 34px 32px; position: sticky; top: calc(var(--nav-h) + 24px); }
.proj-aside h5 { font-size: 9.5px; letter-spacing: 3px; text-transform: uppercase; color: var(--ink-mute); margin-bottom: 22px; }
.proj-aside .price { font-family: var(--font-serif); font-size: 40px; color: var(--ink); line-height: 1; margin-bottom: 8px; }
.proj-aside .price-lbl { font-size: 11px; letter-spacing: 2px; text-transform: uppercase; color: var(--ink-mute); }
.proj-aside dl { margin: 26px 0 30px; border-top: 1px solid var(--line); }
.proj-aside dt { font-size: 9.5px; letter-spacing: 2.2px; text-transform: uppercase; color: var(--ink-mute); padding-top: 16px; }
.proj-aside dd { font-size: 15px; color: var(--ink); padding-bottom: 16px; border-bottom: 1px solid var(--line-soft); }
.proj-pending {
  border: 1px dashed rgba(23,21,19,0.22); border-radius: 14px;
  padding: 30px 30px; background: rgba(255,255,255,0.5); margin-bottom: 40px;
}
.proj-pending h4 { font-family: var(--font-serif); font-size: 23px; color: var(--ink); margin-bottom: 12px; font-weight: 500; }
.proj-pending p { font-size: 15px; line-height: 1.8; color: var(--ink-mute); }

.proj-more { padding: 0 64px 120px; }
.proj-more-inner { max-width: 1400px; margin: 0 auto; }
.proj-more h3 { font-family: var(--font-serif); font-size: 32px; color: var(--ink); margin-bottom: 32px; font-weight: 400; }
.proj-more-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 24px; }
.proj-more-card { display: block; }
.proj-more-card .thumb {
  display: block;
  height: 190px; border-radius: 14px; background-size: cover; background-position: center;
  background-color: var(--cream-3); margin-bottom: 14px;
  transition: transform var(--t), box-shadow var(--t);
}
.proj-more-card:hover .thumb { transform: translateY(-5px); box-shadow: 0 22px 50px rgba(23,21,19,0.15); }
.proj-more-card b { display: block; font-size: 14.5px; font-weight: 500; color: var(--ink); }
.proj-more-card span { font-size: 9.5px; letter-spacing: 2px; text-transform: uppercase; color: var(--ink-mute); }

/* ────────────────────────────────────────
   Responsive
──────────────────────────────────────── */
@media (max-width: 1100px) {
  .map-frame { grid-template-columns: 1fr; height: auto; }
  .map-rail { border-left: none; border-top: 1px solid var(--line); }
  .map-rail-list { max-height: 320px; }
  #akMap { height: 480px; }
  .proj-inner { grid-template-columns: 1fr; gap: 48px; }
  .proj-aside { position: static; }
  .proj-more-grid { grid-template-columns: repeat(2,1fr); }
}
@media (max-width: 768px) {
  .map-section { padding: 64px 20px; }
  .map-head { grid-template-columns: 1fr; gap: 20px; }
  .map-head-meta { text-align: left; }
  #akMap { height: 380px; }
  .map-frame { height: auto; }
  .proj-hero-inner { padding: 40px 20px; }
  .proj-body { padding: 56px 20px 72px; }
  .proj-more { padding: 0 20px 72px; }
  .proj-more-grid { grid-template-columns: 1fr 1fr; gap: 16px; }
  .proj-more-card .thumb { height: 130px; }
  .v2 .footer-glass { padding: 20px; }
}

/* Popup card is a single link target */
.map-pop { display: block; color: inherit; }
.map-pop:hover .go { color: var(--red); }

/* ────────────────────────────────────────
   Logo swap
   ak.png carries a WHITE wordmark, so it only reads over the video.
   ak-dark.png is the same mark with ink lettering, for cream grounds.
──────────────────────────────────────── */
.v2 .nav-logo { position: relative; }
.v2 .nav-logo img { height: 44px; width: auto; display: block; }
.v2 #navbar.nav-transparent .logo-dark { display: none; }
.v2 #navbar.nav-scrolled   .logo-light { display: none; }
/* Option B's bar is dark glass in both states, so it always takes the white mark */
.v2b .logo-dark { display: none !important; }
.v2b #navbar.nav-scrolled .logo-light { display: block !important; }

/* ────────────────────────────────────────
   Map — preview entries
   Located homes with no photography or detail page yet. They read as
   secondary to the built work: hollow pin, no thumbnail, nothing clickable.
──────────────────────────────────────── */
.ak-pin.is-preview {
  background: rgba(255,255,255,0.94);
  color: var(--ink-mute);
  border: 2px solid var(--ink-mute);
  font-weight: 500;
  box-shadow: 0 4px 12px rgba(23,21,19,0.22);
}
.ak-pin.is-preview:hover,
.ak-pin.is-preview.is-active { background: #fff; color: var(--red); border-color: var(--red); }

.map-pop.is-preview { display: block; padding-top: 4px; }
.map-pop-body .meta.is-pending { color: var(--ink-mute); font-style: italic; margin-bottom: 0; }

.map-rail-thumb.is-empty {
  background: repeating-linear-gradient(
    -45deg, var(--cream-2), var(--cream-2) 6px, var(--cream-3) 6px, var(--cream-3) 7px);
  border: 1px solid var(--line);
}
.map-rail-item.is-preview .map-rail-addr { color: var(--ink-soft); font-weight: 400; }
.map-rail-item.is-preview .map-rail-hood { font-style: italic; }
