/* Atrium v2
   Palette: overcast fog grey (from the street photo), Sylvie's deep green, Alice's navy,
   and the sapphire of the earring both of them wear, used only for things they share. */
@font-face {
  font-family: "Bodoni Moda";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("fonts/bodoni-moda-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Bodoni Moda";
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/bodoni-moda-italic-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --fog: #e6e8e4;
  --fog-deep: #d9dcd6;
  --paper: #f5f6f3;
  --ink: #1a2230;
  --ink-soft: #4a5262;
  --rule: rgba(26, 34, 48, 0.16);
  --sylvie: #1f4a3f;
  --sylvie-tint: #dfe6e1;
  --alice: #1c2b4a;
  --alice-tint: #dde2ea;
  --taupe: #b5a58c;
  --sapphire: #2457c5;
  --night: #141c2d;
  --night-ink: #e9ebef;
  --night-soft: #a7afbf;

  --sans: "Noto Sans SC", "Source Han Sans SC", "PingFang SC", "Microsoft YaHei UI", "Microsoft YaHei", system-ui, sans-serif;
  --display: "Bodoni Moda", "Bodoni 72", "Didot", "Bodoni MT", Georgia, serif;

  --wrap: 1180px;
  --gutter: clamp(20px, 4vw, 48px);
  --section: clamp(72px, 10vw, 136px);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
body {
  margin: 0;
  background: var(--fog);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
[hidden] { display: none !important; }
img { display: block; max-width: 100%; height: auto; }
h1, h2, h3, p, dl, dd, ol, figure { margin: 0; }
a { color: inherit; }
code {
  font-family: Consolas, "Cascadia Mono", monospace;
  font-size: 0.86em;
  background: rgba(26, 34, 48, 0.07);
  padding: 0.1em 0.35em;
  border-radius: 3px;
  white-space: nowrap;
}
p, dd, summary { text-wrap: pretty; }
h1, h2 { text-wrap: balance; }
:focus-visible { outline: 2px solid var(--sapphire); outline-offset: 3px; border-radius: 2px; }

.wrap { width: min(100% - 2 * var(--gutter), var(--wrap)); margin-inline: auto; }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}
.skip {
  position: absolute; left: 16px; top: -60px; z-index: 50;
  background: var(--ink); color: var(--fog); padding: 8px 14px; border-radius: 999px;
  text-decoration: none;
}
.skip:focus { top: 12px; }

/* The shared gem: a small sapphire rhombus */
.gem {
  display: inline-block;
  width: 0.5em; height: 0.5em;
  background: var(--sapphire);
  transform: rotate(45deg);
  flex: none;
}

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 0 26px;
  border-radius: 999px;
  background: var(--ink); color: var(--fog);
  border: 1px solid var(--ink);
  font-size: 16px; font-weight: 600; letter-spacing: 0.02em;
  text-decoration: none;
  transition: background-color 0.2s, color 0.2s;
}
.btn:hover { background: var(--alice); }
.btn-ghost { background: transparent; color: var(--ink); }
.btn-ghost:hover { background: var(--ink); color: var(--fog); }
.btn-small { min-height: 38px; padding: 0 18px; font-size: 14px; }
.btn-block { width: 100%; }
.btn-light { background: var(--night-ink); color: var(--night); border-color: var(--night-ink); }
.btn-light:hover { background: #fff; }

/* Header */
.top {
  position: sticky; top: 0; z-index: 20;
  background: rgba(230, 232, 228, 0.86);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s;
}
.top.is-scrolled { border-bottom-color: var(--rule); }
.top-inner { display: flex; align-items: center; gap: 32px; height: 64px; }
.wordmark {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--display); font-size: 26px; font-weight: 500;
  letter-spacing: 0.01em; text-decoration: none; line-height: 1;
}
.wordmark .gem { width: 9px; height: 9px; }
.nav { display: flex; gap: 28px; margin-left: auto; }
.nav a { font-size: 15px; text-decoration: none; color: var(--ink-soft); }
.nav a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 6px; }

/* Arched window frames: the atrium's glass dome */
.arch { position: relative; }
.arch img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 999px 999px 0 0;
}
.arch::after {
  content: "";
  position: absolute; inset: -12px -12px 0 -12px;
  border: 1px solid var(--rule);
  border-bottom: 0;
  border-radius: 999px 999px 0 0;
  pointer-events: none;
}

/* Framed chronicle cover: keeps all four gold corners intact */
.chronicle-frame { position: relative; }
.chronicle-frame img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 4px;
  box-shadow: 0 24px 56px -22px rgba(20, 28, 45, 0.36);
}
.chronicle-frame::after {
  content: "";
  position: absolute; inset: -12px;
  border: 1px solid var(--rule);
  border-radius: 6px;
  pointer-events: none;
}

/* Section heads */
.section-head { max-width: 34em; margin-bottom: clamp(36px, 5vw, 56px); }
.section-head h2 {
  font-size: clamp(30px, 3.4vw, 42px);
  line-height: 1.25;
  font-weight: 700;
  letter-spacing: 0.01em;
}
.section-head p { margin-top: 14px; color: var(--ink-soft); font-size: 18px; }

/* Hero */
.hero { padding: clamp(40px, 6vw, 80px) 0 var(--section); }
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: clamp(40px, 6vw, 96px);
  align-items: end;
}
.hero h1 {
  font-size: clamp(42px, 5.4vw, 72px);
  line-height: 1.2;
  font-weight: 800;
  letter-spacing: 0.04em;
}
.lead {
  margin-top: 28px;
  max-width: 30em;
  font-size: clamp(17px, 1.5vw, 20px);
  color: var(--ink-soft);
}
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 36px; }
.facts {
  margin-top: clamp(48px, 6vw, 80px);
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--rule);
}
.facts > div { padding: 18px 20px 0 0; }
.facts > div + div { padding-left: 20px; border-left: 1px solid var(--rule); }
.facts dt { font-size: 13px; color: var(--ink-soft); }
.facts dd { margin-top: 4px; font-size: 15px; line-height: 1.6; }
.hero-plate { max-width: 440px; justify-self: end; width: 100%; }

/* Residents */
.residents { padding: var(--section) 0; background: var(--paper); }
.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  gap: clamp(24px, 4vw, 56px);
}
.boundary {
  position: relative;
  width: 1px;
  background: var(--rule);
}
.boundary .gem {
  position: sticky; top: 50vh;
  margin-left: -6px;
  width: 13px; height: 13px;
  box-shadow: 0 0 0 6px var(--paper);
}
.lookbook { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; border-radius: 4px; }
.resident-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-top: 28px; }
.resident h3 {
  font-family: var(--display);
  font-size: clamp(56px, 7vw, 92px);
  font-weight: 500;
  line-height: 0.95;
  letter-spacing: -0.01em;
}
.resident-sylvie h3 { color: var(--sylvie); }
.resident-alice h3 { color: var(--alice); }
.role { font-size: 15px; font-weight: 600; padding: 4px 12px; border-radius: 999px; white-space: nowrap; }
.resident-sylvie .role { background: var(--sylvie-tint); color: var(--sylvie); }
.resident-alice .role { background: var(--alice-tint); color: var(--alice); }
.motto {
  margin-top: 10px;
  font-family: var(--display);
  font-style: italic;
  font-size: 16px;
  color: var(--ink-soft);
  letter-spacing: 0.01em;
}
.resident-lead { margin-top: 18px; font-size: 17px; max-width: 30em; }
.scope { margin-top: 28px; border-top: 1px solid var(--rule); }
.scope > div {
  display: grid; grid-template-columns: 5.5em 1fr; gap: 12px;
  padding: 14px 0; border-bottom: 1px solid var(--rule);
}
.scope dt { font-size: 14px; color: var(--ink-soft); padding-top: 2px; }
.scope dd { font-size: 16px; line-height: 1.6; }
.resident-sylvie .scope > div:last-child dt,
.resident-alice .scope > div:last-child dt { color: var(--ink); font-weight: 600; }

.chat { margin-top: 28px; display: grid; gap: 10px; }
.msg {
  max-width: 85%;
  padding: 10px 16px;
  font-size: 15px; line-height: 1.6;
  border-radius: 18px;
}
.msg.me { justify-self: end; background: var(--fog-deep); border-bottom-right-radius: 4px; }
.msg.her { justify-self: start; color: #fff; border-bottom-left-radius: 4px; }
.resident-sylvie .msg.her { background: var(--sylvie); }
.resident-alice .msg.her { background: var(--alice); }

.shared-note {
  display: flex; align-items: center; justify-content: center; gap: 12px;
  margin-top: clamp(48px, 6vw, 72px);
  padding-top: 28px;
  border-top: 1px solid var(--rule);
  font-size: 16px; color: var(--ink-soft); text-align: center;
}

/* Features */
.features { padding: var(--section) 0; }
.features-grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(40px, 7vw, 112px);
  align-items: start;
}
.features-arch { position: sticky; top: 112px; max-width: 420px; }
.feature { padding: 32px 0; border-top: 1px solid var(--rule); }
.feature:last-child { border-bottom: 1px solid var(--rule); }
.feature h3 { font-size: 21px; line-height: 1.4; font-weight: 700; }
.feature > p { margin-top: 10px; color: var(--ink-soft); max-width: 34em; }

/* Memory card demo */
.memo {
  margin-top: 24px;
  max-width: 30em;
  background: var(--paper);
  border: 1px solid var(--rule);
  border-left: 3px solid var(--sylvie);
  border-radius: 4px;
  padding: 18px 22px 14px;
}
.memo-top { display: flex; justify-content: space-between; gap: 12px; font-size: 13px; color: var(--ink-soft); }
.memo-tag { color: var(--sylvie); font-weight: 600; }
.memo-state.is-fresh { color: var(--sapphire); font-weight: 600; }
.memo-title { margin-top: 10px; font-weight: 700; }
.memo-text { margin-top: 4px; font-size: 16px; line-height: 1.7; }
.memo-edit {
  display: block; width: 100%; margin-top: 8px;
  font: inherit; font-size: 16px; line-height: 1.7; color: var(--ink);
  background: #fff; border: 1px solid var(--rule); border-radius: 4px;
  padding: 8px 10px; resize: vertical;
}
.memo-edit:focus { outline: 2px solid var(--sapphire); outline-offset: 0; }
.memo-actions { display: flex; gap: 20px; margin-top: 10px; }
.link-btn {
  background: none; border: 0; padding: 4px 0; cursor: pointer;
  font: inherit; font-size: 15px; font-weight: 600; color: var(--sylvie);
  text-decoration: underline; text-underline-offset: 5px; text-decoration-thickness: 1px;
}
.link-btn:hover { color: var(--ink); }
#memoCancel { color: var(--ink-soft); font-weight: 400; }

/* Install */
.install { padding: var(--section) 0; background: var(--paper); }
.install-grid {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 4fr);
  gap: clamp(40px, 6vw, 96px);
  align-items: center;
}
.steps { list-style: none; padding: 0; counter-reset: step; }
.steps li {
  counter-increment: step;
  display: grid; grid-template-columns: 64px 1fr;
  padding: 26px 0; border-top: 1px solid var(--rule);
}
.steps li:last-child { border-bottom: 1px solid var(--rule); }
.steps li::before {
  content: counter(step);
  grid-row: span 2;
  font-family: var(--display);
  font-size: 44px; line-height: 0.9; font-weight: 400;
  color: var(--taupe);
}
.steps h3 { font-size: 19px; font-weight: 700; line-height: 1.5; }
.steps p { margin-top: 6px; color: var(--ink-soft); font-size: 16px; max-width: 36em; }

.get {
  background: var(--alice); color: var(--night-ink);
  border-radius: 200px 200px 6px 6px;
  padding: 64px 32px 32px;
}
.get h3 { font-family: var(--display); font-size: 30px; font-weight: 500; line-height: 1.2; text-align: center; }
.get-version { margin-top: 6px; text-align: center; color: var(--night-soft); font-size: 14px; }
.get .btn { margin-top: 28px; background: var(--night-ink); color: var(--alice); border-color: var(--night-ink); }
.get .btn:hover { background: #fff; }
.get .btn-coming {
  background: rgba(233, 235, 239, 0.1);
  color: var(--night-ink);
  border-color: rgba(233, 235, 239, 0.34);
  cursor: pointer;
}
.get .btn-coming:hover { background: rgba(233, 235, 239, 0.17); }
.coming-note {
  margin-top: 12px;
  text-align: center;
  font-size: 13px;
  color: var(--night-soft);
  transition: color 0.2s;
}
.coming-note.is-active { color: var(--night-ink); }
.get-list { margin-top: 24px; }
.get-list > div { padding: 12px 0; border-top: 1px solid rgba(233, 235, 239, 0.18); }
.get-list dt { font-size: 13px; color: var(--night-soft); }
.get-list dd { font-size: 15px; line-height: 1.6; }
.get-note {
  margin-top: 20px; padding-top: 16px;
  border-top: 1px solid rgba(233, 235, 239, 0.18);
  font-size: 14px; line-height: 1.7; color: var(--night-soft);
}

/* FAQ */
.faq { padding: var(--section) 0; }
.faq-grid {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 7fr);
  gap: clamp(32px, 6vw, 96px);
}
.faq-list { border-top: 1px solid var(--rule); }
.faq details { border-bottom: 1px solid var(--rule); }
.faq summary {
  list-style: none; cursor: pointer;
  display: flex; justify-content: space-between; align-items: center; gap: 24px;
  padding: 22px 0;
  font-size: 18px; font-weight: 600;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; flex: none;
  width: 12px; height: 12px;
  border-right: 1.5px solid var(--ink); border-bottom: 1.5px solid var(--ink);
  transform: translateY(-3px) rotate(45deg);
  transition: transform 0.2s;
}
.faq details[open] summary::after { transform: translateY(3px) rotate(-135deg); }
.faq details p { padding: 0 40px 24px 0; color: var(--ink-soft); max-width: 36em; }

/* Closing */
.closing { background: var(--night); color: var(--night-ink); padding: var(--section) 0 0; overflow: hidden; }
.closing-grid {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: clamp(40px, 6vw, 96px);
  align-items: end;
}
.closing-copy { padding-bottom: var(--section); }
.closing h2 { font-size: clamp(30px, 3.8vw, 48px); line-height: 1.3; font-weight: 700; letter-spacing: 0.03em; }
.closing p { margin-top: 20px; color: var(--night-soft); font-size: 18px; max-width: 28em; }
.closing .btn { margin-top: 36px; }
.closing-arch { max-width: 420px; justify-self: end; width: 100%; }
.closing-arch::after { border-color: rgba(233, 235, 239, 0.2); }

/* Footer */
.foot { background: var(--night); color: var(--night-soft); border-top: 1px solid rgba(233, 235, 239, 0.12); }
.foot-inner { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 28px 0; font-size: 14px; }
.wordmark-small { font-size: 20px; color: var(--night-ink); }
.wordmark-small .gem { width: 7px; height: 7px; }

/* The one orchestrated moment: the chronicle cover unveils on load */
@media (prefers-reduced-motion: no-preference) {
  .hero-plate img { animation: open-plate 1.05s cubic-bezier(0.2, 0.7, 0.1, 1) both 0.12s; }
  .hero-plate::after { animation: frame-in 0.8s ease both 0.85s; }
}
@keyframes open-plate {
  from { clip-path: inset(100% 0 0 0 round 4px); }
  to { clip-path: inset(0 0 0 0 round 4px); }
}
@keyframes frame-in { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}

/* Responsive */
@media (max-width: 960px) {
  .nav { display: none; }
  .top-inner { justify-content: space-between; }
  .hero-grid, .features-grid, .install-grid, .faq-grid, .closing-grid { grid-template-columns: 1fr; }
  .hero-plate { justify-self: center; max-width: 380px; order: -1; margin-top: 12px; }
  .features-arch { position: relative; top: auto; max-width: 340px; justify-self: center; }
  .split { grid-template-columns: 1fr; gap: 64px; }
  .boundary { width: auto; height: 1px; }
  .boundary .gem { position: absolute; top: -6px; left: 50%; margin-left: -6px; }
  .get { position: static; max-width: 460px; }
  .closing-copy { padding-bottom: 0; }
  .closing-arch { justify-self: center; max-width: 340px; }
}
@media (max-width: 600px) {
  body { font-size: 16px; }
  code { white-space: normal; overflow-wrap: anywhere; }
  .closing h2 { font-size: 26px; }
  .facts { grid-template-columns: 1fr; }
  .facts > div, .facts > div + div { padding: 14px 0; border-left: 0; border-bottom: 1px solid var(--rule); }
  .resident-head { flex-direction: column; align-items: flex-start; gap: 10px; }
  .scope > div { grid-template-columns: 1fr; gap: 2px; }
  .steps li { grid-template-columns: 48px 1fr; }
  .steps li::before { font-size: 34px; }
  .get { border-radius: 160px 160px 6px 6px; padding: 64px 24px 28px; }
  .faq details p { padding-right: 0; }
  .foot-inner { flex-direction: column; align-items: flex-start; }
  .btn-small { padding: 0 14px; }
}
