@font-face {
  font-family: LoopSans;
  src: url('/assets/fonts/NotoSansThai-Regular.ttf');
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: LoopSans;
  src: url('/assets/fonts/NotoSansThai-Medium.ttf');
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: LoopSans;
  src: url('/assets/fonts/NotoSansThai-SemiBold.ttf');
  font-weight: 600;
  font-display: swap;
}
@font-face {
  font-family: LoopSans;
  src: url('/assets/fonts/NotoSansThai-ExtraBold.ttf');
  font-weight: 800;
  font-display: swap;
}
@font-face {
  font-family: LoopSerif;
  src: url('/assets/fonts/NotoSerifThai-Regular.ttf');
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: LoopSerif;
  src: url('/assets/fonts/NotoSerifThai-Bold.ttf');
  font-weight: 700;
  font-display: swap;
}

/* The site lives in the app's night palette: ink ground, teal for what
   you can press, amber for what is being read aloud right now. Paper
   sections carry the long reading parts. */
:root {
  color-scheme: dark;

  --ink: #0e1d1c;
  --deep: #153e3b;
  --teal: #0b7169;
  --mint: #73d9cc;
  --amber: #e2a24f;
  --on-ink: #edf5f3;
  --on-ink-soft: #a5bdb8;
  --line-ink: rgba(165, 189, 184, 0.18);

  --raised: #122826;
  --sheet: #18332f;

  --shell: 1120px;
  --gutter: clamp(16px, 4vw, 40px);
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);

  font-family: LoopSans, system-ui, sans-serif;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--ink);
  color: var(--on-ink);
  font-size: 17px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}

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

h1,
h2,
h3 {
  margin: 0;
  text-wrap: balance;
}

p {
  margin: 0;
}

a {
  color: inherit;
}

:focus-visible {
  outline: 2px solid var(--mint);
  outline-offset: 3px;
  border-radius: 6px;
}

.shell {
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.skip {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 20;
  padding: 8px 14px;
  border-radius: 8px;
  background: var(--mint);
  color: var(--ink);
  text-decoration: none;
  font-weight: 600;
}
.skip:focus {
  top: 12px;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(14, 29, 28, 0.86);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line-ink);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 28px;
  min-height: 64px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-weight: 700;
  font-size: 18px;
}
.brand img {
  width: 36px;
  height: 36px;
  border-radius: 9px;
}

.site-nav {
  display: flex;
  gap: 24px;
  margin-left: auto;
  font-size: 15px;
}
.site-nav a {
  color: var(--on-ink-soft);
  text-decoration: none;
  transition: color 0.2s var(--ease);
}
.site-nav a:hover {
  color: var(--on-ink);
}

.header-cta {
  padding: 8px 18px;
  border-radius: 999px;
  background: var(--mint);
  color: var(--ink);
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}

/* Hero */
.hero {
  position: relative;
  overflow: hidden;
  padding-block: clamp(56px, 9vw, 112px) clamp(64px, 9vw, 120px);
  background:
    radial-gradient(70% 60% at 85% 20%, rgba(11, 113, 105, 0.45), transparent 70%),
    linear-gradient(180deg, var(--ink), #0b1817);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  gap: clamp(40px, 6vw, 80px);
  align-items: center;
}

.hero h1 {
  font-family: LoopSans, system-ui, sans-serif;
  font-weight: 800;
  font-size: clamp(38px, 5.4vw, 66px);
  line-height: 1.25;
  letter-spacing: -0.01em;
}
.hero h1 span {
  display: inline-block;
}

.lede {
  margin-top: 24px;
  max-width: 34em;
  color: var(--on-ink-soft);
  font-size: clamp(17px, 1.6vw, 19px);
}

.store-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 36px;
}

.store-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 172px;
  padding: 10px 20px 10px 16px;
  border-radius: 14px;
  background: var(--mint);
  color: var(--ink);
  text-decoration: none;
  transition: transform 0.2s var(--ease), background-color 0.2s var(--ease);
}
.store-btn:hover {
  background: #8ce4d8;
}
.store-btn:active {
  transform: scale(0.98);
}
.store-btn svg {
  width: 26px;
  height: 26px;
  fill: currentColor;
  flex: none;
}
.store-btn span {
  display: grid;
  line-height: 1.2;
}
.store-btn small {
  font-size: 12px;
  opacity: 0.8;
}
.store-btn b {
  font-size: 18px;
  font-weight: 700;
}

.hero-note {
  margin-top: 14px;
  color: var(--on-ink-soft);
  font-size: 14px;
}

/* The provision being read aloud. Lines light up one after another
   the way the app highlights the line it is speaking. */
.provision {
  position: relative;
  margin: 0;
  padding: clamp(24px, 3vw, 36px);
  border-radius: 24px;
  background: linear-gradient(160deg, #1b4a46, var(--deep) 45%, #102e2c);
  border: 1px solid rgba(115, 217, 204, 0.16);
  box-shadow: 0 30px 80px -30px rgba(0, 0, 0, 0.6);
}

.provision-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  color: var(--on-ink-soft);
  font-size: 14px;
}

.badge {
  padding: 2px 10px;
  border-radius: 999px;
  border: 1px solid rgba(115, 217, 204, 0.35);
  color: var(--mint);
  font-size: 12px;
  white-space: nowrap;
}

.provision-number {
  margin-top: 10px;
  font-family: LoopSerif, serif;
  font-size: clamp(28px, 3vw, 36px);
  font-weight: 700;
}

.provision-body {
  display: grid;
  gap: 4px;
  margin-top: 18px;
  font-family: LoopSerif, serif;
  font-size: clamp(16px, 1.5vw, 18px);
  line-height: 1.9;
}

.line {
  margin-inline: -10px;
  padding: 2px 10px;
  border-radius: 8px;
  color: rgba(237, 245, 243, 0.42);
}

.line.is-read {
  color: var(--on-ink);
}
.line.is-reading {
  color: var(--ink);
  background: var(--amber);
}

@media (prefers-reduced-motion: no-preference) {
  .line {
    animation: read 12s var(--ease) infinite;
  }
  .line:nth-child(1) { animation-delay: -12s; }
  .line:nth-child(2) { animation-delay: -9s; }
  .line:nth-child(3) { animation-delay: -6s; }
  .line:nth-child(4) { animation-delay: -3s; }

  .track i {
    animation: progress 12s linear infinite;
  }
}

/* Each line spends a quarter of the loop being read, then stays read. */
@keyframes read {
  0%, 2% { color: rgba(237, 245, 243, 0.42); background: transparent; }
  4%, 23% { color: var(--ink); background: var(--amber); }
  26%, 96% { color: var(--on-ink); background: transparent; }
  100% { color: rgba(237, 245, 243, 0.42); background: transparent; }
}

@keyframes progress {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}

.player {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 26px;
  padding-top: 20px;
  border-top: 1px solid var(--line-ink);
}

.play {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--mint);
  flex: none;
}
.play svg {
  width: 20px;
  height: 20px;
  fill: var(--ink);
}

.track {
  position: relative;
  flex: 1;
  height: 4px;
  border-radius: 4px;
  background: rgba(165, 189, 184, 0.22);
  overflow: hidden;
}
.track i {
  position: absolute;
  inset: 0;
  background: var(--mint);
  transform: scaleX(0.27);
  transform-origin: left;
}

.time {
  color: var(--on-ink-soft);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

.provision-mascot {
  position: absolute;
  right: -18px;
  bottom: -46px;
  width: clamp(84px, 9vw, 116px);
  height: auto;
  pointer-events: none;
}

/* Section scaffolding */
.section-title {
  font-family: LoopSans, system-ui, sans-serif;
  font-weight: 800;
  font-size: clamp(30px, 4vw, 44px);
  line-height: 1.3;
}

.section-lede {
  margin-top: 12px;
  max-width: 40em;
  font-size: 18px;
}

.paper {
  background: var(--raised);
  padding-block: clamp(72px, 10vw, 128px);
}
.paper .section-lede {
  color: var(--on-ink-soft);
}

/* Features: alternating text and screenshot, one idea per row. */
.feature {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(32px, 6vw, 96px);
  align-items: center;
  padding-block: clamp(48px, 7vw, 88px);
  border-bottom: 1px solid var(--line-ink);
}
.feature:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}
.feature:nth-of-type(even) .feature-copy {
  order: 2;
}

.feature-copy {
  max-width: 30em;
}
.feature h3 {
  font-family: LoopSans, system-ui, sans-serif;
  font-size: clamp(24px, 2.6vw, 32px);
  line-height: 1.35;
}
.feature p {
  margin-top: 14px;
  color: var(--on-ink-soft);
}

.new {
  display: inline-block;
  margin-bottom: 12px;
  padding: 2px 12px;
  border-radius: 999px;
  background: var(--teal);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
}

.shot {
  justify-self: center;
  width: min(260px, 64%);
  height: auto;
  border-radius: 34px;
  border: 8px solid #1f3d3a;
  background: #1f3d3a;
  box-shadow: 0 40px 80px -30px rgba(0, 0, 0, 0.7);
}

.covers {
  justify-self: center;
  width: min(420px, 90%);
  height: auto;
}

/* Laws */
.laws {
  padding-block: clamp(72px, 10vw, 128px);
}
.laws .section-lede {
  color: var(--on-ink-soft);
}

.law-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 48px;
  margin: 40px 0 0;
  padding: 0;
  list-style: none;
}
.law-list li {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line-ink);
}
.law-list b {
  font-weight: 500;
}
.law-list span {
  color: var(--mint);
  font-size: 14px;
  white-space: nowrap;
}

.laws-note {
  margin-top: 24px;
  color: var(--on-ink-soft);
  font-size: 15px;
}

/* Audience */
.audience {
  padding-block: 0 clamp(72px, 10vw, 128px);
}

.audience-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  margin-top: 36px;
}
.audience-grid article {
  padding: 28px;
  border-radius: 20px;
  background: var(--deep);
}
.audience-grid h3 {
  font-size: 19px;
  font-weight: 600;
  line-height: 1.45;
}
.audience-grid p {
  margin-top: 10px;
  color: var(--on-ink-soft);
  font-size: 16px;
}

/* PLUS */
.plus-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: clamp(32px, 6vw, 80px);
  align-items: center;
}

.rates {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.rate {
  display: grid;
  gap: 2px;
  padding: 24px;
  border-radius: 20px;
  background: var(--sheet);
  border: 1px solid var(--line-ink);
}
.rate span {
  color: var(--on-ink-soft);
  font-size: 15px;
}
.rate strong {
  font-family: LoopSans, system-ui, sans-serif;
  font-size: 44px;
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
}
.rate small {
  color: var(--on-ink-soft);
  font-size: 14px;
}

.rate-best {
  background: var(--teal);
  border-color: var(--teal);
  color: #fff;
}
.rate-best span,
.rate-best small {
  color: rgba(255, 255, 255, 0.82);
}

.rate-note {
  grid-column: 1 / -1;
  color: var(--on-ink-soft);
  font-size: 15px;
}

/* FAQ */
.faq {
  padding-block: clamp(72px, 10vw, 128px);
}

.faq-inner {
  max-width: 820px;
}

.faq .section-title {
  margin-bottom: 28px;
}

.faq details {
  border-bottom: 1px solid var(--line-ink);
}
.faq summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 20px 0;
  cursor: pointer;
  list-style: none;
  font-size: 18px;
  font-weight: 500;
}
.faq summary::-webkit-details-marker {
  display: none;
}
.faq summary::after {
  content: '';
  width: 10px;
  height: 10px;
  flex: none;
  border-right: 2px solid var(--mint);
  border-bottom: 2px solid var(--mint);
  transform: rotate(45deg) translateY(-3px);
  transition: transform 0.25s var(--ease);
}
.faq details[open] summary::after {
  transform: rotate(-135deg) translateY(-3px);
}
.faq details p {
  max-width: 40em;
  padding-bottom: 22px;
  color: var(--on-ink-soft);
}

/* Closing */
.closing {
  padding-block: clamp(64px, 9vw, 112px);
  background: radial-gradient(60% 80% at 50% 100%, rgba(11, 113, 105, 0.5), transparent 70%), var(--ink);
  border-top: 1px solid var(--line-ink);
}

.closing-inner {
  display: grid;
  justify-items: center;
  text-align: center;
}
.closing-inner img {
  width: 112px;
  height: auto;
}
.closing h2 {
  margin-top: 12px;
  font-family: LoopSans, system-ui, sans-serif;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.35;
}
.closing .store-row {
  justify-content: center;
}

.disclaimer {
  margin-top: 32px;
  max-width: 36em;
  color: var(--on-ink-soft);
  font-size: 14px;
}
.disclaimer a {
  color: var(--mint);
}

/* Footer */
.site-footer {
  padding-block: 40px;
  border-top: 1px solid var(--line-ink);
  font-size: 14px;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 20px 40px;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}
.footer-brand img {
  width: 40px;
  height: 40px;
  border-radius: 10px;
}
.footer-brand div {
  display: grid;
  line-height: 1.4;
}
.footer-brand span {
  color: var(--on-ink-soft);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  margin-left: auto;
}
.footer-links a {
  color: var(--on-ink-soft);
  text-decoration: none;
}
.footer-links a:hover {
  color: var(--on-ink);
}

.footer-line {
  width: 100%;
  color: var(--on-ink-soft);
}

/* Tablet and phone */
@media (max-width: 900px) {
  .site-nav {
    display: none;
  }
  .header-cta {
    margin-left: auto;
  }

  .hero-grid,
  .feature,
  .plus-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .feature:nth-of-type(even) .feature-copy {
    order: 0;
  }

  .provision {
    margin-right: 24px;
  }

  .law-list {
    grid-template-columns: minmax(0, 1fr);
  }

  .audience-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .footer-links {
    margin-left: 0;
  }
}

@media (max-width: 480px) {
  body {
    font-size: 16px;
  }
  .store-btn {
    flex: 1 1 150px;
    min-width: 0;
  }
  .rates {
    grid-template-columns: minmax(0, 1fr);
  }
  .shot {
    width: min(260px, 78%);
  }
}

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