/* Liao — Chinese Dusk, for the web.
   Mirrors the iOS design system: ink surfaces, cinnabar accent, champagne
   gold rules, and New York serif display type. */

:root {
  --cinnabar: #A8382D;
  --deep-cinnabar: #7C2A24;
  --gold: #C7A15C;
  --muted-gold: #A98B54;
  --sunset: #C96F4A;
  --cream: #F2EADB;
  --ink: #121016;
  --plum: #191521;
  --jade: #5F8272;
  --mist: #8D959C;
  --panel: rgba(30, 25, 38, 0.92);
  --hairline: rgba(242, 234, 219, 0.1);
  --text-secondary: rgba(242, 234, 219, 0.66);
  --text-tertiary: rgba(242, 234, 219, 0.42);
  --measure: 46rem;
  --wide: 72rem;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  background: #0F0D13;
  min-height: 100%;
}

body {
  margin: 0;
  background:
    radial-gradient(120% 80% at 50% -10%, #241C2E 0%, transparent 60%),
    linear-gradient(180deg, #0F0D13 0%, #171320 40%, #221A28 75%, #151119 100%),
    #0F0D13;
  background-repeat: no-repeat;
  color: var(--cream);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 17px;
  line-height: 1.65;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}

.stars {
  position: fixed;
  inset: 0 0 auto 0;
  width: 100%;
  height: 62vh;
  z-index: 0;
  pointer-events: none;
}

main, .site-header, .site-footer { position: relative; z-index: 1; }

/* ---------------------------------------------------------- header */

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  max-width: var(--wide);
  margin: 0 auto;
  padding: 1.5rem 1.5rem 0;
  width: 100%;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
  color: inherit;
}

.brand img { border-radius: 8px; display: block; }

.wordmark {
  font-family: ui-serif, "New York", Georgia, "Times New Roman", serif;
  font-size: 1.05rem;
  letter-spacing: 0.26em;
  padding-left: 0.06em;
}

.site-header nav { display: flex; gap: 1.4rem; }

.site-header nav a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  padding-bottom: 2px;
  border-bottom: 1px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.site-header nav a:hover { color: var(--cream); }
.site-header nav a.active { color: var(--gold); border-bottom-color: var(--muted-gold); }

/* ------------------------------------------------------------ main */

main {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 3.5rem 1.5rem 5rem;
  width: 100%;
  flex: 1;
}

.landing-main {
  max-width: var(--wide);
  padding-top: clamp(2.25rem, 5vw, 4.8rem);
}

h1 {
  font-family: ui-serif, "New York", Georgia, "Times New Roman", serif;
  font-size: clamp(2rem, 5vw, 2.9rem);
  font-weight: 600;
  line-height: 1.15;
  margin: 0 0 0.6rem;
}

h2 {
  font-family: ui-serif, "New York", Georgia, "Times New Roman", serif;
  font-size: 1.35rem;
  font-weight: 600;
  margin: 2.6rem 0 0.7rem;
}

h3 {
  font-family: ui-serif, "New York", Georgia, "Times New Roman", serif;
  font-size: 1.1rem;
  font-weight: 600;
  margin: 0 0 0.4rem;
}

p { margin: 0 0 1rem; color: var(--text-secondary); }

.lede { font-size: 1.12rem; color: var(--text-secondary); max-width: 38rem; }

a { color: var(--gold); text-decoration-color: rgba(199, 161, 92, 0.4); }
a:hover { color: var(--sunset); }

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--muted-gold);
  margin: 0 0 0.5rem;
}

.rule {
  height: 1px;
  margin: 2rem 0 0;
  background: linear-gradient(90deg, transparent, rgba(199, 161, 92, 0.45), transparent);
}

/* ------------------------------------------------------------ app ad */

.app-ad {
  min-height: calc(100svh - 7.5rem);
  display: grid;
  grid-template-columns: minmax(0, 1.06fr) minmax(18rem, 0.8fr);
  align-items: center;
  gap: clamp(2rem, 6vw, 5rem);
  padding-bottom: clamp(3rem, 6vw, 5rem);
}

.ad-copy {
  max-width: 42rem;
}

.app-ad h1 {
  font-size: 6.6rem;
  letter-spacing: 0;
  line-height: 0.93;
  margin-bottom: 1.2rem;
}

.app-ad .lede {
  color: rgba(242, 234, 219, 0.76);
  font-size: 1.28rem;
  line-height: 1.55;
  max-width: 36rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  margin: 1.9rem 0 0.75rem;
}

.app-store-badge {
  display: block;
  width: 15rem;
  max-width: 100%;
  border-radius: 0.72rem;
  text-decoration: none;
  filter: drop-shadow(0 1.1rem 2.25rem rgba(3, 2, 5, 0.44));
}

.app-store-badge:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 5px;
}

.app-store-badge img {
  display: block;
  width: 100%;
  height: auto;
}

.secondary-link {
  color: rgba(242, 234, 219, 0.72);
  text-decoration: none;
  border-bottom: 1px solid rgba(199, 161, 92, 0.42);
  padding-bottom: 0.16rem;
}

.download-note {
  color: var(--text-tertiary);
  font-size: 0.92rem;
  margin-bottom: 1.4rem;
}

.ad-proof {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.ad-proof span {
  border: 1px solid rgba(199, 161, 92, 0.28);
  border-radius: 999px;
  color: rgba(242, 234, 219, 0.76);
  font-size: 0.82rem;
  padding: 0.38rem 0.72rem;
  background: rgba(30, 25, 38, 0.62);
}

.phone-stage {
  position: relative;
  display: flex;
  justify-content: center;
  min-height: 34rem;
}

.phone-glow {
  position: absolute;
  inset: 7% 0 4%;
  margin: auto;
  width: min(28rem, 88%);
  border-radius: 999px;
  background:
    radial-gradient(circle at 50% 22%, rgba(201, 111, 74, 0.35), transparent 54%),
    radial-gradient(circle at 50% 80%, rgba(95, 130, 114, 0.18), transparent 58%);
  filter: blur(18px);
  opacity: 0.9;
}

.phone-shell {
  position: relative;
  width: min(21rem, 82vw);
  aspect-ratio: 739 / 1600;
  overflow: hidden;
  border-radius: 2.35rem;
  background: #0F0D13;
  border: 0.55rem solid rgba(12, 10, 20, 0.94);
  box-shadow:
    0 2.2rem 5rem rgba(0, 0, 0, 0.55),
    0 0 0 1px rgba(242, 234, 219, 0.12);
  transform: rotate(2.2deg);
}

.phone-shell::before {
  content: "";
  position: absolute;
  top: 0.65rem;
  left: 50%;
  z-index: 2;
  width: 5.8rem;
  height: 1.15rem;
  border-radius: 999px;
  background: #050409;
  transform: translateX(-50%);
}

.phone-shell img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ----------------------------------------------------------- cards */

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: 1rem;
  margin: 0 0 4rem;
}

.card {
  background: var(--panel);
  border: 1px solid var(--hairline);
  border-radius: 18px;
  padding: 1.4rem;
}

.card-speak { border-color: rgba(199, 161, 92, 0.3); }
.card-feedback { background: rgba(124, 42, 36, 0.36); }
.card-lesson { background: rgba(95, 130, 114, 0.18); }

.card p:last-child { margin-bottom: 0; font-size: 0.95rem; }

/* --------------------------------------------------------- support */

.support {
  padding-top: 0.5rem;
}

.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr));
  gap: 1rem;
  margin-top: 1.5rem;
}

.contact-grid > div {
  background: var(--panel);
  border: 1px solid var(--hairline);
  border-radius: 14px;
  padding: 1rem 1.1rem;
}

.contact-grid p { margin: 0; font-size: 0.95rem; }

/* ------------------------------------------------------------- faq */

details {
  background: var(--panel);
  border: 1px solid var(--hairline);
  border-radius: 14px;
  padding: 0.9rem 1.1rem;
  margin-bottom: 0.7rem;
}

summary {
  cursor: pointer;
  font-weight: 500;
  color: var(--cream);
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

summary::-webkit-details-marker { display: none; }

summary::after {
  content: "+";
  color: var(--gold);
  font-size: 1.2rem;
  line-height: 1;
  flex-shrink: 0;
}

details[open] summary::after { content: "\2212"; }

details p { margin: 0.8rem 0 0.2rem; font-size: 0.96rem; }

/* ----------------------------------------------------------- legal */

.legal-section h2:first-child { margin-top: 2.2rem; }

.legal ul, .legal ol {
  color: var(--text-secondary);
  padding-left: 1.2rem;
  margin: 0 0 1rem;
}

.legal li { margin-bottom: 0.4rem; }

/* ---------------------------------------------------------- footer */

.site-footer { margin-top: auto; position: relative; }

.terrain {
  display: block;
  width: 100%;
  height: 190px;
  margin-bottom: -1px;
}

.footer-inner {
  background: #0C0A14;
  padding: 2.2rem 1.5rem 2.6rem;
  text-align: center;
}

.footer-brand {
  font-family: ui-serif, "New York", Georgia, "Times New Roman", serif;
  letter-spacing: 0.26em;
  padding-left: 0.26em;
  color: var(--cream);
  margin: 0 0 0.3rem;
}

.footer-inner p { font-size: 0.9rem; margin: 0 0 0.4rem; }

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.2rem;
  margin: 1.2rem 0 1.4rem;
}

.footer-nav a { font-size: 0.85rem; }

.copyright { color: var(--text-tertiary); font-size: 0.8rem !important; margin: 0 !important; }

@media (max-width: 34rem) {
  body { font-size: 16px; }
  main { padding: 2.5rem 1.25rem 4rem; }
  .landing-main { padding-top: 2rem; }
  .site-header {
    align-items: flex-start;
    padding: 1.2rem 1.25rem 0;
  }
  .site-header nav {
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.45rem 0.68rem;
    max-width: 15rem;
  }
  .site-header nav a {
    font-size: 0.76rem;
  }
  .app-ad h1 {
    font-size: 3.7rem;
    line-height: 0.96;
  }
  .hero-actions {
    align-items: stretch;
  }
  .app-store-badge {
    width: min(14.5rem, 100%);
  }
  .secondary-link {
    align-self: center;
  }
  .terrain { height: 130px; }
}

@media (max-width: 52rem) {
  .app-ad {
    grid-template-columns: 1fr;
    min-height: auto;
    gap: 2.6rem;
  }
  .phone-stage {
    min-height: 0;
  }
  .phone-shell {
    width: min(18rem, 76vw);
    border-radius: 2rem;
    transform: none;
  }
  .phone-glow {
    width: min(22rem, 88%);
  }
}

@media (min-width: 34.01rem) and (max-width: 52rem) {
  .app-ad h1 { font-size: 4.6rem; }
  .app-ad .lede { font-size: 1.18rem; }
}

@media (min-width: 52.01rem) and (max-width: 68rem) {
  .app-ad h1 { font-size: 5.4rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
