:root {
  --ink: #181817;
  --honey: #ffb80d;
  --honey-bright: #ffb80d;
  --soft-yellow: #fff1ce;
  --paper: #fbf7f0;
  --white: #fffefb;
  --muted-ink: #696764;
  --dot-muted: #837c6d;
  --focus-ring: #ad6b00;
  --line: #ece5d9;
  font-family: AppSans, "Noto Sans SC", sans-serif;
  color: var(--ink);
  background: var(--paper);
}

@font-face {
  font-family: AppSans;
  src: url("assets/fonts/NotoSansSC.ttf") format("truetype");
  font-display: swap;
}

* { box-sizing: border-box; }

body { margin: 0; background: var(--paper); }

img { display: block; max-width: 100%; }

.hero {
  min-height: 100svh;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(48rem, 1.6fr) minmax(23rem, 1fr);
  background: linear-gradient(108deg, var(--ink) 0 58%, var(--paper) 58% 100%);
}

.hero__showcase {
  --showcase-shift-y: 0rem;
  position: relative;
  min-width: 0;
  min-height: 44rem;
}

.hero__showcase::before {
  position: absolute;
  top: calc(8% + var(--showcase-shift-y));
  left: 5%;
  width: min(48vw, 43rem);
  height: min(48vw, 43rem);
  border: 1px solid rgb(255 254 251 / 15%);
  border-radius: 50%;
  content: "";
}

.book-sheet {
  position: absolute;
  z-index: 1;
  top: calc(15% + var(--showcase-shift-y));
  left: 8%;
  width: 15.5rem;
  min-height: 20rem;
  padding: 3.75rem 1.5rem 1.5rem;
  border-radius: 1.25rem 2.5rem 2.5rem 1.25rem;
  background: #f3eadc;
  color: #514b43;
  font-family: Georgia, "Times New Roman", serif;
  font-size: .77rem;
  line-height: 1.65;
  transform: rotate(-5deg);
  opacity: .8;
  box-shadow: 0 1.2rem 2.2rem rgb(0 0 0 / 18%);
}

.book-sheet::after {
  position: absolute;
  inset: 0 auto 0 50%;
  width: 1px;
  background: linear-gradient(transparent 10%, rgb(81 75 67 / 18%) 28% 75%, transparent 92%);
  content: "";
}

.book-sheet__page { position: absolute; top: 1.75rem; left: 1.8rem; color: #91887b; font-size: .75rem; }

.device-frame {
  position: absolute;
  z-index: 2;
  top: calc(7% + var(--showcase-shift-y));
  left: 29%;
  width: 16.5rem;
  aspect-ratio: 430 / 844;
  padding: .5rem;
  border: 1px solid rgb(255 254 251 / 28%);
  border-radius: 2.35rem;
  background: var(--ink);
  box-shadow: 0 1.5rem 3.5rem rgb(0 0 0 / 28%);
}

.device-frame__screen {
  position: relative;
  height: 100%;
  overflow: hidden;
  padding: 5rem 1rem 1rem;
  border-radius: 1.85rem;
  background: var(--paper);
}

.device-frame__island {
  position: absolute;
  top: .85rem;
  left: 50%;
  width: 4.7rem;
  height: 1.3rem;
  border-radius: 999px;
  background: var(--ink);
  transform: translateX(-50%);
}

.device-frame__heading { display: flex; align-items: baseline; justify-content: space-between; margin: 0 .2rem 1rem; }
.device-frame__heading strong { font-size: 1.05rem; }
.device-frame__heading span { color: var(--muted-ink); font-size: .72rem; }

.scan-sentence {
  margin-bottom: .75rem;
  padding: .9rem;
  border-radius: 1.35rem;
  background: var(--white);
  font-size: .7rem;
  line-height: 1.45;
}

.scan-sentence__top { display: flex; align-items: flex-start; gap: .55rem; }
.scan-sentence__top strong { flex: 1; font-size: .72rem; font-weight: 750; }
.scan-sentence__toggle { display: flex; align-items: center; gap: .12rem; margin-top: .62rem; font-size: .62rem; font-weight: 700; }
.scan-sentence__toggle svg { width: .82rem; height: .82rem; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 2.1; }
.scan-sentence__details { margin-top: .42rem; color: var(--muted-ink); }
.scan-sentence__details > p { margin-bottom: .42rem; font-size: .58rem; font-weight: 500; line-height: 1.45; }
.scan-sentence__details > span { display: block; margin: .42rem 0 .16rem; color: #969696; font-size: .52rem; font-weight: 700; }
.scan-sentence__details > small { display: block; margin-top: -.2rem; font-size: .49rem; line-height: 1.4; }
.scan-sentence__details strong { color: var(--ink); text-decoration: underline; text-decoration-color: #a5a5a5; text-underline-offset: .12em; }

.sound-button { width: 2.5rem; height: 2.5rem; flex: 0 0 auto; display: grid; place-items: center; border-radius: 50%; background: #ffe2b3; color: #5c4624; }
.sound-button svg { width: 1.3rem; height: 1.3rem; fill: currentColor; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.9; }
.sound-button svg path + path { fill: none; }
.sound-button--small { width: 1.8rem; height: 1.8rem; }
.sound-button--small svg { width: .95rem; height: .95rem; }

.feature-card {
  position: absolute;
  z-index: 4;
  margin: 0;
  border: 0;
  border-radius: 2.15rem;
  background: var(--white);
  color: var(--ink);
  box-shadow: 0 1.5rem 3.5rem rgb(0 0 0 / 22%);
}

.card-section-label { margin-bottom: .35rem; color: #969696; font-size: .74rem; font-weight: 700; }

.phrase-card {
  top: calc(20% + var(--showcase-shift-y));
  right: auto;
  left: 52%;
  width: min(21.5rem, 39%);
  padding: .7rem 1.5rem 1.25rem;
}
.sheet-handle { width: 2.5rem; height: .25rem; display: block; margin: 0 auto 1rem; border-radius: 999px; background: #dedede; }
.phrase-card__heading { display: flex; align-items: flex-start; gap: .8rem; margin-bottom: 1rem; }
.phrase-card h2 { flex: 1; margin: 0; font-size: clamp(1.7rem, 2.5vw, 2.15rem); letter-spacing: -.035em; line-height: 1.16; }
.phrase-card__definition { margin-bottom: .8rem; }
.phrase-card__definition p:last-child { margin-bottom: 0; font-size: .82rem; line-height: 1.45; }
.source-label { margin-bottom: .45rem; }
.source-sentence-block { margin-bottom: .85rem; padding: .75rem .85rem; border-radius: .75rem; background: #f0f4ff; }
.feature-card__source { margin-bottom: .35rem; font-size: .82rem; font-weight: 500; line-height: 1.48; }
.feature-card__translation { margin-bottom: 0; color: var(--muted-ink); font-size: .76rem; line-height: 1.5; }
.phrase-highlight { padding: 0; background: none; color: #e8590c; font-weight: 800; }
.meaning-highlight { color: #2b8a3e; font-weight: 800; }
.collect-button { min-height: 2.75rem; display: flex; align-items: center; justify-content: center; margin-bottom: .8rem; border-radius: 999px; background: var(--ink); color: var(--white); font-size: .86rem; font-weight: 700; }
.hero__copy {
  align-self: center;
  max-width: 31rem;
  padding: clamp(3rem, 7vw, 8rem) clamp(2rem, 6vw, 7rem) clamp(4rem, 7vw, 8rem) 2.5rem;
}

.hero__brand { display: flex; align-items: center; gap: .85rem; margin-bottom: 1.65rem; }
.hero__mark { width: 4.25rem; height: 4.25rem; flex: 0 0 auto; border-radius: 1.15rem; }
.hero__brand-copy { display: flex; flex-direction: column; gap: .32rem; }
.hero__brand-name { font-size: clamp(1.75rem, 2.2vw, 2.15rem); font-weight: 800; letter-spacing: -.045em; line-height: 1; }
.hero__brand-subtitle { color: var(--muted-ink); font-size: .95rem; font-weight: 500; letter-spacing: .02em; line-height: 1.2; }

h1, h2, h3, p { margin-top: 0; }

.hero__tagline { margin: 0 0 1.05rem; font-size: clamp(3rem, 3.6vw, 3.25rem); font-weight: 800; letter-spacing: -.055em; line-height: 1.08; }
.hero__tagline span { display: block; }
.hero__explain { margin-bottom: .7rem; color: var(--muted-ink); font-size: 1rem; line-height: 1.65; }
.platform-statuses { display: grid; grid-template-columns: 1fr 1fr; gap: .7rem; }

[data-platform-status] {
  min-height: 3.35rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  border-radius: 999px;
  background: var(--honey-bright);
  color: var(--ink);
  font-weight: 700;
}

a:focus-visible { outline: 3px solid var(--focus-ring); outline-offset: 2px; }

footer { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 1rem 1.5rem; padding: 2.1rem clamp(1.25rem, 7vw, 7rem); background: var(--ink); color: rgb(255 253 248 / 70%); font-size: .9rem; }

footer a { min-height: 2.75rem; display: inline-flex; align-items: center; color: var(--white); text-underline-offset: .22em; }

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

@media (min-width: 768px) {
  .hero__showcase { --showcase-shift-y: clamp(4.5rem, 6vh, 5rem); }
}

@media (min-width: 768px) and (max-width: 1120px) {
  .hero { grid-template-columns: minmax(38rem, 1.5fr) minmax(21rem, 1fr); }
  .hero__showcase { --showcase-shift-y: 3rem; min-height: 42rem; }
  .book-sheet { left: 7%; width: 14.25rem; min-height: 19rem; padding: 3.7rem 1.4rem 1.4rem; font-size: .74rem; }
  .device-frame { left: 28%; width: 15.5rem; }
  .phrase-card { top: calc(23% + var(--showcase-shift-y)); right: auto; left: 51%; width: min(20rem, 41%); }
  .hero__copy { padding-right: 2rem; padding-left: 1rem; }
}

@media (max-width: 767px) {
  .hero {
    min-height: auto;
    grid-template-columns: 1fr;
    background: linear-gradient(to bottom, var(--paper) 0 100svh, var(--ink) 100svh 100%);
  }
  .hero__copy {
    order: -1;
    min-height: 100svh;
    max-width: none;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: calc(1.5rem + env(safe-area-inset-top)) 1.5rem calc(1.5rem + env(safe-area-inset-bottom));
  }
  .hero__brand { gap: .7rem; margin-bottom: 1.75rem; }
  .hero__mark { width: 3.15rem; height: 3.15rem; border-radius: .9rem; }
  .hero__brand-name { font-size: 1.7rem; }
  .hero__brand-subtitle { font-size: .82rem; }
  .hero__tagline { font-size: clamp(3.15rem, 13.5vw, 3.6rem); line-height: 1.08; }
  .platform-statuses {
    width: min(100%, 17.5rem);
    grid-template-columns: 1fr;
    margin: clamp(2.25rem, 6svh, 3.5rem) auto 0;
    gap: .7rem;
  }
  .hero__showcase { min-height: 58rem; }
  .hero__showcase::before { top: 1rem; left: 50%; width: 29rem; height: 29rem; transform: translateX(-50%); }
  .book-sheet { top: 2.5rem; left: 1.25rem; width: 13.5rem; min-height: 17.5rem; padding: 3.5rem 1.15rem 1.25rem; font-size: .68rem; }
  .device-frame { top: 1.5rem; left: 50%; width: 13.75rem; transform: translateX(-18%); }
  .device-frame__screen { padding: 4.25rem .72rem .72rem; }
  .device-frame__island { width: 4rem; height: 1.05rem; }
  .scan-sentence { padding: .72rem; font-size: .63rem; }
  .scan-sentence__top strong { font-size: .62rem; }
  .scan-sentence__toggle { margin-top: .45rem; font-size: .56rem; }
  .sound-button--small { width: 1.55rem; height: 1.55rem; }
  .phrase-card { right: 1.1rem; left: 1.1rem; width: auto; }
  .phrase-card { top: 30.25rem; padding: .7rem 1.25rem 1.15rem; }
  .phrase-card h2 { font-size: 1.8rem; }
  footer { text-align: center; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
