/* ============================================================
   DE VATCHI — base.css
   Design tokens, reset, typography, buttons, forms, motion.
   ============================================================ */

:root {
  --red: #650000;
  --red-deep: #4a0000;
  --cream: #f5eee4;
  --sand: #ece0cd;
  --ink: #27110e;
  --muted: #8a7466;
  --line: rgba(101, 0, 0, .16);
  --line-strong: rgba(101, 0, 0, .34);
  --serif: 'Instrument Serif', Georgia, serif;
  --sans: 'DM Sans', system-ui, sans-serif;
  --mono: 'DM Mono', ui-monospace, monospace;
  --container: min(1300px, 92vw);
  --shadow: 0 24px 60px -24px rgba(63, 7, 7, .28);
  --ease: cubic-bezier(.22, 1, .36, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}
body.no-scroll { overflow: hidden; }
img, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
input, select, textarea { font: inherit; }
[hidden] { display: none !important; }
::selection { background: var(--red); color: var(--cream); }
:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; }

::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--cream); }
::-webkit-scrollbar-thumb { background: rgba(101, 0, 0, .35); border-radius: 5px; }

.skip-link { position: fixed; top: -60px; left: 16px; z-index: 1001; background: var(--red); color: var(--cream); padding: 10px 16px; font-size: 12px; transition: top .3s; }
.skip-link:focus { top: 12px; }

.container { width: var(--container); margin-inline: auto; }
.muted { color: var(--muted); }

/* ---------- typography ---------- */
h1, h2, h3 { font-family: var(--serif); font-weight: 400; letter-spacing: -.02em; line-height: .95; }
h1 em, h2 em, h3 em, blockquote em { font-style: italic; }
.eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .18em;
  color: rgba(101, 0, 0, .72);
  margin-bottom: 20px;
}
.eyebrow.light { color: rgba(245, 238, 228, .85); }

/* ---------- buttons ---------- */
.button {
  position: relative;
  display: inline-flex; align-items: center; justify-content: space-between; gap: 26px;
  padding: 16px 20px;
  border: 1px solid currentColor;
  font-size: 11px; font-weight: 500;
  letter-spacing: .16em; text-transform: uppercase;
  overflow: hidden; z-index: 0; white-space: nowrap;
  transition: color .35s var(--ease), transform .35s var(--ease);
}
.button::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  transform: scaleY(0); transform-origin: bottom;
  transition: transform .4s var(--ease);
}
.button:hover::before { transform: scaleY(1); }
.button:hover { transform: translateY(-2px); }
.button .arrow { font-size: 15px; transition: transform .35s var(--ease); }
.button:hover .arrow { transform: translate(3px, -3px); }

.dark-button { color: var(--red); }
.dark-button::before { background: var(--red); }
.dark-button:hover { color: var(--cream); }

.light-button { color: var(--cream); }
.light-button::before { background: var(--cream); }
.light-button:hover { color: var(--red); }

.ghost-button { color: var(--red); }
.ghost-button:hover { background: rgba(101, 0, 0, .08); }

.danger-button { color: var(--cream); background: #7e1410; border-color: #7e1410; }
.danger-button::before { background: var(--red-deep); }

.full-button { width: 100%; }

/* pressed feedback for every button */
.button:active, .chip:active, .mini-btn:active { transform: translateY(0) scale(.97); }
.button:active .arrow { transform: none; }

.text-link {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 11px; font-weight: 500;
  letter-spacing: .15em; text-transform: uppercase;
  padding-bottom: 6px; border-bottom: 1px solid transparent;
  transition: border-color .3s, color .3s;
}
.text-link::after {
  content: ""; position: absolute; left: 0; bottom: 0; height: 1px; width: 100%;
  background: currentColor; transform: scaleX(0); transform-origin: left;
  transition: transform .45s var(--ease);
}
.text-link { position: relative; }
.text-link:hover::after { transform: scaleX(1); }
.text-link:hover { border-bottom-color: transparent; }
.text-link .arrow { transition: transform .3s var(--ease); }
.text-link:hover .arrow { transform: translateX(4px); }
.light-text-link { color: var(--cream); }
.linklike { text-transform: uppercase; letter-spacing: .13em; font-size: 11px; font-weight: 500; }

/* subtle grain texture on the whole page for depth */
body::before {
  content: ""; position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background-image: radial-gradient(rgba(101, 0, 0, .05) 1px, transparent 1px);
  background-size: 22px 22px;
  mix-blend-mode: multiply; opacity: .5;
}
.container, .hero, footer .footer-main, .ticker { position: relative; z-index: 1; }

/* ---------- scroll-progress bar ---------- */
.scroll-progress {
  position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 1002; pointer-events: none;
  background: linear-gradient(90deg, var(--red), var(--red-deep));
  transform-origin: left; transform: scaleX(var(--p, 0));
  opacity: .7;
}

/* ---------- forms ---------- */
.field { display: flex; flex-direction: column; gap: 8px; margin-bottom: 18px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.field label { font-family: var(--mono); font-size: 10px; letter-spacing: .16em; text-transform: uppercase; color: rgba(101, 0, 0, .66); }
.field input, .field select, .field textarea {
  background: transparent; border: 1px solid var(--line-strong);
  border-radius: 0; padding: 13px 14px; color: var(--ink);
  transition: border-color .25s, box-shadow .25s, background .25s;
  appearance: none; -webkit-appearance: none; width: 100%;
}
.field select {
  background-image: linear-gradient(45deg, transparent 50%, var(--red) 50%), linear-gradient(135deg, var(--red) 50%, transparent 50%);
  background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%;
  background-size: 5px 5px; background-repeat: no-repeat;
}
.field input::placeholder, .field textarea::placeholder { color: rgba(101, 0, 0, .38); }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(101, 0, 0, .12);
}
.field input.invalid, .field textarea.invalid { border-color: #a3271f; background: rgba(163, 39, 31, .05); }
.form-error { color: #a3271f; font-size: 13px; margin: 4px 0 14px; }

/* ---------- chips / badges / stars / qty ---------- */
.chip {
  padding: 9px 18px; border: 1px solid var(--line-strong); border-radius: 999px;
  font-size: 11px; letter-spacing: .12em; text-transform: uppercase;
  transition: background .3s, color .3s, border-color .3s;
}
.chip:hover { border-color: var(--red); }
.chip.active { background: var(--red); border-color: var(--red); color: var(--cream); }

.badge {
  position: absolute; top: 14px; left: 14px; z-index: 2;
  background: var(--cream); color: var(--red);
  font-family: var(--mono); font-size: 10px; letter-spacing: .14em; text-transform: uppercase;
  padding: 6px 10px;
}
.badge-limited { background: var(--red); color: var(--cream); }
.badge-stock { top: auto; bottom: 14px; background: var(--sand); }

.card-stars { color: var(--red); font-size: 12px; letter-spacing: 2px; }
.card-stars i { font-style: normal; font-family: var(--mono); font-size: 11px; color: var(--muted); }

.qty { display: inline-flex; align-items: center; border: 1px solid var(--line-strong); }
.qty button { width: 34px; height: 38px; font-size: 16px; transition: background .25s; }
.qty button:hover { background: rgba(101, 0, 0, .08); }
.qty span { min-width: 28px; text-align: center; font-family: var(--mono); font-size: 13px; }
.qty.big button { width: 48px; height: 50px; }

/* ---------- scroll reveal + entrance ---------- */
[data-reveal] { opacity: 0; transform: translateY(26px); }
[data-reveal].in { opacity: 1; transform: none; transition: opacity .9s var(--ease), transform .9s var(--ease); }

[data-anim] { opacity: 0; animation: fadeUp 1s var(--ease) forwards; animation-delay: var(--d, 0s); }
@keyframes fadeUp { from { opacity: 0; transform: translateY(34px); } to { opacity: 1; transform: none; } }

.shake { animation: shake .5s var(--ease); }
@keyframes shake { 0%,100% { transform: translateX(0); } 20% { transform: translateX(-8px); } 40% { transform: translateX(7px); } 60% { transform: translateX(-5px); } 80% { transform: translateX(3px); } }

.check { color: var(--red); }
.check circle { stroke-dasharray: 190; stroke-dashoffset: 190; animation: draw 1.1s .15s var(--ease) forwards; }
.check path { stroke-dasharray: 44; stroke-dashoffset: 44; animation: draw .55s .95s var(--ease) forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }

/* ---------- shared section furniture ---------- */
.page-head { padding: 90px 0 40px; }
.page-head h1 { font-size: clamp(58px, 8vw, 118px); margin-bottom: 18px; }
.page-head h1 { position: relative; }
.page-head h1::after {
  content: ""; position: absolute; left: 0; bottom: -10px; height: 2px; width: 56px;
  background: var(--red); transition: width .6s var(--ease);
}
.page-head:hover h1::after { width: 120px; }
.page-sub { max-width: 420px; color: rgba(101, 0, 0, .75); }

.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 30px; margin-bottom: 54px; }
.section-head h2 { font-size: clamp(44px, 5.6vw, 84px); position: relative; }

/* ---------- UX micro-motion on headings (magnetic hover + underline) ---------- */
.section-head h2 { transition: transform .3s var(--ease), color .3s; }
.section-head:hover h2 { transform: translateX(4px); color: var(--red); }
.section-head h2 em { display: inline-block; }

.crumbs { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; padding: 34px 0 26px; font-family: var(--mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.crumbs a:hover { color: var(--red); }
.crumbs em { font-style: normal; color: var(--red); }

@media (max-width: 720px) {
  .section-head { flex-direction: column; align-items: flex-start; gap: 18px; }
  .field-row { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  [data-reveal] { opacity: 1; transform: none; }
  [data-anim] { opacity: 1; animation: none; }
  .hero-media video, .film-media video, .story-hero-media video { transform: none !important; }
}
