/* Needle Minder — marketing site, shared styles
   Paper & Ink palette, lifted from the app */

:root {
  --bg:          #efe9dd;
  --bg-2:        #e6dece;
  --card:        #faf6ec;
  --card-2:      #f3ecdb;
  --ink:         #1d1a16;
  --ink-2:       #3c372f;
  --ink-3:       #6e6759;
  --ink-4:       #a59c89;
  --rule:        #d9cfb6;
  --rule-soft:   #e7dfc9;
  --accent:      #b4472e;
  --accent-2:    #9a3c27;
  --accent-soft: #e8c9b9;
  --accent-tint: #f4e1dd;
  --ok:          #5a7a4a;
  --ok-soft:     #e1ebdb;
  --warn:        #c98a2a;
  --warn-soft:   #f6e3cb;

  --serif: 'Instrument Serif', 'EB Garamond', Georgia, serif;
  --sans:  'DM Sans', system-ui, -apple-system, Segoe UI, Helvetica, Arial, sans-serif;
  --mono:  'JetBrains Mono', ui-monospace, Menlo, monospace;

  --w-page: 1240px;
  --w-prose: 720px;

  --ease: cubic-bezier(.22,.61,.36,1);
}

* { box-sizing: border-box; }
html, body {
  margin: 0; padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-feature-settings: 'ss01','cv11';
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}
body {
  min-height: 100vh;
  overflow-x: clip;
  background-image:
    radial-gradient(ellipse 80% 60% at 6% -10%, rgba(180,71,46,0.05), transparent 60%),
    radial-gradient(ellipse 70% 60% at 100% 100%, rgba(58,90,150,0.035), transparent 55%);
}

a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }

/* ───────────────── Top nav ───────────────── */

.nav {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(10px) saturate(140%);
  background: color-mix(in oklab, var(--bg) 82%, transparent);
  border-bottom: 1px solid var(--rule-soft);
}
.nav-inner {
  max-width: var(--w-page);
  margin: 0 auto;
  padding: 16px 32px;
  display: flex; align-items: center; gap: 28px;
}
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--serif); font-size: 22px; color: var(--ink);
  letter-spacing: -0.2px;
}
.brand .mark {
  width: 28px; height: 28px; border-radius: 50%;
  background: radial-gradient(ellipse at 32% 28%, #d96448 0%, var(--accent) 55%, var(--accent-2) 100%);
  position: relative;
  box-shadow:
    inset -2px -3px 6px rgba(0,0,0,0.22),
    inset 2px 2px 5px rgba(255,255,255,0.18);
  overflow: hidden;
}
.brand .mark::before {
  content: ''; position: absolute; inset: 0; border-radius: 50%;
  background:
    repeating-linear-gradient(62deg, rgba(0,0,0,0.10) 0 1px, transparent 1px 4px),
    repeating-linear-gradient(-58deg, rgba(255,255,255,0.10) 0 1px, transparent 1px 4px);
  mix-blend-mode: overlay;
}
.brand .mark::after {
  content: ''; position: absolute;
  width: 38%; height: 38%; border-radius: 50%;
  top: 22%; left: 26%;
  background: rgba(0,0,0,0.18);
  filter: blur(1.5px);
}
.brand .word { font-size: 22px; letter-spacing: -0.2px; }
.brand .word em { font-style: italic; color: var(--accent); }

.nav-links {
  display: flex; align-items: center; gap: 4px;
  margin-left: auto;
}
.nav-link {
  font-family: var(--sans); font-size: 14px; font-weight: 500;
  color: var(--ink-2);
  padding: 8px 14px; border-radius: 10px;
  transition: background .18s var(--ease), color .18s var(--ease);
}
.nav-link:hover { background: var(--card); color: var(--ink); }
.nav-link.on { color: var(--ink); background: var(--card); border: 1px solid var(--rule-soft); }

.nav-cta {
  margin-left: 12px;
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--ink); color: var(--card);
  padding: 10px 16px; border-radius: 11px;
  font-size: 13px; font-weight: 600; letter-spacing: 0.1px;
  transition: transform .18s var(--ease), background .18s var(--ease);
}
.nav-cta:hover { background: var(--ink-2); transform: translateY(-1px); }

/* ───────────────── Layout ───────────────── */

.page {
  max-width: var(--w-page);
  margin: 0 auto;
  padding: 0 32px;
  position: relative;
}

.section {
  padding-top: 96px;
  padding-bottom: 96px;
  position: relative;
}
.section.tight { padding-top: 64px; padding-bottom: 64px; }
.section.flush-bottom { padding-bottom: 0; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--mono); font-size: 11px;
  color: var(--ink-3); letter-spacing: 1.2px;
  text-transform: uppercase;
  margin: 0 0 24px;
}
.eyebrow::before {
  content: ''; width: 18px; height: 1px; background: var(--accent);
}
.eyebrow.center { justify-content: center; }
.eyebrow.center::before { width: 22px; }

h1, h2, h3, h4 {
  font-family: var(--serif); font-weight: 400;
  color: var(--ink); margin: 0;
  letter-spacing: -0.5px;
  text-wrap: balance;
}
h1 { font-size: clamp(48px, 6vw, 88px); line-height: 0.98; }
h2 { font-size: clamp(36px, 4.2vw, 56px); line-height: 1.02; }
h3 { font-size: 28px; line-height: 1.1; }
h4 { font-size: 20px; line-height: 1.2; font-family: var(--sans); font-weight: 600; letter-spacing: -0.1px; }

h1 em, h2 em, h3 em { font-style: italic; color: var(--accent); }

p { margin: 0; color: var(--ink-2); line-height: 1.55; }
.lead {
  font-size: 19px; color: var(--ink-2); max-width: 56ch;
  line-height: 1.55; text-wrap: pretty;
}
.muted { color: var(--ink-3); }
.mono { font-family: var(--mono); }

/* ───────────────── Buttons ───────────────── */

.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 22px;
  border-radius: 12px;
  font-family: var(--sans); font-weight: 600; font-size: 14px;
  letter-spacing: 0.1px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .2s var(--ease), background .2s var(--ease), color .2s var(--ease), border-color .2s var(--ease);
  line-height: 1;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-2); transform: translateY(-1px); }
.btn-ink { background: var(--ink); color: var(--card); }
.btn-ink:hover { background: var(--ink-2); transform: translateY(-1px); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--rule); }
.btn-ghost:hover { background: var(--card); border-color: var(--ink-4); }
.btn-lg { padding: 16px 24px; font-size: 15px; }

/* Store badges (custom — not the official lockups) */
.store-badges { display: flex; gap: 12px; flex-wrap: wrap; }
.store-badge {
  display: inline-flex; align-items: center; gap: 12px;
  padding: 12px 18px;
  background: var(--ink); color: var(--card);
  border-radius: 14px;
  transition: transform .2s var(--ease), background .2s var(--ease);
  border: 1px solid var(--ink);
}
.store-badge:hover { background: var(--ink-2); transform: translateY(-1px); }
.store-badge .glyph {
  width: 22px; height: 22px;
  display: flex; align-items: center; justify-content: center;
}
.store-badge .copy { display: flex; flex-direction: column; gap: 1px; line-height: 1; }
.store-badge .top { font-size: 10px; color: var(--ink-4); letter-spacing: 0.4px; text-transform: uppercase; font-weight: 500; }
.store-badge .bot { font-size: 15px; font-weight: 600; letter-spacing: -0.2px; }

.store-badge.accent { background: var(--accent); border-color: var(--accent); }
.store-badge.accent:hover { background: var(--accent-2); }
.store-badge.accent .top { color: rgba(255,255,255,0.7); }
.store-badge.accent .bot { color: #fff; }

/* ───────────────── Cards / surfaces ───────────────── */

.card {
  background: var(--card);
  border: 1px solid var(--rule-soft);
  border-radius: 18px;
  padding: 28px;
}
.card.bordered { border-color: var(--rule); }

/* dashed/dotted divider rule — embroidery hint */
.stitch-rule {
  height: 1px;
  background-image: linear-gradient(to right, var(--rule) 50%, transparent 50%);
  background-size: 10px 1px;
  background-repeat: repeat-x;
  border: 0;
  margin: 0;
}

/* ───────────────── Skein ball (carried over from the app) ───────────────── */

.skein {
  width: 64px; height: 64px; border-radius: 50%;
  position: relative; flex-shrink: 0;
  box-shadow:
    inset -3px -4px 8px rgba(0,0,0,0.22),
    inset 3px 3px 7px rgba(255,255,255,0.18);
  overflow: hidden;
}
.skein::before {
  content: ''; position: absolute; inset: 0; border-radius: 50%;
  background:
    repeating-linear-gradient(62deg, rgba(0,0,0,0.08) 0 1px, transparent 1px 4px),
    repeating-linear-gradient(-58deg, rgba(255,255,255,0.08) 0 1px, transparent 1px 4px);
  mix-blend-mode: overlay;
}
.skein::after {
  content: ''; position: absolute;
  width: 38%; height: 38%; border-radius: 50%;
  top: 22%; left: 26%;
  background: rgba(0,0,0,0.20);
  filter: blur(1.5px);
}
.skein.xs { width: 28px; height: 28px; }
.skein.sm { width: 40px; height: 40px; }
.skein.lg { width: 96px; height: 96px; }
.skein.xl { width: 140px; height: 140px; }

/* ───────────────── Phone frame ───────────────── */

.phone {
  width: 320px;
  background: #0f0d0a;
  border-radius: 44px;
  padding: 8px;
  box-shadow:
    0 40px 80px -40px rgba(29,26,22,0.5),
    0 12px 26px -12px rgba(29,26,22,0.25),
    inset 0 0 0 1.5px rgba(255,255,255,0.05);
  position: relative;
}
.phone .screen {
  width: 100%;
  aspect-ratio: 1080 / 2400; /* matches real app screenshots (Android 9:20) */
  border-radius: 36px;
  background: var(--card);
  overflow: hidden;
  position: relative;
  display: flex; flex-direction: column;
}
/* Drop-in real app screenshot inside the phone bezel */
.phone .screen .shot {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: top center;
  display: block;
}
/* "real" variant — for when the bezel holds a real screenshot whose chrome
   already includes status bar + gesture pill. Hides our faux chrome. */
.phone.real .punch,
.phone.real .homepill { display: none; }
.phone .punch {
  position: absolute; top: 18px; left: 50%; transform: translateX(-50%);
  width: 9px; height: 9px; border-radius: 50%;
  background: #0f0d0a; z-index: 6;
}
.phone .homepill {
  position: absolute; bottom: 8px; left: 50%; transform: translateX(-50%);
  width: 100px; height: 4px; border-radius: 2px;
  background: var(--ink); opacity: 0.25; z-index: 6;
}
.phone .statusbar {
  height: 30px; padding: 10px 20px 0;
  display: flex; align-items: center; justify-content: space-between;
  font-family: var(--sans); font-size: 11px; font-weight: 600;
  color: var(--ink); letter-spacing: 0.2px;
  flex-shrink: 0;
}
.phone .statusbar .right { display: flex; gap: 4px; align-items: center; }

/* ───────────────── Footer ───────────────── */

.footer {
  margin-top: 96px;
  padding: 72px 0 48px;
  border-top: 1px solid var(--rule-soft);
  background: linear-gradient(to bottom, transparent, var(--bg-2));
}
.footer-inner {
  max-width: var(--w-page);
  margin: 0 auto;
  padding: 0 32px;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 56px;
}
.footer h5 {
  font-family: var(--mono); font-size: 11px; font-weight: 500;
  color: var(--ink-3); text-transform: uppercase; letter-spacing: 1.2px;
  margin: 0 0 16px;
}
.footer ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.footer a {
  font-size: 14px; color: var(--ink-2);
  transition: color .15s var(--ease);
}
.footer a:hover { color: var(--accent); }
.footer .colophon {
  max-width: var(--w-page);
  margin: 48px auto 0;
  padding: 24px 32px 0;
  border-top: 1px solid var(--rule-soft);
  display: flex; align-items: center; justify-content: space-between;
  font-family: var(--mono); font-size: 11px; color: var(--ink-3);
  letter-spacing: 0.4px;
}
.colophon-links { display: inline-flex; gap: 18px; }
.colophon-links a { color: var(--ink-3); }
.colophon-links a:hover { color: var(--accent); }

/* ───────────────── Responsive ───────────────── */

@media (max-width: 880px) {
  .nav-inner { padding: 14px 20px; gap: 12px; }
  .nav-links { display: none; }
  .page { padding: 0 20px; }
  .section { padding-top: 64px; padding-bottom: 64px; }
  .footer-inner { grid-template-columns: 1fr 1fr; gap: 40px; padding: 0 20px; }
  .footer .colophon { padding: 24px 20px 0; flex-direction: column; gap: 12px; }
  h1 { font-size: clamp(40px, 11vw, 64px); }
  h2 { font-size: clamp(30px, 7vw, 44px); }
  .phone { max-width: calc(100vw - 40px); }
}
