/* Flyling site: a warm lab notebook. Cream paper with a faint grid, the toon fly, specimen-label type. */
:root {
  --cream: #FFF4DC;
  --cream-deep: #FFE3A8;
  --paper-line: rgba(138, 79, 23, 0.07);
  --ink: #1F2A26;
  --ink-muted: #56625C;
  --line: #E6D6BD;
  --surface: #FFFFFF;
  --amber: #D9964A;
  --amber-ink: #8A4F17;
  --teal: #1F7A6B;
  --red: #C8203A;
  --banana: #F2D24B;
  --radius: 22px;
  --display: "Jua", "IBM Plex Sans KR", system-ui, sans-serif;
  --body: "IBM Plex Sans KR", system-ui, -apple-system, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
:lang(ko), :lang(ja), :lang(zh) { word-break: keep-all; overflow-wrap: anywhere; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  color: var(--ink);
  font: 17px/1.6 var(--body);
  background-color: var(--cream);
  background-image:
    linear-gradient(var(--paper-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--paper-line) 1px, transparent 1px);
  background-size: 28px 28px;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
img { max-width: 100%; height: auto; display: block; }
.wrap { width: min(1120px, 100% - 40px); margin-inline: auto; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: #fff; padding: 8px 14px; border-radius: 10px; z-index: 10; }
.skip:focus { left: 8px; }
:focus-visible { outline: 3px solid var(--teal); outline-offset: 3px; border-radius: 8px; }

/* header */
.top { position: sticky; top: 0; z-index: 5; backdrop-filter: blur(10px); background: rgba(255, 244, 220, 0.82); border-bottom: 1px solid var(--line); }
.top .wrap { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font: 26px/1 var(--display); }
.brand img { width: 36px; height: 36px; border-radius: 10px; }
.top nav { display: flex; align-items: center; gap: 18px; font-size: 15px; font-weight: 500; }
.top nav a { text-decoration: none; }
.top nav a:hover { color: var(--amber-ink); }
.lang { display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); }
@media (max-width: 720px) { .top nav .hide-sm { display: none; } }

/* labels: the specimen tag look */
.tag { display: inline-flex; align-items: center; gap: 8px; font: 500 12px/1 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--amber-ink); background: var(--surface); border: 1px dashed var(--amber); border-radius: 6px; padding: 7px 10px; }

/* hero */
.hero { padding: 64px 0 40px; }
.hero .wrap { display: grid; grid-template-columns: 1.05fr 1fr; gap: 48px; align-items: center; }
.hero h1 { font: clamp(44px, 6.4vw, 78px)/1.02 var(--display); margin: 18px 0 18px; letter-spacing: -0.01em; }
.hero h1 em { font-style: normal; color: var(--red); }
.hero .lede { font-size: 19px; max-width: 34ch; color: var(--ink); margin: 0 0 28px; }
.ctas { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 52px; padding: 0 22px; border-radius: 16px; font: 700 16px/1 var(--body); text-decoration: none; border: 0; cursor: pointer; transition: transform .15s ease-out, background-color .15s; }
.btn:active { transform: translateY(2px); }
.btn-primary { background: var(--ink); color: #fff; }
.btn-primary:hover { background: #2D3B36; }
.btn-ghost { background: transparent; color: var(--ink); border: 1.5px solid var(--ink-muted); }
.store { display: inline-flex; flex-direction: column; justify-content: center; min-height: 52px; padding: 6px 18px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); line-height: 1.2; }
.store b { font-size: 15px; }
.store small { font: 500 11px/1.2 var(--mono); letter-spacing: 0.06em; color: var(--ink-muted); text-transform: uppercase; }
.fine { font-size: 14px; color: var(--ink-muted); margin-top: 14px; }

/* the dish: the web demo */
.dish-card { background: var(--surface); border: 1px solid var(--line); border-radius: 28px; padding: 18px; box-shadow: 0 30px 60px -30px rgba(138, 79, 23, 0.35); }
.dish { position: relative; aspect-ratio: 1 / 0.86; border-radius: 22px; overflow: hidden;
  background: radial-gradient(circle at 50% 45%, #FFFDF6 0 46%, #FBEBD0 47% 48%, #FFF7E8 49% 62%, #F6E2C2 63%); }
.dish::after { content: ""; position: absolute; inset: 0; border-radius: 22px; box-shadow: inset 0 0 0 1px rgba(0,0,0,.05), inset 0 -18px 40px rgba(217,150,74,.12); pointer-events: none; }
.fly { position: absolute; width: 46%; left: 27%; top: 25%; transition: transform .5s cubic-bezier(.2,.8,.2,1); transform-origin: 50% 80%; animation: idle 3.2s ease-in-out infinite; }
.fly picture { display: block; }
.fly img { width: 100%; filter: drop-shadow(0 14px 10px rgba(122, 74, 34, .18)); }
@keyframes idle { 0%,100% { translate: 0 0; } 50% { translate: 0 -6px; } }
.dish .fog { position: absolute; width: 46%; aspect-ratio: 1; border-radius: 50%; left: 6%; top: 18%; opacity: 0; transform: scale(.6);
  background: radial-gradient(circle, rgba(242,210,75,.55), rgba(242,210,75,0) 68%); transition: opacity .6s, transform .9s; }
.dish .fog.on { opacity: 1; transform: scale(1); }
.dish .sugar { position: absolute; width: 22px; height: 22px; right: 22%; bottom: 20%; border-radius: 6px; background: #fff; box-shadow: 0 0 0 2px var(--amber), 0 6px 10px rgba(0,0,0,.12); opacity: 0; transform: translateY(-40px) rotate(-20deg); transition: opacity .3s, transform .5s cubic-bezier(.3,1.6,.5,1); }
.dish .sugar.on { opacity: 1; transform: none; }
.dish .gust { position: absolute; right: 4%; top: 30%; width: 34%; opacity: 0; }
.dish .gust.on { animation: gust .9s ease-out; }
@keyframes gust { 0% { opacity: 0; transform: translateX(40px); } 30% { opacity: 1; } 100% { opacity: 0; transform: translateX(-70px); } }
.dish .pop { position: absolute; width: 42px; opacity: 0; pointer-events: none; }
.dish .pop.on { animation: pop 1.4s ease-out; }
@keyframes pop { 0% { opacity: 0; transform: translateY(10px) scale(.6); } 20% { opacity: 1; transform: translateY(0) scale(1); } 100% { opacity: 0; transform: translateY(-46px) scale(.9); } }
.dish .note { position: absolute; left: 14px; bottom: 12px; right: 14px; font: 500 12px/1.4 var(--mono); color: var(--ink-muted); }
.tools { display: flex; justify-content: space-around; padding: 16px 4px 4px; }
.tool { display: flex; flex-direction: column; align-items: center; gap: 6px; background: none; border: 0; padding: 0; font: 600 14px/1 var(--body); color: var(--ink); cursor: pointer; }
.tool span { width: 64px; height: 64px; border-radius: 20px; display: grid; place-items: center; background: var(--cream); border: 1px solid var(--line); transition: transform .15s, background-color .15s; }
.tool:hover span { background: var(--cream-deep); }
.tool:active span { transform: translateY(2px); }
.status { min-height: 1.6em; margin: 10px 4px 0; font-size: 15px; color: var(--ink); text-align: center; }
.status b { color: var(--teal); }

/* sections */
section { padding: 84px 0; }
.kicker { margin-bottom: 14px; }
h2 { font: clamp(34px, 4.4vw, 52px)/1.08 var(--display); margin: 0 0 16px; }
.section-lede { font-size: 19px; color: var(--ink); max-width: 56ch; margin: 0 0 40px; }

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; counter-reset: step; }
.step { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; position: relative; }
.step::before { counter-increment: step; content: "0" counter(step); position: absolute; top: 18px; right: 20px; font: 500 13px/1 var(--mono); color: var(--amber-ink); }
.step h3 { font: 26px/1.15 var(--display); margin: 8px 0 10px; }
.step p { margin: 0; color: var(--ink-muted); }
.step .ico { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; background: var(--cream); border: 1px solid var(--line); }

/* the brain */
.brain { background: var(--ink); color: #EDF2EF; border-radius: 36px; padding: 56px; display: grid; grid-template-columns: 1fr 1.1fr; gap: 48px; align-items: center; }
.brain h2 { color: #fff; }
.brain .section-lede { color: #C9D3CE; margin-bottom: 22px; }
.brain .tag { background: transparent; color: var(--cream-deep); border-color: var(--cream-deep); }
.brain .honest { font-size: 15px; color: #AEBAB4; border-left: 3px solid var(--amber); padding-left: 14px; margin: 0; }
.diagram { background: #26332E; border-radius: 24px; padding: 22px; }
.diagram svg { width: 100%; height: auto; display: block; }
.diagram .cap { font: 500 12px/1.5 var(--mono); color: #AEBAB4; margin-top: 10px; }
.cell { fill: #3A4A44; transition: fill .4s; }
.cell.lit { fill: var(--amber); }
.wire { stroke: #4A5C55; stroke-width: 2; }
.wire.lit { stroke: var(--teal); stroke-width: 4; }
.node { fill: #EDF2EF; }
.diagram text { font: 600 13px var(--body); fill: #EDF2EF; }
.diagram .node-lbl { fill: var(--ink); }

/* features */
.duo { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.feature { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 30px; }
.feature h3 { font: 30px/1.1 var(--display); margin: 10px 0 10px; }
.feature p { color: var(--ink-muted); margin: 0; }
.phone { margin-top: 22px; aspect-ratio: 9 / 13; max-width: 220px; border-radius: 28px; border: 8px solid var(--ink); background: linear-gradient(#F6EAD3 0 58%, #fff 58%); position: relative; overflow: hidden; }
.phone img { position: absolute; width: 62%; left: 19%; top: 16%; }
.phone .bar { position: absolute; left: 12%; right: 12%; height: 8px; border-radius: 4px; background: #E7EDE9; }
.phone .wm { position: absolute; left: 0; right: 0; top: 50%; text-align: center; font: 600 9px/1 var(--body); color: #8A6A3E; }
.desk { margin-top: 22px; height: 280px; border-radius: 20px; position: relative; overflow: hidden;
  background: linear-gradient(180deg, #CFD8D4 0 48%, #B98A5A 48% 100%); }
.desk::before { content: ""; position: absolute; left: 0; right: 0; top: 48%; height: 10px; background: #A57647; }
.desk img { position: absolute; width: 34%; left: 33%; top: 30%; }
.desk .mug { position: absolute; right: 12%; top: 26%; width: 56px; height: 64px; background: #fff; border-radius: 6px 6px 14px 14px; box-shadow: 8px 6px 0 -2px #E7EDE9; }
.desk .ring { position: absolute; left: 28%; top: 70%; width: 44%; height: 12%; border: 2px dashed rgba(255,255,255,.7); border-radius: 50%; }

.promise { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 26px; }
.promise div { flex: 1 1 240px; background: var(--cream); border: 1px solid var(--line); border-radius: 16px; padding: 16px 18px; font-size: 15px; }
.promise b { display: block; font-size: 16px; margin-bottom: 2px; }

/* faq */
.faq { display: grid; gap: 12px; max-width: 820px; }
details { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 4px 22px; }
summary { cursor: pointer; list-style: none; padding: 18px 0; font-weight: 700; font-size: 18px; display: flex; justify-content: space-between; gap: 16px; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; font: 400 26px/1 var(--display); color: var(--amber-ink); }
details[open] summary::after { content: "−"; }
details p { margin: 0 0 18px; color: var(--ink-muted); }

/* final */
.final { text-align: center; }
.final .card { background: var(--cream-deep); border-radius: 36px; padding: 64px 28px; position: relative; overflow: hidden; }
.final img { width: 160px; margin: 0 auto 18px; }
.final h2 { margin-bottom: 12px; }
.final p { max-width: 46ch; margin: 0 auto 26px; }
.final .ctas { justify-content: center; }

/* footer */
footer { padding: 40px 0 60px; font-size: 14px; color: var(--ink-muted); }
footer .wrap { display: grid; gap: 14px; }
footer nav { display: flex; flex-wrap: wrap; gap: 18px; }
footer nav a { text-decoration: none; font-weight: 500; color: var(--ink); }
footer nav a:hover { color: var(--amber-ink); }
.credit { font: 12px/1.6 var(--mono); }

/* legal and plain pages */
.doc { background: var(--surface); border: 1px solid var(--line); border-radius: 28px; padding: clamp(24px, 5vw, 56px); margin: 40px auto 60px; max-width: 860px; }
.doc h1 { font: clamp(34px, 5vw, 48px)/1.1 var(--display); margin: 0 0 12px; }
.doc h2 { font: 26px/1.2 var(--display); margin: 36px 0 10px; }
.doc h3 { font-size: 18px; margin: 24px 0 8px; }
.doc table { width: 100%; border-collapse: collapse; font-size: 15px; margin: 12px 0 20px; display: block; overflow-x: auto; }
.doc th, .doc td { border: 1px solid var(--line); padding: 8px 10px; text-align: left; vertical-align: top; }
.doc th { background: var(--cream); }
.doc blockquote { margin: 0 0 16px; padding: 10px 16px; background: var(--cream); border-radius: 12px; color: var(--ink-muted); }
.doc code { font: 14px var(--mono); background: var(--cream); padding: 1px 5px; border-radius: 5px; }
.langs { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 24px; }
.langs a { font-size: 14px; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); text-decoration: none; }
.langs a[aria-current] { background: var(--ink); color: #fff; border-color: var(--ink); }

/* reveal on scroll */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s ease-out, transform .7s ease-out; }
.js .reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .fly { animation: none; }
  * { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

@media (max-width: 900px) {
  .hero .wrap, .brain, .duo { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .brain { padding: 32px 22px; border-radius: 28px; }
  section { padding: 64px 0; }
}

/* phones: the main button takes the full row, the two store badges share the next one evenly */
@media (max-width: 560px) {
  .ctas { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
  .ctas .btn-primary { grid-column: 1 / -1; justify-content: center; min-height: 54px; }
  .ctas .store { align-items: center; text-align: center; padding: 6px 10px; }
}
/* mono caps spacing suits Latin labels, not Hangul/kana/hanzi */
:lang(ko) .store small, :lang(ja) .store small, :lang(zh) .store small { font-family: var(--body); font-size: 12px; letter-spacing: 0; }
