/* ─────────────────────────────────────────────
   Twinly — site.css
   One stylesheet for every page. Editorial, quiet, hand-set.
   ───────────────────────────────────────────── */

:root {
  --accent: #D4FF00;
  --ink: #0B0B0A;
  --ink-2: #121210;
  --paper: #EDEAE3;
  --soft: #BDB9B0;
  --muted: #8A8780;
  --line: rgba(237, 234, 227, 0.12);
  --line-strong: rgba(237, 234, 227, 0.28);
  --serif: 'Instrument Serif', Georgia, 'Times New Roman', serif;
  --sans: 'Inter Tight', -apple-system, BlinkMacSystemFont, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, Menlo, monospace;
  --ease: cubic-bezier(0.2, 0.7, 0.1, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  background: var(--ink);
  color: var(--paper);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button { font: inherit; color: inherit; }
::selection { background: var(--accent); color: var(--ink); }

/* ── Atmosphere ─────────────────────────────── */
#stars { position: fixed; inset: 0; z-index: 0; pointer-events: none; }
.wash {
  position: fixed; z-index: 0; pointer-events: none;
  top: -35vh; right: -20vw; width: 80vw; height: 80vh;
  background: radial-gradient(closest-side, var(--accent), transparent);
  opacity: 0.08;
  transition: background 0.6s ease;
}
.grain {
  position: fixed; inset: 0; z-index: 1; pointer-events: none; opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.wrap { position: relative; z-index: 2; max-width: 1240px; margin: 0 auto; padding: 0 32px; }
.narrow { max-width: 760px; }

/* ── Type ───────────────────────────────────── */
.label { font-family: var(--mono); font-size: 11px; letter-spacing: 0.02em; color: var(--muted); }
.serif { font-family: var(--serif); font-weight: 400; }
em, .it { font-style: italic; }
.accent { color: var(--accent); transition: color 0.4s; }

.display {
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(56px, 9vw, 136px);
  line-height: 0.92; letter-spacing: -0.025em;
}
.display em { color: var(--accent); transition: color 0.4s; }

.title {
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(48px, 7vw, 104px);
  line-height: 0.95; letter-spacing: -0.022em;
}

h2.h {
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(36px, 4.6vw, 64px); line-height: 1; letter-spacing: -0.02em;
  max-width: 18ch;
}

.lede { color: var(--soft); font-size: 17px; max-width: 40ch; }

/* ── Nav ────────────────────────────────────── */
.nav {
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding: 26px 0;
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 15px; letter-spacing: -0.01em; }
.brand img { width: 26px; height: 26px; border-radius: 7px; }
.nav-links { display: flex; gap: 28px; font-size: 14px; color: var(--muted); }
.nav-links a { position: relative; transition: color 0.2s; }
.nav-links a:hover, .nav-links a.on { color: var(--paper); }
.nav-links a.on::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: -6px; height: 1px; background: var(--accent);
}
.nav-right { display: flex; align-items: center; gap: 20px; }
.lang { font-family: var(--mono); font-size: 11px; color: var(--muted); background: none; border: none; cursor: pointer; padding: 4px 0; }
.lang b { color: var(--paper); font-weight: 500; }
.nav-get {
  font-size: 13px; font-weight: 500; padding: 7px 12px; border-radius: 6px;
  box-shadow: inset 0 0 0 1px var(--line-strong); transition: background 0.2s, color 0.2s;
}
.nav-get:hover { background: var(--paper); color: var(--ink); }
.menu-btn { display: none; background: none; border: none; cursor: pointer; font-family: var(--mono); font-size: 11px; color: var(--paper); }
.mobile-menu { display: none; }

/* ── Buttons ────────────────────────────────── */
.stores { display: flex; gap: 10px; flex-wrap: wrap; }
.store {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 11px 17px 11px 15px; border-radius: 8px;
  background: var(--paper); color: var(--ink);
  font-size: 14px; font-weight: 500; border: none; cursor: pointer;
  transition: background 0.2s, transform 0.2s var(--ease);
}
.store:hover { background: #fff; }
.store:active { transform: translateY(1px); }
.store.ghost { background: transparent; color: var(--paper); box-shadow: inset 0 0 0 1px var(--line); }
.store.ghost:hover { box-shadow: inset 0 0 0 1px var(--line-strong); }
.store svg { width: 16px; height: 16px; fill: currentColor; flex-shrink: 0; }

.link-arrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 15px; border-bottom: 1px solid var(--line-strong); padding-bottom: 3px;
  transition: border-color 0.2s, gap 0.2s var(--ease);
}
.link-arrow:hover { border-color: var(--accent); gap: 12px; }

/* ── Layout blocks ─────────────────────────── */
.hero {
  display: grid; grid-template-columns: 1fr 340px; gap: 64px; align-items: end;
  padding: 120px 0 96px; border-bottom: 1px solid var(--line);
}
.hero-side p { color: var(--soft); margin-bottom: 28px; max-width: 32ch; }

.page-head { padding: 112px 0 72px; border-bottom: 1px solid var(--line); }
.page-head .label { display: block; margin-bottom: 28px; }
.page-head .lede { margin-top: 28px; }

section.s { padding: 96px 0; border-bottom: 1px solid var(--line); }
.sec-head { display: grid; grid-template-columns: 200px 1fr; gap: 32px; margin-bottom: 56px; }
.split { display: grid; grid-template-columns: 200px 1fr; gap: 32px; }

/* Ticker line under hero */
.ticker {
  display: flex; flex-wrap: wrap; gap: 8px 28px; align-items: center;
  padding: 18px 0; border-bottom: 1px solid var(--line);
  font-family: var(--mono); font-size: 12px; color: var(--muted);
}
.ticker b { color: var(--paper); font-weight: 500; }
.ticker .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); display: inline-block; margin-right: 8px; vertical-align: 1px; }

/* Marquee of dates */
.marquee { overflow: hidden; border-bottom: 1px solid var(--line); padding: 26px 0; mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.marquee-track { display: flex; gap: 44px; width: max-content; animation: marquee 90s linear infinite; }
.marquee span { font-family: var(--serif); font-size: 34px; font-style: italic; color: rgba(237,234,227,0.28); white-space: nowrap; }
.marquee span.today { color: var(--accent); font-style: normal; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* Rows list (instead of cards) */
.rows { border-top: 1px solid var(--line); }
.row-item {
  position: relative;
  display: grid; grid-template-columns: 200px 1fr 1fr; gap: 32px;
  padding: 36px 0; border-bottom: 1px solid var(--line);
  transition: padding 0.35s var(--ease);
}
.row-item::before {
  content: ''; position: absolute; left: 0; top: -1px; height: 1px; width: 0;
  background: var(--accent); transition: width 0.6s var(--ease);
}
.row-item:hover::before { width: 100%; }
.row-item h3 { font-family: var(--serif); font-weight: 400; font-size: 34px; line-height: 1.05; letter-spacing: -0.01em; }
.row-item p { color: var(--soft); font-size: 15px; max-width: 42ch; }

/* Calendar */
.readout .big { font-family: var(--serif); font-size: 72px; line-height: 1; letter-spacing: -0.02em; margin: 8px 0 12px; }
.readout p { color: var(--soft); font-size: 14px; max-width: 24ch; }
.cal { display: grid; gap: 6px; }
.cal-row { display: grid; grid-template-columns: 44px 1fr; align-items: center; gap: 12px; }
.cal-row .m { font-family: var(--mono); font-size: 11px; color: var(--muted); }
.days { display: grid; grid-template-columns: repeat(31, 1fr); gap: 3px; }
.d { aspect-ratio: 1; border-radius: 2px; background: rgba(237,234,227,0.09); cursor: pointer; border: none; transition: background 0.15s, transform 0.15s; }
.d:hover { background: rgba(237,234,227,0.5); transform: scale(1.25); }
.d.today { box-shadow: inset 0 0 0 1px rgba(237,234,227,0.6); }
.d.on { background: var(--accent); }
.d.void { visibility: hidden; }

/* Themes */
.themes { display: grid; grid-template-columns: repeat(6, 1fr); border-top: 1px solid var(--line); }
.theme {
  background: none; border: none; cursor: pointer; text-align: left;
  padding: 28px 20px 24px 0; border-bottom: 2px solid transparent;
  opacity: 0.5; transition: border-color 0.25s, opacity 0.25s;
}
.theme:hover { opacity: 0.85; }
.theme.on { opacity: 1; border-bottom-color: var(--accent); }
.theme img { width: 56px; height: 56px; border-radius: 13px; margin-bottom: 18px; transition: transform 0.4s var(--ease); }
.theme:hover img { transform: rotate(-4deg) translateY(-2px); }
.theme .n { font-size: 15px; font-weight: 500; }
.theme .c { font-family: var(--mono); font-size: 11px; color: var(--muted); margin-top: 2px; }

/* Compare table */
.compare { width: 100%; border-collapse: collapse; }
.compare th, .compare td { text-align: left; padding: 20px 0; border-bottom: 1px solid var(--line); font-weight: 400; }
.compare th { font-family: var(--mono); font-size: 11px; color: var(--muted); }
.compare td:first-child { font-size: 17px; }
.compare td.c, .compare th.c { text-align: center; width: 140px; }
.compare .yes { color: var(--accent); font-family: var(--serif); font-size: 24px; }
.compare .no { color: var(--muted); }

/* Four columns */
.cols4 { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--line); }
.cols4 > div { padding: 28px 24px 32px 0; border-right: 1px solid var(--line); }
.cols4 > div + div { padding-left: 24px; }
.cols4 > div:last-child { border-right: none; }
.cols4 h4 { font-family: var(--serif); font-weight: 400; font-size: 28px; margin: 20px 0 8px; }
.cols4 p { color: var(--soft); font-size: 14px; }

/* FAQ */
.faq { border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  list-style: none; cursor: pointer;
  display: grid; grid-template-columns: 1fr 24px; gap: 24px; align-items: baseline;
  padding: 26px 0; font-family: var(--serif); font-size: 26px; line-height: 1.15;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; font-family: var(--mono); font-size: 16px; color: var(--muted); transition: transform 0.3s var(--ease); justify-self: end; }
.faq details[open] summary::after { transform: rotate(45deg); color: var(--accent); }
.faq details p { color: var(--soft); max-width: 60ch; padding: 0 0 28px; }

/* Long-form legal prose */
.prose { padding: 72px 0 96px; }
.prose h2 { font-family: var(--serif); font-weight: 400; font-size: 30px; line-height: 1.15; margin: 56px 0 16px; letter-spacing: -0.01em; }
.prose h2:first-child { margin-top: 0; }
.prose p, .prose li { color: var(--soft); font-size: 16px; }
.prose p { margin-bottom: 16px; }
.prose ul { padding-left: 18px; margin-bottom: 16px; }
.prose li { margin-bottom: 8px; }
.prose li::marker { color: var(--muted); }
.prose strong { color: var(--paper); font-weight: 500; }
.prose a { color: var(--paper); border-bottom: 1px solid var(--accent); }
.toc { position: sticky; top: 32px; align-self: start; display: flex; flex-direction: column; gap: 10px; font-size: 13px; color: var(--muted); padding-top: 72px; }
.toc a:hover { color: var(--paper); }

/* Closing block */
.end { display: grid; grid-template-columns: 1fr auto; gap: 48px; align-items: end; padding: 120px 0; }
.end .title { max-width: 14ch; }

/* Small centered card pages (invite / reset) */
.solo { min-height: calc(100vh - 80px); display: grid; place-items: center; padding: 64px 0; }
.solo-inner { width: 100%; max-width: 440px; }
.solo .title { font-size: clamp(44px, 6vw, 72px); margin: 28px 0 18px; }
.solo .lede { margin-bottom: 36px; }

/* Forms */
.field { margin-bottom: 22px; }
.field label { display: block; font-family: var(--mono); font-size: 11px; color: var(--muted); margin-bottom: 8px; }
.input-wrap { position: relative; }
.input {
  width: 100%; background: transparent; color: var(--paper);
  border: none; border-bottom: 1px solid var(--line-strong);
  padding: 12px 40px 12px 0; font: 400 18px var(--sans); outline: none;
  transition: border-color 0.2s;
}
.input:focus { border-bottom-color: var(--accent); }
.input::placeholder { color: #55534e; }
.eye { position: absolute; right: 0; top: 50%; transform: translateY(-50%); background: none; border: none; color: var(--muted); cursor: pointer; padding: 6px; }
.eye:hover { color: var(--paper); }
.meter { height: 2px; background: var(--line); margin-top: 10px; }
.meter > div { height: 100%; width: 0; transition: width 0.3s, background 0.3s; }
.form-error { display: none; font-size: 14px; color: #F87171; border-left: 2px solid #F87171; padding: 4px 0 4px 12px; margin-bottom: 22px; }
.btn-block { width: 100%; justify-content: center; padding: 15px; font-size: 15px; }
.btn-block:disabled { opacity: 0.6; cursor: default; }
.spin { width: 16px; height: 16px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: spin 0.8s linear infinite; display: inline-block; }
.spin.lg { width: 28px; height: 28px; color: var(--accent); }
@keyframes spin { to { transform: rotate(360deg); } }
.state { display: none; }
.state.on { display: block; animation: rise 0.5s var(--ease); }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ── Footer ─────────────────────────────────── */
.footer { position: relative; z-index: 2; border-top: 1px solid var(--line); }
.foot-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 32px; padding: 64px 0 48px; }
.foot-grid h5 { font-family: var(--mono); font-size: 11px; font-weight: 400; color: var(--muted); margin-bottom: 16px; }
.foot-grid ul { list-style: none; display: flex; flex-direction: column; gap: 10px; font-size: 14px; color: var(--soft); }
.foot-grid a:hover { color: var(--paper); }
.foot-brand p { color: var(--muted); font-size: 14px; max-width: 28ch; margin-top: 14px; }
.foot-bottom { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 22px 0 36px; border-top: 1px solid var(--line); font-family: var(--mono); font-size: 11px; color: var(--muted); }
.foot-word { font-family: var(--serif); font-size: clamp(96px, 22vw, 320px); line-height: 0.8; letter-spacing: -0.04em; color: rgba(237,234,227,0.06); padding-top: 24px; user-select: none; overflow: hidden; white-space: nowrap; }

/* ── Reveal on scroll ───────────────────────── */
.rv { opacity: 0; transform: translateY(14px); transition: opacity 0.9s var(--ease), transform 0.9s var(--ease); }
.rv.in { opacity: 1; transform: none; }
.rv.d1 { transition-delay: 0.08s; } .rv.d2 { transition-delay: 0.16s; } .rv.d3 { transition-delay: 0.24s; }
@media (prefers-reduced-motion: reduce) {
  .rv { opacity: 1; transform: none; transition: none; }
  .marquee-track { animation: none; }
}

/* ── Responsive ─────────────────────────────── */
@media (max-width: 900px) {
  .wrap { padding: 0 20px; }
  .nav-links, .nav-get { display: none; }
  .menu-btn { display: block; }
  .mobile-menu.open { display: flex; flex-direction: column; gap: 4px; padding: 12px 0 20px; border-bottom: 1px solid var(--line); }
  .mobile-menu a { font-family: var(--serif); font-size: 32px; padding: 4px 0; }
  .hero, .end { grid-template-columns: 1fr; gap: 40px; padding: 80px 0 64px; }
  .sec-head, .split { grid-template-columns: 1fr; gap: 20px; }
  .row-item { grid-template-columns: 1fr; gap: 12px; }
  .themes { grid-template-columns: repeat(3, 1fr); }
  .cols4 { grid-template-columns: 1fr 1fr; }
  .cols4 > div { border-right: none; border-bottom: 1px solid var(--line); padding-left: 0 !important; }
  .days { gap: 2px; }
  .cal-row { grid-template-columns: 30px 1fr; gap: 8px; }
  .foot-grid { grid-template-columns: 1fr 1fr; }
  .foot-brand { grid-column: 1 / -1; }
  .toc { display: none; }
  .compare td.c, .compare th.c { width: 80px; }
  section.s { padding: 72px 0; }
  .page-head { padding: 80px 0 56px; }
}

