/* Quiet Studio — built from the "Website" page in the app's Figma file.
   Tokens mirror ios/QuietLedger/Design/Theme.swift (Color / Light and Color / Dark). */

@font-face {
  font-family: "Instrument Serif";
  src: url("/fonts/InstrumentSerif-Regular.woff") format("woff");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  --canvas: #f4f4f1;
  --surface: #ffffff;
  --subtle: #ecece8;
  --border: #e5e5e0;
  --ink: #0b0b0c;
  --secondary: #6e6e73;
  --tertiary: #8e8e93;
  --on-inverse: #ffffff;
  --cash: #4f7cf7;
  --invest: #8b6cf0;
  --property: #2fae84;
  --crypto: #f0a23b;
  --header-bg: rgba(244, 244, 241, 0.78);

  --serif: "Instrument Serif", ui-serif, Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --gutter: 20px;
  --max: 1120px;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --canvas: #09090a;
    --surface: #141416;
    --subtle: #1d1d20;
    --border: #242428;
    --ink: #f5f5f3;
    --secondary: #9b9ba1;
    --tertiary: #76767c;
    --on-inverse: #0b0b0c;
    --cash: #6b93ff;
    --invest: #a28bff;
    --property: #45c79b;
    --crypto: #f5b45e;
    --header-bg: rgba(9, 9, 10, 0.72);
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font: 17px/1.55 var(--sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

a { color: inherit; text-decoration-color: var(--tertiary); text-underline-offset: 4px; }
a:hover { text-decoration-color: currentColor; }
::selection { background: var(--ink); color: var(--canvas); }
img { display: block; max-width: 100%; height: auto; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--header-bg);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--border);
}

.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 72px; gap: 16px; }

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-family: var(--serif);
  font-size: 24px;
  line-height: 1;
}

.brand img { width: 28px; height: 28px; border-radius: 7px; border: 1px solid var(--border); }

.site-nav { display: flex; gap: 28px; font-size: 15px; }
.site-nav a { color: var(--secondary); text-decoration: none; transition: color .2s; }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--ink); }

/* ---------- Type ---------- */

.overline { font-size: 11px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--secondary); }

.display {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(72px, 9vw, 128px);
  line-height: 0.92;
  letter-spacing: -0.025em;
  margin: 28px 0;
}

.lede { font-size: clamp(18px, 1.6vw, 21px); line-height: 1.52; color: var(--secondary); max-width: 31em; margin: 0; }

.h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(42px, 4.6vw, 64px);
  line-height: 1.03;
  letter-spacing: -0.02em;
  margin: 14px 0 0;
  max-width: 13em;
}
.h2-sm { font-size: clamp(40px, 3.9vw, 56px); }

.note { font-size: 13px; color: var(--tertiary); margin: 14px 0 0; }

.button {
  display: inline-flex;
  align-items: center;
  height: 52px;
  padding: 0 26px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--on-inverse);
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}

.link-arrow { font-size: 15px; font-weight: 600; text-decoration: none; }
.link-arrow:hover { text-decoration: underline; }

/* The four colors from the app icon: cash, investments, property, crypto. */
.pills { display: flex; gap: 6px; align-items: center; }
.pills i { display: block; height: 8px; border-radius: 4px; }
.pills i:nth-child(1) { width: 28px; background: var(--cash); }
.pills i:nth-child(2) { width: 72px; background: var(--invest); }
.pills i:nth-child(3) { width: 44px; background: var(--property); }
.pills i:nth-child(4) { width: 12px; background: var(--crypto); }

/* ---------- Device (Apple's official iPhone 17 Pro bezel, used as is) ---------- */

.device { display: block; flex: none; }
.device img { width: 100%; }
.hero-device { width: 340px; }
.feature-device { width: 300px; }

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

.hero { padding: 112px 0; }
.hero .wrap { display: flex; align-items: center; gap: 80px; }
.hero-copy { flex: 1; min-width: 0; }
.hero-actions { display: flex; align-items: center; gap: 28px; flex-wrap: wrap; margin-top: 28px; }

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

.section { padding: 120px 0; border-top: 1px solid var(--border); }
.section-head { margin-bottom: 56px; }

.principles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; list-style: none; margin: 0; padding: 0; }

.principle {
  display: flex;
  flex-direction: column;
  gap: 48px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 32px;
}
.principle .num { font-family: var(--serif); font-size: 48px; line-height: 1; color: var(--tertiary); }
.principle h3 { font-size: 19px; line-height: 24px; font-weight: 600; letter-spacing: -0.01em; margin: 0 0 8px; }
.principle p { margin: 0; color: var(--secondary); font-size: 15px; line-height: 23px; }

.feature {
  display: flex;
  align-items: center;
  gap: 72px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 32px;
  padding: 72px;
}
.feature-copy { flex: 1; min-width: 0; }
.feature-copy > p { color: var(--secondary); line-height: 26px; margin: 20px 0 0; }

.feature-list { list-style: none; margin: 20px 0 0; padding: 0; }
.feature-list li { display: flex; gap: 16px; padding: 18px 0; border-top: 1px solid var(--border); }
.feature-list b { font-family: var(--serif); font-weight: 400; font-size: 24px; line-height: 26px; width: 32px; flex: none; color: var(--tertiary); }
.feature-list strong { display: block; font-weight: 600; }
.feature-list span { color: var(--secondary); font-size: 15px; }

.contact { padding: 128px 0; text-align: center; }
.contact .wrap { display: flex; flex-direction: column; align-items: center; gap: 28px; }
.contact .h2 { margin: 0; max-width: 12em; }

/* ---------- Documents ---------- */

.doc { max-width: 720px; margin: 0 auto; padding: clamp(56px, 8vw, 96px) var(--gutter) 96px; }
.doc h1 { font-family: var(--serif); font-weight: 400; font-size: clamp(48px, 8vw, 80px); line-height: 1; letter-spacing: -0.025em; margin: 14px 0 20px; }
.doc .lede { margin-bottom: 8px; }
.doc h2 { font-family: var(--serif); font-weight: 400; font-size: 32px; line-height: 1.1; letter-spacing: -0.015em; margin: 56px 0 12px; padding-top: 28px; border-top: 1px solid var(--border); }
.doc h3 { font-size: 18px; font-weight: 600; margin: 32px 0 6px; }
.doc ul { padding-left: 20px; }
.doc li { margin: 6px 0; }
.doc li::marker { color: var(--tertiary); }

.doc-card { background: var(--surface); border: 1px solid var(--border); border-radius: 24px; padding: 24px 28px; margin-top: 36px; }
.doc-card .big { font-family: var(--serif); font-size: clamp(26px, 4vw, 34px); line-height: 1.15; letter-spacing: -0.01em; display: inline-block; margin-top: 6px; }

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

.site-footer { border-top: 1px solid var(--border); color: var(--secondary); font-size: 13px; }
.site-footer .wrap { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 16px 32px; padding-top: 40px; padding-bottom: 56px; }
.site-footer nav { display: flex; gap: 22px; flex-wrap: wrap; }
.site-footer a { text-decoration: none; }
.site-footer a:hover { color: var(--ink); }
.site-footer .brand { color: var(--ink); font-size: 22px; }
.site-footer .legal { flex-basis: 100%; margin: 8px 0 0; font-size: 11px; color: var(--tertiary); }

/* ---------- Motion ---------- */

@media (prefers-reduced-motion: no-preference) {
  .rise { animation: rise .9s cubic-bezier(.2, .7, .2, 1) both; }
  .rise.d1 { animation-delay: .08s; }
  .rise.d2 { animation-delay: .16s; }
  .rise.d3 { animation-delay: .28s; }
  @keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
}

/* ---------- Small screens (Figma: Website · Mobile 390) ---------- */

@media (max-width: 900px) {
  .site-header .wrap { height: 60px; }
  .site-nav { gap: 18px; font-size: 13px; }
  .hero { padding: 56px 0 64px; }
  .hero .wrap { flex-direction: column; align-items: stretch; gap: 48px; }
  .hero-device { width: 300px; align-self: center; }
  .display { line-height: 0.94; margin: 20px 0; }
  .lede { line-height: 1.5; }
  .section { padding: 72px 0; }
  .section-head { margin-bottom: 32px; }
  .principles { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .feature { flex-direction: column; gap: 40px; padding: 32px 24px; }
  .feature-device { width: 260px; }
  .contact { padding: 80px 0; }
  .site-footer .wrap { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 480px) {
  .hero-actions { flex-direction: column; align-items: flex-start; gap: 18px; }
}

@media (max-width: 340px) {
  .brand span { display: none; }
}
