/* ==========================================================================
   HangTime marketing site — shared styles
   Tokens mirror lib/theme.ts. Fonts: copy public/fonts/ → website/fonts/.
   ========================================================================== */

@font-face {
  font-family: 'Fraunces';
  src: url('/fonts/Fraunces_400Regular.ttf') format('truetype');
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Fraunces';
  src: url('/fonts/Fraunces_500Medium.ttf') format('truetype');
  font-weight: 500; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Fraunces';
  src: url('/fonts/Fraunces_400Regular_Italic.ttf') format('truetype');
  font-weight: 400; font-style: italic; font-display: swap;
}
@font-face {
  font-family: 'Karla';
  src: url('/fonts/Karla-var.woff2') format('woff2');
  font-weight: 200 800; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Karla';
  src: url('/fonts/Karla-Italic-var.woff2') format('woff2');
  font-weight: 200 800; font-style: italic; font-display: swap;
}

:root {
  --bg-warm: #f5efe4;
  --bg-paper: #faf8f3;
  --ink: #1c1a17;
  --ink-soft: #3a352f;
  --ink-mute: #7a716a;
  --accent: #c44b34;
  --accent-deep: #9a3a27;
  --accent-soft-bg: #fef2ed;
  --accent-soft-border: #f4ccc1;
  --border: #d6cfc2;
  --free-bg: #e8efde;
  --free-border: #bfd0a9;
  --serif: 'Fraunces', Georgia, 'Times New Roman', serif;
  --sans: 'Karla', -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
}

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

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg-warm);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16.5px;
  line-height: 1.68;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { text-decoration: none; }

.wrap { max-width: 1040px; margin: 0 auto; padding: 0 24px; }
.wrap--narrow { max-width: 720px; }

/* ---------- Wordmark ---------- */
.brand {
  font-family: var(--serif);
  display: inline-flex; align-items: center; gap: 5px;
  line-height: 1; text-decoration: none;
}
.brand .hang { font-weight: 500; color: var(--ink); }
.brand .divider { width: 1px; height: 0.75em; background: var(--border); }
.brand .dot { width: 4px; height: 4px; border-radius: 50%; background: var(--accent); }
.brand .time { font-style: italic; font-weight: 400; color: var(--accent); }
.brand__img { height: 52px; width: auto; display: block; }
.footer .brand__img { height: 60px; margin-bottom: 10px; }

/* ---------- Nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 20;
  background: rgba(245, 239, 228, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.nav__inner {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 24px; max-width: 1040px; margin: 0 auto;
}
.nav .brand { font-size: 22px; }
.nav__links { display: flex; align-items: center; gap: 22px; }
.nav__links a { color: var(--ink-soft); text-decoration: none; font-size: 14.5px; }
.nav__links a:hover { color: var(--accent); }
.nav__cta {
  background: var(--ink); color: var(--bg-warm) !important;
  padding: 8px 16px; border-radius: 999px; font-weight: 600;
}
.nav__cta:hover { background: var(--accent); color: #fff !important; }
@media (max-width: 680px) { .nav__links a:not(.nav__cta) { display: none; } }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 26px; border-radius: 999px;
  font-weight: 600; font-size: 15.5px; text-decoration: none;
  transition: background .15s ease, transform .15s ease;
}
.btn--primary { background: var(--accent); color: #fff; }
.btn--primary:hover { background: var(--accent-deep); }
.btn--ghost { border: 1px solid var(--border); color: var(--ink); background: transparent; }
.btn--ghost:hover { border-color: var(--ink); }
.store-badge { height: 52px; width: auto; }
.android-note { font-size: 13px; color: var(--ink-mute); margin-top: 10px; }

/* ---------- Hero ---------- */
.hero { padding: 72px 0 56px; }
.hero__grid {
  display: grid; grid-template-columns: 1.1fr 0.9fr;
  gap: 56px; align-items: center;
}
@media (max-width: 860px) { .hero__grid { grid-template-columns: 1fr; gap: 40px; } }
.hero h1 {
  font-family: var(--serif); font-weight: 500;
  font-size: clamp(36px, 5.4vw, 54px);
  line-height: 1.12; letter-spacing: -0.015em;
  margin: 0 0 18px;
}
.hero h1 em { font-style: italic; color: var(--accent); }
.hero__lede { font-size: 18px; color: var(--ink-soft); max-width: 46ch; margin: 0 0 28px; }
.hero__ctas { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.hero__icon {
  width: 76px; height: 76px; border-radius: 18px;
  border: 1px solid var(--border);
  box-shadow: 0 8px 24px rgba(28, 26, 23, 0.08);
  margin-bottom: 22px;
}
.hero__proof { font-size: 13.5px; color: var(--ink-mute); margin-top: 16px; }
.hero__proof strong { color: var(--ink); }

/* ---------- Find-time demo card (CSS illustration) ---------- */
.demo-card {
  background: var(--bg-paper);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 22px;
  box-shadow: 0 12px 32px rgba(28, 26, 23, 0.07);
}
.demo-card__title {
  font-family: var(--serif); font-weight: 500; font-size: 17px; margin: 0 0 4px;
}
.demo-card__sub { font-size: 12.5px; color: var(--ink-mute); margin: 0 0 16px; }
.demo-row { display: grid; grid-template-columns: 64px repeat(6, 1fr); gap: 5px; align-items: center; margin-bottom: 7px; }
.demo-row__name { font-size: 12.5px; color: var(--ink-soft); font-weight: 600; }
.demo-cell { height: 26px; border-radius: 6px; background: #eee7d9; position: relative; }
.demo-cell--busy { background: var(--border); }
.demo-cell--work {
  background: var(--accent-soft-bg); border: 1px solid var(--accent-soft-border);
}
.demo-cell--work::after {
  content: '💼'; font-size: 11px; position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
}
.demo-cell--free { background: var(--free-bg); border: 1px solid var(--free-border); }
.demo-hours { display: grid; grid-template-columns: 64px repeat(6, 1fr); gap: 5px; margin-bottom: 8px; }
.demo-hours span { font-size: 10.5px; color: var(--ink-mute); text-align: center; }
.demo-result {
  margin-top: 14px; padding: 12px 14px;
  background: var(--free-bg); border: 1px solid var(--free-border);
  border-radius: 10px; font-size: 13.5px; color: var(--ink-soft);
}
.demo-result strong { color: var(--ink); }

/* ---------- Sections ---------- */
.section { padding: 64px 0; }
.section--paper { background: var(--bg-paper); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.section__kicker {
  font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--accent); font-weight: 700; margin: 0 0 10px;
}
.section h2 {
  font-family: var(--serif); font-weight: 500;
  font-size: clamp(28px, 3.6vw, 38px);
  line-height: 1.18; letter-spacing: -0.01em; margin: 0 0 14px;
}
.section h2 em { font-style: italic; color: var(--accent); }
.section__lede { color: var(--ink-soft); max-width: 62ch; margin: 0 0 36px; font-size: 17px; }

/* ---------- Screenshots ---------- */
.shots {
  display: flex; gap: 22px; overflow-x: auto; padding: 8px 4px 20px;
  scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch;
}
.shot { flex: 0 0 auto; scroll-snap-align: start; }
.shot img {
  width: 232px; border-radius: 26px;
  border: 1px solid var(--border);
  box-shadow: 0 14px 34px rgba(28, 26, 23, 0.12);
  background: var(--bg-paper);
}
.shot figcaption { font-size: 12.5px; color: var(--ink-mute); text-align: center; margin-top: 10px; }

/* ---------- How it works ---------- */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; counter-reset: step; }
@media (max-width: 900px) { .steps { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 540px) { .steps { grid-template-columns: 1fr; } }
.step {
  background: var(--bg-paper); border: 1px solid var(--border);
  border-radius: 14px; padding: 22px;
}
.section--paper .step { background: var(--bg-warm); }
.step::before {
  counter-increment: step; content: counter(step);
  display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--accent); color: #fff;
  font-family: var(--serif); font-size: 15px; margin-bottom: 14px;
}
.step h3 { font-family: var(--serif); font-weight: 500; font-size: 18.5px; margin: 0 0 8px; }
.step p { font-size: 14.5px; color: var(--ink-soft); margin: 0; }

/* ---------- Guides grid ---------- */
.guides-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
@media (max-width: 720px) { .guides-grid { grid-template-columns: 1fr; } }
.guide-card {
  display: block; background: var(--bg-paper);
  border: 1px solid var(--border); border-radius: 14px;
  padding: 22px 24px; text-decoration: none;
  transition: border-color .15s ease, transform .15s ease;
}
.guide-card:hover { border-color: var(--accent); }
.guide-card h3 {
  font-family: var(--serif); font-weight: 500; font-size: 19px;
  color: var(--ink); margin: 0 0 8px; line-height: 1.3;
}
.guide-card p { font-size: 14px; color: var(--ink-mute); margin: 0 0 10px; }
.guide-card span { font-size: 14px; color: var(--accent); font-weight: 600; }

/* ---------- FAQ ---------- */
.faq {
  background: var(--bg-paper); border: 1px solid var(--border);
  border-radius: 12px; overflow: hidden;
}
.faq details { border-bottom: 1px solid var(--border); }
.faq details:last-child { border-bottom: 0; }
.faq summary {
  font-family: var(--serif); font-weight: 500; font-size: 18px;
  padding: 18px 20px; cursor: pointer; list-style: none;
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: '›'; color: var(--ink-mute); font-size: 22px;
  transform: rotate(90deg); transition: transform .15s ease; flex-shrink: 0;
}
.faq details[open] summary::after { transform: rotate(-90deg); }
.faq .faq__body { padding: 0 20px 18px; color: var(--ink-soft); font-size: 15px; }
.faq .faq__body p { margin: 0 0 10px; }

/* ---------- CTA band ---------- */
.cta-band {
  text-align: center; padding: 72px 24px;
  background: var(--ink); color: var(--bg-warm);
}
.cta-band h2 {
  font-family: var(--serif); font-weight: 500;
  font-size: clamp(30px, 4vw, 42px); margin: 0 0 12px; letter-spacing: -0.01em;
}
.cta-band h2 em { font-style: italic; color: #e08773; }
.cta-band p { color: #b8b0a6; max-width: 52ch; margin: 0 auto 28px; }
.cta-band .android-note { color: #8f887e; }

/* ---------- Footer ---------- */
.footer { padding: 44px 0 56px; border-top: 1px solid var(--border); }
.footer__inner { display: flex; justify-content: space-between; gap: 32px; flex-wrap: wrap; }
.footer .brand { font-size: 20px; margin-bottom: 10px; }
.footer__tag { font-size: 13.5px; color: var(--ink-mute); font-style: italic; font-family: var(--serif); }
.footer__cols { display: flex; gap: 56px; flex-wrap: wrap; }
.footer__col h4 {
  font-size: 12px; letter-spacing: 0.07em; text-transform: uppercase;
  color: var(--ink-mute); margin: 0 0 12px;
}
.footer__col a { display: block; color: var(--ink-soft); text-decoration: none; font-size: 14px; margin-bottom: 9px; }
.footer__col a:hover { color: var(--accent); }
.footer__legal { margin-top: 36px; font-size: 12.5px; color: var(--ink-mute); }

/* ---------- Guide article pages ---------- */
.article { padding: 56px 0 24px; }
.article__breadcrumb { font-size: 13.5px; color: var(--ink-mute); margin-bottom: 22px; }
.article__breadcrumb a { color: var(--ink-mute); }
.article h1 {
  font-family: var(--serif); font-weight: 500;
  font-size: clamp(30px, 4.4vw, 42px);
  line-height: 1.15; letter-spacing: -0.012em; margin: 0 0 16px;
}
.article h1 em { font-style: italic; color: var(--accent); }
.article__answer {
  background: var(--accent-soft-bg); border: 1px solid var(--accent-soft-border);
  border-radius: 12px; padding: 18px 20px;
  font-size: 16.5px; color: var(--ink-soft); margin: 0 0 32px;
}
.article__answer strong { color: var(--ink); }
.article h2 {
  font-family: var(--serif); font-weight: 500; font-size: 26px;
  margin: 40px 0 12px; letter-spacing: -0.01em;
}
.article h3 { font-family: var(--serif); font-weight: 500; font-size: 20px; margin: 26px 0 8px; }
.article p, .article li { color: var(--ink-soft); }
.article ul, .article ol { padding-left: 22px; }
.article li { margin-bottom: 8px; }
.article strong { color: var(--ink); }
.inline-cta {
  display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap;
  background: var(--bg-paper); border: 1px solid var(--border);
  border-radius: 14px; padding: 22px 24px; margin: 40px 0;
}
.inline-cta p { margin: 0; font-family: var(--serif); font-size: 18px; color: var(--ink); }
.related { margin: 48px 0 12px; padding-top: 28px; border-top: 1px solid var(--border); }
.related h2 { font-size: 22px; margin-top: 0; }
.related a { display: block; margin-bottom: 10px; font-size: 15px; }
.manifesto { padding: 88px 0; }
.manifesto__phrase {
  font-family: var(--serif); font-weight: 500;
  font-size: clamp(30px, 4.6vw, 46px);
  letter-spacing: -0.01em; margin: 0 0 18px;
}
.manifesto__phrase em { font-style: italic; color: var(--accent); }
.manifesto__body { color: var(--ink-soft); max-width: 46ch; margin: 0 auto 20px; font-size: 17.5px; }
.hang-card {
  background: var(--bg-paper); border: 1px solid var(--border);
  border-radius: 18px; padding: 26px;
  box-shadow: 0 12px 32px rgba(28, 26, 23, 0.09);
  max-width: 420px;
}
.hang-card__top { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 10px; }
.hang-card__from { font-size: 13px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--accent); }
.hang-card__when { font-size: 14px; color: var(--ink-mute); }
.hang-card__title { font-family: var(--serif); font-weight: 500; font-size: 27px; margin: 0 0 16px; }
.hang-card__people { display: flex; align-items: center; gap: 6px; margin-bottom: 16px; }
.avatar {
  width: 34px; height: 34px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 700; color: #fff;
  border: 2px solid var(--bg-paper);
}
.avatar--a { background: var(--accent); }
.avatar--b { background: #7a8b5c; margin-left: -12px; }
.avatar--c { background: #5c7a8b; margin-left: -12px; }
.hang-card__names { font-size: 14px; color: var(--ink-soft); margin-left: 6px; }
.hang-card__free {
  background: var(--free-bg); border: 1px solid var(--free-border);
  border-radius: 999px; padding: 8px 14px;
  font-size: 13.5px; color: var(--ink-soft); display: inline-block; margin-bottom: 14px;
}
.hang-card__status { font-size: 13.5px; color: var(--ink-mute); border-top: 1px solid var(--border); padding-top: 14px; }
.hero__shot { margin: 0; display: flex; justify-content: center; }
.hero__shot img {
  width: min(300px, 80vw); height: auto;
  border-radius: 34px; border: 1px solid var(--border);
  box-shadow: 0 18px 44px rgba(28, 26, 23, 0.14);
}
