/* =========================================================================
   Vitetti — Nordic product documentation design system
   Palette: white, warm grey, muted clay, dark graphite.
   No wellness gradients, no leaves, no decorative excess.
   ========================================================================= */

:root {
    --paper:      #faf8f5;   /* warm off-white background */
    --paper-2:    #f2efe9;   /* warm grey surface */
    --line:       #e2ddd4;   /* hairline borders */
    --line-2:     #cfc8bb;
    --ink:        #22201d;   /* dark graphite text */
    --ink-2:      #55504a;   /* muted text */
    --ink-3:      #8a8377;   /* faint text */
    --clay:       #a8583f;   /* muted clay accent */
    --clay-dark:  #8c4531;
    --clay-tint:  #f3e7e1;
    --graphite:   #2c2a27;
    --warn-bg:    #f6f1ea;
    --warn-line:  #d8b48a;
    --caff-bg:    #efeae2;
    --focus:      #3a5a78;
    --maxw:       1120px;
    --radius:     4px;
    --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
}

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

html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    font-family: var(--font);
    color: var(--ink);
    background: var(--paper);
    line-height: 1.6;
    font-size: 17px;
}

/* ---- Layout ---- */
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.section { padding: 56px 0; }
.section-tight { padding: 32px 0; }
.grid-2 { display: grid; grid-template-columns: 1.4fr 1fr; gap: 48px; align-items: start; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
@media (max-width: 860px) {
    .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; gap: 28px; }
}

/* ---- Typography ---- */
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 600; line-height: 1.2; color: var(--ink); margin: 0 0 .5em; }
h1 { font-size: clamp(2rem, 4vw, 3rem); letter-spacing: -0.01em; }
h2 { font-size: clamp(1.4rem, 2.6vw, 2rem); }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.05rem; }
p { margin: 0 0 1em; }
a { color: var(--clay-dark); text-underline-offset: 2px; }
a:hover { color: var(--clay); }
.muted { color: var(--ink-2); }
.small { font-size: .875rem; }
.center { text-align: center; }
.lead { font-size: 1.15rem; color: var(--ink-2); }
.eyebrow { text-transform: uppercase; letter-spacing: .12em; font-size: .75rem; font-weight: 600; color: var(--clay); font-family: var(--font); margin-bottom: .75rem; }

/* ---- Skip link & accessibility ---- */
.skip-link {
    position: absolute; left: -999px; top: 0; background: var(--ink); color: #fff;
    padding: 10px 16px; z-index: 1000;
}
.skip-link:focus { left: 8px; top: 8px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }

/* ---- Header / nav ---- */
.site-header { background: var(--paper); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 50; }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.brand-mark {
    width: 32px; height: 32px; display: grid; place-items: center;
    background: var(--graphite); color: var(--paper); font-family: var(--serif);
    font-weight: 700; border-radius: var(--radius);
}
.brand-name { font-family: var(--serif); font-size: 1.3rem; font-weight: 600; letter-spacing: .01em; }

.mainnav { display: flex; align-items: center; }
.navlist { list-style: none; display: flex; align-items: center; gap: 4px; margin: 0; padding: 0; flex-wrap: wrap; }
.navlist a { display: inline-block; padding: 8px 12px; text-decoration: none; color: var(--ink-2); font-size: .92rem; border-radius: var(--radius); }
.navlist a:hover { color: var(--ink); background: var(--paper-2); }
.navlist a[aria-current="page"] { color: var(--ink); font-weight: 600; box-shadow: inset 0 -2px 0 var(--clay); }
.nav-cta a { color: #fff; }
.nav-toggle { display: none; align-items: center; gap: 8px; background: none; border: 1px solid var(--line-2); border-radius: var(--radius); padding: 8px 12px; cursor: pointer; font: inherit; color: var(--ink); }
.nav-toggle-bar, .nav-toggle-bar::before, .nav-toggle-bar::after { content: ""; display: block; width: 18px; height: 2px; background: var(--ink); position: relative; }
.nav-toggle-bar::before { position: absolute; top: -6px; }
.nav-toggle-bar::after { position: absolute; top: 6px; }

@media (max-width: 900px) {
    .nav-toggle { display: inline-flex; }
    .navlist { display: none; position: absolute; left: 0; right: 0; top: 68px; flex-direction: column; align-items: stretch; background: var(--paper); border-bottom: 1px solid var(--line); padding: 8px 24px 16px; gap: 2px; }
    .navlist.is-open { display: flex; }
    .navlist a { padding: 12px 8px; }
    .mainnav { position: static; }
    .header-inner { position: relative; }
}

/* ---- Buttons ---- */
.btn {
    display: inline-block; background: var(--clay); color: #fff; border: 1px solid var(--clay);
    padding: 13px 22px; border-radius: var(--radius); text-decoration: none; font-weight: 600;
    font-size: .95rem; cursor: pointer; font-family: var(--font); line-height: 1.2; text-align: center;
    transition: background .15s ease;
}
.btn:hover { background: var(--clay-dark); color: #fff; }
.btn-outline { background: transparent; color: var(--clay-dark); border-color: var(--line-2); }
.btn-outline:hover { background: var(--paper-2); color: var(--clay-dark); }
.btn-block { display: block; width: 100%; }
.btn-small { padding: 9px 16px; font-size: .88rem; }
.btn-group { display: flex; gap: 12px; flex-wrap: wrap; }
.linklike { background: none; border: none; color: var(--clay-dark); cursor: pointer; font: inherit; padding: 0; text-decoration: underline; }

/* ---- Hero ---- */
.hero { background: var(--paper); border-bottom: 1px solid var(--line); }
.hero-inner { display: grid; grid-template-columns: 1.1fr .9fr; gap: 48px; align-items: center; padding: 64px 0; }
@media (max-width: 860px) { .hero-inner { grid-template-columns: 1fr; padding: 40px 0; } }
.hero h1 { margin-bottom: .35em; }
.hero .price-tag { margin-top: 24px; }
.price-tag { display: inline-flex; align-items: baseline; gap: 12px; padding: 14px 20px; background: var(--paper-2); border: 1px solid var(--line); border-radius: var(--radius); }
.price-tag .amount { font-family: var(--serif); font-size: 1.6rem; font-weight: 700; }
.price-tag .note { font-size: .85rem; color: var(--ink-2); }
.hero-figure { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--paper-2); }
.hero-figure img { display: block; width: 100%; height: auto; }

/* ---- Cards & panels ---- */
.card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.card-2 { background: var(--paper-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.spec-card { background: var(--paper); border: 1px solid var(--line); border-left: 3px solid var(--clay); border-radius: var(--radius); padding: 20px 24px; }
.spec-card h3 { margin-bottom: .3em; }

.panel { border-radius: var(--radius); padding: 24px; margin: 24px 0; }
.panel-h { font-family: var(--serif); }
.panel-caffeine { background: var(--caff-bg); border: 1px solid var(--line-2); }
.panel-caffeine .panel-lead { font-size: 1.1rem; }
.panel-warning { background: var(--warn-bg); border: 1px solid var(--warn-line); }
.warn-list { margin: 0; padding-left: 1.2em; }
.warn-list li { margin-bottom: .4em; }

/* ---- Tables ---- */
.table-scroll { overflow-x: auto; }
.spec-table { width: 100%; border-collapse: collapse; margin: 8px 0 4px; font-size: .95rem; }
.spec-table caption { text-align: left; font-family: var(--serif); font-size: 1.1rem; margin-bottom: 10px; color: var(--ink); }
.spec-table th, .spec-table td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
.spec-table thead th { background: var(--paper-2); font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-2); font-weight: 600; }
.spec-table tbody th { font-weight: 500; }
.spec-table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.status-ok { color: #3a6b45; font-weight: 600; }
.status-missing { color: var(--clay-dark); font-weight: 600; }

/* ---- Summary card ---- */
.summary-card { background: var(--paper-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; position: sticky; top: 88px; }
.summary-title { font-size: 1.15rem; }
.summary-dl { margin: 0 0 18px; }
.summary-dl > div { display: flex; justify-content: space-between; gap: 16px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.summary-dl dt { color: var(--ink-2); font-size: .9rem; }
.summary-dl dd { margin: 0; text-align: right; font-weight: 500; }
@media (max-width: 860px) { .summary-card { position: static; } }

/* ---- Feature list ---- */
.feature-list { list-style: none; margin: 0; padding: 0; }
.feature-list li { padding: 10px 0 10px 26px; border-bottom: 1px solid var(--line); position: relative; }
.feature-list li::before { content: "—"; position: absolute; left: 0; color: var(--clay); }

/* ---- Breadcrumbs ---- */
.breadcrumb { font-size: .85rem; color: var(--ink-2); padding: 18px 0 0; }
.breadcrumb ol { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; }
.breadcrumb li::after { content: "›"; margin-left: 8px; color: var(--ink-3); }
.breadcrumb li:last-child::after { content: ""; }

/* ---- Page header ---- */
.page-head { background: var(--paper-2); border-bottom: 1px solid var(--line); padding: 40px 0; }
.page-head p.lead { max-width: 60ch; margin-bottom: 0; }

/* ---- Ingredient index ---- */
.ing-index { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 0; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
@media (max-width: 640px) { .ing-index { grid-template-columns: 1fr; } }
.ing-index li { border-bottom: 1px solid var(--line); border-right: 1px solid var(--line); }
.ing-index a { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 16px 20px; text-decoration: none; color: var(--ink); }
.ing-index a:hover { background: var(--paper-2); }
.ing-index .ing-amt { font-variant-numeric: tabular-nums; color: var(--ink-2); font-size: .9rem; }

/* ---- FAQ ---- */
.faq-item { border-bottom: 1px solid var(--line); }
.faq-item summary { cursor: pointer; padding: 18px 0; font-family: var(--serif); font-size: 1.1rem; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; color: var(--clay); font-size: 1.4rem; line-height: 1; }
.faq-item[open] summary::after { content: "–"; }
.faq-item .faq-a { padding: 0 0 18px; color: var(--ink-2); }

/* ---- Forms ---- */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 640px) { .form-grid { grid-template-columns: 1fr; } }
.field { display: flex; flex-direction: column; gap: 6px; }
.field.full { grid-column: 1 / -1; }
.field label { font-weight: 600; font-size: .92rem; }
.field .req { color: var(--clay); }
.field input, .field select, .field textarea {
    font: inherit; padding: 11px 12px; border: 1px solid var(--line-2); border-radius: var(--radius);
    background: #fff; color: var(--ink);
}
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--focus); }
.field .hint { font-size: .82rem; color: var(--ink-3); }
.field-error { color: var(--clay-dark); font-size: .85rem; font-weight: 600; }
.field.has-error input, .field.has-error select, .field.has-error textarea { border-color: var(--clay); background: #fdf6f3; }
.checkbox-row { display: flex; gap: 10px; align-items: flex-start; padding: 8px 0; }
.checkbox-row input { margin-top: 4px; }
.honeypot { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.form-alert { padding: 14px 18px; border-radius: var(--radius); margin-bottom: 20px; }
.form-alert.error { background: #fbeee9; border: 1px solid var(--warn-line); color: var(--clay-dark); }
.form-alert.success { background: #eef3ec; border: 1px solid #b8cdb8; color: #33603f; }

/* ---- Order summary ---- */
.order-summary { background: var(--paper-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.order-dl { margin: 0 0 16px; }
.order-row { display: flex; justify-content: space-between; gap: 16px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.order-row dt { color: var(--ink-2); }
.order-row dd { margin: 0; text-align: right; font-weight: 500; }
.order-total { font-family: var(--serif); font-size: 1.15rem; border-bottom: none; padding-top: 14px; }
.order-notes { list-style: none; padding: 0; margin: 0; }
.order-notes li { padding: 4px 0; }

/* ---- Footer ---- */
.site-footer { background: var(--graphite); color: #d8d3ca; margin-top: 64px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 40px; padding: 56px 0 32px; }
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; } }
@media (max-width: 520px) { .footer-grid { grid-template-columns: 1fr; } }
.site-footer .brand-name, .site-footer h2 { color: #f3efe8; }
.site-footer .brand-mark { background: var(--clay); color: #fff; }
.footer-h { font-size: 1rem; margin-bottom: 14px; font-family: var(--font); text-transform: uppercase; letter-spacing: .08em; }
.footer-links { list-style: none; margin: 0; padding: 0; }
.footer-links li { margin-bottom: 8px; }
.footer-links a, .site-footer a { color: #d8d3ca; text-decoration: none; }
.footer-links a:hover, .site-footer a:hover { color: #fff; text-decoration: underline; }
.footer-address { font-style: normal; margin: 12px 0; line-height: 1.7; }
.site-footer .muted { color: #a9a397; }
.footer-bottom { border-top: 1px solid #45423d; padding: 20px 0 40px; }
.footer-brand { margin-bottom: 12px; }

/* ---- Cookie banner ---- */
.cookie-banner { position: fixed; left: 0; right: 0; bottom: 0; background: var(--paper); border-top: 2px solid var(--clay); z-index: 200; box-shadow: 0 -4px 24px rgba(0,0,0,.08); }
.cookie-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 18px 24px; flex-wrap: wrap; }
.cookie-text { flex: 1 1 420px; }
.cookie-h { font-size: 1.05rem; margin-bottom: 6px; }
.cookie-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.is-hidden { display: none !important; }
.cookie-modal { position: fixed; inset: 0; background: rgba(20,18,16,.5); z-index: 300; display: grid; place-items: center; padding: 24px; }
.cookie-modal-box { background: var(--paper); border-radius: var(--radius); max-width: 560px; width: 100%; padding: 28px; max-height: 90vh; overflow: auto; }
.cookie-cat { border-bottom: 1px solid var(--line); padding: 12px 0; }
.cookie-cat-row { display: flex; gap: 12px; align-items: flex-start; }
.cookie-cat-row input { margin-top: 4px; }
.cookie-modal-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 20px; }

/* ---- Misc ---- */
.notice { background: var(--clay-tint); border: 1px solid var(--warn-line); border-radius: var(--radius); padding: 16px 20px; margin: 20px 0; }
.divider { border: none; border-top: 1px solid var(--line); margin: 40px 0; }
figure { margin: 0; }
figure img { display: block; width: 100%; height: auto; border-radius: var(--radius); }
figcaption { font-size: .82rem; color: var(--ink-3); padding-top: 8px; }
.pill { display: inline-block; font-size: .75rem; padding: 3px 10px; border-radius: 999px; background: var(--paper-2); border: 1px solid var(--line-2); color: var(--ink-2); }
.stack > * + * { margin-top: 16px; }
img { max-width: 100%; }

@media (prefers-reduced-motion: reduce) {
    * { transition: none !important; animation: none !important; }
}
