/* Kufu's landing page: the app's own raised and inset surfaces, in Sunghyun Sans. */
@font-face { font-family: "Sunghyun Sans"; font-weight: 400; font-display: swap; src: url("fonts/sunghyun-400-0.woff2") format("woff2"); }
@font-face { font-family: "Sunghyun Sans"; font-weight: 500; font-display: swap; src: url("fonts/sunghyun-500-0.woff2") format("woff2"); }
@font-face { font-family: "Sunghyun Sans"; font-weight: 600; font-display: swap; src: url("fonts/sunghyun-600-0.woff2") format("woff2"); }
@font-face { font-family: "Sunghyun Sans"; font-weight: 700; font-display: swap; src: url("fonts/sunghyun-700-0.woff2") format("woff2"); }

:root {
  color-scheme: dark;
  --win: #0A0B0D;
  --text: #EDEEF0;
  --muted: #A4A9B1;
  --accent: #FF5436;
  --accent-text: #FF8A70;
  --line: #20242A;
  --raised-fill: linear-gradient(#23282E, #16191D);
  --raised-fill-hover: linear-gradient(#2B3138, #1C2025);
  --raised-edge: linear-gradient(#535B66 0%, #262B31 35%, #1A1D22 80%, #030304 100%);
  --panel-fill: linear-gradient(#15181C, #111316);
  --panel-edge: linear-gradient(#2B3037 0%, #191C21 30%, #050607 100%);
  --inset-fill: #0D0F11;
  --inset-edge: linear-gradient(#030304 0%, #15181C 50%, #2A2F36 100%);
  --accent-fill: linear-gradient(#FF6E52, #F04629);
  --accent-fill-hover: linear-gradient(#FF7E65, #F75234);
  --accent-edge: linear-gradient(#FF9C87 0%, #E0442A 40%, #8E2312 100%);
  --panel-shadow: 0 6px 22px rgba(0, 0, 0, .55);
  --soft-shadow: 0 3px 10px rgba(0, 0, 0, .5);
}
* { box-sizing: border-box; }
html { background: var(--win); scroll-behavior: smooth; scroll-padding-top: 84px; }
body { margin: 0; color: var(--text); font: 400 16px/1.55 "Sunghyun Sans", "Segoe UI", system-ui, sans-serif; -webkit-font-smoothing: antialiased; overflow-x: hidden; }
a { color: var(--accent-text); }
img { display: block; max-width: 100%; height: auto; }
h1, h2, h3, p { margin: 0; }
h2 { font-size: clamp(26px, 4vw, 38px); line-height: 1.15; font-weight: 700; letter-spacing: -.02em; }
h3 { font-size: 17px; font-weight: 600; letter-spacing: -.01em; }
code { padding: 1px 6px 2px; border-radius: 6px; background: var(--inset-fill); font: 14px "Cascadia Mono", Consolas, monospace; overflow-wrap: anywhere; }

.grain { position: fixed; inset: 0; z-index: -1; opacity: .2; background-size: 220px; pointer-events: none; }
.grain.add { mix-blend-mode: plus-lighter; }
.grain.sub { mix-blend-mode: difference; }

.raised { border: 1px solid transparent; border-bottom-width: 4px; border-radius: 16px; background: var(--raised-fill) padding-box, var(--raised-edge) border-box; box-shadow: var(--soft-shadow); }
.panel { border: 1px solid transparent; border-radius: 18px; background: var(--panel-fill) padding-box, var(--panel-edge) border-box; box-shadow: var(--panel-shadow); }
.inset { border: 1px solid transparent; border-top-width: 2px; border-radius: 10px; background: linear-gradient(var(--inset-fill), var(--inset-fill)) padding-box, var(--inset-edge) border-box; }

.accent-btn, .raised-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 18px; border: 1px solid transparent; border-bottom-width: 4px; border-radius: 12px; font-weight: 600; text-decoration: none; white-space: nowrap; }
.accent-btn { color: #fff; background: var(--accent-fill) padding-box, var(--accent-edge) border-box; box-shadow: var(--soft-shadow); }
.accent-btn:hover { background: var(--accent-fill-hover) padding-box, var(--accent-edge) border-box; }
.raised-btn { color: var(--text); background: var(--raised-fill) padding-box, var(--raised-edge) border-box; }
.raised-btn:hover { background: var(--raised-fill-hover) padding-box, var(--raised-edge) border-box; }
.small { min-height: 38px; padding: 0 14px; font-size: 14px; border-bottom-width: 3px; border-radius: 10px; }
.big { min-height: 54px; padding: 0 26px; font-size: 17px; border-radius: 14px; border-bottom-width: 5px; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.top { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 24px; max-width: 1120px; margin: 0 auto; padding: 14px 24px; background: linear-gradient(var(--win) 62%, transparent); }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); font-size: 18px; font-weight: 700; text-decoration: none; }
.brand img { border-radius: 8px; }
.top nav { display: flex; gap: 22px; margin-inline-start: auto; }
.top nav a { color: var(--muted); font-size: 15px; font-weight: 500; text-decoration: none; }
.top nav a:hover { color: var(--text); }

main > section { max-width: 1120px; margin: 0 auto; padding: 0 24px; }
.hero { display: flex; flex-direction: column; align-items: center; padding-top: 56px !important; text-align: center; }
h1 { margin-top: 34px; font-size: clamp(44px, 8vw, 84px); line-height: 1.02; font-weight: 700; letter-spacing: -.035em; }
.lede { max-width: 620px; margin-top: 20px; color: var(--muted); font-size: clamp(17px, 2.2vw, 20px); line-height: 1.5; }
.cta { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 30px; }
.fine { margin-top: 16px; color: var(--muted); font-size: 14px; }

.clock { --s: clamp(.62, 18vw / 100px, 1.15); display: flex; align-items: center; gap: 8px; }
.clock { --u: clamp(46px, 13vw, 84px); gap: calc(var(--u) * .1); }
.digit { position: relative; overflow: hidden; width: var(--u); height: calc(var(--u) * 1.44); border: 1px solid transparent; border-bottom-width: 5px; border-radius: calc(var(--u) * .22); background: var(--raised-fill) padding-box, var(--raised-edge) border-box; box-shadow: var(--panel-shadow); font-size: var(--u); font-weight: 700; font-variant-numeric: tabular-nums; }
.digit b { position: absolute; inset: 0; display: grid; place-items: center; font-weight: inherit; line-height: 1; }
.digit::after { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 1px; background: rgba(0, 0, 0, .28); box-shadow: 0 1px 0 rgba(255, 255, 255, .05); }
.gap { display: flex; flex-direction: column; gap: calc(var(--u) * .22); padding-inline: calc(var(--u) * .04); }
.gap i { width: calc(var(--u) * .14); height: calc(var(--u) * .14); border: 1px solid transparent; border-bottom-width: 2px; border-radius: 50%; background: var(--accent-fill) padding-box, var(--accent-edge) border-box; }

.showcase { display: flex; flex-direction: column; align-items: center; margin-top: 88px !important; }
.seg { position: relative; display: inline-flex; max-width: 100%; padding: 3px; border-radius: 13px; }
.seg-pill { position: absolute; top: 3px; bottom: 3px; left: 3px; width: 0; border: 1px solid transparent; border-bottom-width: 3px; border-radius: 10px; background: var(--raised-fill) padding-box, var(--raised-edge) border-box; }
.seg button { position: relative; min-height: 40px; padding: 0 20px; border: 0; border-radius: 10px; background: none; color: var(--muted); font: 500 15px "Sunghyun Sans", "Segoe UI", sans-serif; cursor: pointer; }
.seg button.on { color: var(--text); font-weight: 600; }
.frame { width: 100%; margin: 20px 0 0; padding: 8px; }
.frame img { width: 100%; border-radius: 11px; background: var(--inset-fill); }
.caption { min-height: 3em; margin-top: 14px; color: var(--muted); text-align: center; }

.meaning { display: flex; align-items: center; gap: 30px; max-width: 800px !important; margin-top: 76px !important; }
.kanji { flex: none; color: var(--accent-text); font: 700 clamp(52px, 9vw, 84px)/1 "Yu Gothic UI", "Noto Sans CJK JP", "Hiragino Sans", sans-serif; }
.meaning p { font-size: clamp(18px, 2.4vw, 22px); line-height: 1.45; }

#features { margin-top: 96px; }
.grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-top: 30px; }
.card { padding: 20px 20px 18px; }
.card p { margin-top: 7px; color: var(--muted); font-size: 15px; line-height: 1.5; }

.facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-top: 56px !important; }
.fact { display: flex; flex-direction: column; gap: 6px; padding: 20px; }
.fact b { font-size: 38px; line-height: 1.1; font-weight: 700; letter-spacing: -.02em; }
.fact span { color: var(--muted); font-size: 15px; line-height: 1.45; }

.privacy { max-width: 760px !important; margin-top: 96px !important; }
.privacy p { margin-top: 14px; color: var(--muted); font-size: 17px; }

.install { max-width: 760px !important; margin-top: 96px !important; }
.note { margin-top: 10px; color: var(--muted); }
.install ol { display: flex; flex-direction: column; gap: 12px; margin: 26px 0; padding: 0; list-style: none; }
.step { display: flex; align-items: flex-start; gap: 16px; padding: 18px; }
.num { flex: none; display: grid; place-items: center; width: 40px; height: 40px; color: var(--accent-text); font-size: 18px; font-weight: 700; }
.step p { margin-top: 4px; color: var(--muted); font-size: 15px; }

footer { max-width: 1120px; margin: 96px auto 0; padding: 28px 24px 44px; border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; }
.credits { margin-top: 8px; font-size: 13px; }

@media (max-width: 820px) {
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .top nav { display: none; }
  .top .accent-btn { margin-inline-start: auto; }
}
@media (max-width: 560px) {
  body { font-size: 15px; }
  main > section, .top, footer { padding-inline: 16px; }
  .grid, .facts { grid-template-columns: minmax(0, 1fr); }
  .cta { width: 100%; flex-direction: column; }
  .meaning { flex-direction: column; align-items: flex-start; gap: 14px; }
  .seg button { padding: 0 14px; }
  .step { padding: 14px; gap: 12px; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
