/* Hallmark · genre: modern-minimal · shared shell for the studio system
 * theme: studied-DNA (source: usehallmark.com/examples/tally/)
 * nav: N5 Floating pill · footer: Ft5 Statement
 * Loaded by / (home) and the product landings. Tokens live in studio-tokens.css;
 * a product page overrides --color-accent only, never anything structural.
 */

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

html, body {
  margin: 0;
  padding: 0;
  /* clip, never hidden — hidden on the root kills position:sticky descendants */
  overflow-x: clip;
}

html {
  font-family: var(--font-body);
  color: var(--color-ink-0);
  background: var(--color-paper-0);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  scroll-behavior: smooth;
}

body {
  font-size: var(--text-base);
  line-height: 1.55;
  background:
    radial-gradient(1200px 600px at 12% -10%, color-mix(in oklch, var(--color-accent-tint) 70%, transparent), transparent 60%),
    radial-gradient(900px 500px at 88% 8%, color-mix(in oklch, var(--color-accent-tint) 45%, transparent), transparent 55%),
    var(--color-paper-0);
  background-attachment: fixed;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 140ms !important;
  }
}

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

/* Focus is never animated — it has to land the instant the key is pressed. */
:focus-visible {
  outline: 2px solid var(--color-focus);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding-inline: var(--space-xl);
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-ink-2);
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  margin: 0;
}

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip-path: inset(50%); white-space: nowrap;
}


/* ───────── nav · N5 Floating pill ───────── */
.nav {
  position: fixed;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 50;
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  max-width: calc(100vw - 24px);
  padding: 4px 8px 4px 16px;
  background: color-mix(in oklch, var(--color-paper-0) 78%, transparent);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  backdrop-filter: blur(20px) saturate(180%);
  border: var(--rule-soft);
  border-radius: var(--radius-pill);
  box-shadow: var(--shadow-nav);
  font-size: var(--text-sm);
}

.nav__brand {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--color-ink-0);
  white-space: nowrap;
}

.nav__brand svg { width: 20px; height: 20px; }
/* The V is punched out of the mark with the page colour, so it survives both schemes. */
.nav__brand svg rect { fill: var(--color-ink-0); }
.nav__brand svg path { stroke: var(--color-paper-0); }

.nav__links { display: flex; gap: 2px; }

.nav__link {
  display: block;
  position: relative;
  padding: 8px 12px;
  border-radius: var(--radius-pill);
  color: var(--color-ink-1);
  white-space: nowrap;
  transition: background var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out);
}

/* The visible pill stays 35px tall; the pointer target is 44px. Vertical-only
   inset so neighbouring links never overlap each other's hit area. */
.nav__link::after,
.nav__cta::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: var(--tap-min);
  transform: translateY(-50%);
}

.nav__link:hover { background: var(--color-paper-2); color: var(--color-ink-0); }
.nav__link:active { background: var(--color-paper-3); }

.nav__cta {
  position: relative;
  padding: 8px 16px;
  border-radius: var(--radius-pill);
  background: var(--color-ink-0);
  color: var(--color-paper-0);
  font-weight: 500;
  white-space: nowrap;
  transition: background var(--dur-fast) var(--ease-out), border-color var(--dur-fast) var(--ease-out),
              color var(--dur-fast) var(--ease-out);
}

.nav__cta:hover { background: var(--color-accent); border-color: var(--color-accent); color: var(--color-accent-fg); }
.nav__cta:active { background: var(--color-focus); border-color: var(--color-focus); }


/* ───────── section shell ───────── */
/* Each section gets its own vertical rhythm — uniform padding reads as
   one block repeated, which is the fastest way to look generated. */
.section-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: var(--space-2xl);
  align-items: end;
}

.section-title {
  margin: var(--space-sm) 0 0;
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -0.03em;
  color: var(--color-ink-0);
  overflow-wrap: anywhere;
  min-width: 0;
}

.section-lead {
  margin: 0;
  max-width: 46ch;
  font-size: var(--text-md);
  line-height: 1.6;
  color: var(--color-ink-1);
}


/* ───────── footer · Ft5 Statement ───────── */
.footer {
  border-top: var(--rule-hair);
  padding: var(--space-3xl) 0 var(--space-xl);
  background: color-mix(in oklch, var(--color-paper-1) 60%, transparent);
}

.footer__statement {
  margin: 0;
  max-width: 24ch;
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -0.03em;
  color: var(--color-ink-0);
  overflow-wrap: anywhere;
}

.footer__statement em { font-style: normal; color: var(--color-accent); }

/* Korean business-registration disclosure — required for App Store review.
   Kept as a definition list so the labels stay machine-readable. */
.footer__legal-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-lg) var(--space-xl);
  margin-top: var(--space-2xl);
  padding-top: var(--space-xl);
  border-top: var(--rule-hair);
}

.footer__legal-grid div:last-child { grid-column: 1 / -1; }

.footer__legal-grid dt {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-ink-2);
}

.footer__legal-grid dd {
  margin: 4px 0 0;
  font-size: var(--text-sm);
  line-height: 1.6;
  color: var(--color-ink-1);
}

.footer__legal-grid a {
  color: var(--color-ink-1);
  border-bottom: 1px solid color-mix(in oklch, var(--color-ink-0) 25%, transparent);
  transition: color var(--dur-fast) var(--ease-out), border-color var(--dur-fast) var(--ease-out);
}

.footer__legal-grid a:hover { color: var(--color-accent); border-bottom-color: var(--color-accent); }
.footer__legal-grid a:active { color: var(--color-focus); border-bottom-color: var(--color-focus); }

/* Legal + support row. Product landings carry it; the home does not. */
.footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-lg);
  margin-top: var(--space-xl);
  font-size: var(--text-sm);
}

.footer__links a {
  color: var(--color-ink-1);
  border-bottom: 1px solid color-mix(in oklch, var(--color-ink-0) 25%, transparent);
  transition: color var(--dur-fast) var(--ease-out), border-color var(--dur-fast) var(--ease-out);
}

.footer__links a:hover { color: var(--color-accent); border-bottom-color: var(--color-accent); }
.footer__links a:active { color: var(--color-focus); border-bottom-color: var(--color-focus); }

.footer__bottom {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--space-sm);
  margin-top: var(--space-xl);
  padding-top: var(--space-md);
  border-top: var(--rule-hair);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: 0.06em;
  color: var(--color-ink-2);
}

.footer__bottom .wordmark { color: var(--color-ink-0); font-weight: 500; }


/* ───────── responsive · shell ───────── */
@media (max-width: 760px) {
  .section-head { grid-template-columns: minmax(0, 1fr); gap: var(--space-md); align-items: start; }
  .footer__legal-grid { grid-template-columns: minmax(0, 1fr); }
  .footer__legal-grid div:last-child { grid-column: auto; }
}

@media (max-width: 640px) {
  .container { padding-inline: var(--space-md); }
  .nav { gap: var(--space-2xs); padding: 4px 4px 4px 12px; }
  .nav__link { padding: 8px 12px; }
  .nav__cta { padding: 8px 12px; }
}

/* Below 430px the wordmark is the first thing to go — the destinations
   matter more than the name, which the page repeats moments later. */
@media (max-width: 430px) {
  .nav { font-size: var(--text-xs); }
  .nav__brand-text { display: none; }
  .nav__cta { display: none; }
  .nav__link { padding: 8px 8px; }
}
