/* noodle website — shared styles */

:root {
  --bg: #fbf6ec;
  --bg-deep: #f3e9d6;
  --surface: #ffffff;
  --surface-soft: #fffaf1;
  --ink: #1f1a14;
  --muted: #6b6155;
  --line: #e8dcc6;
  --gold: #f2a93b;
  --gold-deep: #d9731a;
  --accent: #b85d10;
  --accent-ink: #ffffff;
  --shadow: 0 1px 2px rgba(60, 40, 10, .06), 0 12px 32px rgba(60, 40, 10, .08);
  --radius: 22px;
  --wrap: 1120px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #15120e;
    --bg-deep: #1d1913;
    --surface: #221d17;
    --surface-soft: #1b1712;
    --ink: #f5ede0;
    --muted: #b3a795;
    --line: #3a3127;
    --accent: #f5b04d;
    --accent-ink: #1f1a14;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 12px 32px rgba(0, 0, 0, .35);
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --bg: #15120e;
  --bg-deep: #1d1913;
  --surface: #221d17;
  --surface-soft: #1b1712;
  --ink: #f5ede0;
  --muted: #b3a795;
  --line: #3a3127;
  --accent: #f5b04d;
  --accent-ink: #1f1a14;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 12px 32px rgba(0, 0, 0, .35);
  color-scheme: dark;
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Quicksand", ui-rounded, system-ui, -apple-system, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  font-weight: 500;
  overflow-x: hidden;
}

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

a { color: var(--accent); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }

:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; border-radius: 6px; }

.wrap { width: min(var(--wrap), calc(100% - 32px)); margin: 0 auto; }

/* --- header --- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(1.4) blur(14px);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid color-mix(in srgb, var(--line) 60%, transparent);
}

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

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: -.01em;
}

.brand img { width: 34px; height: 34px; border-radius: 9px; box-shadow: 0 1px 3px rgba(60, 40, 10, .18); }

.site-nav { display: flex; gap: 22px; align-items: center; }
.site-nav a { color: var(--muted); text-decoration: none; font-weight: 600; font-size: .95rem; }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--ink); }

@media (max-width: 640px) {
  .site-nav { gap: 14px; }
  .site-nav .hide-sm { display: none; }
}

/* --- buttons --- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 22px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  border: 1px solid transparent;
  transition: transform .15s ease, box-shadow .15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary {
  background: linear-gradient(135deg, var(--gold), var(--gold-deep));
  color: #fff;
  box-shadow: 0 6px 18px rgba(217, 115, 26, .3);
}
.btn-ghost { border-color: var(--line); color: var(--ink); background: var(--surface); }
.btn[aria-disabled="true"] { cursor: default; }
.btn[aria-disabled="true"]:hover { transform: none; }

/* --- hero --- */

.hero { position: relative; padding: 72px 0 40px; overflow: hidden; }

.hero::before {
  content: "";
  position: absolute;
  inset: -20% -10% auto auto;
  width: 720px;
  height: 720px;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--gold) 34%, transparent), transparent);
  pointer-events: none;
  z-index: -1;
}

.hero .wrap {
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 48px;
  align-items: center;
}

.eyebrow {
  display: inline-block;
  font-weight: 700;
  font-size: .85rem;
  letter-spacing: .02em;
  color: var(--accent);
  background: color-mix(in srgb, var(--gold) 16%, transparent);
  padding: 5px 12px;
  border-radius: 999px;
  margin-bottom: 18px;
}

h1, h2, h3 { line-height: 1.15; letter-spacing: -.02em; margin: 0; }

.hero h1 { font-size: clamp(2.6rem, 6vw, 4.4rem); font-weight: 700; }
.hero h1 .grad {
  background: linear-gradient(120deg, var(--gold), var(--gold-deep));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.lede { font-size: 1.2rem; color: var(--muted); margin: 20px 0 30px; max-width: 34ch; }

.cta-row { display: flex; flex-wrap: wrap; gap: 12px; }

.fine { color: var(--muted); font-size: .9rem; margin-top: 14px; }

@media (max-width: 860px) {
  .hero { padding-top: 40px; }
  .hero .wrap { grid-template-columns: 1fr; gap: 40px; }
  .lede { max-width: none; }
}

/* --- phone frames --- */

.phone {
  position: relative;
  border-radius: 46px;
  padding: 10px;
  background: #1c1915;
  box-shadow: var(--shadow), inset 0 0 0 2px #3a342c;
  width: 100%;
  max-width: 300px;
  aspect-ratio: 1206 / 2622;
}
.phone img { width: 100%; height: 100%; object-fit: cover; border-radius: 37px; }

.hero-phones { position: relative; display: flex; justify-content: center; min-height: 520px; }
.hero-phones .phone:first-child { transform: rotate(-5deg) translateX(30px); z-index: 1; }
.hero-phones .phone:last-child { transform: rotate(4deg) translateX(-30px) translateY(36px); }

@media (max-width: 860px) {
  .hero-phones { min-height: 0; }
  .hero-phones .phone { max-width: 46%; }
}

/* --- sections --- */

section { padding: 72px 0; }
.section-head { max-width: 640px; margin-bottom: 40px; }
.section-head h2 { font-size: clamp(2rem, 4vw, 2.8rem); font-weight: 700; }
.section-head p { color: var(--muted); font-size: 1.1rem; margin: 14px 0 0; }

.band { background: var(--bg-deep); }

/* pillars */

.pillars { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.pillar {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px;
}
.pillar .icon {
  width: 44px;
  height: 44px;
  border-radius: 13px;
  display: grid;
  place-items: center;
  background: color-mix(in srgb, var(--gold) 18%, transparent);
  color: var(--accent);
  margin-bottom: 16px;
}
.pillar .icon svg { width: 24px; height: 24px; }
.pillar h3 { font-size: 1.3rem; font-weight: 700; margin-bottom: 8px; }
.pillar p { margin: 0; color: var(--muted); }

@media (max-width: 860px) { .pillars { grid-template-columns: 1fr; } }

/* showcase rows */

.showcase { display: grid; gap: 72px; }
.show {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: center;
}
.show:nth-child(even) .show-media { order: 2; }
.show-media { display: flex; justify-content: center; }
.show-copy h3 { font-size: clamp(1.7rem, 3vw, 2.2rem); font-weight: 700; margin-bottom: 14px; }
.show-copy p { color: var(--muted); font-size: 1.08rem; margin: 0 0 14px; }
.show-copy ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.show-copy li { display: flex; gap: 10px; align-items: baseline; }
.show-copy li::before { content: ""; flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--gold); transform: translateY(-2px); }

@media (max-width: 860px) {
  .show { grid-template-columns: 1fr; gap: 28px; }
  .show:nth-child(even) .show-media { order: 0; }
  .show-media .phone { max-width: 260px; }
}

/* feature grid */

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; }
.feat {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 20px 22px;
}
.feat h3 { font-size: 1.08rem; font-weight: 700; margin-bottom: 6px; }
.feat p { margin: 0; color: var(--muted); font-size: .97rem; line-height: 1.5; }

/* ipad */

.ipad {
  border-radius: 34px;
  padding: 14px;
  background: #1c1915;
  box-shadow: var(--shadow), inset 0 0 0 2px #3a342c;
  max-width: 760px;
  margin: 0 auto;
}
.ipad img { border-radius: 22px; width: 100%; }

/* self-host */

.code {
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: .92rem;
  background: #1c1915;
  color: #f5ede0;
  border-radius: 16px;
  padding: 20px 22px;
  overflow-x: auto;
  line-height: 1.7;
  margin: 0;
}
.code .c { color: #a89a85; }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } }

/* closing cta */

.closing {
  text-align: center;
  background: linear-gradient(135deg, color-mix(in srgb, var(--gold) 22%, var(--surface)), var(--surface));
  border: 1px solid var(--line);
  border-radius: 32px;
  padding: 56px 24px;
}
.closing img { width: 84px; height: 84px; border-radius: 20px; margin: 0 auto 20px; box-shadow: var(--shadow); }
.closing h2 { font-size: clamp(2rem, 4vw, 2.6rem); font-weight: 700; }
.closing p { color: var(--muted); margin: 12px auto 26px; max-width: 46ch; }
.closing .cta-row { justify-content: center; }

/* --- prose pages (privacy, terms, support) --- */

.prose { width: min(760px, calc(100% - 32px)); margin: 0 auto; padding: 56px 0 72px; }
.prose h1 { font-size: clamp(2.2rem, 5vw, 3rem); font-weight: 700; }
.prose .meta { color: var(--muted); margin: 10px 0 32px; }
.prose h2 { font-size: 1.45rem; font-weight: 700; margin: 40px 0 12px; }
.prose h3 { font-size: 1.12rem; font-weight: 700; margin: 24px 0 8px; }
.prose p, .prose li { color: var(--ink); }
.prose ul { padding-left: 1.2rem; }
.prose li { margin: 6px 0; }
.prose .summary {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 8px 26px;
}
.table-scroll { overflow-x: auto; margin: 14px 0; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
.prose table { width: 100%; border-collapse: collapse; font-size: .96rem; min-width: 520px; }
.prose th, .prose td { text-align: left; padding: 12px 16px; border-bottom: 1px solid var(--line); vertical-align: top; }
.prose tr:last-child td { border-bottom: 0; }
.prose th { font-weight: 700; background: var(--surface-soft); }

.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; margin: 18px 0; }
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 20px;
}
.card h3 { margin: 0 0 6px; }
.card p { margin: 0; color: var(--muted); font-size: .97rem; }

details {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 4px 20px;
  margin: 10px 0;
}
summary { cursor: pointer; font-weight: 700; padding: 12px 0; }
details p { margin: 0 0 14px; color: var(--muted); }

/* --- footer --- */

.site-footer { border-top: 1px solid var(--line); padding: 36px 0 48px; color: var(--muted); font-size: .93rem; }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 18px 32px; justify-content: space-between; align-items: center; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 8px 22px; }
.site-footer a { color: var(--muted); text-decoration: none; font-weight: 600; }
.site-footer a:hover { color: var(--ink); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn { transition: none; }
}
