/* ==========================================================
   AURORA ESTATES — ring gallery
   Tokens follow the AURORA ESTATES design system:
   one green accent, black/white/gray, Inter 400/700,
   2px radius everywhere, hairlines instead of shadows.
   ========================================================== */

:root {
  /* colour */
  --primary: #76b900;
  --primary-dark: #5a8d00;
  --primary-ink: #3d6e00;
  --on-primary: #000000;
  --canvas: #ffffff;
  --page: #fafafa;
  --surface-soft: #f7f7f7;
  --surface-dark: #000000;
  --surface-elevated: #1a1a1a;
  --hairline: #cccccc;
  --hairline-strong: #5e5e5e;
  --ink: #000000;
  --body: #1a1a1a;
  --mute: #757575;
  --ash: #a7a7a7;
  --on-dark: #ffffff;
  --on-dark-mute: rgba(255, 255, 255, 0.7);

  /* type */
  --font-sans: Inter, Arial, Helvetica, sans-serif;

  /* spacing (8px base) */
  --space-4: 4px;
  --space-8: 8px;
  --space-12: 12px;
  --space-16: 16px;
  --space-24: 24px;
  --space-32: 32px;
  --space-48: 48px;
  --space-64: 64px;
  --space-80: 80px;

  /* shape */
  --radius-sm: 2px;
  --control-height: 44px;
  --corner-square: 12px;
  --nav-height: 64px;
  --container-max: 1280px;
  --gutter: 48px;

  /* ring card size — script.js reads these */
  --card-w: 38px;
  --card-h: 108px;

  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--page);
  color: var(--body);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
h1, h2, p { margin: 0; }
a { color: inherit; }
button { font: inherit; color: inherit; }
img { display: block; max-width: 100%; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }

.skip {
  position: absolute; left: 16px; top: -60px; z-index: 200;
  background: var(--ink); color: var(--on-dark); padding: 10px 16px; font-weight: 700; text-decoration: none;
}
.skip:focus { top: 12px; }

/* ---------- underline link / button ---------- */
.ul {
  position: relative;
  display: inline-flex; align-items: center;
  min-height: var(--control-height);
  padding: 0; border: 0; background: none; cursor: pointer;
  font-size: 16px; font-weight: 700; color: var(--ink); text-decoration: none;
}
.ul::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 10px; height: 2px;
  background: var(--ink);
  transform: scaleX(0); transform-origin: right;
  transition: transform 0.45s var(--ease);
}
.ul:hover::after, .ul.is-active::after { transform: scaleX(1); transform-origin: left; }
.ul.is-active::after { background: var(--primary); }

/* ---------- buttons (design-system .ae-btn) ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-8);
  min-height: var(--control-height); padding: 0 var(--space-24);
  border-radius: var(--radius-sm); border: 2px solid transparent;
  font-size: 16px; line-height: 1.25; font-weight: 700; white-space: nowrap;
  text-decoration: none; cursor: pointer;
  transition: background-color 0.12s linear, color 0.12s linear;
}
.btn--primary { background: var(--primary); color: var(--on-primary); border-color: var(--primary); }
.btn--primary:active { background: var(--primary-dark); border-color: var(--primary-dark); }
.btn--outline { background: transparent; color: var(--ink); border-color: var(--primary); }
.btn--outline:active { background: var(--surface-soft); }

.textbtn {
  min-height: var(--control-height); padding: 0; border: 0; background: none; cursor: pointer;
  font-size: 14px; font-weight: 700; color: var(--ink);
  text-decoration: underline; text-underline-offset: 4px;
}

.tool {
  min-height: var(--control-height); padding: 0; border: 0; background: none; cursor: pointer;
  font-size: 16px; font-weight: 700; color: var(--ink);
  text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 6px;
  transition: color 0.2s;
}
.tool:hover { color: var(--primary-ink); }

.eyebrow {
  display: flex; align-items: center; gap: var(--space-8);
  font-size: 14px; line-height: 1.43; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--mute);
}
.eyebrow::before { content: ""; width: 8px; height: 8px; background: var(--primary); }

/* ==========================================================
   Header
   ========================================================== */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 60;
  height: var(--nav-height);
  display: flex; align-items: center; gap: 40px;
  padding: 0 var(--gutter);
  background: var(--page);
}
.logo {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 17px; font-weight: 700; letter-spacing: 0.12em; color: var(--ink);
  text-decoration: none; white-space: nowrap;
}
.logo i { display: block; width: 12px; height: 12px; background: var(--primary); }
.nav__links { display: flex; gap: 28px; flex: 1; }
.nav__lang { display: flex; align-items: center; gap: var(--space-8); font-size: 14px; }
.nav__lang .ul { font-size: 14px; }
.nav__lang span { color: var(--mute); }
.nav__burger { display: none; margin-left: auto; }

.drawer {
  position: fixed; inset: var(--nav-height) 0 auto 0; z-index: 59;
  background: var(--canvas); border-bottom: 1px solid var(--hairline);
  padding: 8px 16px 16px;
}
.drawer a {
  display: flex; align-items: center; min-height: 56px;
  font-size: 18px; font-weight: 700; text-decoration: none; color: var(--ink);
  border-bottom: 1px solid var(--hairline);
}
.drawer__lang { padding-top: 12px; font-weight: 700; }
.drawer__lang button { border: 0; background: none; min-height: 44px; font-weight: 700; cursor: pointer; padding: 0 4px; }

/* ==========================================================
   Hero + ring
   ========================================================== */
.hero {
  position: relative;
  height: 100vh; height: 100svh;
  min-height: 700px;
  overflow: hidden;
  background: var(--page);
}

.tools {
  position: absolute; z-index: 40;
  top: calc(var(--nav-height) + 4px); left: var(--gutter); right: var(--gutter);
  display: flex; justify-content: space-between;
  pointer-events: none;
}
.tools .tool { pointer-events: auto; }

.hero__copy {
  position: absolute; z-index: 30; left: 50%; top: 108px;
  width: min(1040px, calc(100% - 32px));
  transform: translateX(-50%);
  text-align: center; pointer-events: none;
}
.hero__title, .hero__sub { transition: opacity 0.35s var(--ease); }
.hero.is-previewing .hero__title, .hero.is-previewing .hero__sub { opacity: 0; }
.hero__title {
  font-size: clamp(34px, min(4.8vw, 8.2vh), 76px);
  line-height: 1.02; font-weight: 700; letter-spacing: -0.035em; color: var(--ink);
}
.hero__sub {
  max-width: 600px; margin: 16px auto 0;
  font-size: clamp(16px, 1.35vw, 20px); line-height: 1.45; color: var(--body);
}

.ring {
  position: absolute; inset: 0; z-index: 10;
  perspective: 1300px;
  touch-action: pan-y;
  transition: opacity 0.5s var(--ease);
}
.ring:focus-visible { outline: none; }
.ring:focus-visible ~ .center::after {
  content: "Arrow keys browse · Enter selects"; position: absolute; left: 0; right: 0; top: 100%;
  margin-top: 8px; font-size: 12px; color: var(--mute);
}
.ring__stage {
  position: absolute; left: 50%; top: 60%;
  width: 0; height: 0;
  transform-style: preserve-3d;
}

/* ring card */
.card {
  position: absolute;
  left: calc(var(--card-w) / -2); top: calc(var(--card-h) / -2);
  width: var(--card-w); height: var(--card-h);
  margin: 0; padding: 0;
  border: 1px solid rgba(0, 0, 0, 0.16);
  border-radius: var(--radius-sm);
  background: #e4e4e1;
  overflow: hidden;
  cursor: pointer;
  opacity: 0;
  will-change: transform, opacity;
  transition: border-color 0.3s, filter 0.4s;
}
.card img { width: 100%; height: 100%; object-fit: cover; pointer-events: none; user-select: none; -webkit-user-drag: none; }
.card.is-far { filter: blur(1px) saturate(0.85); }
.card.is-on { border-color: var(--ink); filter: none; }
.card.is-lock::after {
  content: ""; position: absolute; left: -1px; top: -1px; width: 8px; height: 8px; background: var(--primary);
}

/* center preview — sits at z = 0 inside the 3D stage, so the back of the ring
   passes behind it and the front passes in front of it */
.center {
  position: absolute; z-index: 15; left: 50%; top: 40%; width: 560px;
  /* --pv-scale is set by script.js so the preview always fits inside the ring */
  transform: translateX(-50%) scale(var(--pv-scale, 1));
  transform-origin: 50% 0;
  display: flex; justify-content: center; text-align: center;
  pointer-events: none;
}
.pv { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.pv.is-in { animation: pvIn 0.5s var(--ease) both; }
.pv__media {
  position: relative; display: block;
  width: 290px; aspect-ratio: 3 / 2;
  margin: 0 0 10px; padding: 0;
  border: 1px solid var(--hairline); border-radius: var(--radius-sm);
  background: #e4e4e1; overflow: hidden;
  cursor: zoom-in; pointer-events: auto;
}
.pv__media::before {
  content: ""; position: absolute; left: -1px; top: -1px; z-index: 2;
  width: var(--corner-square); height: var(--corner-square); background: var(--primary);
}
.pv__img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  opacity: 0; transition: opacity 0.55s var(--ease);
}
.pv__img.is-on { opacity: 1; }
.pv__title, .pv__meta, .pv__price { background: rgba(250, 250, 250, 0.92); padding: 0 8px; }
.pv__title { font-size: 22px; line-height: 1.25; font-weight: 700; color: var(--ink); }
.pv__meta { font-size: 13px; line-height: 1.4; letter-spacing: 0.12em; text-transform: uppercase; color: var(--mute); }
.pv__hint {
  padding: 4px 0; border: 0; background: none; cursor: pointer; pointer-events: auto;
  font-size: 12px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--primary-ink);
}
.pv__locked { display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: auto; animation: pvIn 0.45s var(--ease) both; }
.pv__price { font-size: 14px; color: var(--body); }
.pv__actions { display: flex; align-items: center; gap: var(--space-16); }

/* category labels */
.labels { position: absolute; inset: 0; z-index: 20; pointer-events: none; }
.label {
  position: absolute; left: 0; top: 0;
  padding: 6px 0; min-height: 36px;
  border: 0; background: none; cursor: pointer; pointer-events: auto;
  font-size: 15px; font-weight: 700; color: var(--ink); white-space: nowrap;
  opacity: 0; transition: opacity 0.9s var(--ease), color 0.2s;
}
.label.is-placed { opacity: 1; }
.label span { position: relative; }
.label span::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -3px; height: 1px; background: var(--ink);
  transform-origin: left; transition: transform 0.4s var(--ease), height 0.2s, background-color 0.2s;
}
.label:hover span::after { transform: scaleX(0.35); }
.label.is-active span::after { height: 2px; background: var(--primary); transform: none; }
.label sup { margin-left: 3px; font-size: 10px; font-weight: 400; color: var(--mute); vertical-align: 8px; }

.hero__hint--touch { display: none; }
.hero__hint {
  position: absolute; left: 0; right: 0; bottom: 22px; z-index: 20;
  text-align: center; pointer-events: none;
  font-size: 11px; font-weight: 700; letter-spacing: 0.32em; text-transform: uppercase; color: var(--mute);
}

/* custom cursor (fine pointers only) */
.cursor {
  position: fixed; left: 0; top: 0; z-index: 300;
  width: 10px; height: 10px; margin: -5px 0 0 -5px;
  border-radius: 9999px; background: var(--ink);
  pointer-events: none; opacity: 0;
  transition: opacity 0.3s, width 0.3s var(--ease), height 0.3s var(--ease), margin 0.3s var(--ease), background-color 0.3s;
}
.cursor.is-big { width: 28px; height: 28px; margin: -14px 0 0 -14px; background: transparent; border: 1.5px solid var(--ink); }
@media (hover: hover) and (pointer: fine) {
  .ring, .ring .card { cursor: none; }
}

/* ==========================================================
   Grid view
   ========================================================== */
.grid {
  min-height: 100vh;
  padding: calc(var(--nav-height) + var(--space-64)) var(--gutter) var(--space-80);
  background: var(--page);
  animation: fadeIn 0.5s var(--ease) both;
}
.grid__head {
  max-width: var(--container-max); margin: 0 auto var(--space-48);
  display: flex; justify-content: space-between; align-items: flex-end; gap: var(--space-24); flex-wrap: wrap;
  border-bottom: 1px solid var(--hairline); padding-bottom: var(--space-24);
}
.grid__head h2 { font-size: 36px; line-height: 1.25; font-weight: 700; color: var(--ink); letter-spacing: -0.01em; }
.grid__count { margin-top: 4px; font-size: 15px; color: var(--mute); }
.grid__tools { display: flex; gap: var(--space-32); }
.grid__list {
  max-width: var(--container-max); margin: 0 auto;
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 48px 24px;
}
.gcard {
  display: flex; flex-direction: column; gap: 6px;
  padding: 0; border: 0; background: none; text-align: left; cursor: pointer; color: inherit;
  animation: riseIn 0.6s var(--ease) both;
}
.gcard__media {
  position: relative; display: block; width: 100%; aspect-ratio: 4 / 5;
  border: 1px solid var(--hairline); border-radius: var(--radius-sm);
  background: #e4e4e1; overflow: hidden; margin-bottom: 8px;
}
.gcard__media::before {
  content: ""; position: absolute; left: -1px; top: -1px; z-index: 2;
  width: var(--corner-square); height: var(--corner-square); background: var(--primary);
}
.gcard__media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.9s var(--ease); }
.gcard:hover .gcard__media img { transform: scale(1.04); }
.gcard__badge {
  position: absolute; right: 8px; bottom: 8px; z-index: 2;
  padding: 4px 10px; border-radius: var(--radius-sm); background: var(--canvas); color: var(--body);
  font-size: 11px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
}
.gcard__title { font-size: 17px; line-height: 1.47; font-weight: 700; color: var(--ink); }
.gcard__meta { font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--mute); }
.gcard__price { margin-top: 4px; padding-top: 8px; border-top: 1px solid var(--hairline); font-size: 15px; font-weight: 700; color: var(--ink); }
.grid__more { display: flex; justify-content: center; margin-top: var(--space-64); }
.grid__empty { grid-column: 1 / -1; padding: 64px 0; text-align: center; color: var(--mute); }

/* ==========================================================
   Filter overlay
   ========================================================== */
.filter { position: fixed; inset: 0; z-index: 120; }
.filter__scrim { position: absolute; inset: 0; background: rgba(0, 0, 0, 0.28); animation: fadeIn 0.3s both; }
.filter__panel {
  position: absolute; left: 0; top: 0; bottom: 0;
  width: min(440px, 100%);
  display: flex; flex-direction: column; gap: var(--space-24);
  padding: var(--space-32) 40px;
  background: var(--canvas); border-right: 1px solid var(--hairline);
  overflow: auto;
  animation: slideIn 0.5s var(--ease) both;
}
.filter__head { display: flex; justify-content: space-between; align-items: center; }
.filter__head h2 { font-size: 24px; line-height: 1.25; font-weight: 700; color: var(--ink); }
.filter__form { display: flex; flex-direction: column; gap: var(--space-24); flex: 1; }
.field { display: flex; flex-direction: column; gap: var(--space-8); }
.field label { font-size: 14px; font-weight: 700; color: var(--ink); }
.field select {
  height: var(--control-height); padding: 0 var(--space-12);
  border: 1px solid var(--hairline-strong); border-radius: var(--radius-sm);
  background: var(--canvas); color: var(--ink); font: inherit; font-size: 16px;
}
.field select:focus { outline: none; border: 2px solid var(--primary); padding: 0 11px; }
.filter__count { font-size: 14px; color: var(--mute); }
.filter__actions { display: flex; gap: var(--space-12); margin-top: auto; padding-top: var(--space-16); border-top: 1px solid var(--hairline); }
.filter__actions .btn { flex: 1; }

/* ==========================================================
   Lightbox
   ========================================================== */
.lightbox {
  position: fixed; inset: 0; z-index: 140;
  display: flex; align-items: center; justify-content: center;
  padding: 56px var(--gutter);
  background: rgba(26, 26, 26, 0.94);
  animation: fadeIn 0.35s both;
}
.lightbox__fig {
  position: relative; margin: 0;
  width: min(1100px, 100%);
  border: 1px solid var(--hairline-strong);
  animation: riseIn 0.55s var(--ease) both;
}
.lightbox__fig::before {
  content: ""; position: absolute; left: -1px; top: -1px; z-index: 2; width: 16px; height: 16px; background: var(--primary);
}
.lightbox__fig img { width: 100%; max-height: 74vh; aspect-ratio: 3 / 2; object-fit: cover; background: #333; }
.lightbox figcaption {
  display: flex; justify-content: space-between; gap: var(--space-16); flex-wrap: wrap;
  padding: 14px 18px; background: var(--surface-dark); color: var(--on-dark);
  font-size: 14px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase;
}
.lightbox__price { color: var(--on-dark-mute); font-weight: 400; letter-spacing: 0.04em; text-transform: none; }
.lightbox__close {
  position: absolute; top: 16px; right: 24px;
  min-height: var(--control-height); padding: 0; border: 0; background: none; cursor: pointer;
  color: var(--on-dark); font-weight: 700; text-decoration: underline; text-underline-offset: 4px;
}
.lightbox__close:focus-visible { outline-color: var(--on-dark); }

.noscript { padding: 120px 24px; text-align: center; }

/* ==========================================================
   Load-in
   ========================================================== */
.nav, .tools { animation: fadeIn 0.9s 0.1s both; }
.hero__copy { animation: copyUp 1.1s 0.25s var(--ease) both; }
.hero__hint { animation: fadeIn 1s 0.9s both; }

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes copyUp { from { opacity: 0; transform: translate(-50%, 24px); } to { opacity: 1; transform: translate(-50%, 0); } }
@keyframes pvIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes riseIn { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: none; } }
@keyframes slideIn { from { opacity: 0; transform: translateX(-40px); } to { opacity: 1; transform: none; } }

/* ==========================================================
   Page sections
   ========================================================== */
.nav.is-scrolled { background: var(--canvas); box-shadow: 0 0 5px 0 rgba(0, 0, 0, 0.3); }

.container { max-width: var(--container-max); margin: 0 auto; padding: 0 var(--gutter); }
.section { padding: 112px 0; background: var(--canvas); scroll-margin-top: var(--nav-height); }
.section--soft { background: var(--surface-soft); }
.section--dark { background: var(--surface-dark); color: var(--on-dark-mute); }
.section__head {
  display: grid; grid-template-columns: 5fr 7fr; gap: var(--space-48); align-items: end;
  margin-bottom: var(--space-64);
}
.h-section { font-size: clamp(32px, 3.4vw, 52px); line-height: 1.08; font-weight: 700; letter-spacing: -0.025em; color: var(--ink); }
.h-sub { font-size: 24px; line-height: 1.25; font-weight: 700; color: var(--ink); margin: 8px 0 16px; }
.lede { font-size: 20px; line-height: 1.6; color: var(--body); max-width: 680px; }
.section--dark .h-section, .section--dark .h-sub { color: var(--on-dark); }
.section--dark .lede { color: var(--on-dark-mute); }
.section--dark .eyebrow { color: var(--on-dark-mute); }
.section--dark :focus-visible { outline-color: var(--on-dark); }

/* ghost link with chevron (design-system .ae-ghost) */
.ghost {
  display: inline-flex; align-items: center; gap: var(--space-8);
  min-height: var(--control-height); padding: 0; border: 0; background: none; cursor: pointer;
  font-size: 14px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--primary-ink);
  text-decoration: none;
}
.ghost::after { content: ""; width: 8px; height: 8px; border-top: 2px solid currentColor; border-right: 2px solid currentColor; transform: rotate(45deg); transition: transform 0.3s var(--ease); }
.ghost:hover::after { transform: translateX(4px) rotate(45deg); }
.ghost--dark { color: var(--primary); }
.btn--outline-dark { background: transparent; color: var(--on-dark); border: 1px solid var(--on-dark); }
.btn--outline-dark:hover { background: var(--on-dark); color: var(--ink); }

/* developments */
.dev { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 56px 24px; }
.dcard {
  display: flex; flex-direction: column; gap: 6px;
  padding: 0; border: 0; background: none; text-align: left; color: inherit; cursor: pointer;
}
.dcard__media {
  position: relative; display: block; width: 100%; aspect-ratio: 16 / 10;
  border: 1px solid var(--hairline); border-radius: var(--radius-sm); overflow: hidden;
  background: #e4e4e1; margin-bottom: 12px;
}
.dcard__media::before { content: ""; position: absolute; left: -1px; top: -1px; z-index: 2; width: 12px; height: 12px; background: var(--primary); }
.dcard__media img { width: 100%; height: 100%; object-fit: cover; transition: transform 1s var(--ease); }
.dcard:hover .dcard__media img { transform: scale(1.04); }
.dcard__status {
  position: absolute; left: 12px; bottom: 12px; z-index: 2;
  padding: 4px 10px; border-radius: var(--radius-sm); background: var(--canvas);
  font-size: 11px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--body);
}
.dcard__title { font-size: 20px; line-height: 1.25; font-weight: 700; color: var(--ink); }
.dcard__meta { font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--mute); }
.dcard__row { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 6px; padding-top: 10px; border-top: 1px solid var(--hairline); font-size: 15px; font-weight: 700; color: var(--ink); }
.dcard__row .ghost { min-height: 0; font-size: 12px; }
.dcard--feature { grid-column: 1 / -1; display: grid; grid-template-columns: 8fr 4fr; gap: 40px; align-items: end; }
.dcard--feature .dcard__media { aspect-ratio: 16 / 9; margin: 0; }
.dcard--feature .dcard__title { font-size: 36px; line-height: 1.1; letter-spacing: -0.02em; }
.dcard--feature .dcard__body { display: flex; flex-direction: column; gap: 10px; padding-bottom: 8px; }
.dcard--feature .dcard__text { font-size: 16px; line-height: 1.6; color: var(--body); }

/* investment */
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--hairline-strong); }
.stat { padding: 32px 24px 32px 0; }
.stat + .stat { padding-left: 24px; border-left: 1px solid var(--hairline-strong); }
.stat__num { font-size: clamp(40px, 4vw, 56px); line-height: 1; font-weight: 700; color: var(--primary); font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
.stat__cap { margin-top: 10px; font-size: 15px; color: var(--on-dark-mute); }
.stats__src { font-size: 12px; color: var(--on-dark-mute); margin: 8px 0 64px; }
.icards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; margin-bottom: 96px; }
.icard {
  position: relative; display: flex; flex-direction: column; gap: 12px;
  padding: 32px; background: var(--surface-elevated); border: 1px solid var(--hairline-strong); border-radius: var(--radius-sm);
}
.icard::before { content: ""; position: absolute; left: -1px; top: -1px; width: 12px; height: 12px; background: var(--primary); }
.icard h3 { margin: 0; font-size: 20px; line-height: 1.25; color: var(--on-dark); }
.icard p { font-size: 15px; line-height: 1.67; }
.icard .ghost { margin-top: auto; }
.nri { display: grid; grid-template-columns: 5fr 7fr; gap: 64px; align-items: start; padding-top: 64px; border-top: 1px solid var(--hairline-strong); }
.ticks { list-style: none; padding: 0; margin: 0 0 32px; display: grid; gap: 12px; }
.ticks li { position: relative; padding-left: 28px; font-size: 16px; color: var(--on-dark); }
.ticks li::before { content: ""; position: absolute; left: 2px; top: 6px; width: 12px; height: 7px; border-left: 2px solid var(--primary); border-bottom: 2px solid var(--primary); transform: rotate(-45deg); }
.steps { list-style: none; padding: 0; margin: 0; counter-reset: step; }
.steps li {
  counter-increment: step;
  display: grid; grid-template-columns: 56px 1fr; column-gap: 16px;
  padding: 20px 0; border-bottom: 1px solid var(--hairline-strong);
}
.steps li:first-child { border-top: 1px solid var(--hairline-strong); }
.steps li::before { content: "0" counter(step); grid-row: span 2; font-size: 14px; font-weight: 700; color: var(--primary); letter-spacing: 0.04em; padding-top: 3px; }
.steps b { font-size: 18px; color: var(--on-dark); }
.steps span { font-size: 15px; line-height: 1.6; }

/* about */
.about { display: grid; grid-template-columns: 5fr 7fr; gap: 64px; align-items: start; }
.about .lede { margin-top: 24px; }
.principles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.fcard {
  position: relative; display: flex; flex-direction: column; gap: 12px;
  padding: 32px; border: 1px solid var(--hairline); border-radius: var(--radius-sm); background: var(--canvas);
}
.fcard::before { content: ""; position: absolute; left: -1px; top: -1px; width: 12px; height: 12px; background: var(--primary); }
.fcard svg { width: 28px; height: 28px; fill: none; stroke: var(--primary-ink); stroke-width: 2; stroke-linecap: square; }
.fcard h3 { margin: 0; font-size: 20px; line-height: 1.25; color: var(--ink); }
.fcard p { font-size: 15px; line-height: 1.67; color: var(--body); }
.cities { margin-top: 96px; padding-top: 32px; border-top: 1px solid var(--hairline); }
.cities__list { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 0 24px; margin-top: 16px; }
.city {
  display: flex; justify-content: space-between; align-items: baseline; gap: 8px;
  min-height: 56px; padding: 0; border: 0; border-bottom: 1px solid var(--hairline); background: none; cursor: pointer;
  font-size: 18px; font-weight: 700; color: var(--ink); text-align: left;
}
.city sup { font-size: 11px; font-weight: 400; color: var(--mute); }
.city:hover { color: var(--primary-ink); }

/* contact */
.contact { display: grid; grid-template-columns: 5fr 7fr; gap: 64px; align-items: start; }
.contact .lede { margin-top: 24px; }
.contact__list { margin: 40px 0 0; display: grid; gap: 0; }
.contact__list div { display: grid; grid-template-columns: 160px 1fr; gap: 16px; padding: 14px 0; border-top: 1px solid var(--hairline); }
.contact__list dt { font-size: 14px; font-weight: 700; color: var(--ink); }
.contact__list dd { margin: 0; font-size: 16px; color: var(--body); }
.contact__list a { color: var(--link-blue, #0046a4); text-underline-offset: 3px; }
.cform {
  position: relative; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 24px;
  padding: 40px; background: var(--canvas); border: 1px solid var(--hairline); border-radius: var(--radius-sm);
}
.cform::before { content: ""; position: absolute; left: -1px; top: -1px; width: 12px; height: 12px; background: var(--primary); }
.field--wide { grid-column: 1 / -1; }
.field input, .field textarea {
  min-height: var(--control-height); padding: 10px 12px;
  border: 1px solid var(--hairline-strong); border-radius: var(--radius-sm);
  background: var(--canvas); color: var(--ink); font: inherit; font-size: 16px; width: 100%;
}
.field textarea { resize: vertical; }
.field input:focus, .field textarea:focus { outline: none; border: 2px solid var(--primary); padding: 9px 11px; }
.field input[aria-invalid="true"] { border-color: #e52020; }
.cform__foot { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; padding-top: 8px; }
.cform__note { font-size: 13px; color: var(--mute); max-width: 340px; }
.cform__error { grid-column: 1 / -1; font-size: 14px; font-weight: 700; color: #e52020; }
.cform__ok { grid-column: 1 / -1; padding: 14px 16px; border: 1px solid var(--hairline); border-left: 0; background: var(--surface-soft); font-size: 15px; color: var(--body); }

/* CTA strip */
.cta { background: var(--surface-dark); color: var(--on-dark); border-top: 1px solid var(--surface-elevated); }
.cta__inner { display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap; padding-top: 48px; padding-bottom: 48px; }
.cta__title { display: flex; align-items: center; gap: 16px; font-size: 24px; line-height: 1.25; font-weight: 700; }
.cta__title i { width: 16px; height: 16px; background: var(--primary); flex: none; }
.cta__sub { margin-top: 4px; font-size: 15px; color: var(--on-dark-mute); }
.cta__actions { display: flex; gap: 12px; flex-wrap: wrap; }
.cta :focus-visible { outline-color: var(--on-dark); }

/* footer */
.footer { background: var(--surface-dark); color: var(--on-dark-mute); }
.footer :focus-visible { outline-color: var(--on-dark); }
.footer__top { display: grid; grid-template-columns: 4fr 8fr; gap: 48px; padding-top: 64px; padding-bottom: 48px; border-top: 1px solid var(--hairline-strong); }
.logo--dark, .footer .logo--dark { color: var(--on-dark); }
.footer__brand p { margin-top: 16px; font-size: 15px; line-height: 1.67; max-width: 300px; }
.footer__cols { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; }
.footer h3 { margin: 0 0 12px; font-size: 16px; color: var(--on-dark); }
.footer ul { list-style: none; padding: 0; margin: 0; }
.footer li { font-size: 15px; line-height: 1.67; padding: 3px 0; }
.footer a, .footer li button { color: var(--on-dark-mute); text-decoration: none; background: none; border: 0; padding: 0; cursor: pointer; font-size: 15px; text-align: left; }
.footer a:hover, .footer li button:hover { color: var(--primary); }
.footer__legal { background: var(--surface-elevated); }
.footer__legal-inner { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-top: 16px; padding-bottom: 16px; font-size: 10px; line-height: 1.5; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; }

/* property detail panel */
.detail { position: fixed; inset: 0; z-index: 130; }
.detail__scrim { position: absolute; inset: 0; background: rgba(0, 0, 0, 0.32); animation: fadeIn 0.3s both; }
.detail__panel {
  position: absolute; right: 0; top: 0; bottom: 0; width: min(580px, 100%);
  display: flex; flex-direction: column; gap: 16px;
  padding: 24px 40px 48px; background: var(--canvas); border-left: 1px solid var(--hairline);
  overflow-y: auto; overscroll-behavior: contain;
  animation: slideInR 0.55s var(--ease) both;
}
.detail__panel > * { flex: none; }
.detail__top { display: flex; justify-content: space-between; align-items: center; }
.detail__media {
  position: relative; display: block; width: 100%; aspect-ratio: 16 / 10; padding: 0; margin: 0;
  border: 1px solid var(--hairline); border-radius: var(--radius-sm); overflow: hidden; background: #e4e4e1; cursor: zoom-in;
}
.detail__media::before { content: ""; position: absolute; left: -1px; top: -1px; z-index: 2; width: 12px; height: 12px; background: var(--primary); }
.detail__media img { width: 100%; height: 100%; object-fit: cover; }
.detail__title { font-size: 32px; line-height: 1.12; font-weight: 700; letter-spacing: -0.02em; color: var(--ink); margin-top: 8px; }
.detail__loc { font-size: 13px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--mute); }
.specs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 8px 0 0; border-top: 1px solid var(--hairline); }
.specs div { padding: 12px 12px 12px 0; border-bottom: 1px solid var(--hairline); }
.specs dt { font-size: 12px; color: var(--mute); }
.specs dd { margin: 2px 0 0; font-size: 15px; font-weight: 700; color: var(--ink); }
.detail__desc { font-size: 16px; line-height: 1.6; color: var(--body); }
.detail__actions { display: flex; gap: 12px; flex-wrap: wrap; }
.detail__more { margin-top: 24px; padding-top: 24px; border-top: 1px solid var(--hairline); }
.similar { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 12px; }
.similar .dcard__media { aspect-ratio: 4 / 5; margin-bottom: 6px; }
.similar .dcard__title { font-size: 14px; }
.similar .dcard__meta { font-size: 11px; }

@keyframes slideInR { from { opacity: 0; transform: translateX(40px); } to { opacity: 1; transform: none; } }

/* ==========================================================
   Responsive
   ========================================================== */
@media (max-width: 1024px) {
  :root { --gutter: 24px; }
  .nav { gap: 24px; }
  .nav__links { gap: 18px; }
  .nav__links .ul { font-size: 15px; }
  .grid__list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .section { padding: 80px 0; }
  .section__head, .about, .contact, .nri, .footer__top { grid-template-columns: 1fr; gap: 32px; }
  .dev { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dcard--feature { grid-template-columns: 1fr; gap: 16px; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat:nth-child(3) { padding-left: 0; border-left: 0; }
  .stat:nth-child(n+3) { border-top: 1px solid var(--hairline-strong); }
  .icards { grid-template-columns: 1fr; }
  .cities__list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 768px) {
  :root { --gutter: 16px; --card-w: 30px; --card-h: 92px; }
  .nav__links, .nav__lang { display: none; }
  .nav__burger { display: inline-flex; }
  .hero__copy { top: 116px; }
  .hero__hint { display: none; }
  .hero__hint.hero__hint--touch { display: block; bottom: 100px; letter-spacing: 0.24em; }
  .hero.is-picked .hero__hint--touch { display: none; }
  /* phone: the preview becomes a compact card docked above the category row */
  .center {
    left: 16px; right: 16px; top: auto !important; bottom: 64px; width: auto;
    transform: none; display: block; text-align: left;
  }
  .pv {
    display: grid; grid-template-columns: 88px minmax(0, 1fr); column-gap: 14px; row-gap: 2px;
    align-items: center; justify-items: start;
    padding: 10px; background: var(--canvas); border: 1px solid var(--hairline); border-radius: var(--radius-sm);
  }
  .pv__media { grid-row: 1 / span 4; width: 88px; aspect-ratio: 1; margin: 0; align-self: stretch; height: auto; }
  .pv__media::before { width: 8px; height: 8px; }
  .pv__title, .pv__meta, .pv__price { background: none; padding: 0; }
  .pv__title { font-size: 16px; line-height: 1.3; }
  .pv__meta { font-size: 11px; letter-spacing: 0.08em; }
  .pv__hint { padding: 2px 0; font-size: 11px; }
  .pv__locked { align-items: flex-start; gap: 6px; animation: none; }
  .pv__price { font-size: 13px; }
  .pv__actions { gap: 12px; }
  .pv__actions .btn { min-height: 40px; padding: 0 14px; font-size: 14px; }
  .pv__actions .textbtn { min-height: 40px; font-size: 13px; }
  /* labels become a horizontal scroll row near the bottom */
  .labels {
    inset: auto 0 16px 0;
    display: flex; gap: 20px; overflow-x: auto;
    padding: 0 16px; scrollbar-width: none;
  }
  .labels::-webkit-scrollbar { display: none; }
  .label { position: static; opacity: 1; transform: none !important; flex: none; font-size: 14px; }
  .grid__list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px 16px; }
  .grid__head h2 { font-size: 30px; }
  .section { padding: 64px 0; }
  .section__head { margin-bottom: 40px; }
  .lede { font-size: 18px; }
  .dev { grid-template-columns: 1fr; gap: 40px; }
  .dcard--feature .dcard__title { font-size: 28px; }
  .principles { grid-template-columns: 1fr; }
  .cities { margin-top: 64px; }
  .cities__list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cform { grid-template-columns: 1fr; padding: 24px; }
  .contact__list div { grid-template-columns: 1fr; gap: 2px; }
  .footer__cols { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px 24px; }
  .detail__panel { padding: 16px 16px 40px; }
  .detail__title { font-size: 26px; }
  .specs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .icards { margin-bottom: 64px; }
}

@media (max-width: 480px) {
  .grid__list { gap: 28px 12px; }
  .gcard__title { font-size: 15px; line-height: 1.35; }
  .gcard__meta { font-size: 10px; }
  .gcard__price { font-size: 13px; }
  .gcard__badge { font-size: 9px; padding: 3px 6px; }
  .stat { padding: 24px 12px 24px 0; }
  .stat + .stat { padding-left: 12px; }
  .stat:nth-child(3) { padding-left: 0; }
  .stat__num { font-size: 36px; }
  .stat__cap { font-size: 13px; }
  .hero__hint--touch { display: block; }
  .similar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cta__actions .btn { flex: 1 1 100%; }
  .tools .tool { font-size: 15px; }
  .lightbox { padding: 56px 16px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

.dcard__body { display: flex; flex-direction: column; gap: 6px; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
