/* Dream Villa — shared styles for the site.
   Colours mirror the app's DesignSystem/Theme.swift so the web and the app read
   as one product. No external fonts or CDNs: the site works offline, like the app. */

:root {
  --brand: #c75933;
  --brand-soft: rgba(199, 89, 51, 0.10);
  --brand-strong: #a8461f;
  --accent: #1f739e;
  --accent-soft: rgba(31, 115, 158, 0.10);
  --positive: #1f8c54;
  --warning: #b8760f;
  --danger: #c73333;

  --ink: #1a2438;
  --ink-soft: #5a6478;
  --ink-faint: #8b93a3;
  --canvas: #f5f4f1;
  --surface: #ffffff;
  --surface-alt: #fbfaf8;
  --hairline: rgba(26, 36, 56, 0.10);

  --radius-s: 10px;
  --radius: 18px;
  --radius-l: 26px;
  --shadow: 0 4px 14px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 18px 50px rgba(0, 0, 0, 0.14);

  --measure: 1120px;
  --gap: 24px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --brand: #f28554;
    --brand-soft: rgba(242, 133, 84, 0.12);
    --brand-strong: #f79b71;
    --accent: #70bce6;
    --accent-soft: rgba(112, 188, 230, 0.12);
    --positive: #5cd18c;
    --warning: #fabf52;
    --danger: #fa736b;

    --ink: #ebf0f7;
    --ink-soft: #a4adbd;
    --ink-faint: #7c8493;
    --canvas: #0e0e11;
    --surface: #1d1e22;
    --surface-alt: #24262b;
    --hairline: rgba(235, 240, 247, 0.12);
    --shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 18px 50px rgba(0, 0, 0, 0.6);
  }
}

*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font: 16px/1.65 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI",
        Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4 {
  margin: 0 0 0.5em;
  line-height: 1.15;
  letter-spacing: -0.02em;
  font-weight: 700;
}

h1 { font-size: clamp(2.1rem, 6vw, 3.6rem); }
h2 { font-size: clamp(1.6rem, 4vw, 2.4rem); }
h3 { font-size: 1.15rem; }

p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

.wrap {
  width: 100%;
  max-width: var(--measure);
  margin: 0 auto;
  padding: 0 22px;
}

.muted { color: var(--ink-soft); }
.small { font-size: 0.9rem; }

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--canvas) 88%, transparent);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--hairline);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  gap: 18px;
  min-height: 62px;
  flex-wrap: wrap;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.01em;
}
.brand:hover { text-decoration: none; }
.brand svg { width: 26px; height: 26px; flex: none; }
.brand small {
  display: block;
  font-size: 0.68rem;
  font-weight: 500;
  color: var(--ink-faint);
  letter-spacing: 0.02em;
}

.site-nav {
  margin-left: auto;
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}
.site-nav a {
  color: var(--ink-soft);
  font-size: 0.92rem;
  font-weight: 500;
  padding: 7px 11px;
  border-radius: 999px;
}
.site-nav a:hover {
  text-decoration: none;
  color: var(--brand);
  background: var(--brand-soft);
}
.site-nav a[aria-current="page"] { color: var(--brand); background: var(--brand-soft); }

/* On a phone the in-page jump links would wrap the sticky header onto three rows
   and swallow a third of the screen. Keep only the two real destinations. */
@media (max-width: 780px) {
  .site-nav a[href^="#"] { display: none; }
  .site-header .wrap { min-height: 56px; flex-wrap: nowrap; }
  /* Dropping the tagline keeps brand and nav on one row at 375px. */
  .site-header .brand small { display: none; }
  .site-nav a { padding: 6px 9px; font-size: 0.86rem; }
}

/* ---------- Hero ---------- */

.hero { padding: clamp(44px, 8vw, 92px) 0 clamp(30px, 5vw, 60px); }

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(30px, 5vw, 56px);
  align-items: center;
}
@media (min-width: 900px) {
  .hero-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 440px); }
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--brand);
  background: var(--brand-soft);
  padding: 6px 13px;
  border-radius: 999px;
  margin-bottom: 20px;
}
.eyebrow svg { width: 15px; height: 15px; flex: none; }

.hero p.lede {
  font-size: clamp(1.02rem, 2.2vw, 1.2rem);
  color: var(--ink-soft);
  max-width: 34em;
}

.hero-points {
  list-style: none;
  margin: 26px 0 30px;
  padding: 0;
  display: grid;
  gap: 10px;
}
.hero-points li {
  display: flex;
  gap: 11px;
  align-items: flex-start;
  color: var(--ink);
}
.hero-points svg { width: 19px; height: 19px; flex: none; margin-top: 3px; color: var(--brand); }

.badges { display: flex; flex-wrap: wrap; gap: 9px; }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 7px 13px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--hairline);
  color: var(--ink-soft);
  box-shadow: var(--shadow);
}
.badge svg { width: 15px; height: 15px; flex: none; }
.badge.is-brand { color: var(--brand); border-color: color-mix(in srgb, var(--brand) 34%, transparent); }
.badge.is-positive { color: var(--positive); border-color: color-mix(in srgb, var(--positive) 34%, transparent); }
.badge.is-accent { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 34%, transparent); }

/* ---------- Phone frames ---------- */

.phone {
  position: relative;
  border-radius: 42px;
  padding: 9px;
  background: linear-gradient(160deg, #3a3a3f, #16161a 55%, #2c2c31);
  box-shadow: var(--shadow-lg);
  margin: 0 auto;
  max-width: 320px;
}
.phone img {
  border-radius: 34px;
  width: 100%;
  background: var(--canvas);
}
.phone figcaption {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: -32px;
  white-space: nowrap;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--ink-faint);
}

.phone-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  align-items: start;
}
.phone-pair .phone { max-width: none; }
.phone-pair .phone:first-child { transform: rotate(-3deg); }
.phone-pair .phone:last-child { transform: rotate(3deg) translateY(16px); }
@media (max-width: 560px) {
  .phone-pair { grid-template-columns: 1fr; }
  .phone-pair .phone:first-child,
  .phone-pair .phone:last-child { transform: none; }
  .phone-pair .phone:last-child { display: none; }
}

/* ---------- Sections ---------- */

section { padding: clamp(40px, 6vw, 78px) 0; }
section.tint { background: var(--surface-alt); border-block: 1px solid var(--hairline); }

.section-head { max-width: 42em; margin-bottom: clamp(26px, 4vw, 44px); }
.section-head p { color: var(--ink-soft); font-size: 1.03rem; }

.cards {
  display: grid;
  gap: var(--gap);
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.card {
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow);
}
.card h3 { margin-bottom: 6px; }
.card p { color: var(--ink-soft); font-size: 0.95rem; }

.icon-chip {
  width: 40px;
  height: 40px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  background: var(--brand-soft);
  color: var(--brand);
  margin-bottom: 14px;
}
.icon-chip svg { width: 20px; height: 20px; }
.icon-chip.accent { background: var(--accent-soft); color: var(--accent); }
.icon-chip.positive { background: color-mix(in srgb, var(--positive) 12%, transparent); color: var(--positive); }

/* Alternating feature rows */

.feature {
  display: grid;
  gap: clamp(26px, 5vw, 56px);
  align-items: center;
  padding: clamp(30px, 5vw, 52px) 0;
  border-top: 1px solid var(--hairline);
}
.feature:first-of-type { border-top: 0; }
@media (min-width: 860px) {
  .feature { grid-template-columns: minmax(0, 1fr) minmax(0, 330px); }
  .feature.flip > .feature-text { order: 2; }
  .feature.flip > .feature-shot { order: 1; }
}

.feature-text h3 {
  font-size: clamp(1.35rem, 3vw, 1.85rem);
  letter-spacing: -0.02em;
}
.feature-text p { color: var(--ink-soft); }
.feature-text ul {
  margin: 16px 0 0;
  padding-left: 0;
  list-style: none;
  display: grid;
  gap: 8px;
}
.feature-text li {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 0.95rem;
  color: var(--ink);
}
.feature-text li::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--brand);
  flex: none;
  margin-top: 9px;
}

.kicker {
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--brand);
  margin-bottom: 8px;
}

/* Module chips */

.modules {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fill, minmax(155px, 1fr));
  list-style: none;
  margin: 0;
  padding: 0;
}
.modules li {
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-s);
  padding: 13px 15px;
  font-size: 0.93rem;
  font-weight: 600;
  box-shadow: var(--shadow);
}
.modules li span {
  display: block;
  font-weight: 400;
  font-size: 0.79rem;
  color: var(--ink-faint);
  margin-top: 2px;
}
.modules li.later { border-style: dashed; box-shadow: none; opacity: 0.75; }

/* Stat strip */

.stats {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  list-style: none;
  margin: 0;
  padding: 0;
}
.stats li {
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow);
}
.stats b {
  display: block;
  font-size: 1.8rem;
  letter-spacing: -0.03em;
  color: var(--brand);
  line-height: 1.1;
}
.stats span { font-size: 0.87rem; color: var(--ink-soft); }

/* Shot gallery */

.gallery {
  display: grid;
  gap: 30px 20px;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  margin: 0;
  padding: 0;
  list-style: none;
}
.gallery .phone { max-width: 260px; }

/* Notice / callout */

.notice {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  border-radius: var(--radius);
  padding: 18px 20px;
  background: var(--accent-soft);
  border: 1px solid color-mix(in srgb, var(--accent) 28%, transparent);
  color: var(--ink);
}
.notice svg { width: 20px; height: 20px; flex: none; color: var(--accent); margin-top: 2px; }
.notice.warn {
  background: color-mix(in srgb, var(--warning) 12%, transparent);
  border-color: color-mix(in srgb, var(--warning) 32%, transparent);
}
.notice.warn svg { color: var(--warning); }

/* ---------- Legal pages ---------- */

.legal { padding: clamp(34px, 6vw, 60px) 0 clamp(50px, 8vw, 90px); }
.legal-head {
  border-bottom: 1px solid var(--hairline);
  padding-bottom: 26px;
  margin-bottom: 34px;
}
.legal-head p.lede { font-size: 1.08rem; color: var(--ink-soft); max-width: 40em; }

.legal-body { display: grid; grid-template-columns: minmax(0, 1fr); gap: 34px; }
@media (min-width: 1000px) {
  .legal-body { grid-template-columns: 220px minmax(0, 1fr); align-items: start; }
}

.toc {
  position: sticky;
  top: 82px;
  font-size: 0.88rem;
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 16px 18px;
  box-shadow: var(--shadow);
}
.toc h2 {
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 10px;
}
.toc ol { margin: 0; padding-left: 1.1em; display: grid; gap: 6px; }
.toc a { color: var(--ink-soft); }
.toc a:hover { color: var(--brand); }
@media (max-width: 999px) { .toc { position: static; } }

.legal article { max-width: 44em; }
.legal article section {
  padding: 0 0 30px;
  scroll-margin-top: 84px;
}
.legal article h2 {
  font-size: 1.28rem;
  letter-spacing: -0.01em;
  margin-bottom: 10px;
}
.legal article ul { margin: 0 0 1em; padding-left: 1.15em; }
.legal article li { margin-bottom: 0.45em; }
.legal article p, .legal article li { color: var(--ink-soft); }

/* ---------- Footer ---------- */

.site-footer {
  border-top: 1px solid var(--hairline);
  padding: 40px 0 54px;
  background: var(--surface-alt);
}
.footer-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 26px;
  justify-content: space-between;
  align-items: flex-start;
}
.site-footer nav { display: flex; flex-wrap: wrap; gap: 18px; }
.site-footer nav a { color: var(--ink-soft); font-size: 0.92rem; }
.site-footer nav a:hover { color: var(--brand); }
.site-footer .small { color: var(--ink-faint); max-width: 40em; }

/* ---------- A11y ---------- */

:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 3px;
  border-radius: 4px;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .phone-pair .phone:first-child,
  .phone-pair .phone:last-child { transform: none; }
}
