/* Flatment marketing site. One dark system, shared by every page. */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --ink: #0F172A;
  --surface: #1E293B;
  --surface-2: #273449;
  --line: rgba(148, 163, 184, 0.18);
  --line-strong: rgba(148, 163, 184, 0.34);
  --text: #F8FAFC;
  --text-2: #CBD5E1;
  --text-3: #94A3B8;
  --sky: #38BDF8;
  --green: #34D399;
  --amber: #FBBF24;
  /* Logo colours: green for societies, amber for PGs, sky for co-living and discovery */
  --society: var(--green);
  --pg: var(--amber);
  --coliving: var(--sky);
  --discovery: var(--sky);
  --accent: var(--sky);
  --radius: 22px;
  --wrap: 1180px;
}

html { scroll-behavior: smooth; background: var(--ink); }
body {
  background: var(--ink);
  color: var(--text);
  font-family: 'Geist', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
img, video { display: block; max-width: 100%; }
ul { list-style: none; }
:focus-visible { outline: 2px solid var(--sky); outline-offset: 3px; border-radius: 6px; }

.wrap { width: min(var(--wrap), calc(100% - 3rem)); margin: 0 auto; }
.aurora { position: relative; isolation: isolate; }
.aurora::before {
  content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(60% 50% at 80% 8%, color-mix(in srgb, var(--accent) 22%, transparent), transparent 70%),
    radial-gradient(50% 45% at 6% 30%, rgba(52, 211, 153, 0.13), transparent 70%);
}

/* Nav */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(15, 23, 42, 0.8);
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  border-bottom: 1px solid var(--line);
}
.nav-inner { display: flex; align-items: center; gap: 1.5rem; height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 0.625rem; font-weight: 700; letter-spacing: -0.02em; }
.brand svg { width: 30px; height: 30px; }
.nav-links { display: flex; align-items: center; gap: 0.25rem; margin-left: auto; font-size: 0.9375rem; }
.nav-links a { padding: 0.4375rem 0.8125rem; border-radius: 10px; color: var(--text-2); transition: color .15s, background .15s; }
.nav-links a:hover, .nav-links a[aria-current] { color: var(--text); background: rgba(255, 255, 255, 0.07); }
.nav-menu { display: none; margin-left: auto; }
.nav-menu summary {
  list-style: none; cursor: pointer; padding: 0.4375rem 0.875rem; font-size: 0.9375rem; font-weight: 500;
  border: 1px solid var(--line-strong); border-radius: 999px;
}
.nav-menu summary::-webkit-details-marker { display: none; }
.nav-menu-panel {
  position: absolute; left: 0; right: 0; top: 64px; padding: 0.75rem 1.5rem 1.25rem;
  background: var(--surface); border-bottom: 1px solid var(--line);
}
.nav-menu-panel a { display: block; padding: 0.75rem 0; font-size: 1.0625rem; border-bottom: 1px solid var(--line); }
.nav-menu-panel a:last-child { border-bottom: 0; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem; white-space: nowrap;
  padding: 0.8125rem 1.625rem; border-radius: 999px; font-size: 1rem; font-weight: 600;
  background: var(--sky); color: var(--ink);
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 14px 30px -12px rgba(56, 189, 248, 0.55); }
.btn-sm { padding: 0.5rem 1.0625rem; font-size: 0.9375rem; }
.btn-ghost { background: rgba(255, 255, 255, 0.06); color: var(--text); box-shadow: inset 0 0 0 1px var(--line-strong); }
.btn-ghost:hover { background: rgba(255, 255, 255, 0.11); box-shadow: inset 0 0 0 1px var(--line-strong); }
.btn-row { display: flex; flex-wrap: wrap; gap: 0.875rem; }
.link { color: var(--accent); font-weight: 600; }
.link:hover { text-decoration: underline; text-underline-offset: 4px; }

/* Type */
.kicker { font-size: 0.8125rem; font-weight: 600; letter-spacing: 0.15em; text-transform: uppercase; color: var(--accent); }
h1, h2, h3 { font-weight: 700; letter-spacing: -0.035em; line-height: 1.06; text-wrap: balance; }
.display { font-size: clamp(3rem, 8.4vw, 6.25rem); font-weight: 800; letter-spacing: -0.048em; line-height: 0.99; }
.h1 { font-size: clamp(2.5rem, 6vw, 4.5rem); font-weight: 800; letter-spacing: -0.042em; line-height: 1.02; }
.h2 { font-size: clamp(2rem, 4.4vw, 3.25rem); }
.h3 { font-size: clamp(1.5rem, 2.8vw, 2.25rem); letter-spacing: -0.03em; }
.lead { font-size: clamp(1.0625rem, 2vw, 1.25rem); line-height: 1.55; color: var(--text-2); text-wrap: pretty; }
.grad {
  background: linear-gradient(95deg, var(--sky) 0%, var(--green) 58%, var(--amber) 112%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* Sections */
.section { padding: clamp(4.5rem, 9vw, 7.5rem) 0; }
.section + .section { border-top: 1px solid var(--line); }
.section-head { max-width: 780px; margin-bottom: clamp(2.5rem, 5vw, 4rem); }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.section-head .kicker { display: block; margin-bottom: 1rem; }
.section-head .lead { margin-top: 1.125rem; }
.page-hero { padding: clamp(4.5rem, 10vw, 8rem) 0 clamp(3.5rem, 7vw, 5.5rem); }
.page-hero .kicker { display: block; margin-bottom: 1.125rem; }
.page-hero .lead { margin-top: 1.5rem; max-width: 720px; }
.page-hero .btn-row { margin-top: 2.25rem; }

/* Home hero */
.hero { padding: clamp(4rem, 8vw, 6.5rem) 0 clamp(4rem, 7vw, 5.5rem); text-align: center; }
.pill {
  display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.4375rem 1rem; margin-bottom: 1.75rem;
  font-size: 0.875rem; font-weight: 500; color: #E2E8F0;
  background: rgba(255, 255, 255, 0.06); border: 1px solid var(--line); border-radius: 999px;
}
.pill i { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 4px rgba(52, 211, 153, 0.18); }
.hero .lead { max-width: 660px; margin: 1.625rem auto 2.25rem; }
.hero .btn-row { justify-content: center; }
.demo {
  width: min(1120px, 100%); margin: clamp(3rem, 6vw, 4.5rem) auto 0; padding: 7px; border-radius: 24px;
  background: linear-gradient(160deg, rgba(255,255,255,.24), rgba(255,255,255,.04) 45%, rgba(56,189,248,.34));
  box-shadow: 0 50px 120px -30px rgba(0,0,0,.85), 0 0 120px -30px rgba(56,189,248,.4);
}
.demo video { width: 100%; aspect-ratio: 16 / 9; border-radius: 18px; background: var(--ink); object-fit: cover; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); margin-top: clamp(3rem, 6vw, 4.5rem); text-align: left; }
.stats > div { padding: 0.25rem 1.75rem; border-left: 1px solid var(--line); }
.stats > div:first-child { border-left: 0; }
.stats dt { font-size: clamp(2rem, 4vw, 3rem); font-weight: 700; letter-spacing: -0.04em; line-height: 1.1; }
.stats dd { margin-top: 0.25rem; font-size: 0.9375rem; color: var(--text-3); }

/* Phone */
.phone {
  position: relative; flex: none; width: 100%; max-width: 330px; padding: 2.2%;
  aspect-ratio: 1180 / 2556; border-radius: 13.5% / 6.2%;
  background: linear-gradient(145deg, #64748B 0%, #334155 22%, #0F172A 55%, #475569 100%);
  box-shadow: 0 40px 90px -24px rgba(0,0,0,.85), 0 0 100px -30px color-mix(in srgb, var(--accent) 65%, transparent);
}
.phone-screen { position: relative; width: 100%; height: 100%; overflow: hidden; border-radius: 12.4% / 5.7%; background: #0B1324; }
.phone-screen video, .phone-screen img { width: 100%; height: 100%; object-fit: cover; }
/* A clean Dynamic Island, covering the capture dot in the source recording. */
.phone-screen::after { content: ''; position: absolute; left: 26.6%; width: 45%; top: 1.15%; height: 4.6%; border-radius: 999px; background: #000; }

/* Spotlight */
.spotlight { display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: clamp(2.5rem, 7vw, 6rem); }
.spotlight + .spotlight { margin-top: clamp(5rem, 10vw, 8.5rem); }
.spotlight-media { display: flex; justify-content: center; }
.spotlight.flip .spotlight-media { order: -1; }
.spotlight .kicker { display: block; margin-bottom: 0.875rem; }
.spotlight .lead { margin-top: 1rem; }
.ticks { margin-top: 1.5rem; display: grid; gap: 0.625rem; color: var(--text-2); }
.ticks li { position: relative; padding-left: 1.75rem; }
.ticks li::before {
  content: ''; position: absolute; left: 0.1875rem; top: 0.5em; width: 0.6875rem; height: 0.375rem;
  border-left: 2px solid var(--accent); border-bottom: 2px solid var(--accent); transform: rotate(-45deg);
}

/* Cards */
.grid { display: grid; gap: 1.125rem; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.card {
  position: relative; display: block; padding: 1.75rem; border-radius: var(--radius);
  background: linear-gradient(180deg, var(--surface-2), var(--surface)); border: 1px solid var(--line);
}
a.card { transition: transform .25s ease, border-color .25s ease; }
a.card:hover { transform: translateY(-4px); border-color: color-mix(in srgb, var(--accent) 60%, transparent); }
.card h3 { font-size: 1.25rem; letter-spacing: -0.02em; line-height: 1.25; margin-bottom: 0.5rem; }
.card p { color: var(--text-2); font-size: 1rem; line-height: 1.5; }
.card .kicker { display: block; margin-bottom: 0.875rem; font-size: 0.75rem; }
.card .link { display: inline-block; margin-top: 1.125rem; font-size: 0.9375rem; }
.a-society { --accent: var(--society); }
.a-pg { --accent: var(--pg); }
.a-coliving { --accent: var(--coliving); }
.a-discovery { --accent: var(--discovery); }
.a-amber { --accent: var(--amber); }
.a-green { --accent: var(--green); }
.a-sky { --accent: var(--sky); }

/* Feature chips */
.feature-group + .feature-group { margin-top: 2.25rem; }
.feature-group .kicker { display: block; margin-bottom: 0.875rem; }
.chips { display: flex; flex-wrap: wrap; gap: 0.625rem; }
.chips li {
  padding: 0.5rem 1rem; font-size: 0.9375rem; font-weight: 500; border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent) 38%, transparent);
}

/* Themes */
.themes { display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(0.75rem, 2.5vw, 2rem); }
.themes figcaption { margin-top: 1rem; text-align: center; font-size: 0.9375rem; color: var(--text-2); }
.themes .phone { max-width: none; }

/* CTA + badges */
.cta { text-align: center; }
.cta .lead { max-width: 620px; margin: 1.125rem auto 2.25rem; }
.badges { display: flex; flex-wrap: wrap; gap: 0.875rem; justify-content: center; }
.badge {
  display: inline-flex; align-items: center; gap: 0.75rem; padding: 0.625rem 1.375rem; border-radius: 14px;
  background: var(--text); color: var(--ink); transition: transform .2s ease;
}
.badge:hover { transform: translateY(-2px); }
.badge svg { width: 28px; height: 28px; fill: currentColor; }
.badge span { display: block; font-size: 1.125rem; font-weight: 700; letter-spacing: -0.02em; line-height: 1.15; }
.badge small { display: block; font-size: 0.6875rem; font-weight: 500; letter-spacing: 0; opacity: 0.7; }

/* Prose */
.prose { max-width: 760px; color: var(--text-2); }
.prose h2 { margin: 2.75rem 0 0.875rem; font-size: 1.5rem; letter-spacing: -0.025em; line-height: 1.2; color: var(--text); }
.prose h3 { margin: 1.75rem 0 0.625rem; font-size: 1.125rem; letter-spacing: -0.015em; line-height: 1.3; color: var(--text); }
.prose p { margin-bottom: 1rem; }
.prose ul, .prose ol { margin: 0 0 1rem 1.25rem; }
.prose ul { list-style: disc; }
.prose ol { list-style: decimal; }
.prose li { margin-bottom: 0.5rem; padding-left: 0.25rem; }
.prose li::marker { color: var(--text-3); }
.prose strong { color: var(--text); font-weight: 600; }
.prose a { color: var(--sky); }
.prose a:hover { text-decoration: underline; }
.prose table { width: 100%; margin-bottom: 1.25rem; border-collapse: collapse; font-size: 0.9375rem; }
.prose th, .prose td { padding: 0.625rem 0.75rem; border: 1px solid var(--line); text-align: left; }
.prose th { color: var(--text); background: var(--surface); }
.prose .note { padding: 0.875rem 1.125rem; margin: 1rem 0 1.25rem; font-size: 0.9375rem; border-radius: 12px; background: rgba(56,189,248,.09); border: 1px solid rgba(56,189,248,.28); }
.doc-date { margin-top: 1rem; color: var(--text-3); font-size: 0.9375rem; }

/* Footer */
.footer { padding: 4rem 0 2.5rem; border-top: 1px solid var(--line); font-size: 0.9375rem; }
.footer-grid { display: grid; grid-template-columns: 2fr repeat(3, 1fr); gap: 2.5rem; }
.footer p { margin-top: 0.75rem; color: var(--text-3); }
.footer h4 { margin-bottom: 0.875rem; font-size: 0.8125rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-3); }
.footer li + li { margin-top: 0.5rem; }
.footer li a { color: var(--text-2); }
.footer li a:hover { color: var(--text); }
.footer-copy { margin-top: 3rem; padding-top: 1.5rem; border-top: 1px solid var(--line); color: var(--text-3); }

/* Scroll reveal, applied by site.js so the page still works without JavaScript */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s cubic-bezier(.2,.7,.2,1); }
.reveal.in { opacity: 1; transform: none; }

@media (max-width: 980px) {
  .nav-links { display: none; }
  .nav-menu { display: block; }
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: repeat(3, 1fr); }
  .footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 760px) {
  body { font-size: 16px; }
  .spotlight { grid-template-columns: 1fr; }
  .spotlight.flip .spotlight-media { order: 0; }
  .spotlight-media .phone { max-width: 280px; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .themes { grid-template-columns: repeat(2, 1fr); }
  .stats { grid-template-columns: repeat(2, 1fr); row-gap: 1.75rem; }
  .stats > div { padding: 0.25rem 1.25rem; }
  .stats > div:nth-child(3) { border-left: 0; }
  .demo { width: min(360px, 100%); border-radius: 28px; }
  .demo video { aspect-ratio: 9 / 16; border-radius: 22px; }
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .btn, .badge, a.card { transition: none; }
}
