/* Malsori — one sheet of warm paper; everything is pressed out of it or sunk into it.
   No borders, no flat cards, no hard shadows: depth is always the same pair of soft shadows. */

:root {
  --surface: #ECE5D8;
  --shade: #D1C6B3;
  --light: #FFFAF1;
  --ink: #1E1A16;
  --ink-soft: #5A5148;
  --persimmon: #C24A20;
  --persimmon-deep: #8A3414;
  --indigo: #2C4A7A;
  --cream: #FFFDF8;

  --raised-sm: 5px 5px 10px var(--shade), -5px -5px 10px var(--light);
  --raised: 8px 8px 18px var(--shade), -8px -8px 18px var(--light);
  --raised-lg: 12px 12px 26px var(--shade), -12px -12px 26px var(--light);
  --pressed-sm: inset 3px 3px 6px var(--shade), inset -3px -3px 6px var(--light);
  --pressed: inset 5px 5px 10px var(--shade), inset -5px -5px 10px var(--light);

  --display: 'Gowun Batang', 'Apple SD Gothic Neo', serif;
  --text: 'Gowun Dodum', 'Apple SD Gothic Neo', system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; overflow-x: clip; }
body {
  margin: 0;
  background: var(--surface);
  color: var(--ink);
  font-family: var(--text);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--indigo); }
a:hover { color: var(--persimmon-deep); }
h1, h2, h3 { font-family: var(--display); font-weight: 700; line-height: 1.25; margin: 0; }
p { margin: 0; }

.wrap { max-width: 1040px; margin: 0 auto; padding: 0 24px; }

/* ---- nav ---- */
.nav { position: sticky; top: 0; z-index: 10; background: var(--surface); padding: 14px 0; }
.nav-inner { display: flex; align-items: center; gap: 18px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); font-family: var(--display); font-weight: 700; font-size: 20px; }
.brand img { width: 40px; height: 40px; border-radius: 11px; box-shadow: var(--raised-sm); }
.nav-links { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.nav-links a { text-decoration: none; color: var(--ink-soft); font-size: 15px; padding: 9px 14px; border-radius: 999px; }
.nav-links a:hover { color: var(--persimmon); box-shadow: var(--pressed-sm); }

/* ---- buttons ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 54px; padding: 0 26px; border: none; border-radius: 999px;
  background: var(--surface); color: var(--ink); box-shadow: var(--raised);
  font: inherit; font-size: 16px; text-decoration: none; cursor: pointer;
  transition: box-shadow .12s ease, transform .12s ease;
}
.btn:hover { color: var(--ink); }
.btn:active { box-shadow: var(--pressed); }
.btn.primary { background: var(--persimmon); color: var(--cream); }
.btn.primary:hover { color: var(--cream); }
.btn.primary:active { box-shadow: var(--raised-sm); transform: scale(.985); }
.btn.soon { cursor: default; }

/* ---- hero ---- */
.hero { padding-top: 56px; padding-bottom: 72px; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: 48px; align-items: center; }
.kicker { display: inline-block; font-size: 13px; letter-spacing: 1.5px; text-transform: uppercase; color: var(--ink-soft); padding: 8px 14px; border-radius: 999px; box-shadow: var(--pressed-sm); margin-bottom: 22px; }
.hero h1 { font-size: clamp(36px, 5.2vw, 56px); }
.hero h1 em { font-style: normal; color: var(--persimmon); }
.hero .sub { margin-top: 20px; font-size: 18px; color: var(--ink-soft); max-width: 34em; }
.hero .sub strong { color: var(--ink); font-weight: 400; font-family: var(--display); }
.hero-ctas { margin-top: 30px; display: flex; flex-wrap: wrap; gap: 16px; }

.hero-card { padding: 30px; border-radius: 34px; box-shadow: var(--raised-lg); display: flex; flex-direction: column; gap: 18px; }
.cap { font-size: 12px; letter-spacing: 1.5px; text-transform: uppercase; color: var(--ink-soft); }
.hero-word { font-family: var(--display); font-weight: 700; font-size: clamp(44px, 6vw, 62px); line-height: 1.05; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { font-size: 15px; padding: 6px 12px; border-radius: 12px; box-shadow: var(--pressed-sm); }
.said { display: flex; align-items: center; gap: 12px; padding: 13px 18px; border-radius: 18px; box-shadow: var(--pressed); }
.said .cap { color: var(--persimmon-deep); }
.said b { font-family: var(--display); font-size: 25px; flex: 1; }
.said span:last-child { font-size: 13px; color: var(--persimmon-deep); }

/* ---- sections ---- */
section { padding: 64px 0; }
.sec-head { text-align: center; margin-bottom: 40px; }
.sec-head h2 { font-size: clamp(28px, 3.8vw, 38px); }
.sec-head p { margin: 12px auto 0; color: var(--ink-soft); max-width: 38em; }

.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 26px; }
.card { padding: 26px; border-radius: 28px; box-shadow: var(--raised); display: flex; flex-direction: column; gap: 10px; }
.card .glyph { width: 58px; height: 58px; border-radius: 18px; box-shadow: var(--pressed-sm); display: flex; align-items: center; justify-content: center; font-family: var(--display); font-weight: 700; font-size: 26px; color: var(--indigo); }
.card h3 { font-size: 21px; }
.card p { color: var(--ink-soft); font-size: 16px; }

/* ---- the engine demo ---- */
.hg-card { max-width: 700px; margin: 0 auto; padding: 30px; border-radius: 34px; box-shadow: var(--raised-lg); display: flex; flex-direction: column; gap: 18px; }
.hg-chips { display: flex; flex-wrap: wrap; gap: 10px; }
.hg-chip { font: inherit; font-family: var(--display); font-weight: 700; font-size: 16px; color: var(--ink); background: var(--surface); border: none; border-radius: 999px; padding: 9px 16px; box-shadow: var(--raised-sm); cursor: pointer; }
.hg-chip:active, .hg-chip[aria-pressed="true"] { box-shadow: var(--pressed-sm); color: var(--persimmon); }
.hg-field { display: flex; flex-direction: column; gap: 8px; }
.hg-field input { width: 100%; font: inherit; font-family: var(--display); font-weight: 700; font-size: clamp(28px, 5vw, 38px); color: var(--ink); background: var(--surface); border: none; border-radius: 20px; padding: 14px 20px; box-shadow: var(--pressed); }
.hg-field input:focus { outline: 2px solid var(--indigo); outline-offset: 3px; }
#hgSpoken { font-family: var(--display); font-weight: 700; font-size: clamp(26px, 4.6vw, 34px); }
#hgSpoken.same { color: var(--ink-soft); }
.hg-rules { display: flex; flex-direction: column; gap: 10px; }
.hg-rule { font-size: 15px; color: var(--ink-soft); padding: 11px 16px; border-radius: 16px; box-shadow: var(--pressed-sm); }
.hg-rule b { font-family: var(--display); color: var(--ink); margin-right: 8px; }
.hg-letters { display: flex; flex-wrap: wrap; gap: 10px; }
.hg-block { font-size: 18px; color: var(--indigo); padding: 8px 14px; border-radius: 14px; box-shadow: var(--raised-sm); }
.hg-note { font-size: 14px; color: var(--ink-soft); }

/* ---- levels ---- */
.levels { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.level { display: flex; align-items: center; gap: 14px; padding: 18px; border-radius: 24px; box-shadow: var(--raised); }
.level .n { width: 46px; height: 46px; flex: none; border-radius: 999px; box-shadow: var(--pressed-sm); display: flex; align-items: center; justify-content: center; font-family: var(--display); font-weight: 700; font-size: 22px; }
.level b { display: block; font-weight: 400; font-size: 17px; }
.level span { font-size: 13px; color: var(--ink-soft); }

/* ---- pricing ---- */
.plans { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; max-width: 820px; margin: 0 auto; }
.plan { padding: 26px; border-radius: 28px; box-shadow: var(--raised); text-align: center; display: flex; flex-direction: column; gap: 6px; }
.plan.best { box-shadow: var(--pressed); }
.plan .price { font-family: var(--display); font-weight: 700; font-size: 30px; }
.plan.best .price { color: var(--persimmon); }
.plan span { font-size: 14px; color: var(--ink-soft); }
.fine { max-width: 720px; margin: 26px auto 0; text-align: center; font-size: 14px; color: var(--ink-soft); }

/* ---- faq ---- */
.faq { max-width: 760px; margin: 0 auto; display: flex; flex-direction: column; gap: 16px; }
.faq details { border-radius: 22px; box-shadow: var(--raised); padding: 18px 22px; }
.faq details[open] { box-shadow: var(--pressed); }
.faq summary { cursor: pointer; font-family: var(--display); font-weight: 700; font-size: 18px; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq p { margin-top: 10px; color: var(--ink-soft); font-size: 16px; }

/* ---- footer ---- */
footer { padding: 48px 0 64px; color: var(--ink-soft); font-size: 14px; }
footer .wrap { display: flex; flex-direction: column; gap: 14px; }
.foot-links { display: flex; flex-wrap: wrap; gap: 18px; }

/* ---- policy pages ---- */
.doc { max-width: 780px; margin: 0 auto; padding: 40px 24px 80px; }
.doc .sheet { padding: 34px; border-radius: 30px; box-shadow: var(--raised); }
.doc h1 { font-size: 30px; margin-bottom: 14px; }
.doc h2 { font-size: 24px; margin: 40px 0 8px; padding-top: 26px; box-shadow: 0 -1px 0 var(--shade); }
.doc h3 { font-size: 18px; margin: 26px 0 8px; }
.doc p, .doc li { font-size: 16px; color: var(--ink); }
.doc p { margin: 10px 0; }
.doc ul { padding-left: 22px; margin: 8px 0; }
.doc hr { border: none; height: 0; margin: 0; }

@media (max-width: 860px) {
  .hero { grid-template-columns: minmax(0, 1fr); gap: 36px; padding-top: 36px; padding-bottom: 56px; }
  .grid3, .levels, .plans { grid-template-columns: minmax(0, 1fr); }
  .nav-links a:not(.keep) { display: none; }
}
@media (max-width: 480px) {
  .wrap { padding: 0 16px; }
  .hero-card, .hg-card { padding: 22px; border-radius: 28px; }
  .doc { padding: 24px 16px 64px; }
  .doc .sheet { padding: 24px 20px; }
}


/* The two friends, under the hero: the vowel and the consonant the app is named after. */
.friends-line {
  grid-column: 1 / -1;
  display: flex; align-items: center; gap: 18px;
  margin: 26px 0 0; padding: 16px 20px;
  border-radius: 20px; background: var(--light, #FFFAF1);
  box-shadow: 6px 6px 14px rgba(120, 104, 80, .16), -6px -6px 14px rgba(255, 253, 248, .9);
  font-size: 15px; line-height: 1.55;
}
.friends-line .friends { width: 157px; height: 120px; flex: none; margin: -34px 0 -8px -6px; }
@media (max-width: 640px) {
  .friends-line { flex-direction: column; align-items: flex-start; gap: 12px; }
}

/* The friends elsewhere on the page, the way the app places them: over a section's title, or
   sitting on the edge of a card with their feet on it. Soft-felt art, so no shadow of their own. */
.sec-head .friend { display: block; margin: 0 auto 6px; height: auto; max-width: 42vw; }
.perched { position: relative; }
.perch { position: absolute; bottom: calc(100% - 10px); right: 26px; pointer-events: none; }
.hg-card.perched { margin-top: 104px; }       /* margins collapse: this is the whole gap */
.plans:has(.perched) { margin-top: 116px; }
.plan.perched .perch { right: 50%; transform: translateX(50%); }
footer .wrap { position: relative; padding-top: 22px; box-shadow: 0 -1px 0 var(--shade); }
footer .peek { position: absolute; bottom: 100%; right: 24px; pointer-events: none; }
@media (max-width: 860px) {
  /* One column: the key sits on the Yearly card where it falls in the stack. */
  .plans:has(.perched) { margin-top: 0; }
  .plan.perched { margin-top: 74px; }
}
@media (max-width: 640px) {
  .friends-line .friends { margin: -44px 0 0; }
}
