/*
  Fambil website. Brand colours and fonts live in the :root block below;
  a new logo only means replacing the files in /brand (same names).
  Layout: one centred column, sections stacked, two- and three-column grids
  that fold to one column on phones.
*/

@font-face { font-family: "Figtree"; src: url("/fonts/Figtree-400.ttf") format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Figtree"; src: url("/fonts/Figtree-600.ttf") format("truetype"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Figtree"; src: url("/fonts/Figtree-700.ttf") format("truetype"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Bricolage Grotesque"; src: url("/fonts/BricolageGrotesque-700.ttf") format("truetype"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Bricolage Grotesque"; src: url("/fonts/BricolageGrotesque-800.ttf") format("truetype"); font-weight: 800; font-display: swap; }

:root {
  /* Brand (assets/brand/README.md) */
  --brand: #195E49;
  --brand-deep: #10443C;
  --accent: #EEB64A; /* honey: on green or dark grounds only */
  --brand-light: #6FBF9F; /* brand green for dark grounds */
  --ink: #0D1C1E;

  /* Surfaces and text */
  --bg: #F7F6F0;
  --surface: #FFFFFF;
  --soft: #E1EEE8;
  --muted: #586466;
  --line: #E2E0D7;
  --on-brand: #FFFFFF;
  --on-brand-muted: #CBE2D8;
  --eyebrow: var(--brand);

  --display: "Bricolage Grotesque", "Figtree", system-ui, sans-serif;
  --body: "Figtree", system-ui, -apple-system, "Segoe UI", sans-serif;
  --radius: 22px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0C1817;
    --surface: #142422;
    --soft: #1B3430;
    --ink: #E8EFEC;
    --muted: #A3B3AF;
    --line: #263B38;
    --eyebrow: var(--accent);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 17px/1.6 var(--body);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--brand); outline-offset: 3px; border-radius: 6px; }

.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding-inline: 20px; }
h1, h2, h3 { font-family: var(--display); line-height: 1.12; margin: 0; text-wrap: balance; letter-spacing: -0.01em; }
h1 { font-size: clamp(36px, 6vw, 64px); font-weight: 800; }
h2 { font-size: clamp(28px, 4vw, 42px); font-weight: 800; }
h3 { font-size: 20px; font-weight: 700; }
p { margin: 0; }
.lede { font-size: clamp(18px, 2.2vw, 21px); color: var(--muted); max-width: 60ch; }
.eyebrow { font-weight: 700; font-size: 13px; letter-spacing: .1em; text-transform: uppercase; color: var(--eyebrow); }

/* Header */
.site-header { position: sticky; top: 0; z-index: 10; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; align-items: center; gap: 18px; padding-block: 12px; }
.brand { display: flex; align-items: center; text-decoration: none; }
.brand img { height: 40px; width: auto; }
footer .brand img { height: 28px; }
.nav { display: flex; gap: 22px; margin-left: auto; align-items: center; font-weight: 600; font-size: 15px; }
.nav a { text-decoration: none; color: var(--muted); }
.nav a:hover { color: var(--ink); }
.lang { position: relative; }
.lang summary { list-style: none; cursor: pointer; border: 1px solid var(--line); border-radius: 99px; padding: 4px 12px; color: var(--muted); }
.lang summary::-webkit-details-marker { display: none; }
.lang summary::after { content: " ▾"; font-size: 11px; }
.lang-menu { position: absolute; right: 0; top: calc(100% + 8px); min-width: 150px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 6px; display: flex; flex-direction: column; box-shadow: 0 16px 40px -20px rgba(0,0,0,.35); }
.lang-menu a { padding: 8px 12px; border-radius: 9px; color: var(--ink); }
.lang-menu a:hover { background: var(--soft); }
.lang-menu a[aria-current] { font-weight: 700; color: var(--brand); }
@media (prefers-color-scheme: dark) { .lang-menu a[aria-current] { color: var(--brand-light); } }
@media (max-width: 760px) { .nav .hide-sm { display: none; } }

/* Hero */
.hero { padding-block: 64px 40px; }
.hero .wrap { display: grid; grid-template-columns: 1.1fr .9fr; gap: 48px; align-items: center; }
.hero-text { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.stores { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; }
.store { display: inline-flex; align-items: center; gap: 10px; min-width: 176px; padding: 9px 18px 9px 14px; border-radius: 14px; background: var(--ink); color: var(--bg); line-height: 1.2; text-decoration: none; }
.store svg { width: 26px; height: 26px; flex: none; }
.store small { display: block; font-size: 12px; opacity: .75; }
.store strong { font: 700 17px var(--body); }
.note { font-size: 14px; color: var(--muted); }
@media (max-width: 860px) {
  .hero .wrap { grid-template-columns: 1fr; }
  .hero { padding-top: 36px; }
}

/* Phone drawn in HTML (replaced by real screenshots later) */
.phone { width: min(340px, 100%); margin-inline: auto; aspect-ratio: 9 / 18.5; border-radius: 44px; padding: 12px; background: #0C1817; box-shadow: 0 30px 80px -30px rgba(25, 94, 73, .45); }
.screen { height: 100%; border-radius: 34px; overflow: hidden; background: #F7F6F0; color: #0D1C1E; display: flex; flex-direction: column; gap: 10px; padding: 18px 14px; font-size: 13px; }
.screen .hello { font: 800 20px var(--display); }
.screen .date { color: #55646A; font-size: 12px; }
.mcard { background: var(--brand); color: #fff; border-radius: 18px; padding: 14px; display: grid; grid-template-columns: 1fr 1fr; gap: 6px 10px; }
.mcard small { color: var(--on-brand-muted); display: block; font-size: 11px; }
.mcard b { font: 800 19px var(--display); }
.mbar { grid-column: 1 / -1; height: 8px; border-radius: 9px; background: rgba(255,255,255,.18); overflow: hidden; }
.mbar span { display: block; height: 100%; width: 62%; background: var(--accent); }
.mlist { background: #fff; border-radius: 16px; padding: 4px 12px; }
.mrow { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid #EEF1EE; }
.mrow:last-child { border-bottom: 0; }
.mrow .day { width: 34px; text-align: center; background: #FBF0D6; color: #7A5512; border-radius: 9px; font-weight: 800; font-size: 12px; line-height: 1.1; padding: 4px 0; }
.mrow .grow { flex: 1; min-width: 0; }
.mrow .grow small { display: block; color: #55646A; font-size: 11px; }
.mrow .amt { font-weight: 800; }
.tick { width: 18px; height: 18px; border-radius: 5px; border: 2px solid var(--brand); flex: none; }
.tick.on { background: var(--brand); }
.mrow.done .grow { text-decoration: line-through; color: #6B787D; }
.mhead { font: 700 14px var(--display); margin-top: 4px; }

/* Real app screens */
.phone.shot { aspect-ratio: auto; padding: 10px; }
.phone.shot img { width: 100%; height: auto; border-radius: 34px; }
.screens { display: flex; gap: 20px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 4px 4px 16px; margin-inline: -4px; }
.screens figure { flex: 0 0 min(230px, 70vw); margin: 0; scroll-snap-align: start; }
.screens img { width: 100%; height: auto; border-radius: 28px; border: 8px solid #0C1817; box-shadow: 0 20px 50px -28px rgba(25, 94, 73, .5); }
.screens figcaption { margin-top: 12px; font-weight: 600; font-size: 15px; color: var(--muted); }

/* Sections */
section { padding-block: 64px; }
.section-head { display: flex; flex-direction: column; gap: 12px; margin-bottom: 32px; max-width: 720px; }
.grid { display: grid; gap: 16px; }
.grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 860px) { .grid.three { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .grid.two, .grid.three { grid-template-columns: 1fr; } }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.card p { color: var(--muted); }
.icon { width: 46px; height: 46px; border-radius: 14px; background: var(--soft); display: grid; place-items: center; color: var(--brand); }
@media (prefers-color-scheme: dark) { .icon { color: var(--brand-light); } }
.icon svg { width: 24px; height: 24px; }
.card ul { margin: 0; padding-left: 20px; color: var(--muted); display: flex; flex-direction: column; gap: 4px; }

.audience .card:first-child { background: var(--brand); color: var(--on-brand); border-color: transparent; }
.audience .card:first-child p, .audience .card:first-child li { color: var(--on-brand-muted); }
.audience .card:first-child .icon { background: rgba(255,255,255,.12); color: var(--accent); }

.steps { counter-reset: step; }
.steps .card { position: relative; padding-top: 58px; }
.steps .card::before { counter-increment: step; content: counter(step); position: absolute; top: 20px; left: 24px; width: 28px; height: 28px; border-radius: 50%; background: var(--accent); color: #0D1C1E; font: 800 15px/28px var(--display); text-align: center; }

.privacy { background: var(--surface); border-block: 1px solid var(--line); }

/* FAQ */
.faq { display: flex; flex-direction: column; gap: 10px; max-width: 820px; }
.faq details { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 4px 20px; }
.faq summary { cursor: pointer; font-weight: 700; padding: 14px 0; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-weight: 800; color: var(--eyebrow); }
.faq details[open] summary::after { content: "–"; }
.faq details p { padding-bottom: 16px; color: var(--muted); }

/* Call to action */
.cta { background: var(--brand); color: var(--on-brand); border-radius: 32px; padding: 44px 36px; display: grid; grid-template-columns: 1fr auto; gap: 24px; align-items: center; }
.cta p { color: var(--on-brand-muted); }
.cta .store { background: var(--on-brand); color: var(--brand); }
@media (max-width: 760px) { .cta { grid-template-columns: 1fr; padding: 32px 22px; } }

/* Footer */
footer { padding-block: 40px 56px; color: var(--muted); font-size: 15px; }
footer .wrap { display: flex; flex-wrap: wrap; gap: 14px 28px; align-items: center; }
footer nav { display: flex; flex-wrap: wrap; gap: 8px 20px; }
footer a { text-decoration: none; }
footer a:hover { text-decoration: underline; }
footer .copy { margin-left: auto; }

/* Legal and support pages */
.doc { max-width: 760px; padding-block: 48px 72px; }
.doc h1 { font-size: clamp(32px, 5vw, 46px); margin-bottom: 8px; }
.doc h2 { font-size: 24px; margin: 36px 0 10px; }
.doc p, .doc li { color: var(--muted); }
.doc p + p { margin-top: 10px; }
.doc ul { padding-left: 22px; display: flex; flex-direction: column; gap: 6px; }
.doc table { width: 100%; border-collapse: collapse; font-size: 15px; margin-top: 8px; }
.doc th, .doc td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.doc .scroll { overflow-x: auto; }
.draft { background: #FDEBD6; color: #6A3A05; border-radius: 14px; padding: 12px 16px; font-size: 15px; margin-bottom: 24px; }
.updated { font-size: 14px; color: var(--muted); }
.fill { background: #FFF3C4; color: #5A4300; border-radius: 4px; padding: 0 4px; }

/* ---------- Home: lively hero, a month with Fambil, who sees what ---------- */
.hero { padding-block: 56px 32px; overflow: hidden; }
.hero .wrap { grid-template-columns: 1.05fr .95fr; }
.hero h1 { font-size: clamp(38px, 6vw, 68px); }
.hero-visual { position: relative; display: grid; place-items: center; padding: 24px 0 36px; min-width: 0; }
.hero-visual::before { content: ""; position: absolute; width: min(460px, 92%); aspect-ratio: 1; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, color-mix(in srgb, var(--accent) 45%, transparent), transparent 62%),
              radial-gradient(circle at 70% 75%, color-mix(in srgb, var(--brand) 30%, transparent), transparent 60%);
  filter: blur(8px); z-index: 0; }
.phone.slideshow { position: relative; z-index: 1; width: min(300px, 78%); aspect-ratio: 1000 / 2222; padding: 0; }
.phone.slideshow img { position: absolute; inset: 10px; width: calc(100% - 20px); height: calc(100% - 20px); object-fit: cover;
  border-radius: 34px; opacity: 0; animation: slide 16s infinite; }
.slideshow img:nth-child(1) { animation-delay: 0s; opacity: 1; }
.slideshow img:nth-child(2) { animation-delay: 4s; }
.slideshow img:nth-child(3) { animation-delay: 8s; }
.slideshow img:nth-child(4) { animation-delay: 12s; }
@keyframes slide { 0% { opacity: 0; } 3% { opacity: 1; } 25% { opacity: 1; } 28% { opacity: 0; } 100% { opacity: 0; } }

.toast { position: absolute; z-index: 2; display: flex; gap: 10px; align-items: center; max-width: 260px;
  background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: 18px; padding: 10px 14px 10px 10px;
  box-shadow: 0 18px 40px -22px rgba(13, 28, 30, .45); font-size: 13px; line-height: 1.3;
  animation: toast 12s infinite; opacity: 0; }
.toast .icon { width: 36px; height: 36px; border-radius: 11px; flex: none; }
.toast .icon svg { width: 20px; height: 20px; }
.toast b { display: block; font-weight: 700; }
.toast small { color: var(--muted); }
.toast.t1 { top: 6%; left: -2%; animation-delay: .6s; }
.toast.t2 { top: 44%; right: -4%; animation-delay: 4.6s; }
.toast.t3 { bottom: 6%; left: 2%; animation-delay: 8.6s; }
@keyframes toast { 0% { opacity: 0; transform: translateY(12px) scale(.97); } 4% { opacity: 1; transform: none; }
  30% { opacity: 1; transform: none; } 35% { opacity: 0; transform: translateY(-8px); } 100% { opacity: 0; } }
@media (max-width: 860px) {
  .hero .wrap { grid-template-columns: 1fr; }
  .toast { max-width: 210px; font-size: 12px; }
  .toast.t2 { right: 0; }
}

.facts-band { padding-block: 8px 24px; }
.facts { list-style: none; margin: 0; padding: 18px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px;
  background: var(--brand); color: var(--on-brand); border-radius: 26px; }
.facts li { display: flex; flex-direction: column; gap: 2px; padding: 8px 12px; min-width: 0; }
.facts b { font: 800 clamp(22px, 2.6vw, 30px)/1.1 var(--display); color: var(--accent); }
.facts span { color: var(--on-brand-muted); font-size: 14px; }
@media (max-width: 760px) { .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.section-head.center { margin-inline: auto; text-align: center; align-items: center; }
.story .wrap { display: flex; flex-direction: column; gap: 28px; }
.chapter { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 48px; align-items: center;
  background: var(--surface); border: 1px solid var(--line); border-radius: 32px; padding: 32px 40px; }
.chapter.flip { grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr); }
.chapter.flip .chapter-shot { order: 2; }
.chapter-shot { display: grid; place-items: center; }
.chapter-shot img { width: min(260px, 100%); height: auto; border-radius: 30px; border: 8px solid #0C1817;
  box-shadow: 0 26px 60px -32px rgba(25, 94, 73, .55); }
.chapter-text { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.chapter-text .when { align-self: flex-start; font-weight: 700; font-size: 13px; letter-spacing: .06em; text-transform: uppercase;
  color: var(--brand-deep); background: color-mix(in srgb, var(--accent) 55%, transparent); border-radius: 99px; padding: 4px 12px; }
.chapter-text h3 { font-size: clamp(24px, 3vw, 32px); font-weight: 800; }
.chapter-text p { color: var(--muted); font-size: 17px; }
.ticks { list-style: none; margin: 4px 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.ticks li { position: relative; padding-left: 30px; font-weight: 600; }
.ticks li::before { content: ""; position: absolute; left: 0; top: 3px; width: 20px; height: 20px; border-radius: 50%;
  background: var(--brand) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='m6 10.4 2.6 2.6L14 7.6' fill='none' stroke='%23fff' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/20px no-repeat; }
@media (max-width: 760px) {
  .chapter, .chapter.flip { grid-template-columns: 1fr; gap: 24px; padding: 24px 20px; }
  .chapter.flip .chapter-shot { order: 0; }
  .chapter-shot img { width: min(230px, 80%); }
}

.records { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-bottom: 20px; }
.record { border-radius: 22px; padding: 18px; display: flex; flex-direction: column; gap: 12px; border: 1px solid var(--line); background: var(--bg); }
.record .chip { align-self: flex-start; display: inline-flex; align-items: center; gap: 6px; font-weight: 700; font-size: 14px;
  border-radius: 99px; padding: 4px 12px 4px 4px; }
.record .chip .icon { width: 28px; height: 28px; border-radius: 50%; }
.record .chip .icon svg { width: 16px; height: 16px; }
.record.shared .chip { background: var(--soft); color: var(--brand); }
.record.personal .chip { background: color-mix(in srgb, var(--accent) 30%, transparent); color: var(--ink); }
.record-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; background: var(--surface);
  border: 1px solid var(--line); border-radius: 16px; padding: 12px 14px; }
.record-row small { display: block; color: var(--muted); font-size: 13px; }
@media (max-width: 600px) { .records { grid-template-columns: 1fr; } }

@media (prefers-reduced-motion: reduce) {
  .phone.slideshow img, .toast { animation: none; }
  .phone.slideshow img:not(:first-child) { display: none; }
  .toast { opacity: 1; position: static; margin: 8px auto 0; }
  .hero-visual { display: flex; flex-direction: column; }
}

/* Bar offering the visitor's own language (added by script). */
.lang-note { background: var(--brand); color: var(--on-brand); font-size: 14px; }
.lang-note .wrap { display: flex; align-items: center; gap: 12px; min-height: 44px; flex-wrap: wrap; padding-block: 6px; }
.lang-note span { min-width: 0; }
.lang-note button { margin-left: auto; }
.lang-note a { color: var(--accent); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.lang-note button { background: none; border: 0; color: inherit; font-size: 22px; line-height: 1; padding: 4px 6px; cursor: pointer; opacity: .8; }
.lang-note button:hover { opacity: 1; }

/* Account deletion page */
.delete-page .note { color: var(--muted); font-size: 15px; }
.delete-steps { margin-block: 24px; }
.card-form { display: flex; flex-direction: column; gap: 12px; max-width: 460px; padding: 20px; border: 1px solid var(--line);
  border-radius: 20px; background: var(--surface); }
.card-form h2 { margin: 0 0 4px; font-size: 20px; }
.card-form label { display: flex; flex-direction: column; gap: 6px; font-weight: 600; font-size: 15px; }
.card-form input[type=email], .card-form input[type=password] { font: inherit; padding: 11px 12px; border-radius: 12px;
  border: 1px solid var(--line); background: var(--bg); color: var(--ink); }
.card-form .check { flex-direction: row; align-items: flex-start; font-weight: 500; }
.card-form .check input { margin-top: 4px; width: 18px; height: 18px; flex: none; }
.card-form .btn { font: 700 16px/1 inherit; padding: 14px 16px; border-radius: 14px; border: 0; cursor: pointer;
  background: var(--brand); color: var(--on-brand); min-height: 48px; }
.card-form .btn.ghost { background: transparent; color: var(--brand); border: 1px solid var(--line); }
.card-form .btn.danger { background: #B4412F; color: #fff; }
.card-form .btn:disabled { opacity: .6; cursor: progress; }
#message { min-height: 1.5em; font-weight: 600; }
#message.bad { color: #B4412F; }

/* Pricing */
.plans .card { gap: 12px; }
.plan-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.card .plan-price { font: 800 clamp(28px, 3vw, 36px)/1.1 var(--display); color: inherit; }
.plan-sub { font-size: 15px; }
.soon { font-size: 13px; font-weight: 700; background: var(--accent); color: #0D1C1E; border-radius: 99px; padding: 3px 10px; white-space: nowrap; }
.plans .featured { background: var(--brand); color: var(--on-brand); border-color: transparent; }
.plans .featured .plan-sub, .plans .featured li { color: var(--on-brand-muted); }
