/* ═══════════════════════════════════════════════════════════
   InlineCoach — Landing page
   Design system: warm cream + deep walnut. Clear type ladder,
   intentional light/dark rhythm, one dark focal anchor.
═══════════════════════════════════════════════════════════ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  /* ── surfaces ── */
  --bg:       #F0ECE3;
  --bg2:      #E8E2D6;
  --dark:     #241D12;
  --dark2:    #2E2516;
  --card:     #FAF7F2;
  --border:   #DCD6CA;
  --border-d: rgba(245, 240, 230, 0.14);

  /* ── ink ── */
  --brand:    #2E2010;
  --text:     #2C2418;
  --ink-soft: #6B5E4E;
  --gray:     #9C9384;
  --cream:    #F4EFE5;
  --cream-soft: rgba(244, 239, 229, 0.62);

  /* ── functional accents (used sparingly) ── */
  --green:    #2E9E5B;
  --green-bg: rgba(46, 158, 91, 0.10);
  --red:      #C7503F;

  --font-cn: "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", sans-serif;
  --font-en: "Inter", "Segoe UI", sans-serif;

  --maxw: 1120px;
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-cn);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* ═══════════════ LAYOUT ═══════════════ */
.container {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 40px;
}

@media (max-width: 720px) {
  .container { padding: 0 22px; }
}

section {
  padding: 120px 0;
}

@media (max-width: 720px) {
  section { padding: 76px 0; }
}

.surface-bg2 { background: var(--bg2); }

/* ═══════════════ TYPE LADDER ═══════════════ */
.eyebrow {
  font-family: var(--font-en);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gray);
  display: inline-flex;
  align-items: center;
  gap: 9px;
}
.eyebrow::before {
  content: "";
  width: 22px;
  height: 1.5px;
  background: var(--gray);
  display: inline-block;
}

h1.display {
  font-size: clamp(2.7rem, 5.6vw, 4.5rem);
  font-weight: 700;
  line-height: 1.06;
  letter-spacing: -0.025em;
  color: var(--brand);
}

h2.title {
  font-size: clamp(1.95rem, 3.6vw, 2.7rem);
  font-weight: 700;
  line-height: 1.18;
  letter-spacing: -0.02em;
  color: var(--brand);
}

.lead {
  font-size: clamp(1.05rem, 1.55vw, 1.24rem);
  color: var(--ink-soft);
  line-height: 1.75;
  font-weight: 400;
}

.section-head {
  max-width: 620px;
  margin-bottom: 8px;
}
.section-head .eyebrow { margin-bottom: 22px; }
.section-head .lead    { margin-top: 20px; }
.section-head.center {
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}
.section-head.center .eyebrow::before { display: none; }
.section-head.center .eyebrow { gap: 0; }
.section-head.center .lead { margin-left: auto; margin-right: auto; }

em.en {
  font-family: var(--font-en);
  font-style: italic;
}

/* ═══════════════ BUTTONS ═══════════════ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--font-cn);
  font-size: 1rem;
  font-weight: 600;
  padding: 14px 26px;
  border-radius: 10px;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: background .15s, transform .1s, border-color .15s, color .15s;
  -webkit-tap-highlight-color: transparent;
}
.btn:active { transform: scale(0.975); }

.btn-primary { background: var(--brand); color: var(--cream); }
.btn-primary:hover { background: #1d1409; }

.btn-ghost {
  background: transparent;
  color: var(--brand);
  border: 1.5px solid var(--border);
  padding: 14px 22px;
}
.btn-ghost:hover { border-color: var(--brand); }

.btn-cream { background: var(--cream); color: var(--brand); }
.btn-cream:hover { background: #fff; }

.btn-sm { padding: 9px 18px; font-size: 0.92rem; border-radius: 8px; }

.hint {
  font-size: 0.82rem;
  color: var(--gray);
}

/* ═══════════════ NAV ═══════════════ */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(240, 236, 227, 0.78);
  backdrop-filter: saturate(140%) blur(14px);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s, background .2s;
}
.nav.scrolled {
  border-bottom-color: var(--border);
}
.nav .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--brand);
}
.wordmark .mark {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: var(--brand);
  color: var(--cream);
  display: grid;
  place-items: center;
  font-family: var(--font-en);
  font-weight: 700;
  font-size: 1rem;
}
.wordmark .name {
  font-family: var(--font-en);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
}
.nav-right {
  display: flex;
  align-items: center;
  gap: 24px;
}
.nav-link {
  font-size: 0.92rem;
  color: var(--ink-soft);
  text-decoration: none;
  font-weight: 500;
}
.nav-link:hover { color: var(--brand); }
@media (max-width: 640px) {
  .nav-link { display: none; }
}

.gh-ico { display: block; }

/* ═══════════════ HERO ═══════════════ */
#hero { padding: 84px 0 96px; }

#hero .container {
  display: grid;
  grid-template-columns: 1fr;
  gap: 56px;
  align-items: center;
}
@media (min-width: 940px) {
  #hero { padding: 104px 0 116px; }
  #hero .container {
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
    gap: 64px;
  }
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 100px;
  padding: 6px 14px 6px 12px;
  font-family: var(--font-en);
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--ink-soft);
  margin-bottom: 30px;
}
.hero-badge kbd {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 1px 7px;
  font-family: var(--font-en);
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--text);
}
.hero-badge .sep { color: var(--border); }

#hero h1.display { margin-bottom: 26px; }
#hero .lead { max-width: 480px; }
#hero .lead strong { color: var(--text); font-weight: 600; }

.cta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  margin-top: 38px;
}
.cta-row .hint { width: 100%; margin-top: -4px; }
@media (min-width: 480px) {
  .cta-row .hint { width: auto; margin-top: 0; }
}

/* ── demo window (supporting visual) ── */
.demo-window {
  background: var(--dark);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 24px 60px -24px rgba(36, 29, 18, 0.5),
              0 4px 14px rgba(36, 29, 18, 0.12);
  border: 1px solid rgba(0,0,0,0.2);
}
.demo-titlebar {
  background: var(--dark2);
  padding: 11px 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.demo-titlebar .dot { width: 11px; height: 11px; border-radius: 50%; }
.dot-r { background: #E5685A; }
.dot-y { background: #E0A93C; }
.dot-g { background: #5FB97F; }
.demo-titlebar .tab {
  font-family: var(--font-en);
  font-size: 0.76rem;
  color: var(--cream-soft);
  margin-left: 10px;
}
.demo-body { padding: 18px; }

.demo-input-area {
  background: rgba(0,0,0,0.28);
  border-radius: 9px;
  padding: 15px 16px;
  font-family: var(--font-en);
  font-size: 0.92rem;
  color: #D7CFBE;
  min-height: 74px;
}
.demo-input-area .label {
  font-size: 0.68rem;
  color: var(--cream-soft);
  margin-bottom: 9px;
  font-family: var(--font-cn);
}
.cursor {
  display: inline-block;
  width: 2px; height: 1em;
  background: #D7CFBE;
  vertical-align: text-bottom;
  animation: blink 1s step-end infinite;
}
@keyframes blink { 50% { opacity: 0; } }

.demo-popup {
  background: var(--card);
  border-radius: 11px;
  margin-top: 12px;
  overflow: hidden;
  box-shadow: 0 8px 26px rgba(0,0,0,0.28);
  opacity: 0;
  transform: translateY(8px) scale(0.985);
  transition: opacity .35s ease, transform .35s ease;
}
.demo-popup.visible { opacity: 1; transform: translateY(0) scale(1); }

.popup-result {
  padding: 17px 18px 7px;
  font-family: var(--font-en);
  font-size: 1.02rem;
  font-weight: 500;
  color: var(--text);
  line-height: 1.55;
  min-height: 34px;
}
.popup-copy-hint {
  padding: 0 18px 13px;
  font-size: 0.76rem;
  color: var(--gray);
  display: flex;
  align-items: center;
  gap: 6px;
}
.stream-cursor {
  display: inline-block;
  width: 2px; height: 0.9em;
  background: var(--brand);
  vertical-align: text-bottom;
  animation: blink 0.7s step-end infinite;
}
.lesson-card {
  border-top: 1px solid var(--border);
  background: var(--green-bg);
  padding: 14px 18px;
  opacity: 0;
  transform: translateY(5px);
  transition: opacity .3s ease .1s, transform .3s ease .1s;
}
.lesson-card.visible { opacity: 1; transform: translateY(0); }
.lesson-diff {
  display: flex; align-items: center; gap: 9px;
  margin-bottom: 6px; flex-wrap: wrap;
  font-family: var(--font-en); font-size: 0.95rem;
}
.lesson-diff .wrong { font-weight: 600; color: var(--red); }
.lesson-diff .arrow { color: var(--gray); }
.lesson-diff .right { font-weight: 700; color: var(--green); }
.lesson-explain { font-size: 0.84rem; color: var(--ink-soft); line-height: 1.55; }

/* ═══════════════ PAIN — broken loop ═══════════════ */
.loop {
  margin-top: 52px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 40px;
}
@media (max-width: 720px) { .loop { padding: 26px 20px; } }

.loop-flow {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}
.loop-step {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 15px;
  font-size: 0.94rem;
  color: var(--text);
  white-space: nowrap;
}
.loop-arr { color: var(--gray); font-size: 0.9rem; }
.loop-step.bad {
  background: rgba(199, 80, 63, 0.08);
  border-color: rgba(199, 80, 63, 0.28);
  color: var(--red);
  font-weight: 600;
}
.loop-again {
  margin-top: 22px;
  padding-top: 20px;
  border-top: 1px dashed var(--border);
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.96rem;
  color: var(--ink-soft);
}
.loop-again .recycle {
  font-family: var(--font-en);
  font-weight: 700;
  color: var(--red);
}

.quotes {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin-top: 22px;
}
@media (min-width: 760px) { .quotes { grid-template-columns: 1fr 1fr; } }
.quote {
  background: transparent;
  border-left: 3px solid var(--border);
  padding: 6px 0 6px 22px;
}
.quote p {
  font-size: 1.08rem;
  font-style: italic;
  line-height: 1.75;
  color: var(--ink-soft);
}

.punch {
  margin-top: 56px;
  text-align: center;
}
.punch h3 {
  font-size: clamp(1.4rem, 2.8vw, 2rem);
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--brand);
  line-height: 1.35;
}
.punch h3 .muted { color: var(--gray); }

/* ═══════════════ DARK FOCAL — core value ═══════════════ */
#core {
  background: var(--dark);
  color: var(--cream);
  padding: 132px 0;
}
@media (max-width: 720px) { #core { padding: 88px 0; } }

#core .eyebrow { color: var(--cream-soft); }
#core .eyebrow::before { background: var(--cream-soft); }
#core h2.title { color: var(--cream); }
#core .core-head { max-width: 760px; margin: 0 auto; text-align: center; }
#core .core-head .eyebrow { gap: 0; margin-bottom: 24px; }
#core .core-head .eyebrow::before { display: none; }
#core .core-lead {
  font-size: clamp(1.05rem, 1.6vw, 1.28rem);
  color: var(--cream-soft);
  line-height: 1.8;
  margin-top: 24px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

/* bigger popup in core section — reuses .demo-popup classes, just scaled up */
.showcase {
  margin: 56px auto 0;
  max-width: 480px;
  box-shadow: 0 30px 70px -20px rgba(0,0,0,0.55);
  opacity: 1;
  transform: none;
}
.showcase .popup-result {
  font-size: 1.15rem;
  padding: 22px 24px 9px;
}
.showcase .popup-copy-hint {
  font-size: 0.8rem;
  padding: 0 24px 16px;
}
.showcase .lesson-card {
  padding: 16px 24px;
}
.showcase .lesson-diff {
  font-size: 1rem;
}
.showcase .lesson-explain {
  font-size: 0.9rem;
}

.core-tag {
  margin-top: 44px;
  text-align: center;
  font-size: clamp(1.15rem, 2.2vw, 1.55rem);
  font-weight: 600;
  color: var(--cream);
  letter-spacing: -0.01em;
}
.core-tag .accent { color: #7FBF98; }

/* ═══════════════ HOW — 3 steps ═══════════════ */
#how .steps {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  margin-top: 52px;
}
@media (min-width: 860px) {
  #how .steps { grid-template-columns: repeat(3, 1fr); gap: 18px; }
}
.step {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 28px 26px;
  position: relative;
}
.step-num {
  font-family: var(--font-en);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--gray);
  margin-bottom: 18px;
}
.step-num b { color: var(--brand); font-size: 1.5rem; letter-spacing: -0.02em; }
.step h3 {
  font-size: 1.18rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 8px;
  line-height: 1.3;
}
.step h3 .kbd-badge {
  display: inline-block;
  background: var(--brand);
  color: var(--cream);
  font-family: var(--font-en);
  font-size: 0.92rem;
  font-weight: 700;
  padding: 2px 10px;
  border-radius: 6px;
  letter-spacing: 0.02em;
  vertical-align: 2px;
}
.step p { font-size: 0.92rem; color: var(--ink-soft); line-height: 1.65; }

/* ═══════════════ COMPARE — two columns ═══════════════ */
#compare .versus {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  margin-top: 52px;
  max-width: 920px;
  margin-left: auto;
  margin-right: auto;
}
@media (min-width: 760px) { #compare .versus { grid-template-columns: 1fr 1fr; } }

.vs-col {
  border-radius: 16px;
  padding: 30px 30px 34px;
  border: 1px solid var(--border);
}
.vs-col.them { background: var(--card); }
.vs-col.us { background: var(--brand); color: var(--cream); border-color: var(--brand); }

.vs-col .vs-name {
  display: flex;
  align-items: center;
  gap: 9px;
  font-weight: 700;
  font-size: 1.1rem;
  margin-bottom: 22px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--border);
}
.vs-col.them .vs-name { color: var(--ink-soft); }
.vs-col.us .vs-name { color: var(--cream); border-bottom-color: var(--border-d); }
.vs-name .badge {
  font-family: var(--font-en);
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 3px 9px;
  border-radius: 100px;
  margin-left: auto;
}
.vs-col.them .badge { background: var(--bg2); color: var(--gray); }
.vs-col.us .badge { background: rgba(127, 191, 152, 0.22); color: #9FD8B4; }

.vs-list { list-style: none; display: flex; flex-direction: column; gap: 16px; }
.vs-list li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  font-size: 0.98rem;
  line-height: 1.55;
}
.vs-list li .ico {
  flex-shrink: 0;
  width: 20px; height: 20px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 0.7rem;
  font-weight: 700;
  margin-top: 2px;
}
.vs-col.them .ico { background: rgba(199,80,63,0.12); color: var(--red); }
.vs-col.them li { color: var(--ink-soft); }
.vs-col.us .ico { background: rgba(127,191,152,0.2); color: #9FD8B4; }
.vs-col.us li { color: var(--cream); }

/* ═══════════════ PRICING ═══════════════ */
#pricing .section-head { margin-bottom: 0; }
.pricing-cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  margin-top: 52px;
  max-width: 620px;
  margin-left: auto;
  margin-right: auto;
  align-items: stretch;
}
@media (min-width: 600px) {
  .pricing-cards { grid-template-columns: 1fr 1.18fr; align-items: center; }
}
.plan {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 30px 28px;
  display: flex;
  flex-direction: column;
}
.plan.featured {
  background: var(--brand);
  color: var(--cream);
  border-color: var(--brand);
  box-shadow: 0 24px 50px -22px rgba(46, 32, 16, 0.55);
}
@media (min-width: 760px) {
  .plan.featured { padding: 40px 30px; border-radius: 18px; }
}
.plan-tag {
  font-family: var(--font-en);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gray);
  margin-bottom: 4px;
}
.plan.featured .plan-tag { color: #9FD8B4; }
.plan-rec {
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--cream-soft);
  margin-bottom: 14px;
  visibility: hidden;
}
.plan.featured .plan-rec { visibility: visible; }
.plan-price {
  font-family: var(--font-en);
  font-size: 2.4rem;
  font-weight: 700;
  color: var(--brand);
  line-height: 1.05;
  letter-spacing: -0.02em;
}
.plan.featured .plan-price { color: var(--cream); }
.plan-price .per { font-size: 0.95rem; font-weight: 400; color: var(--gray); }
.plan.featured .plan-price .per { color: var(--cream-soft); }
.plan-sub {
  font-size: 0.85rem;
  color: var(--gray);
  margin-top: 6px;
  margin-bottom: 24px;
}
.plan.featured .plan-sub { color: var(--cream-soft); }
.plan ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 11px;
  margin-bottom: 28px;
  flex: 1;
}
.plan ul li {
  font-size: 0.92rem;
  color: var(--ink-soft);
  display: flex;
  gap: 9px;
  align-items: flex-start;
}
.plan.featured ul li { color: rgba(244,239,229,0.88); }
.plan ul li::before {
  content: "\2713";
  color: var(--green);
  font-weight: 700;
  flex-shrink: 0;
}
.plan.featured ul li::before { color: #9FD8B4; }
.plan-cta {
  display: block;
  text-align: center;
  padding: 13px;
  border-radius: 9px;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  transition: background .15s, border-color .15s;
  -webkit-tap-highlight-color: transparent;
}
.plan .plan-cta.free {
  background: var(--bg2);
  color: var(--brand);
  border: 1px solid var(--border);
}
.plan .plan-cta.free:hover { background: var(--border); }
.plan.featured .plan-cta { background: var(--cream); color: var(--brand); }
.plan.featured .plan-cta:hover { background: #fff; }
.pricing-foot {
  margin-top: 22px;
  text-align: center;
  font-size: 0.84rem;
  color: var(--gray);
}

/* ═══════════════ FOOTER ═══════════════ */
footer {
  background: var(--dark);
  color: var(--cream);
  padding: 96px 0 44px;
  text-align: center;
}
.footer-cta h2 {
  font-size: clamp(1.7rem, 3.4vw, 2.5rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--cream);
  line-height: 1.2;
  margin-bottom: 30px;
}
.footer-note {
  font-size: 0.84rem;
  color: var(--cream-soft);
  margin-top: 16px;
}
.footer-divider {
  height: 1px;
  background: var(--border-d);
  margin: 56px 0 32px;
}
.footer-bottom {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
}
@media (min-width: 680px) {
  .footer-bottom { flex-direction: row; justify-content: space-between; }
}
.footer-links { display: flex; gap: 26px; }
.footer-links a {
  font-size: 0.85rem;
  color: var(--cream-soft);
  text-decoration: none;
}
.footer-links a:hover { color: var(--cream); }
.footer-copy {
  font-size: 0.78rem;
  color: rgba(244,239,229,0.4);
}

/* ═══════════════ PRIVACY ═══════════════ */
#privacy {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--border-d);
}
.privacy-body {
  font-size: 0.8rem;
  color: var(--cream-soft);
  line-height: 1.7;
  text-align: left;
  max-width: 560px;
  margin: 0 auto;
}
.privacy-body strong { color: var(--cream); }
.privacy-body a { color: #9FD8B4; }
