/* The landing page wears the app's own look: the palette of lib/theme.dart,
   Nunito, white cards on a near-white page, and buttons with a face and an
   edge that press down onto it. */

@font-face { font-family: Nunito; font-weight: 400; font-display: swap; src: url(fonts/Nunito-Regular.ttf); }
@font-face { font-family: Nunito; font-weight: 700; font-display: swap; src: url(fonts/Nunito-Bold.ttf); }
@font-face { font-family: Nunito; font-weight: 800; font-display: swap; src: url(fonts/Nunito-ExtraBold.ttf); }
@font-face { font-family: "Noto Sans Sinhala"; font-weight: 100 900; font-display: swap; src: url(fonts/NotoSansSinhala-wght.ttf); unicode-range: U+0D80-0DFF, U+200C-200D; }

:root {
  --band: #0B814A;
  --band-glow: #0FA85B;
  --green: #19C472;
  --green-face: #12A65B;
  --green-edge: #0C7F45;
  --green-text: #0D8548;
  --orange: #FF8B2D;
  --orange-face: #EF7B1A;
  --orange-edge: #B85A0C;
  --page: #F6F9F8;
  --card: #FFFFFF;
  --raised: #EEF2F1;
  --hairline: #E4EAE8;
  --wash: #DFF8EC;
  --ink: #273430;
  --muted: #5B6462;
  --on-band-soft: rgba(255, 255, 255, .9);
}

@media (prefers-color-scheme: dark) {
  :root {
    --band: #0A5C36;
    --band-glow: #0E7A45;
    --green-text: #3DD68C;
    --page: #0F1513;
    --card: #19211E;
    --raised: #232D29;
    --hairline: #2F3B36;
    --wash: #10291D;
    --ink: #FFFFFF;
    --muted: #A5ADAB;
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font: 400 17px/1.5 Nunito, "Noto Sans Sinhala", system-ui, sans-serif;
  color: var(--ink);
  background: var(--page);
  -webkit-text-size-adjust: 100%;
}
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3 { font-weight: 800; margin: 0; text-wrap: balance; }
h1 { font-size: clamp(34px, 5vw, 52px); line-height: 1.12; }
h2 { font-size: clamp(26px, 3.4vw, 36px); line-height: 1.2; }
h3 { font-size: 22px; line-height: 1.28; }
p { margin: 0; }
a { color: var(--green-text); }
:focus-visible { outline: 3px solid var(--orange); outline-offset: 3px; border-radius: 6px; }

.wrap { max-width: 1080px; margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 760px; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 12px; top: 12px; z-index: 10; background: #fff; color: #273430; padding: 8px 12px; border-radius: 8px; }

/* Buttons: a face on an edge. */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 52px; padding: 0 28px;
  border-radius: 999px;
  font: 800 17px/1 Nunito, sans-serif; text-decoration: none; white-space: nowrap;
  transition: transform .08s ease, box-shadow .08s ease;
}
.btn:active { transform: translateY(4px); }
.btn-orange { background: var(--orange-face); color: #fff; box-shadow: 0 4px 0 var(--orange-edge); }
.btn-orange:active { box-shadow: 0 0 0 var(--orange-edge); }
.btn-white { background: #fff; color: #0A4F2C; box-shadow: 0 4px 0 rgba(0, 0, 0, .22); }
.btn-white:active { box-shadow: 0 0 0 rgba(0, 0, 0, .22); }
.btn-ghost { color: #fff; border: 2px solid rgba(255, 255, 255, .7); }
.btn-small { min-height: 44px; padding: 0 20px; font-size: 15px; }

/* The top bar and the hero share the green band of the app's headers. */
.top { background: var(--band); color: #fff; }
.top-row { display: flex; align-items: center; gap: 24px; padding-top: 14px; padding-bottom: 14px; }
.brand { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; font-weight: 800; font-size: 20px; }
.brand img { border-radius: 12px; }
.links { display: flex; gap: 22px; margin-left: auto; }
.links a { color: var(--on-band-soft); text-decoration: none; font-weight: 700; font-size: 15px; padding: 10px 0; }
.links a:hover { color: #fff; text-decoration: underline; }

.hero {
  background: linear-gradient(135deg, var(--band), var(--band-glow));
  color: #fff;
  border-radius: 0 0 40px 40px;
  overflow: hidden;
}
.hero-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 40px; align-items: center; padding-top: 48px; }
.hero-text { padding-bottom: 64px; }
.kanji { font-size: 44px; font-weight: 800; line-height: 1.1; margin-bottom: 8px; }
.lead { font-size: 20px; margin-top: 16px; color: var(--on-band-soft); max-width: 34em; }
.lead.si { font-size: 17px; line-height: 1.7; }
.actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 28px; }
.chips { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; padding: 0; margin: 28px 0 0; }
.chips li { background: rgba(0, 0, 0, .18); border-radius: 999px; padding: 6px 14px; font-size: 14px; font-weight: 700; }
.hero-phone { align-self: end; display: flex; justify-content: center; }
.hero-phone .phone { margin-bottom: -90px; }

/* A screenshot in the outline of a phone. */
.phone {
  width: 300px; flex: none;
  border-radius: 36px; padding: 8px;
  background: #1B2422;
  box-shadow: 0 24px 48px rgba(0, 0, 0, .22);
}
.phone img { border-radius: 28px; width: 100%; }
.phone.small { width: 260px; }

.section { padding: 80px 0; }
.tinted { background: var(--wash); }
.sub { color: var(--muted); margin-top: 10px; max-width: 40em; }
.section h2 + .sub { margin-bottom: 8px; }
#pro .cards { margin-top: 40px; }
.sub.after { margin-top: 28px; font-size: 16px; }

.feature { display: grid; grid-template-columns: 260px 1fr; gap: 56px; align-items: center; margin-top: 56px; }
.feature.flip { grid-template-columns: 1fr 260px; }
.feature.flip .phone { order: 2; }
.feature p { color: var(--muted); margin-top: 12px; max-width: 34em; }
.tag { display: inline-block; border-radius: 999px; padding: 4px 14px; font-size: 14px; font-weight: 800; margin-bottom: 12px; }
.tag.green { background: var(--wash); color: var(--green-text); }
.tinted .tag.green { background: var(--card); }
.tag.orange { background: rgba(255, 139, 45, .16); color: #A84F08; }
.ticks { list-style: none; padding: 0; margin: 18px 0 0; }
.ticks li { position: relative; padding-left: 32px; margin-top: 10px; font-weight: 700; }
.ticks li::before {
  content: ""; position: absolute; left: 0; top: 2px; width: 22px; height: 22px; border-radius: 50%;
  background: var(--green-face) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 22 22'%3E%3Cpath d='M6 11.5l3.2 3.2L16 8' fill='none' stroke='%23fff' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
}

.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 72px; }
.card {
  background: var(--card); border: 1px solid var(--hairline); border-radius: 24px; padding: 24px;
  box-shadow: 0 4px 0 var(--hairline);
}
.card img { width: 96px; height: 96px; margin-bottom: 12px; }
.card p { color: var(--muted); margin-top: 8px; font-size: 15px; line-height: 1.45; }

.levels { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; margin-top: 32px; }
.level {
  background: var(--card); border: 1px solid var(--hairline); border-radius: 20px; padding: 20px 16px;
  display: flex; flex-direction: column; gap: 4px; color: var(--muted);
}
.level b { font-size: 30px; font-weight: 800; line-height: 1.1; color: var(--ink); }
.level span { font-weight: 700; font-size: 15px; }
.level small { font-size: 13px; line-height: 1.4; margin-top: 6px; }
.level.ready { border: 2px solid var(--green-face); box-shadow: 0 4px 0 var(--green-edge); }
.level.ready span { color: var(--green-text); }

.honest { display: grid; grid-template-columns: 180px 1fr; gap: 48px; align-items: start; }
.plain { list-style: none; padding: 0; margin: 24px 0 0; }
.plain li { margin-top: 16px; color: var(--muted); max-width: 44em; }
.plain b { color: var(--ink); }

details {
  background: var(--card); border: 1px solid var(--hairline); border-radius: 18px;
  margin-top: 12px; padding: 0 20px;
}
details:first-of-type { margin-top: 28px; }
summary { cursor: pointer; font-weight: 800; padding: 18px 0; }
details p { color: var(--muted); padding-bottom: 18px; }

.closing { background: linear-gradient(135deg, var(--band), var(--band-glow)); color: #fff; padding: 56px 0; }
.closing-row { display: flex; align-items: center; justify-content: center; gap: 40px; }
.closing img { width: 200px; background: rgba(255, 255, 255, .92); border-radius: 50%; padding: 16px; }
.closing h2 { margin-bottom: 24px; }

.foot { padding: 32px 0 48px; color: var(--muted); font-size: 14px; }
.foot p + p { margin-top: 8px; max-width: 60em; }
.foot b { color: var(--ink); }

@media (max-width: 860px) {
  .links { display: none; }
  .top-row { justify-content: space-between; }
  .hero-grid { grid-template-columns: 1fr; padding-top: 32px; gap: 8px; }
  .hero-text { padding-bottom: 32px; }
  .hero-phone .phone { margin-bottom: -120px; }
  .section { padding: 56px 0; }
  .feature, .feature.flip { grid-template-columns: 1fr; gap: 28px; justify-items: start; margin-top: 48px; }
  .feature .phone { justify-self: center; }
  .feature.flip .phone { order: 0; }
  .cards { grid-template-columns: 1fr; margin-top: 56px; }
  .levels { grid-template-columns: repeat(2, 1fr); }
  .honest { grid-template-columns: 1fr; gap: 16px; }
  .honest img { width: 120px; }
  .closing-row { flex-direction: column; text-align: center; gap: 24px; }
  .closing img { width: 150px; }
}

@media (max-width: 420px) {
  .brand span { font-size: 17px; }
  .actions .btn { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn { transition: none; }
}
