/* SCREEN TEST 007 — shared styles */
:root {
  --ink: #0c0c0f;
  --ink-2: #16161b;
  --ink-3: #22222a;
  --ivory: #f3eee3;
  --ivory-2: #e6dfcf;
  --gold: #d4ae5a;
  --gold-2: #f0d48f;
  --red: #c4161f;
  --teal: #4fb3a9;
  --muted: #a7a196;

  --bg: var(--ink);
  --bg-2: var(--ink-2);
  --card: var(--ink-3);
  --fg: var(--ivory);
  --fg-dim: #c9c2b4;
  --line: rgba(243, 238, 227, .14);
  --accent: var(--gold);
  --accent-fg: #18130a;
  --danger: #ff4d55;
  --good: #6fd3a3;
  --shadow: 0 10px 30px rgba(0, 0, 0, .45);

  --f-display: "Bodoni Moda", "Didot", Georgia, serif;
  --f-body: "DM Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-mono: "Space Mono", ui-monospace, Menlo, monospace;
  --r: 14px;
  color-scheme: dark;
}
:root[data-theme="light"] {
  --bg: #f5f0e4;
  --bg-2: #ebe4d3;
  --card: #fffaf0;
  --fg: #141318;
  --fg-dim: #4a463f;
  --line: rgba(20, 19, 24, .16);
  --accent: #8a6516;
  --accent-fg: #fffaf0;
  --danger: #b0121b;
  --good: #1d7a52;
  --shadow: 0 10px 26px rgba(60, 45, 20, .16);
  color-scheme: light;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 16px/1.55 var(--f-body);
  min-height: 100vh;
  overflow-x: hidden;
}
img, svg, canvas { max-width: 100%; }
a { color: var(--accent); }
a:hover { text-decoration-thickness: 2px; }
h1, h2, h3 { font-family: var(--f-display); font-weight: 700; line-height: 1.1; margin: 0 0 .5em; }
h1 { font-size: clamp(2.2rem, 8vw, 4.6rem); letter-spacing: -.01em; }
h2 { font-size: clamp(1.6rem, 5vw, 2.5rem); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1em; }
.mono { font-family: var(--f-mono); }
.dim { color: var(--fg-dim); }
.small { font-size: .875rem; }
.center { text-align: center; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 0; background: var(--accent); color: var(--accent-fg); padding: .5rem 1rem; z-index: 100; }
.skip:focus { left: .5rem; }
:focus-visible { outline: 3px solid var(--gold-2); outline-offset: 2px; }
:root[data-theme="light"] :focus-visible { outline-color: #8a6516; }

/* ---------- header ---------- */
.site-head {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; gap: .75rem;
  padding: .6rem clamp(.8rem, 3vw, 2rem);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: .5rem; text-decoration: none; color: var(--fg); font-family: var(--f-display); font-weight: 700; font-size: 1.1rem; white-space: nowrap; }
.brand svg { width: 30px; height: 30px; flex: none; }
.brand b { color: var(--accent); }
.nav { display: flex; gap: .2rem; margin-left: auto; overflow-x: auto; scrollbar-width: none; }
.nav::-webkit-scrollbar { display: none; }
.nav a { color: var(--fg-dim); text-decoration: none; padding: .4rem .6rem; border-radius: 8px; font-size: .92rem; white-space: nowrap; }
.nav a:hover { color: var(--fg); background: var(--bg-2); }
.nav a[aria-current="page"] { color: var(--accent); }
.icon-btn {
  flex: none; width: 38px; height: 38px; display: grid; place-items: center;
  border-radius: 50%; border: 1px solid var(--line); background: transparent; color: var(--fg); cursor: pointer;
}
.icon-btn:hover { border-color: var(--accent); }
.icon-btn svg { width: 18px; height: 18px; }
@media (max-width: 640px) {
  .site-head { flex-wrap: wrap; }
  .nav { order: 3; width: 100%; margin: 0; justify-content: space-between; }
  .nav a { padding: .35rem .4rem; font-size: .85rem; }
  .head-tools { margin-left: auto; }
}
.head-tools { display: flex; gap: .4rem; }

/* ---------- layout ---------- */
main { display: block; }
.wrap { width: min(1080px, 100% - 2rem); margin-inline: auto; }
.narrow { width: min(760px, 100% - 2rem); margin-inline: auto; }
section { padding: clamp(2rem, 6vw, 4rem) 0; }
.eyebrow { font-family: var(--f-mono); text-transform: uppercase; letter-spacing: .18em; font-size: .75rem; color: var(--accent); margin-bottom: .6rem; display: block; }
.grid { display: grid; gap: 1rem; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 1.2rem; box-shadow: var(--shadow); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  font: 600 1rem/1 var(--f-body); letter-spacing: .02em;
  padding: .85rem 1.3rem; min-height: 46px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--accent); background: var(--accent); color: var(--accent-fg);
  text-decoration: none; transition: transform .12s, filter .12s, background .12s;
  touch-action: manipulation; user-select: none; -webkit-user-select: none;
}
.btn:hover { filter: brightness(1.08); }
.btn:active { transform: scale(.97); }
.btn.ghost { background: transparent; color: var(--fg); border-color: var(--line); }
.btn.ghost:hover { border-color: var(--accent); }
.btn.red { background: var(--red); border-color: var(--red); color: #fff; }
.btn.big { font-size: 1.15rem; padding: 1rem 1.8rem; min-height: 56px; }
.btn[disabled] { opacity: .45; cursor: not-allowed; }
.btn-row { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; }
.btn-row.center { justify-content: center; }

/* ---------- forms ---------- */
input[type="text"], input[type="number"], select {
  font: inherit; color: var(--fg); background: var(--bg-2);
  border: 1px solid var(--line); border-radius: 10px; padding: .7rem .9rem; min-height: 46px; width: 100%;
}
input:focus { border-color: var(--accent); }
label { font-weight: 600; display: block; margin-bottom: .35rem; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; padding: 3px; gap: 2px; background: var(--bg-2); }
.seg button { font: 600 .9rem var(--f-body); border: 0; background: transparent; color: var(--fg-dim); padding: .5rem 1rem; border-radius: 999px; cursor: pointer; min-height: 38px; }
.seg button[aria-pressed="true"] { background: var(--accent); color: var(--accent-fg); }

/* ---------- footer ---------- */
.site-foot { border-top: 1px solid var(--line); padding: 2rem 0 3rem; color: var(--fg-dim); font-size: .9rem; }
.site-foot .wrap { display: flex; flex-wrap: wrap; gap: 1rem; justify-content: space-between; }
.site-foot a { color: var(--fg-dim); }

/* ---------- toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: 1.2rem; transform: translate(-50%, 150%);
  background: var(--fg); color: var(--bg); padding: .7rem 1.1rem; border-radius: 999px; font-weight: 600;
  transition: transform .25s; z-index: 80; max-width: calc(100% - 2rem); text-align: center;
}
.toast.show { transform: translate(-50%, 0); }

/* ---------- barrel motif ---------- */
.barrel-bg {
  background:
    radial-gradient(circle at 50% 50%, transparent 0 38%, rgba(0,0,0,.0) 38%),
    repeating-conic-gradient(from 0deg, rgba(255,255,255,.035) 0 10deg, rgba(0,0,0,.08) 10deg 20deg);
}
.dots { display: flex; gap: .55rem; justify-content: center; }
.dots i { width: 14px; height: 14px; border-radius: 50%; background: var(--fg); display: block; }
.dots i:nth-child(1) { animation: dot 2.4s infinite; }
.dots i:nth-child(2) { animation: dot 2.4s .2s infinite; }
.dots i:nth-child(3) { animation: dot 2.4s .4s infinite; }
@keyframes dot { 0%, 60%, 100% { opacity: 1; } 30% { opacity: .2; } }

.pill { display: inline-block; font: 700 .72rem var(--f-mono); letter-spacing: .12em; text-transform: uppercase; padding: .25rem .6rem; border-radius: 999px; border: 1px solid var(--line); color: var(--fg-dim); }
.pill.gold { border-color: var(--accent); color: var(--accent); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
}
