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

:root {
  --bg: #fbfbfa;
  --surface: #f1f1ee;
  --ink: #1c1f24;
  --muted: #6a6f76;
  --line: #dedfdb;
  --accent: #a8552f;
  --display: 'Iowan Old Style', 'Palatino Linotype', 'Book Antiqua', Palatino, Georgia, serif;
  --body: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --page: 1180px;
  --gutter: clamp(20px, 5vw, 48px);
}

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }

h1, h2, h3 {
  font-family: var(--display);
  font-weight: 500;
  line-height: 1.15;
  text-wrap: balance;
  margin: 0;
}

h1 { font-size: clamp(2rem, 5vw, 3.4rem); letter-spacing: -0.02em; }
h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); letter-spacing: -0.01em; }
h3 { font-size: 1.125rem; }

p { margin: 0 0 1em; max-width: 68ch; text-wrap: pretty; }

.wrap { max-width: var(--page); margin: 0 auto; padding: 0 var(--gutter); }
.muted { color: var(--muted); }
.small { font-size: 0.875rem; }

/* --- testata ------------------------------------------------------------- */

.site-head {
  position: sticky; top: 0; z-index: 20;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}

.site-head__row {
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px; min-height: 68px;
}

.brand {
  font-family: var(--display);
  font-size: 1.3rem;
  letter-spacing: 0.01em;
  text-decoration: none;
  white-space: nowrap;
}

.nav { display: flex; gap: 22px; flex-wrap: wrap; }
.nav a { text-decoration: none; font-size: 0.94rem; padding: 4px 0; border-bottom: 1px solid transparent; }
.nav a:hover, .nav a[aria-current="page"] { border-bottom-color: var(--accent); }

.cart-link { display: inline-flex; align-items: center; gap: 6px; text-decoration: none; font-size: 0.94rem; }
.cart-count {
  min-width: 20px; height: 20px; padding: 0 6px;
  display: inline-grid; place-items: center;
  background: var(--accent); color: #fff;
  border-radius: 999px; font-size: 0.75rem; font-variant-numeric: tabular-nums;
}
.cart-count[hidden] { display: none; }

/* --- pulsanti ------------------------------------------------------------ */

.btn {
  display: inline-block;
  padding: 13px 26px;
  border: 1px solid var(--ink);
  background: var(--ink); color: var(--bg);
  font: inherit; font-size: 0.95rem;
  text-decoration: none; cursor: pointer;
  transition: background 140ms ease, color 140ms ease;
}
.btn:hover { background: var(--accent); border-color: var(--accent); }
.btn--ghost { background: none; color: var(--ink); }
.btn--ghost:hover { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.btn[disabled] { opacity: 0.45; cursor: not-allowed; }
.btn--wide { width: 100%; text-align: center; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* --- apertura ------------------------------------------------------------ */

.hero { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 5vw, 64px); align-items: center; padding: clamp(40px, 7vw, 84px) 0; }
.hero__eyebrow { font-size: 0.8rem; letter-spacing: 0.09em; text-transform: uppercase; color: var(--muted); margin: 0 0 14px; }
.hero__lede { font-size: 1.06rem; margin: 18px 0 28px; }
.hero__actions { display: flex; gap: 14px; flex-wrap: wrap; }
.hero__art { aspect-ratio: 4 / 5; background: var(--surface); overflow: hidden; }
.hero__art img { width: 100%; height: 100%; object-fit: cover; }

@media (max-width: 780px) { .hero { grid-template-columns: 1fr; } }

/* --- sezioni ------------------------------------------------------------- */

.section { padding: clamp(36px, 6vw, 72px) 0; border-top: 1px solid var(--line); }
.section__head { display: flex; align-items: baseline; justify-content: space-between; gap: 20px; margin-bottom: 28px; flex-wrap: wrap; }

.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: clamp(18px, 3vw, 34px); }

.card { text-decoration: none; display: block; }
.card__art { aspect-ratio: 4 / 5; background: var(--surface); overflow: hidden; margin-bottom: 12px; }
.card__art img { width: 100%; height: 100%; object-fit: cover; transition: transform 400ms cubic-bezier(0.2, 0.8, 0.2, 1); }
.card:hover .card__art img { transform: scale(1.03); }
.card__title { font-family: var(--display); font-size: 1.02rem; margin: 0 0 2px; }
.card__price { font-size: 0.94rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.card__dots { display: flex; gap: 5px; margin-top: 8px; }
.dot { width: 11px; height: 11px; border-radius: 50%; border: 1px solid rgba(0,0,0,0.18); }

/* --- promessa ------------------------------------------------------------ */

.promise { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 5vw, 60px); align-items: center; }
.promise__art { aspect-ratio: 3 / 2; background: var(--surface); overflow: hidden; }
.promise__art img { width: 100%; height: 100%; object-fit: cover; }
.promise ul { list-style: none; padding: 0; margin: 20px 0 0; display: grid; gap: 10px; }
.promise li { padding-left: 20px; position: relative; }
.promise li::before { content: ""; position: absolute; left: 0; top: 0.62em; width: 8px; height: 1px; background: var(--accent); }

@media (max-width: 780px) { .promise { grid-template-columns: 1fr; } }

/* --- scheda prodotto ----------------------------------------------------- */

.product { display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(28px, 5vw, 64px); padding: clamp(28px, 5vw, 56px) 0; align-items: start; }
.product__art { aspect-ratio: 4 / 5; background: var(--surface); overflow: hidden; }
.product__art img { width: 100%; height: 100%; object-fit: cover; }
.product__price { font-size: 1.3rem; margin: 10px 0 20px; font-variant-numeric: tabular-nums; }
.product__spec { font-size: 0.92rem; color: var(--muted); border-top: 1px solid var(--line); padding-top: 14px; margin-top: 22px; }

.option { margin-bottom: 20px; }
.option__label { display: block; font-size: 0.82rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
.option__values { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  padding: 9px 16px; border: 1px solid var(--line); background: none;
  font: inherit; font-size: 0.92rem; cursor: pointer;
}
.chip[aria-pressed="true"] { border-color: var(--ink); background: var(--ink); color: var(--bg); }
.chip--color { display: inline-flex; align-items: center; gap: 8px; }
.chip--color .dot { width: 14px; height: 14px; }

@media (max-width: 780px) { .product { grid-template-columns: 1fr; } }

/* --- carrello e checkout ------------------------------------------------- */

.line { display: grid; grid-template-columns: 84px 1fr auto; gap: 16px; align-items: center; padding: 16px 0; border-bottom: 1px solid var(--line); }
.line__art { aspect-ratio: 4 / 5; background: var(--surface); overflow: hidden; }
.line__art img { width: 100%; height: 100%; object-fit: cover; }
.line__name { font-family: var(--display); }
.line__meta { font-size: 0.86rem; color: var(--muted); }
.line__price { font-variant-numeric: tabular-nums; text-align: right; }
.line__remove { background: none; border: none; padding: 0; font: inherit; font-size: 0.82rem; color: var(--muted); text-decoration: underline; cursor: pointer; }

.qty { display: inline-flex; border: 1px solid var(--line); }
.qty button { width: 30px; height: 30px; background: none; border: none; font: inherit; cursor: pointer; }
.qty span { width: 34px; display: grid; place-items: center; font-variant-numeric: tabular-nums; }

.totals { margin-top: 24px; display: grid; gap: 8px; max-width: 340px; margin-left: auto; }
.totals__row { display: flex; justify-content: space-between; gap: 24px; font-variant-numeric: tabular-nums; }
.totals__row--sum { border-top: 1px solid var(--line); padding-top: 8px; font-size: 1.1rem; }

.checkout { display: grid; grid-template-columns: 1.2fr 1fr; gap: clamp(28px, 5vw, 56px); align-items: start; padding: 32px 0 0; }
.field { display: grid; gap: 6px; margin-bottom: 16px; }
.field label { font-size: 0.82rem; letter-spacing: 0.05em; text-transform: uppercase; color: var(--muted); }
.field input, .field select, .field textarea {
  padding: 11px 13px; border: 1px solid var(--line); background: var(--bg); color: var(--ink);
  font: inherit; font-size: 0.96rem; border-radius: 0;
}
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.summary { background: var(--surface); padding: 24px; position: sticky; top: 90px; }
.descriptor { border: 1px dashed var(--line); padding: 12px 14px; margin-top: 18px; font-size: 0.86rem; }
.descriptor code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }

@media (max-width: 860px) { .checkout { grid-template-columns: 1fr; } .summary { position: static; } }

/* --- pagine di testo ----------------------------------------------------- */

.prose { max-width: 68ch; padding: clamp(28px, 5vw, 56px) 0; }
.prose h2 { margin: 34px 0 12px; }
.prose ul { padding-left: 20px; }
.prose li { margin-bottom: 6px; }
.prose dl { display: grid; grid-template-columns: max-content 1fr; gap: 8px 24px; margin: 0; }
.prose dt { color: var(--muted); }
.prose dd { margin: 0; }

/* --- chiusura ------------------------------------------------------------ */

.site-foot { border-top: 1px solid var(--line); margin-top: 60px; padding: 44px 0 56px; background: var(--surface); }
.foot-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 32px; }
.foot-cols h3 { font-family: var(--body); font-size: 0.8rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin-bottom: 12px; }
.foot-cols ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 7px; font-size: 0.92rem; }
.foot-cols a { text-decoration: none; }
.foot-cols a:hover { text-decoration: underline; }
.foot-legal { border-top: 1px solid var(--line); margin-top: 34px; padding-top: 20px; font-size: 0.84rem; color: var(--muted); display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; }

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