/* Alleppey Homes design system: calm twilight backwaters, iOS-style frosted glass, generous space.
   One file, no framework. Tokens first, then base, layout, components. */

:root {
  --bg: #0b1411;
  --bg-2: #0f1b16;
  --ink: #f5f2ea;
  --ink-2: rgba(245, 242, 234, .78);
  --ink-3: rgba(245, 242, 234, .56);
  --accent: #9bd8b8;
  --accent-ink: #0d241b;
  --gold: #e9d6a8;

  --glass: rgba(255, 255, 255, .07);
  --glass-2: rgba(255, 255, 255, .11);
  --line: rgba(255, 255, 255, .13);
  --hi: inset 0 1px 0 rgba(255, 255, 255, .16);
  --shadow: 0 10px 40px rgba(0, 0, 0, .28);
  --blur: blur(22px) saturate(180%);

  --r-sm: 14px;
  --r: 24px;
  --r-lg: 32px;
  --ease: cubic-bezier(.32, .72, 0, 1);

  --space-section: clamp(4.5rem, 11vw, 8rem);
  --gutter: clamp(1.25rem, 5vw, 2rem);
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);

  --font-display: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --font-body: 'Source Sans Pro', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; min-height: 100vh;
  font: 400 1.0625rem/1.7 var(--font-body);
  color: var(--ink); background: var(--bg);
  background-image:
    radial-gradient(70rem 40rem at 85% -8%, rgba(70, 140, 110, .22), transparent 60%),
    radial-gradient(60rem 38rem at -10% 35%, rgba(40, 90, 75, .20), transparent 60%),
    radial-gradient(55rem 40rem at 100% 78%, rgba(120, 100, 60, .10), transparent 60%);
  background-attachment: scroll;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img, video, svg { max-width: 100%; display: block; }
img { height: auto; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
p { margin: 0 0 1.1em; text-wrap: pretty; }
ul, ol { margin: 0; padding: 0; }
h1, h2, h3, h4 { font-variant-numeric: lining-nums; margin: 0 0 .6em; font-family: var(--font-display); font-weight: 500; letter-spacing: -.012em; color: var(--ink); text-wrap: balance; }
h1 { font-size: clamp(2.3rem, 8.2vw, 4.25rem); line-height: 1.1; }
h2 { font-size: clamp(1.8rem, 5.6vw, 2.9rem); line-height: 1.16; }
h3 { font-size: clamp(1.25rem, 4vw, 1.5rem); line-height: 1.3; }
h4 { font-size: 1.05rem; font-family: var(--font-body); font-weight: 600; letter-spacing: 0; }
strong { font-weight: 600; color: var(--ink); }
.skip { position: absolute; left: -999px; top: 8px; z-index: 2000; background: #fff; color: #000; padding: .6rem 1rem; border-radius: 10px; }
.skip:focus { left: 8px; }
.i { width: 1.25rem; height: 1.25rem; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex: none; }
[hidden] { display: none !important; }

/* ---------- Layout ---------- */
.wrap { width: 100%; max-width: 72rem; margin-inline: auto; padding-inline: max(var(--gutter), env(safe-area-inset-left)); }
.wrap--narrow { max-width: 46rem; }
section { padding-block: var(--space-section); }
.section--tight { padding-block: clamp(3rem, 7vw, 5rem); }
.section--tint { background: linear-gradient(180deg, transparent, rgba(255, 255, 255, .03) 18%, rgba(255, 255, 255, .03) 82%, transparent); }
.head { max-width: 40rem; margin-bottom: clamp(2.25rem, 6vw, 4rem); }
.head h2 { margin-bottom: .55em; }
.head p:last-child { margin-bottom: 0; }
.head--center { margin-inline: auto; text-align: center; }
.eyebrow { display: block; margin-bottom: 1.1rem; font-size: .75rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--gold); }
.lead { font-size: clamp(1.1rem, 2.6vw, 1.3rem); line-height: 1.6; color: var(--ink-2); font-weight: 300; }
.muted { color: var(--ink-3); }
.grid { display: grid; gap: clamp(1rem, 3vw, 1.75rem); }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 20rem), 1fr)); }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 16.5rem), 1fr)); }
.grid--4 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 13rem), 1fr)); }
.split { display: grid; gap: clamp(2rem, 6vw, 4.5rem); align-items: center; }
@media (min-width: 860px) { .split { grid-template-columns: 1fr 1fr; } .split--flip > :first-child { order: 2; } }
.stack > * + * { margin-top: 1.4rem; }
.stack > .eyebrow + h2 { margin-top: 0; }
.center { text-align: center; }

/* ---------- Navigation ---------- */
.nav { position: fixed; inset: 0 0 auto 0; z-index: 1000; padding: calc(.75rem + var(--safe-t)) .75rem 0; pointer-events: none; }
.nav__bar {
  pointer-events: auto; max-width: 72rem; margin-inline: auto; min-height: 60px; padding: .5rem .6rem .5rem 1.1rem;
  display: flex; align-items: center; justify-content: space-between; gap: 1.25rem; border-radius: 999px;
  background: rgba(14, 24, 20, .5); border: 1px solid var(--line); box-shadow: var(--hi), var(--shadow);
  -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur);
}
.nav__brand { display: inline-flex; align-items: center; gap: .6rem; color: var(--ink); font-family: var(--font-display); font-size: 1.15rem; font-weight: 500; white-space: nowrap; }
.nav__brand:hover { text-decoration: none; }
.nav__brand img { width: 34px; height: auto; flex: none; }
.nav__brand span { line-height: 1; }
.nav__links { display: none; margin-inline: auto; gap: .35rem; }
.nav__links a { padding: .6rem 1rem; white-space: nowrap; border-radius: 999px; color: var(--ink-2); font-size: .95rem; font-weight: 600; transition: background .25s var(--ease), color .25s; }
.nav__links a:hover { background: var(--glass-2); color: var(--ink); text-decoration: none; }
.nav__links a[aria-current="page"] { color: var(--ink); background: var(--glass-2); }
.nav .nav__cta { display: none; margin-left: 0; }
.nav__toggle { margin-left: 0; flex: none; width: 46px; height: 46px; border-radius: 50%; border: 0; background: var(--glass); display: grid; place-content: center; gap: 6px; cursor: pointer; }
.nav__toggle span { display: block; width: 18px; height: 1.5px; background: var(--ink); transition: transform .35s var(--ease); }
.nav__toggle[aria-expanded="true"] span:first-child { transform: translateY(3.75px) rotate(45deg); }
.nav__toggle[aria-expanded="true"] span:last-child { transform: translateY(-3.75px) rotate(-45deg); }
@media (min-width: 1020px) {
  .nav__links { display: flex; }
  .nav .nav__cta { display: inline-flex; min-height: 44px; }
  .nav__links { margin-inline: 0; }
  .nav__toggle { display: none; }
}

.sheet {
  position: fixed; inset: 0; z-index: 990; display: flex; flex-direction: column; justify-content: space-between;
  padding: calc(6rem + var(--safe-t)) 1.75rem calc(2rem + var(--safe-b)); height: 100vh; height: 100dvh;
  background: rgba(9, 16, 13, .8); -webkit-backdrop-filter: blur(30px) saturate(180%); backdrop-filter: blur(30px) saturate(180%);
  opacity: 0; transform: scale(1.02); transition: opacity .4s var(--ease), transform .4s var(--ease);
}
.sheet.open { opacity: 1; transform: none; }
.sheet nav { display: flex; flex-direction: column; gap: .15rem; }
.sheet nav a { padding: .6rem 0; font-family: var(--font-display); font-size: clamp(1.9rem, 8vw, 2.5rem); color: var(--ink); opacity: 0; transform: translateY(14px); transition: opacity .5s var(--ease), transform .5s var(--ease); }
.sheet.open nav a { opacity: 1; transform: none; }
.sheet.open nav a:nth-child(2) { transition-delay: .04s; } .sheet.open nav a:nth-child(3) { transition-delay: .08s; }
.sheet.open nav a:nth-child(4) { transition-delay: .12s; } .sheet.open nav a:nth-child(5) { transition-delay: .16s; }
.sheet.open nav a:nth-child(6) { transition-delay: .2s; } .sheet.open nav a:nth-child(7) { transition-delay: .24s; }
.sheet nav a:hover { text-decoration: none; color: var(--accent); }
.sheet__cta { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .55rem; min-height: 48px; padding: 0 1.5rem;
  border-radius: 999px; border: 1px solid transparent; font: 600 1rem/1 var(--font-body); cursor: pointer; white-space: nowrap;
  color: var(--ink); background: transparent; transition: transform .25s var(--ease), background .25s var(--ease), box-shadow .25s var(--ease);
}
.btn:hover { text-decoration: none; }
.btn:active { transform: scale(.97); }
.btn--primary { background: rgba(255, 255, 255, .93); color: var(--accent-ink); box-shadow: 0 6px 24px rgba(0, 0, 0, .25); }
.btn--primary:hover { background: #fff; }
.btn--glass { background: var(--glass-2); border-color: var(--line); box-shadow: var(--hi); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); }
.btn--glass:hover { background: rgba(255, 255, 255, .17); }
.btn--text { padding-inline: .25rem; color: var(--accent); }
.btn--sm { min-height: 40px; padding: 0 1.1rem; font-size: .92rem; }
.btn-row { display: flex; flex-wrap: wrap; gap: .85rem; }
.center .btn-row, .head--center .btn-row { justify-content: center; }

/* ---------- Hero ---------- */
.hero { position: relative; min-height: 100vh; min-height: 100svh; display: flex; align-items: flex-end; padding: calc(7rem + var(--safe-t)) 0 clamp(3rem, 9vw, 5.5rem); overflow: hidden; isolation: isolate; }
.hero--short { min-height: min(78svh, 40rem); }
.hero__media { position: absolute; inset: 0; z-index: -2; }
.hero__media img, .hero__media video { width: 100%; height: 100%; object-fit: cover; }
.hero__media video { position: absolute; inset: 0; opacity: 0; transition: opacity 1s var(--ease); }
.hero__media video.on { opacity: 1; }
.hero::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(11, 20, 17, .6) 0%, rgba(11, 20, 17, .3) 35%, rgba(11, 20, 17, .88) 85%, var(--bg) 100%); }
.hero__content { max-width: 44rem; }
.hero .eyebrow { margin-bottom: 1.25rem; }
.hero h1 { margin-bottom: .45em; }
.hero .lead { margin-bottom: 2rem; max-width: 34rem; }
.hero__facts { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: clamp(1.75rem, 5vw, 2.75rem); }

/* ---------- Glass surfaces ---------- */
.glass {
  background: var(--glass); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--hi), var(--shadow);
  -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur);
}
.card { padding: clamp(1.4rem, 3.5vw, 2rem); transition: transform .4s var(--ease), background .4s var(--ease); }
a.card { color: inherit; display: block; }
a.card:hover { text-decoration: none; transform: translateY(-4px); background: var(--glass-2); }
.card h3 { margin-bottom: .5em; }
.card .price { margin-bottom: .25rem; }
.card .ticks { margin: 1.1rem 0 1.5rem; }
.card .btn { margin-top: .25rem; }
.card p:last-child { margin-bottom: 0; }
.card__icon { width: 2.75rem; height: 2.75rem; border-radius: 14px; display: grid; place-items: center; margin-bottom: 1.1rem; background: rgba(155, 216, 184, .12); color: var(--accent); }
.card--media { padding: 0; overflow: hidden; display: flex; flex-direction: column; }
.card--media > img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.card--media .card__body { padding: clamp(1.25rem, 3.5vw, 1.75rem); display: flex; flex-direction: column; flex: 1; }
.card--media .card__body .btn { margin-top: auto; align-self: flex-start; }
.card--media .card__body p { flex: 0 0 auto; }
.card__more { margin-top: auto; padding-top: 1.25rem; display: inline-flex; align-items: center; gap: .4rem; font-weight: 600; color: var(--accent); }
.chip { display: inline-flex; align-items: center; gap: .6rem; padding: .35rem 1rem .35rem .4rem; border-radius: 999px; font-size: .9rem; font-weight: 600; color: var(--ink); background: rgba(255, 255, 255, .09); border: 1px solid rgba(255, 255, 255, .12); box-shadow: var(--hi); -webkit-backdrop-filter: blur(16px) saturate(160%); backdrop-filter: blur(16px) saturate(160%); }
.chip .i { box-sizing: content-box; width: 1rem; height: 1rem; padding: .4rem; border-radius: 50%; background: rgba(155, 216, 184, .16); color: var(--accent); }
.tag { display: flex; width: fit-content; align-items: center; margin-bottom: 1rem; padding: .3rem .8rem; border-radius: 999px; font-size: .72rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; line-height: 1.2; color: var(--gold); background: rgba(233, 214, 168, .12); }
.stat { padding: 1.5rem; text-align: center; }
.stat b { display: block; font: 600 clamp(2rem, 6vw, 2.6rem)/1.1 var(--font-body); color: var(--ink); font-variant-numeric: lining-nums tabular-nums; }
.stat span { font-size: .92rem; color: var(--ink-3); }
.price { font: 600 1.95rem/1.1 var(--font-body); letter-spacing: -.01em; color: var(--gold); font-variant-numeric: lining-nums tabular-nums; }
.price small { font: 400 .9rem var(--font-body); color: var(--ink-3); }
.ticks { list-style: none; display: grid; gap: .7rem; margin: 1.25rem 0; }
.ticks li { position: relative; padding-left: 1.9rem; color: var(--ink-2); overflow-wrap: break-word; }
.ticks .i { position: absolute; left: 0; top: .38rem; color: var(--accent); width: 1.1rem; height: 1.1rem; }
.photo { border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--shadow); }
.photo img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }
.photo--wide img { aspect-ratio: 16 / 10; }
.quote { padding: clamp(1.5rem, 4vw, 2.25rem); }
.quote p { font: 400 1.15rem/1.65 var(--font-display); font-style: italic; color: var(--ink); }
.quote footer { display: flex; align-items: center; gap: .75rem; margin-top: 1.25rem; font-size: .92rem; color: var(--ink-3); }
.quote footer img { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; }

/* ---------- FAQ (native details) ---------- */
.faq { display: grid; gap: .75rem; }
.faq details { border-radius: var(--r); background: var(--glass); border: 1px solid var(--line); box-shadow: var(--hi); transition: background .3s var(--ease); }
.faq details[open] { background: var(--glass-2); }
.faq summary { list-style: none; cursor: pointer; padding: 1.15rem 1.4rem; display: flex; justify-content: space-between; align-items: center; gap: 1rem; font-weight: 600; color: var(--ink); min-height: 56px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary .i { transition: transform .35s var(--ease); color: var(--accent); }
.faq details[open] summary .i { transform: rotate(180deg); }
.faq .faq__a { padding: 0 1.4rem 1.3rem; color: var(--ink-2); }
.faq .faq__a p:last-child { margin-bottom: 0; }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; border-radius: var(--r); border: 1px solid var(--line); background: var(--glass); -webkit-overflow-scrolling: touch; }
table { width: 100%; border-collapse: collapse; font-size: .98rem; min-width: 34rem; }
th, td { padding: 1rem 1.25rem; text-align: left; border-bottom: 1px solid var(--line); }
th { font-size: .78rem; letter-spacing: .1em; text-transform: uppercase; color: var(--gold); font-weight: 600; }
tr:last-child td { border-bottom: 0; }
td { color: var(--ink-2); font-variant-numeric: lining-nums tabular-nums; }
td:first-child { color: var(--ink); font-weight: 600; }

/* ---------- Prose (blog & policies) ---------- */
.prose { max-width: 42rem; margin-inline: auto; font-size: 1.1rem; line-height: 1.85; color: var(--ink-2); }
.prose h2 { margin-top: 2.6em; font-size: clamp(1.6rem, 4.6vw, 2.2rem); }
.prose h3 { margin-top: 2em; }
.prose p, .prose li { color: var(--ink-2); }
.prose ul, .prose ol { margin: 0 0 1.4em 1.2em; display: grid; gap: .5rem; }
.prose img { border-radius: var(--r); margin-block: 2rem; }
.prose a { text-decoration: underline; text-underline-offset: 3px; }
.crumbs { display: flex; flex-wrap: wrap; gap: .4rem; font-size: .88rem; color: var(--ink-3); margin-bottom: 1.25rem; }
.crumbs a { color: var(--ink-3); } .crumbs a:hover { color: var(--accent); }
.meta { color: var(--ink-3); font-size: .92rem; }
.callout { padding: 1.4rem 1.6rem; margin-block: 2rem; }
.callout p:last-child { margin: 0; }

/* ---------- CTA band ---------- */
.cta { text-align: center; padding: clamp(2.5rem, 7vw, 4.5rem) clamp(1.5rem, 5vw, 3rem); border-radius: var(--r-lg); background: linear-gradient(135deg, rgba(155, 216, 184, .16), rgba(255, 255, 255, .06)); border: 1px solid var(--line); box-shadow: var(--hi), var(--shadow); }
.cta h2 { margin-bottom: .4em; }
.cta p { color: var(--ink-2); max-width: 34rem; margin-inline: auto; margin-bottom: 1.75rem; }

/* ---------- Gallery ---------- */
.masonry { columns: 2 12rem; column-gap: .9rem; }
.masonry a { display: block; margin-bottom: .9rem; border-radius: var(--r); overflow: hidden; break-inside: avoid; background: var(--glass); }
.masonry img { width: 100%; transition: transform .6s var(--ease); }
.masonry a:hover img { transform: scale(1.03); }
@media (min-width: 900px) { .masonry { columns: 3; } }

/* ---------- Forms ---------- */
.form { display: grid; gap: 1rem; padding: clamp(1.4rem, 4vw, 2.25rem); }
.field { display: grid; gap: .4rem; }
.field label { font-size: .9rem; font-weight: 600; color: var(--ink-2); }
.field input, .field select, .field textarea {
  width: 100%; min-height: 52px; padding: .8rem 1rem; font: 400 16px/1.4 var(--font-body); color: var(--ink);
  background: rgba(255, 255, 255, .06); border: 1px solid var(--line); border-radius: 16px; transition: border-color .25s, background .25s;
}
.field textarea { min-height: 8rem; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--accent); background: rgba(255, 255, 255, .1); }
.field select option { color: #111; }
.form-row { display: grid; gap: 1rem; }
@media (min-width: 640px) { .form-row { grid-template-columns: 1fr 1fr; } }

/* ---------- Footer ---------- */
.footer { padding: clamp(3rem, 8vw, 5rem) 0 calc(2rem + var(--safe-b)); border-top: 1px solid var(--line); background: linear-gradient(180deg, transparent, rgba(0, 0, 0, .25)); }
.footer__grid { display: grid; gap: 2.5rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr)); }
.footer__brand { max-width: 22rem; }
.footer__brand p { color: var(--ink-3); margin-top: 1.1rem; font-size: .98rem; }
.footer h4 { color: var(--ink); margin-bottom: 1rem; font-size: .95rem; }
.footer ul { list-style: none; display: grid; gap: .55rem; }
.footer a { color: var(--ink-3); } .footer a:hover { color: var(--accent); text-decoration: none; }
.footer address { font-style: normal; color: var(--ink-3); margin-bottom: .75rem; }
.footer p { color: var(--ink-3); margin-bottom: .5rem; }
.footer__social { display: flex; gap: .6rem; margin-top: 1.25rem; }
.footer__social a { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; background: var(--glass); border: 1px solid var(--line); color: var(--ink-2); }
.footer__legal { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .75rem; margin-top: 3rem; padding-top: 1.5rem; border-top: 1px solid var(--line); font-size: .88rem; color: var(--ink-3); }

/* ---------- Mobile dock + contact modal ---------- */
.dock {
  position: fixed; left: 50%; bottom: max(12px, var(--safe-b)); z-index: 900; width: min(92vw, 25rem); display: none; gap: 6px; padding: 6px; border-radius: 999px;
  background: rgba(16, 28, 23, .6); border: 1px solid var(--line); box-shadow: var(--hi), 0 12px 40px rgba(0, 0, 0, .4);
  -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur);
  transform: translate(-50%, 150%); transition: transform .5s var(--ease);
}
.dock.show { transform: translate(-50%, 0); }
.dock a, .dock button { flex: 1; min-height: 48px; display: inline-flex; align-items: center; justify-content: center; gap: .45rem; border: 0; border-radius: 999px; background: transparent; color: var(--ink); font: 600 .95rem var(--font-body); cursor: pointer; }
.dock a:hover { text-decoration: none; }
.dock .primary { background: rgba(255, 255, 255, .93); color: var(--accent-ink); }
.dock a:active, .dock button:active { transform: scale(.97); }
@media (max-width: 1019px) { .dock { display: flex; } body { padding-bottom: calc(80px + var(--safe-b)); } }

.modal { border: 0; padding: 0; background: transparent; color: var(--ink); max-width: min(94vw, 26rem); width: 100%; margin: auto; overflow: visible; }
.modal::backdrop { background: rgba(5, 10, 8, .55); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.modal__panel { position: relative; margin: 0; padding: 2rem 1.5rem 1.5rem; border-radius: var(--r-lg); background: rgba(18, 30, 25, .78); border: 1px solid var(--line); box-shadow: var(--hi), 0 30px 80px rgba(0, 0, 0, .5); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); display: grid; gap: 1rem; }
.modal h2 { font-size: 1.7rem; margin: 0; }
.modal p { margin: 0; color: var(--ink-2); font-size: .98rem; }
.modal__close { position: absolute; top: .6rem; right: .6rem; width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--glass); color: var(--ink); display: grid; place-items: center; cursor: pointer; }
.modal__list { display: grid; gap: .75rem; }
.modal__item { padding: 1rem; border-radius: var(--r); background: var(--glass); border: 1px solid var(--line); display: grid; gap: .75rem; }
.modal__item b { font: 600 1.3rem var(--font-body); text-align: center; letter-spacing: .04em; font-variant-numeric: lining-nums tabular-nums; }
.modal__item div { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; }

/* ---------- Motion ---------- */
.js [data-reveal] { opacity: 0; transform: translateY(16px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.js [data-reveal].in { opacity: 1; transform: none; }
@media (hover: none) { a.card:hover { transform: none; } .masonry a:hover img { transform: none; } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .js [data-reveal] { opacity: 1; transform: none; }
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .nav__bar, .glass, .dock, .modal__panel, .sheet { background: rgba(18, 30, 25, .94); }
}
@media (max-width: 599px) {
  .glass, .btn--glass, .chip { -webkit-backdrop-filter: blur(14px) saturate(160%); backdrop-filter: blur(14px) saturate(160%); }
}

/* Hero refinements for phones: tidy full-width actions and a deeper scrim behind the text */
@media (max-width: 599px) {
  .hero .btn-row > .btn { flex: 1 1 100%; }
  .hero::after { background: linear-gradient(180deg, rgba(11, 20, 17, .62) 0%, rgba(11, 20, 17, .5) 30%, rgba(11, 20, 17, .86) 70%, var(--bg) 100%); }
  .hero__facts { gap: .5rem; }
}

/* Horizontal swipe rail on phones (iOS style), normal grid on larger screens */
@media (max-width: 899px) {
  .rail { display: flex; gap: .9rem; overflow-x: auto; scroll-snap-type: x mandatory; margin-inline: calc(var(--gutter) * -1); padding: .25rem var(--gutter) 1rem; scroll-padding-inline: var(--gutter); -webkit-overflow-scrolling: touch; scrollbar-width: none; }
  .rail::-webkit-scrollbar { display: none; }
  .rail > * { flex: 0 0 78%; max-width: 20rem; scroll-snap-align: start; }
}

/* Phones: use more of the screen width, let headings run full width */
@media (max-width: 599px) {
  .card { padding: 1.15rem; }
  .card--media .card__body { padding: 1.15rem 1.15rem 1.35rem; }
  .faq summary { padding: 1rem 1.1rem; }
  .faq .faq__a { padding: 0 1.1rem 1.15rem; }
  .cta { padding: 2.25rem 1.25rem; }
  h1, h2, h3, .lead { text-wrap: pretty; }
  .head, .head--center { max-width: none; }
  .lead { font-size: 1.08rem; }
  .nav { padding-inline: .6rem; }
  .nav__bar { padding-left: .9rem; }
}

/* ---------- Editorial blocks: keep long guides scannable ---------- */
.keyfacts { display: grid; gap: .75rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 8.5rem), 1fr)); margin-bottom: clamp(2.5rem, 7vw, 4rem); }
.keyfacts > div { padding: 1.1rem 1.2rem; border-radius: var(--r); background: var(--glass); border: 1px solid var(--line); box-shadow: var(--hi); }
.keyfacts b { display: block; font: 600 1.35rem/1.2 var(--font-body); color: var(--ink); font-variant-numeric: lining-nums; }
.keyfacts span { display: block; margin-top: .25rem; font-size: .82rem; letter-spacing: .06em; text-transform: uppercase; color: var(--gold); font-weight: 600; }

.toc { display: flex; gap: .5rem; overflow-x: auto; margin: 0 calc(var(--gutter) * -1) clamp(2rem, 6vw, 3.5rem); padding: .25rem var(--gutter); scrollbar-width: none; scroll-snap-type: x proximity; scroll-padding-inline: var(--gutter); }
.toc::-webkit-scrollbar { display: none; }
.toc a { flex: none; scroll-snap-align: start; padding: .6rem 1.05rem; border-radius: 999px; font-size: .9rem; font-weight: 600; color: var(--ink-2); background: var(--glass); border: 1px solid var(--line); }
.toc a:hover { color: var(--ink); background: var(--glass-2); text-decoration: none; }

.block { padding-block: clamp(2.5rem, 7vw, 4.5rem); border-top: 1px solid var(--line); }
.block:first-of-type { border-top: 0; }
.block__num { display: block; margin-bottom: .75rem; font: 500 .8rem var(--font-body); letter-spacing: .18em; color: var(--gold); }
.block h2 { margin-bottom: .5em; }
.block > p, .block .intro { max-width: 40rem; color: var(--ink-2); font-size: 1.08rem; }
.block .grid, .block .timeline, .block .compare, .block .table-wrap, .block .photo { margin-top: 1.75rem; }

.pull { position: relative; margin: 2rem 0 0; padding: 1.4rem 1.5rem 1.4rem 1.7rem; border-radius: var(--r); background: linear-gradient(135deg, rgba(155, 216, 184, .14), rgba(255, 255, 255, .04)); border: 1px solid rgba(155, 216, 184, .22); }
.pull::before { content: ""; position: absolute; left: 0; top: 1.2rem; bottom: 1.2rem; width: 3px; border-radius: 3px; background: var(--accent); }
.pull strong { display: block; margin-bottom: .25rem; font-size: .78rem; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); }
.pull p { margin: 0; color: var(--ink); font-size: 1.05rem; }

.timeline { display: grid; gap: .75rem; }
.timeline > div { display: grid; grid-template-columns: 6.2rem 1fr; gap: 1rem; padding: 1.1rem 1.2rem; border-radius: var(--r); background: var(--glass); border: 1px solid var(--line); }
.timeline b { font-weight: 600; color: var(--gold); font-variant-numeric: lining-nums; }
.timeline p { margin: 0; color: var(--ink-2); font-size: 1rem; }
.timeline p strong { display: block; }
@media (max-width: 479px) { .timeline > div { grid-template-columns: 1fr; gap: .3rem; } }

.compare { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr)); }
.compare > div { padding: 1.4rem; border-radius: var(--r); background: var(--glass); border: 1px solid var(--line); }
.compare h3 { font-size: 1.2rem; }
.compare .price { display: block; margin-bottom: .75rem; }
.badge-row { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1.25rem; }
.steps { counter-reset: s; display: grid; gap: .75rem; list-style: none; }
.steps li { counter-increment: s; display: grid; grid-template-columns: 2.5rem 1fr; gap: 1rem; padding: 1.1rem 1.2rem; border-radius: var(--r); background: var(--glass); border: 1px solid var(--line); color: var(--ink-2); }
.steps li::before { content: counter(s); width: 2.5rem; height: 2.5rem; display: grid; place-items: center; border-radius: 50%; background: rgba(155, 216, 184, .16); color: var(--accent); font-weight: 600; }
.steps strong { display: block; color: var(--ink); }
.more { margin-top: 1.5rem; }
.more summary { cursor: pointer; display: inline-flex; align-items: center; gap: .5rem; min-height: 44px; font-weight: 600; color: var(--accent); list-style: none; }
.more summary::-webkit-details-marker { display: none; }
.more[open] summary { margin-bottom: .75rem; }
.more > div { color: var(--ink-2); max-width: 40rem; }
.figure { margin: 2rem 0 0; border-radius: var(--r-lg); overflow: hidden; }
.figure img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.figure { overflow: visible; }
.figure img { border-radius: var(--r-lg); }
.figure figcaption { padding: .85rem 1.1rem 0; font-size: .88rem; line-height: 1.5; color: var(--ink-3); }

/* Illustration disclaimer */
.note { max-width: 46rem; margin: 0 auto clamp(2rem, 6vw, 3.5rem); padding: 1rem 1.25rem; border-radius: var(--r); background: var(--glass); border: 1px solid var(--line); font-size: .88rem; line-height: 1.6; color: var(--ink-3); text-align: center; }
.footer__note { max-width: 32rem; }

.price--ask { font-size: 1.3rem; line-height: 1.3; }
.price--ask small { display: block; margin-top: .2rem; }

/* Tables: always-visible, tidy scrollbar plus a fade that shows there is more to the right */
.table-wrap {
  overflow-x: scroll; overflow-y: hidden; padding-bottom: 2px;
  background:
    linear-gradient(to right, var(--bg-2) 30%, rgba(15, 27, 22, 0)) left center / 28px 100% no-repeat local,
    linear-gradient(to left, var(--bg-2) 30%, rgba(15, 27, 22, 0)) right center / 28px 100% no-repeat local,
    radial-gradient(farthest-side at 0 50%, rgba(155, 216, 184, .28), rgba(155, 216, 184, 0)) left center / 14px 100% no-repeat scroll,
    radial-gradient(farthest-side at 100% 50%, rgba(155, 216, 184, .28), rgba(155, 216, 184, 0)) right center / 14px 100% no-repeat scroll,
    var(--glass);
}
.table-wrap::-webkit-scrollbar { height: 8px; }
.table-wrap::-webkit-scrollbar-track { margin: 0 1.1rem; border-radius: 999px; background: rgba(255, 255, 255, .08); }
.table-wrap::-webkit-scrollbar-thumb { border-radius: 999px; background: rgba(155, 216, 184, .75); border: 0; }
.table-wrap::-webkit-scrollbar-thumb:hover { background: var(--accent); }
@supports (-moz-appearance: none) { .table-wrap { scrollbar-width: thin; scrollbar-color: rgba(155, 216, 184, .75) rgba(255, 255, 255, .08); } }
.table-wrap table { margin-bottom: 8px; }

/* Media cards: image inset with rounded corners, text lines up with the image's left edge */
.card--media { padding: .85rem; }
.card--media > img { border-radius: 22px; }
.card--media .card__body { padding: 1.35rem 0 .35rem; }
@supports (corner-shape: squircle) { .card--media > img, .card--media { corner-shape: squircle; } .card--media > img { border-radius: 34px; } }

/* Hero facts: three icon tiles in one row on phones */
@media (max-width: 599px) {
  .hero__facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem; }
  .hero__facts .chip {
    flex-direction: column; justify-content: center; gap: .55rem; padding: .85rem .25rem .8rem; border-radius: 22px;
    font-size: .7rem; line-height: 1.2; font-weight: 600; text-align: center; letter-spacing: .01em; white-space: nowrap;
  }
  .hero__facts .chip .i { display: block; width: 1.3rem; height: 1.3rem; padding: .6rem; background: rgba(155, 216, 184, .18); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .18); }
}
@media (min-width: 900px) { .table-wrap { overflow-x: auto; } }
