/* hongido.kr: brand hub and app pages. Calm, light-only landing pages in the books app's monochrome palette
   (web/src/styles/tokens.css): white paper, one grey panel colour, serif headings, colour only from book covers.
   Fonts are subsets made by hub/scripts/subset-fonts.py. */
@font-face { font-family: 'Pretendard'; font-weight: 400; font-display: swap; src: url('/fonts/hub-sans-400.woff2') format('woff2'); }
@font-face { font-family: 'Pretendard'; font-weight: 600; font-display: swap; src: url('/fonts/hub-sans-600.woff2') format('woff2'); }
@font-face { font-family: 'HB MaruBuri'; font-weight: 600; font-display: swap; src: url('/fonts/hub-serif.woff2') format('woff2'); }

:root {
  --paper: #FFFFFF;
  --surface: #F3F4F4;
  --hairline: #E8E8E9;
  --ink: #131314;
  --muted: #5E5F66;
  --faint: #77787E;
  --font-sans: 'Pretendard', -apple-system, BlinkMacSystemFont, 'Apple SD Gothic Neo', sans-serif;
  --font-serif: 'HB MaruBuri', 'AppleMyungjo', serif;
  --pad: 20px;
  --wide: 1200px;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 16px/1.65 var(--font-sans);
  word-break: keep-all;
  overflow-wrap: anywhere;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
img { max-width: 100%; }
.serif { font-family: var(--font-serif); font-weight: 600; letter-spacing: -0.015em; }
.muted { color: var(--muted); }
.wrap { max-width: var(--wide); margin: 0 auto; padding-left: max(var(--pad), env(safe-area-inset-left)); padding-right: max(var(--pad), env(safe-area-inset-right)); }

/* top bar */
.top { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 64px; padding-top: env(safe-area-inset-top); }
.wordmark { display: inline-flex; align-items: baseline; gap: 8px; min-height: 44px; padding-top: 10px; font-size: 21px; text-decoration: none; }
.wordmark small { font-family: var(--font-sans); font-weight: 400; font-size: 14px; color: var(--muted); letter-spacing: 0; }
.nav { display: flex; align-items: center; gap: 2px; }
.nav a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 10px; font-size: 15px; color: var(--muted); text-decoration: none; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--ink); }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 48px; padding: 0 22px; border-radius: 10px; background: var(--ink); color: #FFFFFF; border: 1px solid var(--ink); font-weight: 600; font-size: 16px; text-decoration: none; white-space: nowrap; }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--hairline); }
.btn:hover { opacity: .86; }
.btn.ghost:hover { opacity: 1; background: var(--surface); }
a:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 8px; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.fineprint { margin: 14px 0 0; font-size: 14px; color: var(--muted); }

/* hero: text left, drawing or phone right (stacked on phones) */
.hero { display: grid; gap: 32px; align-items: center; padding: 40px 0 64px; }
.hero h1 { font-size: clamp(32px, 8.4vw, 54px); line-height: 1.28; margin: 0 0 18px; }
.hero .lead { font-size: 17px; color: var(--muted); margin: 0 0 28px; max-width: 28em; }
.hero-art { width: min(440px, 88%); height: auto; justify-self: center; display: block; }
.eyebrow { display: block; font-size: 14px; font-weight: 600; color: var(--muted); margin-bottom: 12px; }
@media (min-width: 880px) {
  .hero { grid-template-columns: 1.05fr 1fr; gap: 48px; min-height: min(calc(100vh - 64px), 820px); padding: 24px 0 72px; }
  .hero-text { padding-left: 6%; }
  .hero-art { width: min(520px, 100%); }
}

/* grey panels */
.panels { display: grid; gap: 16px; padding-bottom: 16px; }
.panel { background: var(--surface); border-radius: 20px; overflow: hidden; text-align: center; padding: 48px 22px 0; display: flex; flex-direction: column; }
.panel h2 { font-size: clamp(26px, 6.4vw, 38px); line-height: 1.3; margin: 0 0 12px; text-wrap: balance; }
.panel p { margin: 0 auto; max-width: 30em; color: var(--muted); text-wrap: balance; }
.panel .tagline { font-size: clamp(17px, 4.4vw, 20px); color: var(--muted); margin: -2px auto 18px; }
.panel .actions { justify-content: center; margin-top: 22px; }
.panel-text-only { padding-bottom: 48px; justify-content: center; }
.panel.dashed { background: transparent; border: 1.5px dashed var(--hairline); }
.pair { display: grid; gap: 16px; }
@media (min-width: 880px) {
  .pair { grid-template-columns: 1fr 1fr; }
  .panel { padding: 64px 40px 0; }
  .panel-text-only { padding-bottom: 64px; min-height: 320px; }
}

/* phone frames: a front view of a current iPhone, kept minimal: a thin titanium band (the padding) and the black
   bezel (the image border), no side buttons, so nothing covers a neighbouring screen. Screen images carry their own status bar, Dynamic Island and home indicator (made by hub/scripts, 393x852).
   --w sets the size; every edge scales with it. Cut off by the panel's bottom edge. */
.phones { display: flex; justify-content: center; align-items: flex-start; margin-top: 40px; height: 440px; overflow-x: visible; overflow-y: clip; }
.phone {
  --w: 236px;
  flex: none; position: relative; width: var(--w);
  padding: calc(var(--w) * .009);
  border-radius: calc(var(--w) * .175);
  background: linear-gradient(140deg, #a7a7ac 0%, #eeeef0 12%, #8e8e93 30%, #c9c9cd 52%, #7d7d82 74%, #dcdce0 90%, #9a9a9f 100%);
  box-shadow: 0 2px 0 rgba(255,255,255,.5) inset, 0 calc(var(--w) * .16) calc(var(--w) * .26) calc(var(--w) * -.13) rgba(19,19,20,.5),
    0 calc(var(--w) * .03) calc(var(--w) * .06) calc(var(--w) * -.02) rgba(19,19,20,.22);
}
.phone img {
  display: block; width: 100%; height: auto; aspect-ratio: 393 / 852; background: #FFFFFF;
  border: calc(var(--w) * .026) solid #0a0a0b;
  border-radius: calc(var(--w) * .162);
  box-shadow: 0 0 0 1px rgba(0,0,0,.55);
}
.phones.tall { height: 520px; }
.phones.one .phone { --w: 260px; }

/* several screens: the main one in front, the others a little behind and lower, overlapping only at the edges
   so every screen stays readable */
.phones.stack .phone { z-index: 2; }
.phones.stack .phone.back { z-index: 1; transform: scale(.9); transform-origin: 50% 0; margin-top: 40px; }
.phones.stack .phone.back:first-child { margin-right: calc(var(--w) * -.15); }
.phones.stack .phone.back:last-child { margin-left: calc(var(--w) * -.15); }
@media (max-width: 559px) {
  .phones.stack { height: 330px; }
  .phones.stack .phone { --w: 128px; }
  .phones.stack .phone.back { margin-top: 24px; }
  .phones.stack.pair .phone { --w: 156px; }
}
@media (min-width: 880px) {
  .phones { height: 520px; margin-top: 48px; }
  .phones.tall { height: 560px; }
  .phone { --w: 270px; }
  .phones.one .phone { --w: 290px; }
}

/* hero phone on the app page */
.hero-phone { justify-self: center; position: relative; }
.hero-phone .phone { --w: min(280px, 72vw); }
.hero-phone .doodle { position: absolute; z-index: 3; width: 170px; height: auto; left: -120px; bottom: 40px; background: #FFFFFF; border-radius: 50%; padding: 12px; }
@media (max-width: 879px) { .hero-phone .doodle { display: none; } }

/* small feature list */
.features { display: grid; gap: 1px; background: var(--hairline); border: 1px solid var(--hairline); border-radius: 16px; overflow: hidden; margin: 56px 0 0; }
.feature { background: var(--paper); padding: 22px; }
.feature h3 { font-size: 18px; margin: 0 0 4px; }
.feature p { margin: 0; color: var(--muted); font-size: 15px; }
@media (min-width: 640px) { .features { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1000px) { .features { grid-template-columns: repeat(4, 1fr); } }

/* closing call to action */
.closing { text-align: center; padding: 88px 0 96px; }
.closing img { width: 170px; height: auto; display: block; margin: 0 auto 20px; }
.closing h2 { font-size: clamp(26px, 6.4vw, 36px); line-height: 1.3; margin: 0 0 12px; }
.closing p { margin: 0 0 26px; color: var(--muted); }
.closing .actions { justify-content: center; }

/* footer */
.foot { border-top: 1px solid var(--hairline); padding-top: 20px; padding-bottom: max(28px, env(safe-area-inset-bottom)); font-size: 14px; color: var(--muted); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0 24px; }
.foot nav { display: flex; flex-wrap: wrap; gap: 0 18px; }
.foot a { display: inline-flex; align-items: center; min-height: 44px; color: var(--ink); text-decoration: none; }
.foot a:hover { text-decoration: underline; }
.foot .fine { margin: 0; display: flex; align-items: center; min-height: 44px; color: var(--faint); }

/* 404 */
.missing { text-align: center; padding: 72px 0 96px; }
.missing img { width: min(260px, 70%); height: auto; }
.missing h1 { font-size: 30px; margin: 24px 0 24px; }
