/* ShigotoSwitch website. Palette and ring come from the iOS app and its icon. */

@font-face {
  font-family: "Bricolage Grotesque";
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url("/assets/fonts/bricolage-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Bricolage Grotesque";
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url("/assets/fonts/bricolage-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --green-950: #04261d;
  --green-900: #073428;
  --green-800: #0a4636;
  --green-700: #0e5c45;
  --green-500: #14c38e;
  --mint-300: #8fdcc0;
  --mint-200: #b9eadb;
  --gold-600: #a67b2a;
  --gold-500: #c9a33e;
  --gold-400: #dcb955;
  --gold-300: #ecd48c;
  --paper: #eef5f0;
  --paper-line: #cfe2d7;
  --ink: #0b2a21;
  --ink-soft: #3b5a50;
  --text: #f1f7f3;
  --text-soft: #b5d6c9;

  --cjk-ja: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", "Yu Gothic", Meiryo, sans-serif;
  --cjk-ko: "Apple SD Gothic Neo", "Noto Sans KR", "Malgun Gothic", sans-serif;
  --cjk-sc: "PingFang SC", "Noto Sans SC", "Microsoft YaHei", sans-serif;
  --cjk-tc: "PingFang TC", "Noto Sans TC", "Microsoft JhengHei", sans-serif;
  --cjk: var(--cjk-ja);
  --body: -apple-system, BlinkMacSystemFont, "Segoe UI", var(--cjk);
  --display: "Bricolage Grotesque", -apple-system, BlinkMacSystemFont, var(--cjk);

  --gutter: clamp(16px, 5vw, 64px);
  --max: 1180px;
  --radius: 22px;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}
:lang(ko) { --cjk: var(--cjk-ko); }
:lang(zh-Hans) { --cjk: var(--cjk-sc); }
:lang(zh-Hant) { --cjk: var(--cjk-tc); }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scrollbar-color: var(--gold-500) var(--green-950); }
body {
  margin: 0;
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.75;
  color: var(--text);
  background: var(--green-900);
  overflow-x: hidden;
}
::selection { background: var(--gold-400); color: var(--green-950); }
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-underline-offset: 0.22em; text-decoration-thickness: 1px; }
:focus-visible { outline: 2px solid var(--gold-400); outline-offset: 3px; border-radius: 6px; }
h1, h2, h3 { font-family: var(--display); line-height: 1.2; margin: 0; text-wrap: balance; letter-spacing: -0.01em; }
p { margin: 0; text-wrap: pretty; }
:lang(ja) :is(h1, h2, h3, p, li, strong) { word-break: auto-phrase; line-break: strict; }
:lang(ko) { word-break: keep-all; overflow-wrap: anywhere; }
.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.num { font-family: var(--display); font-variant-numeric: tabular-nums lining-nums; }

/* ---------- header ---------- */
.site-head { position: relative; z-index: 5; }
.site-head .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 18px; padding-bottom: 18px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; font-family: var(--display); font-weight: 700; font-size: 18px; }
.brand img { width: 36px; height: 36px; border-radius: 9px; box-shadow: 0 4px 12px rgba(0,0,0,.25); }
.lang { position: relative; }
.lang summary {
  list-style: none; cursor: pointer; display: flex; align-items: center; gap: 8px;
  padding: 7px 14px; border: 1px solid rgba(220,185,85,.45); border-radius: 999px;
  font-size: 14px; color: var(--gold-300);
}
.lang summary::-webkit-details-marker { display: none; }
.lang summary svg { width: 16px; height: 16px; }
.lang summary:hover { border-color: var(--gold-400); }
.lang ul {
  position: absolute; right: 0; top: calc(100% + 8px); margin: 0; padding: 6px; list-style: none;
  background: var(--green-950); border: 1px solid rgba(220,185,85,.3); border-radius: 14px;
  box-shadow: 0 18px 40px rgba(0,0,0,.35); min-width: 168px;
}
.lang li a { display: block; padding: 8px 12px; border-radius: 9px; text-decoration: none; font-size: 15px; }
.lang li a:hover { background: var(--green-800); }
.lang li a[aria-current="true"] { color: var(--gold-300); }

/* ---------- hero ---------- */
.hero { padding: clamp(24px, 5vw, 56px) 0 clamp(64px, 9vw, 112px); }
.hero .wrap {
  display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  grid-template-areas: "title timer" "copy timer"; grid-template-rows: auto 1fr;
  column-gap: clamp(32px, 6vw, 88px); align-items: center;
}
.hero h1 { grid-area: title; align-self: end; }
.hero-copy { grid-area: copy; align-self: start; }
.timer { grid-area: timer; }
.hero h1 { font-size: clamp(34px, 5vw, 64px); font-weight: 800; letter-spacing: -0.02em; }
.hero h1 span, .hero h1 em { display: inline-block; }
.hero h1 em { font-style: normal; color: var(--gold-400); }
.hero .lede { margin-top: 24px; font-size: clamp(17px, 1.5vw, 19px); color: var(--text-soft); max-width: 34em; }
.store { display: inline-flex; margin-top: 36px; border-radius: 12px; transition: transform .4s var(--ease-out); }
.store:hover { transform: translateY(-2px); }
.store img { height: 56px; width: auto; }
.hero .meta { margin-top: 14px; font-size: 14px; color: var(--text-soft); }

/* the instrument */
.timer {
  justify-self: center; width: min(100%, 440px);
  display: flex; flex-direction: column; align-items: center;
}
.dial { position: relative; width: 100%; aspect-ratio: 1; }
.dial svg.ring { width: 100%; height: 100%; overflow: visible; }
.ring .track { stroke: rgba(185,234,219,.12); }
.ring .arc { stroke: url(#gold); transition: stroke-dashoffset .25s linear; }
.ring .glint { transform-origin: center; transform-box: fill-box; }
.dial-face {
  position: absolute; inset: 15%; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center;
}
.state {
  font-size: 13px; letter-spacing: .04em; padding: 3px 12px; border-radius: 999px;
  color: var(--mint-200); background: rgba(185,234,219,.1);
}
.state[data-s="run"] { color: var(--green-950); background: var(--mint-300); }
.state[data-s="done"] { color: var(--green-950); background: var(--gold-400); }
.clock { margin-top: 8px; font-size: clamp(22px, 3vw, 28px); font-weight: 500; color: var(--text-soft); }
.value-label { margin-top: 10px; font-size: 13px; color: var(--text-soft); }
.value { font-size: clamp(40px, 6.4vw, 64px); font-weight: 700; color: var(--gold-300); line-height: 1.05; letter-spacing: -0.02em; }
.timer-controls { margin-top: 22px; width: 100%; display: grid; grid-template-columns: 1fr auto auto; gap: 10px; align-items: end; }
.field label { display: block; font-size: 13px; color: var(--text-soft); margin-bottom: 6px; }
.field .box { display: flex; align-items: center; border: 1px solid rgba(185,234,219,.28); border-radius: 14px; background: var(--green-950); padding: 0 12px; }
.field .box:focus-within { border-color: var(--gold-400); }
.field .cur { color: var(--text-soft); font-size: 16px; }
.field input {
  width: 100%; min-width: 0; border: 0; background: transparent; color: var(--text); caret-color: var(--gold-400);
  font: 600 18px/1 var(--display); font-variant-numeric: tabular-nums; padding: 13px 6px; outline: none;
}
.field input::-webkit-inner-spin-button { -webkit-appearance: none; }
.btn {
  appearance: none; border: 0; cursor: pointer; border-radius: 14px; height: 46px; padding: 0 20px;
  font: 700 16px/1 var(--body); display: inline-flex; align-items: center; gap: 8px; white-space: nowrap;
  transition: background-color .2s, transform .3s var(--ease-out);
}
.btn svg { width: 18px; height: 18px; }
.btn-gold { background: var(--gold-400); color: var(--green-950); }
.btn-gold:hover { background: var(--gold-300); }
.btn-ghost { background: transparent; color: var(--text); border: 1px solid rgba(185,234,219,.28); padding: 0 14px; }
.btn-ghost:hover { border-color: var(--mint-300); }
.btn:active { transform: scale(.97); }
.demo-note { margin-top: 12px; font-size: 13px; color: var(--text-soft); align-self: flex-start; }

/* ---------- formula ---------- */
.formula { background: var(--green-950); padding: clamp(64px, 9vw, 112px) 0; }
.formula h2 { font-size: clamp(26px, 3.4vw, 40px); font-weight: 700; max-width: 22em; }
.eq {
  margin-top: 40px; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 18px;
  font-family: var(--display); font-size: clamp(30px, 5.4vw, 68px); font-weight: 700; letter-spacing: -0.02em; line-height: 1.15;
}
.eq .op { color: var(--green-500); font-weight: 500; }
.eq .res { color: var(--gold-300); }
.eq-legend { margin-top: 12px; display: flex; flex-wrap: wrap; gap: 4px 28px; color: var(--text-soft); font-size: 15px; }
.steps { margin: 56px 0 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 32px; counter-reset: s; }
.steps li { counter-increment: s; padding-top: 18px; border-top: 1px solid rgba(185,234,219,.2); }
.steps li::before { content: counter(s); font: 700 15px/1 var(--display); color: var(--gold-400); display: block; margin-bottom: 10px; }
.steps strong { display: block; font-size: 18px; margin-bottom: 4px; }
.steps span { color: var(--text-soft); font-size: 15px; }

/* ---------- light sections ---------- */
.paper { background: var(--paper); color: var(--ink); padding: clamp(64px, 9vw, 112px) 0; }
.paper ::selection { background: var(--green-700); color: var(--paper); }
.paper h2 { font-size: clamp(28px, 3.6vw, 44px); font-weight: 700; }
.paper .sub { margin-top: 14px; color: var(--ink-soft); max-width: 38em; }

.modes { margin-top: 48px; display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid var(--paper-line); }
.mode { padding: 36px 40px 8px 0; }
.mode + .mode { padding: 36px 0 8px 40px; border-left: 1px solid var(--paper-line); }
.mode-icon { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; background: var(--green-800); color: var(--gold-300); }
.mode.commit .mode-icon { background: var(--gold-400); color: var(--green-950); }
.mode-icon svg { width: 24px; height: 24px; }
.mode h3 { margin-top: 20px; font-size: 24px; font-weight: 700; }
.mode p { margin-top: 8px; color: var(--ink-soft); }
.mode ul { margin: 16px 0 0; padding: 0; list-style: none; }
.mode li { display: flex; gap: 10px; align-items: baseline; padding: 6px 0; }
.mode li svg { flex: none; width: 16px; height: 16px; color: var(--green-700); transform: translateY(2px); }

.safe { margin-top: 56px; display: flex; gap: 18px; align-items: flex-start; padding: 24px 28px; background: #fff; border: 1px solid var(--paper-line); border-radius: var(--radius); box-shadow: 0 10px 30px rgba(11,42,33,.06); }
.safe svg { flex: none; width: 28px; height: 28px; color: var(--green-700); }
.safe strong { display: block; font-size: 18px; }
.safe p { color: var(--ink-soft); margin-top: 2px; }

/* ---------- pro ---------- */
.pro { padding: clamp(64px, 9vw, 112px) 0; }
.pro-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(32px, 6vw, 80px); align-items: start; }
.pro h2 { font-size: clamp(28px, 3.6vw, 44px); font-weight: 700; }
.pro .sub { margin-top: 14px; color: var(--text-soft); max-width: 32em; }
.badge { display: inline-flex; align-items: center; gap: 8px; margin-top: 24px; padding: 8px 16px; border-radius: 999px; background: rgba(220,185,85,.14); color: var(--gold-300); font-size: 15px; font-weight: 600; }
.badge svg { width: 16px; height: 16px; }

.graph { margin-top: 40px; padding: 24px; border-radius: var(--radius); background: var(--green-950); box-shadow: 0 20px 50px rgba(0,0,0,.22); }
.graph-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; font-size: 14px; color: var(--text-soft); }
.graph-head strong { font-family: var(--display); font-size: 16px; color: var(--text); }
.cells { margin-top: 16px; display: grid; grid-template-rows: repeat(7, 1fr); grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px; }
.cells i { aspect-ratio: 1; border-radius: 3px; background: rgba(185,234,219,.08); }
.cells i[data-l="1"] { background: #1e6b52; }
.cells i[data-l="2"] { background: #149a70; }
.cells i[data-l="3"] { background: var(--green-500); }
.cells i[data-l="4"] { background: var(--gold-400); }
.graph-foot { margin-top: 14px; display: flex; justify-content: space-between; gap: 12px; font-size: 13px; color: var(--text-soft); }
.graph-foot .streak { color: var(--gold-300); font-weight: 600; }

table.compare { width: 100%; border-collapse: collapse; font-size: 16px; }
.compare th, .compare td { padding: 15px 8px; border-bottom: 1px solid rgba(185,234,219,.14); }
.compare thead th { font-size: 14px; font-weight: 600; color: var(--text-soft); text-align: center; padding-top: 0; }
.compare thead th.pro-col { color: var(--gold-300); }
.compare tbody th { text-align: left; font-weight: 500; }
.compare td { text-align: center; width: 84px; }
.compare td.pro-col { background: rgba(220,185,85,.08); }
.compare tbody tr:last-child td.pro-col { border-radius: 0 0 12px 12px; }
.compare thead th.pro-col { background: rgba(220,185,85,.08); border-radius: 12px 12px 0 0; padding-top: 12px; }
.compare svg { width: 20px; height: 20px; margin: 0 auto; }
.compare .yes { color: var(--gold-400); }
.compare .no { color: rgba(185,234,219,.35); }
.pro-note { margin-top: 18px; font-size: 14px; color: var(--text-soft); }

/* ---------- audience ---------- */
.who { margin: 40px 0 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 0 48px; }
.who li { display: flex; gap: 14px; align-items: baseline; padding: 18px 0; border-bottom: 1px solid var(--paper-line); font-size: 18px; }
.who li svg { flex: none; width: 18px; height: 18px; color: var(--gold-600); transform: translateY(3px); }

/* ---------- close ---------- */
.close { padding: clamp(80px, 11vw, 140px) 0; text-align: center; background: var(--green-950); }
.close img.icon { width: 96px; height: 96px; border-radius: 22px; margin: 0 auto; box-shadow: 0 18px 40px rgba(0,0,0,.35); }
.close h2 { margin-top: 32px; font-size: clamp(30px, 4.4vw, 54px); font-weight: 800; letter-spacing: -0.02em; }
.close p { margin: 14px auto 0; color: var(--text-soft); max-width: 30em; }

/* ---------- footer ---------- */
.site-foot { background: var(--green-950); border-top: 1px solid rgba(185,234,219,.12); padding: 36px 0 48px; font-size: 14px; color: var(--text-soft); }
.site-foot .wrap { display: flex; flex-wrap: wrap; gap: 16px 32px; justify-content: space-between; align-items: center; }
.site-foot nav { display: flex; flex-wrap: wrap; gap: 8px 24px; }
.site-foot a { text-decoration: none; }
.site-foot a:hover { color: var(--gold-300); text-decoration: underline; }

/* ---------- document pages (privacy, contact) ---------- */
.doc { background: var(--paper); color: var(--ink); padding: clamp(40px, 6vw, 80px) 0 clamp(64px, 9vw, 112px); }
.doc ::selection { background: var(--green-700); color: var(--paper); }
.doc .wrap { max-width: 820px; }
.doc h1 { font-size: clamp(32px, 4.6vw, 48px); font-weight: 800; letter-spacing: -0.02em; }
.doc .updated { margin-top: 10px; color: var(--ink-soft); font-size: 15px; }
.doc .intro { margin-top: 28px; font-size: 18px; }
.doc h2 { margin-top: 52px; margin-bottom: 14px; font-size: 22px; font-weight: 700; }
.doc p, .doc li { max-width: 68ch; }
.doc p + p { margin-top: 12px; }
.doc ul { padding-left: 1.3em; margin: 12px 0; }
.doc li { margin: 6px 0; }
.doc li::marker { color: var(--green-700); }
.doc a { color: var(--green-700); font-weight: 600; }
.doc a:hover { color: var(--ink); }
.form-frame { margin-top: 32px; background: #fff; border: 1px solid var(--paper-line); border-radius: var(--radius); overflow: hidden; box-shadow: 0 10px 30px rgba(11,42,33,.06); }
.form-frame iframe { display: block; width: 100%; height: 1180px; border: 0; }
.doc .aside { margin-top: 20px; font-size: 15px; color: var(--ink-soft); }
.doc-head { background: var(--green-900); }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .pro-grid { grid-template-columns: minmax(0, 1fr); }
  .hero .wrap { grid-template-columns: minmax(0, 1fr); grid-template-areas: "title" "timer" "copy"; grid-template-rows: auto; row-gap: 28px; }
  .hero .lede { margin-top: 8px; }
  .timer { width: min(100%, 400px); }
  .steps { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .modes { grid-template-columns: minmax(0, 1fr); }
  .mode, .mode + .mode { padding: 32px 0 8px; border-left: 0; }
  .mode + .mode { border-top: 1px solid var(--paper-line); margin-top: 24px; }
  .who { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 520px) {
  body { font-size: 16px; }
  .dial { width: min(100%, 290px); }
  .brand span { font-size: 16px; }
  .timer-controls { grid-template-columns: 1fr 1fr; }
  .timer-controls .field { grid-column: 1 / -1; }
  .timer-controls .btn { justify-content: center; }
  .compare td { width: 64px; }
  .graph { padding: 18px; }
  .safe { padding: 20px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0s !important; animation: none !important; }
}
