/* Smart Grocery Plan, sito vetrina. Palette "Basilico e Pomodoro", Nunito + Onest (self-hosted, OFL). */
@font-face { font-family: "Nunito"; font-weight: 200 1000; font-display: swap; src: url(fonts/nunito-latin.woff2) format("woff2"); }
@font-face { font-family: "Onest"; font-weight: 100 900; font-display: swap; src: url(fonts/onest-latin.woff2) format("woff2"); }

:root {
  --basil: #1E5B3F;
  --basil-dark: #164530;
  --tomato: #FF5B36;
  --tomato-dark: #E8481F;
  --butter: #FFD449;
  --leaf: #CFE6CC;
  --paper: #F6F7F2;
  --card: #FFFFFF;
  --ink: #15201A;
  --muted: #4E5D54;
  --line: #E2E6DD;
  --radius: 22px;
  --wrap: 1120px;
  --gutter: 20px;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 17px/1.55 "Onest", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: var(--basil); }
h1, h2, h3 { font-family: "Nunito", "Onest", system-ui, sans-serif; font-weight: 900; line-height: 1.08; letter-spacing: -.01em; margin: 0; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 12px; top: 12px; background: var(--card); padding: 8px 12px; border-radius: 10px; z-index: 20; }
:focus-visible { outline: 3px solid var(--butter); outline-offset: 2px; border-radius: 6px; }

/* Header */
.top { position: sticky; top: 0; z-index: 10; background: rgba(246, 247, 242, .92); backdrop-filter: saturate(1.4) blur(10px); -webkit-backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid transparent; transition: border-color .2s; }
.top.scrolled { border-bottom-color: var(--line); }
.top .wrap { display: flex; align-items: center; gap: 12px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); margin-right: auto; min-width: 0; }
.brand img { width: 36px; height: 36px; flex: none; }
.brand span { font: 900 18px/1 "Nunito", sans-serif; letter-spacing: -.01em; white-space: nowrap; }
.nav { display: none; gap: 22px; }
.nav a { color: var(--ink); text-decoration: none; font-weight: 500; font-size: 15px; }
.nav a:hover { color: var(--basil); }
.lang { display: flex; gap: 2px; background: var(--card); border: 1px solid var(--line); border-radius: 999px; padding: 3px; }
.lang a { font: 700 12px/1 "Onest", sans-serif; letter-spacing: .04em; color: var(--muted); text-decoration: none; padding: 7px 8px; border-radius: 999px; }
.lang a[aria-current] { background: var(--basil); color: #fff; }
.top .btn { display: none; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 52px; padding: 0 26px; border-radius: 999px; font: 700 17px/1 "Onest", sans-serif; text-decoration: none; transition: transform .15s, background .15s, box-shadow .15s; }
.btn:active { transform: scale(.98); }
.btn-primary { background: var(--tomato); color: #fff; box-shadow: 0 8px 20px -8px rgba(255, 91, 54, .7); }
.btn-primary:hover { background: var(--tomato-dark); }
.btn-ghost { color: var(--basil); background: transparent; border: 2px solid var(--basil); }
.btn-ghost:hover { background: var(--basil); color: #fff; }
.btn-small { min-height: 40px; padding: 0 18px; font-size: 15px; }
.btn-light { background: var(--paper); color: var(--basil); }
.btn-light:hover { background: #fff; }

/* Hero */
.hero { padding: 28px 0 56px; }
.hero .wrap { display: grid; gap: 36px; }
.pill { display: inline-flex; align-items: center; gap: 8px; background: var(--leaf); color: var(--basil-dark); font-weight: 700; font-size: 14px; padding: 7px 14px; border-radius: 999px; }
.pill i { width: 8px; height: 8px; border-radius: 50%; background: var(--basil); }
.hero h1 { font-size: clamp(40px, 11vw, 70px); margin: 18px 0 16px; color: var(--basil-dark); }
.hero h1 em { font-style: normal; background: linear-gradient(transparent 62%, var(--butter) 62% 92%, transparent 92%); padding: 0 .06em; }
.hero .lead { font-size: 19px; color: var(--muted); max-width: 34em; }
.ctas { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }
.ctas .btn { flex: 1 1 220px; }
.note { margin-top: 14px; font-size: 14px; color: var(--muted); }

.hero-art { position: relative; margin: 0 auto; width: 100%; max-width: 520px; padding-bottom: 40px; }
.hero-photo { border-radius: 28px; overflow: hidden; aspect-ratio: 4 / 5; width: 78%; margin-left: auto; box-shadow: 0 30px 60px -30px rgba(21, 32, 26, .45); }
.hero-photo img { width: 100%; height: 100%; object-fit: cover; }

/* Phone mock-up: a sketch of the app made with HTML, no screenshots to maintain */
.phone { position: absolute; left: 0; bottom: 0; width: 56%; max-width: 270px; background: var(--ink); border-radius: 34px; padding: 8px; box-shadow: 0 30px 60px -20px rgba(21, 32, 26, .55); }
.screen { background: var(--paper); border-radius: 27px; overflow: hidden; padding: 14px 12px 10px; font-size: 11px; line-height: 1.3; }
.screen .bar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.screen .bar b { font: 900 15px/1 "Nunito", sans-serif; }
.screen .bar span { width: 22px; height: 22px; border-radius: 50%; background: var(--leaf); }
.tonight { position: relative; border-radius: 16px; overflow: hidden; color: #fff; padding: 10px; min-height: 96px; display: flex; flex-direction: column; justify-content: flex-end; background: var(--basil) url(img/board.webp) center/cover; }
.tonight::before { content: ""; position: absolute; inset: 0; background: linear-gradient(transparent 20%, rgba(21, 32, 26, .8)); }
.tonight > * { position: relative; }
.tonight small { opacity: .85; font-size: 9px; text-transform: uppercase; letter-spacing: .08em; font-weight: 700; }
.tonight b { font: 900 14px/1.1 "Nunito", sans-serif; }
.tonight .tag { align-self: flex-start; margin-top: 6px; background: var(--leaf); color: var(--basil-dark); border-radius: 999px; padding: 2px 7px; font-size: 9px; font-weight: 700; }
.screen h4 { margin: 12px 0 6px; font: 800 12px/1 "Nunito", sans-serif; }
.row { display: flex; align-items: center; gap: 8px; background: var(--card); border-radius: 12px; padding: 7px 8px; margin-bottom: 5px; }
.row .dot { width: 8px; height: 8px; border-radius: 50%; flex: none; background: #2E8B57; }
.row .dot.now { background: #A06A00; }
.row .dot.soon { background: #E0B000; }
.row .grow { flex: 1; min-width: 0; display: grid; gap: 1px; }
.row .grow b { font-weight: 600; }
.row .grow small { font-size: .82em; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row .use { font-size: .82em; font-weight: 700; color: var(--basil); white-space: nowrap; }
.tabs { display: flex; justify-content: space-around; align-items: center; background: var(--ink); color: #C9D3CC; border-radius: 16px; padding: 8px 4px; margin-top: 10px; font-size: 8.5px; }
.tabs .plus { width: 26px; height: 26px; border-radius: 50%; background: var(--tomato); color: #fff; display: grid; place-items: center; font-size: 16px; font-weight: 700; }
.tabs .on { color: #fff; font-weight: 700; }

.sticker { position: absolute; right: 2%; top: 10%; background: var(--butter); color: var(--ink); border-radius: 18px; padding: 10px 14px; font: 800 14px/1.2 "Nunito", sans-serif; transform: rotate(4deg); box-shadow: 0 12px 24px -12px rgba(21, 32, 26, .4); max-width: 46%; }

/* Sections */
section { scroll-margin-top: 72px; }
.section { padding: 64px 0; }
.kicker { font-weight: 700; font-size: 14px; letter-spacing: .1em; text-transform: uppercase; color: var(--basil); margin-bottom: 10px; }
.section h2 { font-size: clamp(32px, 8vw, 48px); color: var(--basil-dark); max-width: 16em; }
.section .intro { color: var(--muted); font-size: 18px; margin-top: 12px; max-width: 36em; }

/* Features */
.features { display: grid; gap: 18px; margin-top: 34px; }
.feature { background: var(--card); border-radius: var(--radius); padding: 22px; display: grid; gap: 18px; align-content: start; border: 1px solid var(--line); }
.feature h3 { font-size: 24px; }
.feature p { color: var(--muted); margin-top: 8px; }
.demo { background: var(--paper); border-radius: 16px; padding: 12px; font-size: 14px; }
.demo .row { margin-bottom: 6px; padding: 9px 10px; border-radius: 12px; }
.demo .row:last-child { margin-bottom: 0; }
.demo .row .dot { width: 10px; height: 10px; }
.demo .row .use { font-size: 12px; }
.check { width: 22px; height: 22px; border-radius: 7px; border: 2px solid #B9C4BB; flex: none; display: grid; place-items: center; }
.check.on { background: var(--basil); border-color: var(--basil); }
.check.on::after { content: ""; width: 9px; height: 5px; border: solid #fff; border-width: 0 0 2.5px 2.5px; transform: rotate(-45deg) translate(1px, -1px); }
.done .grow { text-decoration: line-through; color: #8A968E; }
.receipt { background: #fff; border-radius: 10px; padding: 10px 12px; font: 500 12.5px/1.6 ui-monospace, "SFMono-Regular", Menlo, monospace; border: 1px dashed #C9D1C6; position: relative; }
.receipt div { display: flex; justify-content: space-between; gap: 10px; }
.receipt .learn { position: absolute; right: -6px; top: -12px; background: var(--butter); font: 800 11px/1 "Nunito", sans-serif; padding: 6px 9px; border-radius: 999px; transform: rotate(3deg); }
.arrow { text-align: center; color: var(--basil); font-weight: 700; font-size: 13px; padding: 6px 0; }
.week { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.week div { background: #fff; border-radius: 10px; padding: 8px 2px; text-align: center; font-size: 11px; color: var(--muted); }
.week div b { display: block; font: 900 13px/1 "Nunito", sans-serif; color: var(--ink); margin-bottom: 6px; }
.week div i { display: block; height: 30px; border-radius: 7px; margin: 0 4px; background: var(--leaf); }
.week div:nth-child(3n) i { background: #FFF1C2; }
.week div:nth-child(4n) i { background: #FFE1D9; }
.meal { display: flex; justify-content: space-between; align-items: center; background: #fff; border-radius: 12px; padding: 10px 12px; margin-top: 8px; font-size: 14px; gap: 8px; }
.meal span { font-size: 12px; color: var(--basil-dark); background: var(--leaf); border-radius: 999px; padding: 3px 8px; white-space: nowrap; font-weight: 700; }
.who { display: flex; margin-left: auto; }
.who i { width: 22px; height: 22px; border-radius: 50%; border: 2px solid #fff; margin-left: -6px; display: grid; place-items: center; font: 800 10px/1 "Nunito", sans-serif; font-style: normal; color: #fff; }

/* Steps */
.steps { list-style: none; padding: 0; margin: 34px 0 0; display: grid; gap: 14px; counter-reset: s; }
.steps li { counter-increment: s; display: grid; grid-template-columns: 52px 1fr; gap: 14px; align-items: start; background: var(--card); border-radius: var(--radius); padding: 20px; border: 1px solid var(--line); }
.steps li::before { content: counter(s); width: 52px; height: 52px; border-radius: 16px; background: var(--butter); display: grid; place-items: center; font: 900 24px/1 "Nunito", sans-serif; }
.steps h3 { font-size: 20px; margin-top: 4px; }
.steps p { color: var(--muted); margin-top: 4px; }

/* Family band */
.family { background: var(--basil); color: #fff; border-radius: 32px; overflow: hidden; display: grid; }
.family .txt { padding: 32px 24px; }
.family h2 { color: #fff; }
.family .intro { color: #D7E8D9; }
.family .photo { min-height: 260px; background: url(img/family.webp) center 10%/cover; }
.family ul { margin: 20px 0 26px; padding: 0; list-style: none; display: grid; gap: 10px; }
.family li { display: flex; gap: 10px; align-items: flex-start; }
.family li::before { content: ""; flex: none; width: 20px; height: 20px; margin-top: 3px; border-radius: 6px; background: var(--butter) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5 10.5l3.2 3L15 6.5' fill='none' stroke='%2315201A' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/16px no-repeat; }

/* FAQ */
.faq { margin-top: 30px; display: grid; gap: 10px; }
.faq details { background: var(--card); border-radius: 18px; border: 1px solid var(--line); padding: 0 20px; }
.faq summary { cursor: pointer; list-style: none; padding: 18px 0; font: 800 18px/1.3 "Nunito", sans-serif; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font: 700 24px/1 "Onest", sans-serif; color: var(--basil); transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { padding: 0 0 18px; color: var(--muted); }

/* Beta CTA */
.beta { text-align: center; background: var(--butter); border-radius: 32px; padding: 44px 24px; }
.beta h2 { margin: 0 auto; color: var(--ink); }
.beta .intro { margin: 12px auto 26px; color: #3D3A22; }
.beta img { width: 72px; height: 72px; margin: 0 auto 18px; }

/* Contacts */
.contacts { display: grid; gap: 14px; margin-top: 30px; }
.contact { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; text-decoration: none; color: var(--ink); display: block; transition: border-color .15s, transform .15s; }
.contact:hover { border-color: var(--basil); transform: translateY(-2px); }
.contact b { font: 900 20px/1.2 "Nunito", sans-serif; display: block; }
.contact span { color: var(--muted); display: block; margin: 4px 0 10px; }
.contact u { color: var(--basil); font-weight: 700; text-decoration: none; word-break: break-all; }

/* Footer */
footer { margin-top: 40px; padding: 36px 0 44px; border-top: 1px solid var(--line); font-size: 14px; color: var(--muted); }
footer .wrap { display: grid; gap: 18px; }
footer nav { display: flex; flex-wrap: wrap; gap: 8px 20px; }
footer a { color: var(--ink); text-decoration: none; font-weight: 500; }
footer a:hover { color: var(--basil); text-decoration: underline; }
footer .brand span { font-size: 16px; }
footer .brand img { width: 30px; height: 30px; }

/* Language hint */
.langhint { position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 30; max-width: 420px; margin: 0 auto; background: var(--ink); color: #fff; border-radius: 18px; padding: 12px 12px 12px 16px; display: flex; gap: 10px; align-items: center; box-shadow: 0 20px 40px -16px rgba(0, 0, 0, .5); font-size: 15px; }
.langhint[hidden] { display: none; }
.langhint span { flex: 1; }
.langhint a { color: var(--butter); font-weight: 700; white-space: nowrap; }
.langhint button { background: none; border: 0; color: #C9D3CC; font-size: 22px; line-height: 1; padding: 4px 6px; cursor: pointer; }

/* Legal pages */
.legal { padding: 36px 0 20px; }
.legal .wrap { max-width: 760px; }
.legal h1 { font-size: clamp(34px, 8vw, 48px); color: var(--basil-dark); }
.legal .meta { color: var(--muted); margin-top: 10px; }
.legal h2 { font-size: 24px; margin: 34px 0 10px; color: var(--basil-dark); }
.legal p, .legal li { color: #2C3830; }
.legal p + p { margin-top: 10px; }
.legal ul { padding-left: 22px; margin: 10px 0; }
.legal li { margin: 6px 0; }
.draft { background: #FFF1C2; border: 1px solid var(--butter); border-radius: 16px; padding: 14px 16px; margin-top: 22px; font-size: 15px; }
.todo { background: #FFE1D9; border-radius: 6px; padding: 0 5px; font-weight: 600; color: #8A2309; }
.tbl { width: 100%; border-collapse: collapse; margin: 12px 0; font-size: 15px; }
.tbl th, .tbl td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
.tbl th { font-weight: 700; }
.tbl-wrap { overflow-x: auto; }

/* Larger screens */
@media (min-width: 720px) {
  :root { --gutter: 28px; }
  .features { grid-template-columns: 1fr 1fr; }
  .contacts { grid-template-columns: 1fr 1fr; }
  .steps { grid-template-columns: repeat(3, 1fr); }
  .steps li { grid-template-columns: 1fr; }
  .family { grid-template-columns: 1.1fr 1fr; }
  .family .txt { padding: 48px 44px; }
  .family .photo { min-height: 100%; }
  .beta { padding: 64px 40px; }
  footer .wrap { grid-template-columns: auto 1fr; align-items: center; }
  footer nav { justify-content: flex-end; }
}
@media (min-width: 960px) {
  .nav { display: flex; margin-right: 8px; }
  .top .btn { display: inline-flex; }
  .hero { padding: 56px 0 80px; }
  .hero .wrap { grid-template-columns: 1.05fr 1fr; align-items: center; gap: 48px; }
  .section { padding: 88px 0; }
  .feature { padding: 28px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn, .contact { transition: none; }
}
