/* MemoWize landing page. Colours and font follow the app
   (app/lib/core/extensions/color_extension.dart). */

@font-face { font-family: "Kodchasan"; font-weight: 400; font-display: swap; src: url("fonts/kodchasan-400.woff") format("woff"); }
@font-face { font-family: "Kodchasan"; font-weight: 500; font-display: swap; src: url("fonts/kodchasan-500.woff") format("woff"); }
@font-face { font-family: "Kodchasan"; font-weight: 600; font-display: swap; src: url("fonts/kodchasan-600.woff") format("woff"); }
@font-face { font-family: "Kodchasan"; font-weight: 700; font-display: swap; src: url("fonts/kodchasan-700.woff") format("woff"); }

:root {
  --bg: #faf9f6;
  --surface: #ffffff;
  --surface-warm: #fbeee2;
  --outline: #e4e0d9;
  --text: #292d29;
  --text-medium: #646960;
  --primary: #f4ab6a;
  --primary-strong: #fca149;
  --primary-dark: #9b4d19;
  --forest: #203f35;
  --radius: 22px;
  --shadow: 0 18px 40px -22px rgba(80, 40, 0, 0.35);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Kodchasan", system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--primary-dark); }
.wrap { width: min(1120px, 100% - 40px); margin-inline: auto; }

/* Header */
.header {
  position: sticky; top: 0; z-index: 10;
  background: rgba(250, 249, 246, 0.9);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid transparent;
}
.header.scrolled { border-bottom-color: var(--outline); }
.header .wrap { display: flex; align-items: center; gap: 24px; height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); font-weight: 700; font-size: 20px; letter-spacing: .3px; }
.brand img { width: 36px; height: 36px; border-radius: 9px; }
.nav { display: flex; gap: 22px; margin-left: auto; }
.nav a { color: var(--text-medium); text-decoration: none; font-weight: 500; font-size: 15px; }
.nav a:hover { color: var(--text); }
.lang { font-weight: 600; font-size: 14px; text-decoration: none; color: var(--text-medium); border: 1px solid var(--outline); border-radius: 999px; padding: 4px 11px; }
.lang:hover { color: var(--text); border-color: var(--text-medium); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px 26px; border-radius: 999px; font-weight: 600; font-size: 16px;
  text-decoration: none; transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}
.btn-primary { background: var(--primary); color: #1d1a16; box-shadow: 0 10px 24px -12px rgba(155, 77, 25, .7); }
.btn-primary:hover { background: var(--primary-strong); transform: translateY(-1px); }
.btn-ghost { color: var(--text); border: 1.5px solid var(--outline); background: var(--surface); }
.btn-ghost:hover { border-color: var(--text-medium); }
.btn-small { padding: 9px 18px; font-size: 14px; }

/* Hero */
.hero { padding: 56px 0 72px; overflow: hidden; }
.hero .wrap { display: grid; grid-template-columns: 1.05fr .95fr; gap: 48px; align-items: center; }
.eyebrow { display: inline-block; font-weight: 600; font-size: 14px; color: var(--primary-dark); background: var(--surface-warm); padding: 6px 14px; border-radius: 999px; }
h1 { font-size: clamp(38px, 5.4vw, 64px); line-height: 1.08; margin: 18px 0 18px; letter-spacing: -.5px; font-weight: 700; }
h1 em { font-style: normal; color: var(--primary-dark); }
.lead { font-size: clamp(17px, 1.6vw, 19px); color: var(--text-medium); margin: 0 0 30px; max-width: 34em; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; }
.cta-row { align-items: flex-start; }
.cta-main { display: inline-flex; flex-direction: column; align-items: center; gap: 14px; }
.cta-main .btn-primary { width: 100%; }
.cta-main .btn-ghost { padding: 10px 22px; font-size: 15px; }
.badges { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.play-badge { display: block; line-height: 0; }
.appstore-soon {
  /* Built to the Google Play badge's measurements at 48 px: 161 px wide,
     text from 51 px, small line ~10 px, large line ~21 px, 7 px corners. */
  display: grid; grid-template-columns: 51px 1fr; align-items: center;
  width: 161px; height: 48px; padding: 0 6px 0 0;
  background: #000; color: #fff; border-radius: 7px; border: 1px solid #a6a6a6;
  font-family: -apple-system, "SF Pro Display", "Helvetica Neue", Arial, sans-serif; line-height: 1;
}
.appstore-soon svg { justify-self: center; width: 22px; height: 26px; margin-left: 4px; }
.appstore-soon span { display: flex; flex-direction: column; white-space: nowrap; font-size: 21px; font-weight: 500; letter-spacing: -.3px; }
.appstore-soon small { font-size: 10px; font-weight: 500; letter-spacing: 0; margin-bottom: 2px; }
.play-badge img { height: 48px; width: auto; }
.fineprint { margin-top: 10px; font-size: 14px; color: var(--text-medium); }
.fineprint span + span::before { content: "·"; margin: 0 8px; }

.phones { position: relative; height: 560px; }
.phone {
  position: absolute; width: 258px; border-radius: 40px; padding: 10px;
  background: #1f1f1f; box-shadow: 0 40px 70px -30px rgba(60, 30, 0, .55);
}
.phone img { border-radius: 31px; width: 100%; height: auto; }
.phone::before { content: ""; position: absolute; top: 3.6%; left: 50%; width: 30%; height: 3.2%; transform: translateX(-50%); background: #1f1f1f; border-radius: 999px; z-index: 2; }
.phone.front { right: 8%; top: 0; z-index: 2; transform: rotate(3deg); }
.phone.back { left: 4%; top: 64px; transform: rotate(-5deg); opacity: .96; }
.blob { position: absolute; inset: 40px 0 0 0; background: radial-gradient(closest-side, #fde3c8, transparent 72%); z-index: -1; }

/* Sections */
section { padding: 84px 0; }
section[id] { scroll-margin-top: 60px; }
.section-head { text-align: center; max-width: 720px; margin: 0 auto 48px; }
h2 { font-size: clamp(30px, 3.6vw, 42px); line-height: 1.15; margin: 0 0 14px; letter-spacing: -.3px; }
.section-head p { color: var(--text-medium); font-size: 18px; margin: 0; }
.alt { background: var(--surface); border-block: 1px solid var(--outline); }

/* Steps */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; counter-reset: step; }
.step { background: var(--surface); border: 1px solid var(--outline); border-radius: var(--radius); padding: 28px; }
.step::before {
  counter-increment: step; content: counter(step);
  display: grid; place-items: center; width: 42px; height: 42px; border-radius: 14px;
  background: var(--primary); color: #1d1a16; font-weight: 700; font-size: 19px; margin-bottom: 18px;
}
.step h3, .feature h3 { margin: 0 0 8px; font-size: 20px; }
.step p, .feature p { margin: 0; color: var(--text-medium); }

/* Features */
.features { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.feature { background: var(--bg); border: 1px solid var(--outline); border-radius: var(--radius); padding: 24px; }
.feature .icon { width: 44px; height: 44px; border-radius: 14px; background: var(--surface-warm); display: grid; place-items: center; margin-bottom: 16px; font-size: 22px; }

/* Gallery */
.gallery { display: flex; align-items: center; gap: 18px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 4px 20px 20px; margin: 0 -20px; scrollbar-width: thin; }
.gallery img { height: 652px; width: auto; flex: 0 0 auto; border-radius: 26px; scroll-snap-align: center; box-shadow: var(--shadow); }

/* Trust */
.trust { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-top: 44px; }
.trust div { display: flex; gap: 12px; align-items: flex-start; font-weight: 500; }
.trust div::before { content: "✓"; flex: 0 0 auto; width: 26px; height: 26px; border-radius: 50%; background: var(--forest); color: #fff; display: grid; place-items: center; font-size: 14px; margin-top: 2px; }

/* Pricing */
.plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; align-items: stretch; }
.plan { background: var(--surface); border: 1px solid var(--outline); border-radius: var(--radius); padding: 30px; display: flex; flex-direction: column; }
.plan.featured { background: var(--forest); color: #fff; border-color: var(--forest); box-shadow: 0 30px 60px -30px rgba(32, 63, 53, .7); }
.plan .badge { align-self: flex-start; background: var(--primary); color: #1d1a16; font-weight: 600; font-size: 13px; padding: 4px 12px; border-radius: 999px; margin-bottom: 14px; }
.plan h3 { margin: 0; font-size: 22px; }
.price { font-size: 42px; font-weight: 700; margin: 10px 0 4px; letter-spacing: -.5px; }
.price small { font-size: 16px; font-weight: 500; opacity: .75; }
.credits { color: var(--primary-dark); font-weight: 600; margin-bottom: 18px; }
.plan.featured .credits { color: var(--primary); }
.plan ul { list-style: none; padding: 0; margin: 0 0 26px; display: grid; gap: 10px; }
.plan li { padding-left: 28px; position: relative; }
.plan li::before { content: "✓"; position: absolute; left: 0; color: var(--primary-dark); font-weight: 700; }
.plan.featured li::before { color: var(--primary); }
.plan .btn { margin-top: auto; }
.plan.featured .btn-ghost { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .4); }
.price-note { text-align: center; color: var(--text-medium); font-size: 14px; margin: 26px auto 0; max-width: 760px; }

/* FAQ */
.faq { max-width: 820px; margin: 0 auto; display: grid; gap: 12px; }
.faq details { background: var(--surface); border: 1px solid var(--outline); border-radius: 18px; padding: 4px 22px; }
.faq summary { cursor: pointer; font-weight: 600; font-size: 17px; padding: 16px 0; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 22px; line-height: 1; color: var(--primary-dark); }
.faq details[open] summary::after { content: "–"; }
.faq details p { margin: 0 0 18px; color: var(--text-medium); }

/* Final CTA */
.final .box {
  background: var(--forest); color: #fff; border-radius: 32px; padding: 56px 64px;
  display: grid; grid-template-columns: 1.1fr .9fr; gap: 48px; align-items: center; overflow: hidden;
}
.final .poster { width: 100%; max-width: 330px; height: auto; justify-self: center; border-radius: 26px; box-shadow: 0 30px 60px -24px rgba(0, 0, 0, .55); transform: rotate(2deg); }
.final h2 { color: #fff; }
.final p { color: rgba(255, 255, 255, .8); font-size: 18px; margin: 0 0 28px; }

/* Footer */
footer { padding: 40px 0 48px; color: var(--text-medium); font-size: 14px; }
footer .wrap { display: flex; flex-wrap: wrap; gap: 14px 28px; align-items: center; }
footer nav { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-left: auto; }
footer a { color: var(--text-medium); text-decoration: none; }
footer a:hover { color: var(--text); }
footer a.company { color: var(--primary-dark); font-weight: 600; }

/* Responsive */
@media (max-width: 980px) {
  .features { grid-template-columns: repeat(2, 1fr); }
  .trust { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 860px) {
  .nav { display: none; }
  .header .lang { margin-left: auto; }
  .hero { padding-top: 32px; }
  .hero .wrap { grid-template-columns: 1fr; gap: 28px; }
  .phones { height: 470px; max-width: 420px; margin: 0 auto; width: 100%; }
  .phone { width: 210px; border-radius: 34px; padding: 8px; }
  .phone img { border-radius: 27px; }
  .steps, .plans { grid-template-columns: 1fr; }
  .final .box { grid-template-columns: 1fr; text-align: center; padding: 48px 24px; gap: 36px; }
  .final .poster { max-width: 260px; }
  .final .cta-main { display: flex; }
  section { padding: 64px 0; }
}
@media (max-width: 520px) {
  .gallery img { height: 565px; }
  .header .btn-small { display: none; }
  .features, .trust { grid-template-columns: 1fr; }
  .phones { height: 400px; }
  .phone { width: 178px; }
  .phone.front { right: 2%; }
  .phone.back { left: 0; }
  .cta-row .btn, .cta-main { width: 100%; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } .btn { transition: none; } }
