/* Kor Kai website. Colours, type and shapes match the app and the Figma "Website" page.
   Phone layout first; wider screens add columns from 820px up. */
:root {
  color-scheme: light;
  --chili: #E2482E;
  --chili-dark: #9E3220;
  --mango: #FFB627;
  --mango-dark: #C98A12;
  --jade: #1F9D74;
  --jade-dark: #13684C;
  --blue: #2F5BCB;
  --blue-dark: #1F3E8C;
  --pink: #E8457C;
  --grape: #7A4DD8;
  --sky: #2A9BD8;
  --ink: #2B2B33;
  --ink-dark: #111114;
  --muted: #6B6B75;
  --cream: #FFF7EA;
  --peach: #FFEFD6;
  --ledge: #EADFCB;
  --white: #FFFFFF;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: 'Figtree', system-ui, -apple-system, sans-serif;
  font-weight: 500;
  font-size: 17px;
  line-height: 1.55;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
.thai { font-family: 'Mali', 'Figtree', sans-serif; font-weight: 700; }
a { color: var(--chili); font-weight: 800; }
h1, h2, h3 { font-weight: 900; margin: 0; letter-spacing: -0.01em; }
p { margin: 0; }

.wrap { width: 100%; max-width: 1360px; margin: 0 auto; padding: 0 20px; }
.lead { color: var(--muted); font-size: 18px; line-height: 1.6; }

/* ---------- Chips and buttons, the same shapes as the app */
.chip {
  display: inline-block;
  font-weight: 900;
  line-height: 1.15;
  padding: 0.12em 0.36em 0.2em;
  border-radius: 0.32em;
  white-space: nowrap;
}
.tag {
  display: inline-block;
  font-weight: 900;
  font-size: 16px;
  letter-spacing: 0.02em;
  padding: 5px 16px 8px;
  border-radius: 14px;
  background: var(--chili);
  color: var(--white);
  box-shadow: 0 5px 0 var(--chili-dark);
  transform: rotate(-3deg);
  margin-bottom: 22px;
}
.tag.ink { background: var(--ink); box-shadow: 0 5px 0 var(--ink-dark); }
.tag.mango { background: var(--mango); color: var(--ink); box-shadow: 0 5px 0 var(--mango-dark); }
.btn {
  display: inline-block;
  text-align: center;
  text-decoration: none;
  background: var(--white);
  color: var(--chili);
  font-weight: 900;
  font-size: 19px;
  padding: 14px 28px 12px;
  border-radius: 999px;
  box-shadow: 0 6px 0 var(--chili-dark);
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.btn small { display: block; color: var(--muted); font-size: 13px; font-weight: 700; margin-top: 2px; }
.btn:active { transform: translateY(4px); box-shadow: 0 2px 0 var(--chili-dark); }
.btn.red { background: var(--chili); color: var(--white); }
.btn.red small { color: #FFD9CF; }
.btn.mango { background: var(--mango); color: var(--ink); box-shadow: 0 6px 0 var(--mango-dark); }
.btn.mango small { color: rgba(43, 43, 51, 0.72); }
.btn.mango:active { box-shadow: 0 2px 0 var(--mango-dark); }
.cta .btn + .btn { margin-top: 16px; }

/* ---------- Header */
.top { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 0; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); }
.brand img { width: 44px; height: 44px; border-radius: 11px; box-shadow: 0 4px 0 var(--ledge); }
.brand span { font-weight: 900; font-size: 24px; }
.nav { display: none; align-items: center; gap: 28px; }
.nav a { color: var(--ink); text-decoration: none; font-weight: 800; }
.nav a:hover { color: var(--chili); }
.nav .btn { font-size: 16px; padding: 10px 20px 9px; background: var(--chili); color: var(--white); box-shadow: 0 5px 0 var(--chili-dark); }
.menu { position: relative; }
.menu summary { list-style: none; cursor: pointer; width: 46px; height: 46px; border-radius: 23px; background: var(--white); box-shadow: 0 4px 0 var(--ledge); display: grid; place-items: center; }
.menu summary::-webkit-details-marker { display: none; }
.menu summary span, .menu summary span::before, .menu summary span::after { display: block; width: 20px; height: 3px; border-radius: 2px; background: var(--ink); position: relative; content: ''; }
.menu summary span::before { position: absolute; top: -7px; }
.menu summary span::after { position: absolute; top: 7px; }
.menu nav { position: absolute; right: 0; top: 58px; z-index: 20; background: var(--white); border-radius: 22px; box-shadow: 0 6px 0 var(--ledge), 0 18px 40px rgba(43, 27, 13, 0.15); padding: 10px; display: grid; min-width: 200px; }
.menu nav a { padding: 12px 14px; border-radius: 14px; color: var(--ink); text-decoration: none; }
.menu nav a:hover { background: var(--cream); }

/* ---------- Phones */
.phone { width: 100%; filter: drop-shadow(0 18px 30px rgba(43, 27, 13, 0.22)); }

/* ---------- Hero */
/* The hero never runs taller than the screen: it fills the space under the header, and its type and phones size to fit. */
.hero { position: relative; overflow: hidden; background: var(--chili); color: var(--white); border-radius: 36px; padding: clamp(28px, 4.4svh, 44px) 24px 0; margin-top: 4px; height: calc(100svh - 96px); min-height: 540px; max-height: 920px; display: flex; flex-direction: column; }
.hero::before { content: 'ก'; font-family: 'Mali', sans-serif; font-weight: 700; position: absolute; right: -60px; bottom: -120px; font-size: 640px; line-height: 1; color: var(--white); opacity: 0.08; pointer-events: none; }
.hero .tag { margin-bottom: 2svh; font-size: 14px; align-self: flex-start; }
.hero h1 { font-size: clamp(40px, min(13vw, 7svh), 112px); line-height: 1.02; margin-bottom: 2svh; }
.hero h1 .chip.read { background: var(--white); color: var(--chili); box-shadow: 0 0.07em 0 var(--ledge); transform: rotate(-3deg); display: inline-block; margin: 0.08em 0 0.14em 0.06em; }
.hero h1 .chip.write { background: var(--ink); color: var(--white); box-shadow: 0 0.07em 0 var(--ink-dark); display: inline-block; margin-bottom: 0.08em; }
.hero h1 .line { display: block; }
.hero .lead { color: var(--white); opacity: 0.95; max-width: 34ch; margin-bottom: 2.6svh; font-size: clamp(15px, 2.2svh, 18px); }
.hero .btn { width: 100%; max-width: 420px; }
.hero-art { position: relative; flex: 1 1 0; min-height: 120px; margin-top: 3svh; }
.hero-art .p1 { position: absolute; width: 46%; max-width: 300px; left: 4%; top: 30px; transform: rotate(-6deg); }
.hero-art .p2 { position: absolute; width: 46%; max-width: 300px; right: 4%; top: 0; transform: rotate(6deg); }
.hero-art .hen { position: absolute; width: 48%; max-width: 330px; left: -6%; bottom: -10px; z-index: 2; }
.star { position: absolute; z-index: 3; }

/* ---------- Letter ticker */
.ticker { background: var(--ink); color: var(--white); overflow: hidden; margin: 28px 0 0; }
.ticker-track { display: flex; width: max-content; animation: slide 40s linear infinite; }
.ticker-track span { display: inline-flex; align-items: baseline; gap: 10px; padding: 16px 0; white-space: nowrap; }
.ticker-track .thai { font-size: 30px; }
.ticker-track .en { color: #9A9AA5; font-weight: 700; font-size: 16px; }
.ticker-track .sep { width: 10px; height: 10px; border-radius: 5px; background: var(--chili); margin: 0 28px; align-self: center; }
.ticker-track span:nth-child(4n + 1) .thai { color: var(--mango); }
@keyframes slide { to { transform: translateX(-50%); } }

/* ---------- Sections */
.section { padding: 64px 0 0; }
.section h2 { font-size: clamp(36px, 8vw, 72px); line-height: 1.06; margin-bottom: 18px; }
.center { text-align: center; }
.center .lead { margin-left: auto; margin-right: auto; max-width: 46ch; }

/* Letter friends */
.friends { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; margin-top: 30px; }
.friend { background: var(--white); border-radius: 26px; box-shadow: 0 6px 0 var(--ledge); overflow: hidden; }
.friend:nth-child(odd) { transform: rotate(-1.5deg); }
.friend:nth-child(even) { transform: rotate(1.5deg); }
.friend .band { background: color-mix(in srgb, var(--c) 18%, white); height: 104px; display: grid; place-items: center; }
.friend .band img { width: 100px; height: 100px; object-fit: contain; }
.friend .label { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 8px 12px 16px; }
.friend .letter { font-size: 42px; line-height: 1.1; }
.friend .name { font-size: 21px; color: var(--c); line-height: 1.2; }
.friend .en { color: var(--muted); font-weight: 700; font-size: 14px; }
.friend:nth-child(9) { display: none; }

/* How it works */
.how { background: var(--peach); border-radius: 36px; padding: 48px 20px 56px; margin-top: 64px; }
.steps { display: grid; gap: 52px; margin-top: 36px; }
.step { text-align: center; }
.step .art { position: relative; width: 200px; margin: 0 auto 18px; }
.step:nth-child(1) .phone { transform: rotate(-3deg); }
.step:nth-child(3) .phone { transform: rotate(3deg); }
.num { position: absolute; left: -26px; top: -12px; z-index: 2; width: 58px; height: 58px; border-radius: 29px; display: grid; place-items: center; color: var(--white); font-weight: 900; font-size: 30px; }
.num.n1 { background: var(--chili); box-shadow: 0 5px 0 var(--chili-dark); }
.num.n2 { background: var(--jade); box-shadow: 0 5px 0 var(--jade-dark); }
.num.n3 { background: var(--blue); box-shadow: 0 5px 0 var(--blue-dark); }
.step h3 { font-size: 28px; margin-bottom: 6px; }
.step p { color: var(--muted); max-width: 32ch; margin: 0 auto; }

/* Path */
.path { display: grid; gap: 40px; align-items: center; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 26px 0 22px; }
.stat { background: var(--white); border-radius: 24px; box-shadow: 0 6px 0 var(--ledge); padding: 12px 14px 14px; }
.stat b { display: block; font-size: 40px; font-weight: 900; line-height: 1.1; }
.stat span { color: var(--muted); font-weight: 700; font-size: 14px; line-height: 1.3; display: block; }
.stages { display: flex; flex-wrap: wrap; gap: 10px 8px; }
.stages .chip { font-size: 15px; color: var(--white); box-shadow: 0 4px 0 var(--ledge); }
.path-art { position: relative; max-width: 420px; margin: 0 auto; width: 100%; }
.path-art::before { content: ''; position: absolute; inset: 8% 2% 12%; border-radius: 50%; background: rgba(255, 182, 39, 0.25); }
.path-art .phone { position: relative; width: 60%; margin: 0 auto; transform: rotate(-4deg); }
.path-art .turtle { position: absolute; width: 38%; left: -4%; bottom: 0; }
.path-art .mouse { position: absolute; width: 24%; right: 0; bottom: 4%; }

/* Rewards */
.rewards { position: relative; overflow: hidden; background: var(--mango); border-radius: 36px; padding: 44px 22px 30px; margin-top: 64px; }
.rewards::before { content: 'ก'; font-family: 'Mali', sans-serif; font-weight: 700; position: absolute; left: -60px; top: -100px; font-size: 640px; line-height: 1; color: var(--white); opacity: 0.12; pointer-events: none; }
.rewards > * { position: relative; }
.rewards .lead { color: #4A3A14; }
.eggs, .stars { display: flex; align-items: flex-end; gap: 6px; margin-top: 22px; }
.eggs svg { width: 56px; height: 56px; }
.stars svg:nth-child(1) { width: 52px; transform: rotate(-10deg); }
.stars svg:nth-child(2) { width: 64px; }
.stars svg:nth-child(3) { width: 52px; transform: rotate(10deg); }
.rewards-art { position: relative; height: 470px; margin-top: 24px; }
.rewards-art .p1 { position: absolute; width: 52%; max-width: 300px; left: 6%; top: 0; transform: rotate(-5deg); }
.rewards-art .p2 { position: absolute; width: 46%; max-width: 280px; right: 4%; top: 50px; transform: rotate(5deg); }
.rewards-art .tiger { position: absolute; width: 40%; max-width: 220px; left: 38%; bottom: -10px; z-index: 2; }

/* Little and often */
.often { position: relative; display: flex; justify-content: center; gap: 4%; margin: 36px auto 0; max-width: 820px; }
.often .phone { width: 31%; }
.often .phone:nth-child(1) { transform: rotate(-4deg) translateY(20px); }
.often .phone:nth-child(3) { transform: rotate(4deg) translateY(20px); }
.often-friends { display: flex; justify-content: space-between; max-width: 1200px; margin: -60px auto 0; }
.often-friends img { width: 26%; max-width: 220px; }

/* Privacy */
.privacy { background: var(--white); border-radius: 32px; box-shadow: 0 8px 0 var(--ledge); padding: 28px 22px; margin-top: 64px; display: grid; gap: 22px; }
.privacy h2 { font-size: clamp(28px, 5vw, 46px); margin-bottom: 10px; }
.badges { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.badge { background: var(--cream); border-radius: 22px; text-align: center; padding: 16px 8px 14px; font-weight: 800; font-size: 14px; }
.badge svg { width: 30px; height: 30px; margin: 0 auto 6px; display: block; }

/* Final call to action */
.cta { position: relative; overflow: hidden; background: var(--chili); color: var(--white); border-radius: 36px; padding: 40px 22px 0; margin-top: 56px; }
.cta::before { content: 'ก'; font-family: 'Mali', sans-serif; font-weight: 700; position: absolute; right: -60px; top: -120px; font-size: 560px; line-height: 1; color: var(--white); opacity: 0.1; pointer-events: none; }
.cta > * { position: relative; }
.cta h2 { font-size: clamp(34px, 7vw, 76px); line-height: 1.08; margin-bottom: 4px; }
.cta h2 .soft { color: #FFD9CF; display: block; }
.cta .btn { margin-top: 24px; width: 100%; max-width: 440px; }
.cta .hen { width: 60%; max-width: 380px; margin: 16px auto 0; }

/* Footer */
.foot { padding: 40px 0 48px; display: grid; gap: 14px; color: var(--muted); font-size: 15px; font-weight: 700; }
.foot a { color: var(--muted); font-weight: 700; }
.foot .links { display: flex; flex-wrap: wrap; gap: 6px 16px; }

/* ---------- Text pages (privacy, support) */
.page { background: var(--white); border-radius: 30px; padding: 28px 22px; box-shadow: 0 6px 0 var(--ledge); margin: 8px 0 0; }
.page h1 { font-size: clamp(34px, 6vw, 48px); line-height: 1.1; margin-bottom: 6px; }
.page .updated { color: var(--muted); font-size: 15px; margin-bottom: 24px; }
.page h2 { font-size: 22px; margin: 30px 0 6px; }
.page p + p { margin-top: 12px; }
.callout { background: var(--cream); border-radius: 20px; padding: 18px 22px; margin: 18px 0; }

/* ---------- Wider screens */
@media (min-width: 820px) {
  body { font-size: 18px; }
  .wrap { padding: 0 40px; }
  .nav { display: flex; }
  .menu { display: none; }
  .top { padding: 24px 0; }
  .lead { font-size: 22px; }
  .hero { display: grid; grid-template-columns: 1.05fr 1fr; gap: 20px; align-items: center; padding: clamp(30px, 6svh, 80px) clamp(48px, 5vw, 80px); border-radius: 56px; height: calc(100svh - 132px); min-height: 560px; max-height: 1000px; }
  .hero h1 { font-size: clamp(40px, min(6vw, 6.9svh), 112px); margin-bottom: 2svh; }
  .hero .lead { font-size: clamp(16px, 2.2svh, 21px); margin-bottom: 3svh; max-width: 40ch; }
  .hero .btn { font-size: clamp(16px, 2.3svh, 19px); }
  .hero::before { right: auto; left: 46%; top: -360px; bottom: auto; font-size: 1300px; }
  .hero .tag { font-size: clamp(15px, 2.2svh, 20px); margin-bottom: 2.6svh; }
  .hero-art { height: 100%; min-height: 0; margin: 0; }
  .hero-art .p1 { height: 74%; width: auto; max-width: none; left: 6%; top: 16%; }
  .hero-art .p2 { height: 82%; width: auto; max-width: none; right: 2%; top: 4%; }
  .hero-art .hen { height: 40%; width: auto; max-width: none; left: -10%; bottom: -3%; }
  .section { padding-top: 110px; }
  .story { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: 60px; align-items: start; }
  .story .friends { margin-top: 0; grid-template-columns: repeat(3, 1fr); gap: 20px; }
  .friend:nth-child(9) { display: block; }
  .friend .band { height: 128px; }
  .friend .band img { width: 124px; height: 124px; }
  .how { padding: 80px 50px 90px; border-radius: 56px; margin-top: 110px; }
  .steps { grid-template-columns: repeat(3, 1fr); gap: 40px; }
  .step .art { width: 250px; }
  .path { grid-template-columns: 1fr 1fr; gap: 60px; }
  .path-art { order: -1; max-width: 560px; }
  .stats { gap: 18px; }
  .stat { padding: 16px 22px 18px; }
  .stat b { font-size: 60px; }
  .stages .chip { font-size: 17px; }
  .rewards { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 30px; padding: 90px 70px 70px; border-radius: 56px; margin-top: 110px; }
  .rewards::before { font-size: 1100px; top: -300px; }
  .rewards-art { height: auto; margin: 0; min-height: 640px; }
  .rewards-art .tiger { left: 0; bottom: -20px; width: 34%; }
  .eggs svg { width: 70px; height: 70px; }
  .privacy { grid-template-columns: 1.4fr 1fr; align-items: center; padding: 50px 60px; border-radius: 48px; margin-top: 110px; }
  .cta { display: grid; grid-template-columns: 1.3fr 1fr; align-items: center; padding: 80px 70px; border-radius: 56px; margin-top: 110px; }
  .cta .hen { margin: 0; width: 100%; }
  .foot { grid-template-columns: auto 1fr auto; align-items: center; padding: 56px 0 64px; }
  .foot .links { justify-content: flex-end; }
  .page { padding: 44px 56px; border-radius: 40px; }
}

@media (prefers-reduced-motion: reduce) {
  .ticker-track { animation: none; }
  html { scroll-behavior: auto; }
}

/* Text pages keep their two links visible on phones. */
.nav.always { display: flex; gap: 18px; font-size: 16px; }
.nowrap { white-space: nowrap; }
@media (max-width: 819px) { .btn { font-size: 17px; padding: 14px 18px 12px; } }

/* Phone hero: a two-line headline, then both app screens shown whole, sized to the space left. */
@media (max-width: 819px) {
  .hero h1 { font-size: clamp(36px, min(11.5vw, 6.2svh), 64px); line-height: 1.12; }
  .hero h1 .line { display: inline; }
  .hero h1 .chip.read { margin: 0 0.04em; }
  .hero .lead { font-size: clamp(15px, 2.1svh, 17px); }
  .hero-art { margin: 2.4svh -24px 0; }
  .hero-art .p1, .hero-art .p2 { width: auto; max-width: none; left: 50%; right: auto; }
  .hero-art .p1 { height: 84%; top: 9%; transform: translateX(-96%) rotate(-6deg); }
  .hero-art .p2 { height: 90%; top: 2%; transform: translateX(-6%) rotate(6deg); }
  .hero-art .hen { width: auto; max-width: none; height: 40%; left: 2%; bottom: 2%; }
  .hero-art .star { display: none; }
}
@media (max-width: 819px) {
  .hero .more { display: none; }
  .hero .tag { font-size: clamp(11px, 3.3vw, 14px); white-space: nowrap; }
  .hero .btn small { display: none; }
  .hero .btn { padding: 14px 18px; }
}
@media (max-width: 819px) { .hero .btn { white-space: nowrap; font-size: clamp(14px, 4.3vw, 17px); } }
.cta .soon { margin-top: 18px; max-width: 440px; color: #FFE3DB; font-weight: 700; font-size: 15px; line-height: 1.5; }
.cta .soon a { color: var(--white); font-weight: 900; }
