/* StampaPronto — design system
   Sober warm neutrals + one terracotta accent. Rounded, airy, subtle shadows.
   See DESIGN.md for the guiding principles. */

:root {
  --bg: #FAF7F2;
  --bg-tint: #F6F1EA;
  --surface: #FFFFFF;
  --ink: #2C2A26;
  --ink-soft: #6E685F;
  --ink-faint: #A39C90;
  --line: #ECE6DD;
  --line-strong: #E0D8CC;

  --accent: #C56A4E;
  --accent-strong: #B0533A;
  --accent-soft: #F4E7E0;

  --radius-s: 10px;
  --radius: 16px;
  --radius-l: 26px;

  --shadow-sm: 0 1px 2px rgba(44, 33, 22, .05), 0 1px 3px rgba(44, 33, 22, .04);
  --shadow: 0 8px 26px rgba(70, 50, 30, .07);
  --shadow-lg: 0 18px 50px rgba(70, 50, 30, .10);

  --maxw: 1080px;
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: var(--accent-strong); text-decoration: none; }
a:hover { text-decoration: underline; }

img { max-width: 100%; }

.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

/* ---------- Typography ---------- */
h1, h2, h3 { line-height: 1.2; letter-spacing: -.01em; margin: 0 0 .4em; font-weight: 700; }
h1 { font-size: clamp(2rem, 4.5vw, 3rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); }
h3 { font-size: 1.15rem; }
.lead { font-size: 1.15rem; color: var(--ink-soft); max-width: 60ch; }
.eyebrow {
  display: inline-block;
  font-size: .8rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase;
  color: var(--accent-strong);
  background: var(--accent-soft);
  padding: .35em .9em; border-radius: 999px; margin-bottom: 1rem;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(250, 247, 242, .82);
  backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.brand { display: flex; align-items: center; gap: .6rem; font-weight: 700; font-size: 1.15rem; color: var(--ink); }
.brand:hover { text-decoration: none; }
.brand .mark {
  width: 34px; height: 34px; border-radius: 11px;
  display: grid; place-items: center; color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  box-shadow: var(--shadow-sm);
}
.brand .mark svg { width: 19px; height: 19px; }
.nav-links { display: flex; align-items: center; gap: 1.6rem; }
.nav-links a { color: var(--ink-soft); font-weight: 500; font-size: .95rem; }
.nav-links a:hover { color: var(--ink); text-decoration: none; }
@media (max-width: 640px) { .nav-links { display: none; } }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  font-family: inherit; font-size: 1rem; font-weight: 600; cursor: pointer;
  padding: .8rem 1.5rem; border-radius: 999px; border: 1px solid transparent;
  transition: transform .12s ease, box-shadow .2s ease, background .2s ease;
  text-decoration: none;
}
.btn:hover { text-decoration: none; }
.btn-primary {
  color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  box-shadow: var(--shadow-sm);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: var(--shadow); }
.btn-primary:active { transform: translateY(0); }
.btn-ghost { background: var(--surface); color: var(--ink); border-color: var(--line-strong); }
.btn-ghost:hover { background: var(--bg-tint); }
.btn svg { width: 18px; height: 18px; }
.btn-lg { padding: 1rem 1.9rem; font-size: 1.05rem; }

/* ---------- Hero ---------- */
.hero { padding: 84px 0 56px; }
.hero-inner { display: grid; grid-template-columns: 1.1fr .9fr; gap: 48px; align-items: center; }
.hero-art {
  background: linear-gradient(160deg, #FFFFFF 0%, var(--bg-tint) 100%);
  border: 1px solid var(--line);
  border-radius: var(--radius-l);
  box-shadow: var(--shadow);
  padding: 28px;
  aspect-ratio: 4 / 3.4;
  display: grid; place-items: center;
}
.hero-art .sheet {
  width: 76%; background: #fff; border-radius: 12px; box-shadow: var(--shadow);
  border: 1px solid var(--line); padding: 22px 20px; transform: rotate(-2deg);
}
.hero-art .sheet .bar { height: 9px; border-radius: 6px; background: var(--accent-soft); margin: 0 0 14px; }
.hero-art .sheet .bar.lg { width: 55%; background: var(--accent); height: 12px; }
.hero-art .sheet .row { height: 7px; border-radius: 6px; background: var(--line); margin: 9px 0; }
.hero-art .sheet .row.short { width: 60%; }
.hero-cta { display: flex; gap: 12px; margin-top: 28px; flex-wrap: wrap; }
.hero-note { margin-top: 18px; color: var(--ink-faint); font-size: .92rem; display: flex; gap: 1.2rem; flex-wrap: wrap; }
.hero-note span { display: inline-flex; align-items: center; gap: .4rem; }
@media (max-width: 860px) { .hero-inner { grid-template-columns: 1fr; } .hero-art { order: -1; aspect-ratio: 16/10; } }

/* ---------- Catalog cards ---------- */
.section { padding: 56px 0; }
.section-head { max-width: 60ch; margin-bottom: 36px; }
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
@media (max-width: 900px) { .cards { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .cards { grid-template-columns: 1fr; } }
.card {
  display: flex; flex-direction: column; gap: 12px;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow-sm);
  transition: transform .15s ease, box-shadow .2s ease, border-color .2s ease;
  color: inherit;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--line-strong); text-decoration: none; }
.card .ico {
  width: 46px; height: 46px; border-radius: 13px; display: grid; place-items: center;
  background: var(--accent-soft); color: var(--accent-strong);
}
.card .ico svg { width: 24px; height: 24px; }
.card h3 { margin: 4px 0 0; }
.card p { margin: 0; color: var(--ink-soft); font-size: .95rem; }
.card .go { margin-top: auto; color: var(--accent-strong); font-weight: 600; font-size: .92rem; display: inline-flex; align-items: center; gap: .35rem; }
.card:hover .go svg { transform: translateX(3px); }
.card .go svg { width: 16px; height: 16px; transition: transform .15s ease; }

/* ---------- Steps ---------- */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
@media (max-width: 720px) { .steps { grid-template-columns: 1fr; } }
.step { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow-sm); }
.step .num {
  width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center;
  font-weight: 700; color: var(--accent-strong); background: var(--accent-soft); margin-bottom: 14px;
}
.step h3 { margin-bottom: .2em; }
.step p { margin: 0; color: var(--ink-soft); font-size: .96rem; }

/* ---------- Tool page ---------- */
.tool { padding: 40px 0 12px; }
.tool-intro { max-width: 64ch; margin-bottom: 28px; }
.tool-grid { display: grid; grid-template-columns: 360px 1fr; gap: 28px; align-items: start; }
@media (max-width: 880px) { .tool-grid { grid-template-columns: 1fr; } }

.panel {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-l); padding: 24px; box-shadow: var(--shadow-sm);
  position: sticky; top: 88px;
}
@media (max-width: 880px) { .panel { position: static; } }
.panel h2 { font-size: 1.1rem; display: flex; align-items: center; gap: .5rem; }
.panel h2 svg { width: 20px; height: 20px; flex: none; color: var(--accent); }

.field { margin-bottom: 18px; }
.field > label { display: block; font-weight: 600; font-size: .9rem; margin-bottom: .45rem; color: var(--ink); }
.field .hint { font-weight: 400; color: var(--ink-faint); font-size: .82rem; }

.control,
input[type="text"], input[type="number"], select {
  width: 100%; font-family: inherit; font-size: .95rem; color: var(--ink);
  background: var(--bg); border: 1px solid var(--line-strong); border-radius: var(--radius-s);
  padding: .65rem .8rem; transition: border-color .15s ease, box-shadow .15s ease;
}
input:focus, select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }

/* segmented control */
.seg { display: flex; background: var(--bg); border: 1px solid var(--line-strong); border-radius: 999px; padding: 4px; gap: 4px; }
.seg button {
  flex: 1; font-family: inherit; font-size: .88rem; font-weight: 600; cursor: pointer;
  border: none; background: transparent; color: var(--ink-soft); padding: .5rem .6rem; border-radius: 999px;
  transition: background .15s ease, color .15s ease;
}
.seg button[aria-pressed="true"] { background: var(--surface); color: var(--accent-strong); box-shadow: var(--shadow-sm); }

/* color swatches */
.swatches { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.swatch { width: 30px; height: 30px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 1px var(--line-strong); cursor: pointer; padding: 0; }
.swatch[aria-pressed="true"] { box-shadow: 0 0 0 2px var(--accent); transform: scale(1.06); }
.swatch.custom { background: conic-gradient(from 0deg, #e66, #fc6, #6c9, #69c, #96c, #e66); position: relative; overflow: hidden; }
.swatch.custom input { position: absolute; inset: -6px; opacity: 0; cursor: pointer; }

/* checkbox row */
.check { display: flex; align-items: center; gap: .65rem; cursor: pointer; font-size: .94rem; }
.check input { width: 18px; height: 18px; accent-color: var(--accent); }

/* preview column */
.preview-col { display: flex; flex-direction: column; gap: 16px; }
.preview-frame {
  background: var(--bg-tint); border: 1px solid var(--line); border-radius: var(--radius-l);
  padding: 16px; box-shadow: var(--shadow-sm); min-height: 420px;
  display: flex; align-items: center; justify-content: center;
}
.preview-frame iframe { width: 100%; height: 70vh; max-height: 760px; border: none; border-radius: var(--radius); background: #fff; box-shadow: var(--shadow); }
.preview-frame .placeholder { color: var(--ink-faint); text-align: center; padding: 40px; }
.preview-bar { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.preview-bar .filename { color: var(--ink-faint); font-size: .88rem; }
.preview-bar .btn { flex: 1; min-width: 180px; }

/* ---------- Prose / SEO content ---------- */
.prose { max-width: 70ch; margin: 12px auto 0; }
.prose h2 { margin-top: 1.6em; }
.prose p, .prose li { color: var(--ink-soft); }
.prose ul { padding-left: 1.2em; }
.prose li { margin: .35em 0; }

/* faq */
.faq details { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); padding: 4px 18px; margin: 12px 0; box-shadow: var(--shadow-sm); }
.faq summary { cursor: pointer; font-weight: 600; padding: 14px 0; list-style: none; display: flex; justify-content: space-between; align-items: center; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--accent-strong); font-size: 1.3rem; font-weight: 400; }
.faq details[open] summary::after { content: "–"; }
.faq details p { margin: 0 0 16px; color: var(--ink-soft); }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); background: var(--bg-tint); margin-top: 64px; }
.site-footer .wrap { padding: 44px 24px; display: flex; flex-wrap: wrap; gap: 24px; justify-content: space-between; }
.site-footer .cols { display: flex; gap: 56px; flex-wrap: wrap; }
.site-footer h4 { font-size: .82rem; text-transform: uppercase; letter-spacing: .07em; color: var(--ink-faint); margin: 0 0 12px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.site-footer a { color: var(--ink-soft); font-size: .94rem; }
.site-footer .colophon { color: var(--ink-faint); font-size: .88rem; max-width: 30ch; }

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }

/* ---------- Cookie consent banner ---------- */
.cookie-banner {
  position: fixed; z-index: 200; left: 16px; right: 16px; bottom: 16px;
  max-width: 440px;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow-lg);
  padding: 18px 20px; display: flex; flex-direction: column; gap: 14px;
}
.cookie-banner p { margin: 0; font-size: .92rem; color: var(--ink-soft); }
.cookie-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.cookie-actions .btn { flex: 1; min-width: 130px; padding: .6rem 1rem; font-size: .92rem; }
@media (min-width: 560px) { .cookie-banner { right: auto; } }
