/* ============================================================================
   bitcoin-puzzle.com — ₿-Hexagon, Festival Edition
   Aesthetic: Swiss workshop cut-sheet. Warm paper ground, ink type, hairline
   technical rules. The two secondary accents are lifted verbatim from the
   generator's own SVG output — red = cut path, blue = engrave path — so the
   site is coloured by the product's own laser file. Bitcoin orange is the
   single loud accent and appears ONLY on price + order actions.
   No external requests: fonts are self-hosted (see assets/fonts/).
   ========================================================================= */

@font-face {
  font-family: 'Bricolage Grotesque';
  src: url('fonts/bricolage-grotesque-var.woff2') format('woff2-variations');
  font-weight: 200 800;
  font-stretch: 75% 100%;
  font-display: swap;
}
@font-face {
  font-family: 'Newsreader';
  src: url('fonts/newsreader-var.woff2') format('woff2-variations');
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Newsreader';
  src: url('fonts/newsreader-italic-var.woff2') format('woff2-variations');
  font-weight: 200 800;
  font-style: italic;
  font-display: swap;
}

:root {
  --paper:      #f2eee4;
  --paper-deep: #e7e0d1;
  --ink:        #16130f;
  --ink-soft:   #4b453b;
  --ink-faint:  #8b8271;
  --rule:       #cec5b1;
  --cut:        #d2372a;   /* generator red — cut path  */
  --engrave:    #2b4c9b;   /* generator blue — engrave  */
  --orange:     #f7931a;   /* ₿                          */
  --orange-ink: #8a4d00;

  --display: 'Bricolage Grotesque', 'Trebuchet MS', sans-serif;
  --body:    'Newsreader', Georgia, 'Times New Roman', serif;
  --mono:    ui-monospace, 'SF Mono', 'DejaVu Sans Mono', Menlo, monospace;

  --gut: clamp(1.25rem, 4vw, 3.5rem);
  --max: 76rem;
}

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

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: clamp(1.02rem, 0.98rem + 0.25vw, 1.18rem);
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Paper texture: a faint hexagonal rule grid + a grain wash, both painted on
   the body background so every section inherits the same sheet. */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.5;
  background-image:
    linear-gradient(115deg, transparent 0 calc(50% - 0.5px), var(--rule) 50%, transparent calc(50% + 0.5px) 100%),
    linear-gradient( 65deg, transparent 0 calc(50% - 0.5px), var(--rule) 50%, transparent calc(50% + 0.5px) 100%),
    linear-gradient(  0deg, transparent 0 calc(50% - 0.5px), var(--rule) 50%, transparent calc(50% + 0.5px) 100%);
  background-size: 64px 111px;
  mask-image: radial-gradient(ellipse 120% 80% at 50% 0%, #000 0%, transparent 75%);
}
body::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)'/%3E%3C/svg%3E");
}

main, header, footer { position: relative; z-index: 2; }

/* ── shared bits ───────────────────────────────────────────────────────── */

.wrap { width: min(100% - 2 * var(--gut), var(--max)); margin-inline: auto; }

.tag {
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

a { color: inherit; text-underline-offset: 0.22em; text-decoration-thickness: 1px; }
a:hover { text-decoration-color: var(--cut); }

h1, h2, h3 {
  font-family: var(--display);
  font-weight: 800;
  line-height: 1.02;
  letter-spacing: -0.025em;
  margin: 0;
  text-wrap: balance;
}

.rule-h {
  border: 0;
  border-top: 1px solid var(--rule);
  margin: 0;
}

/* ── header ────────────────────────────────────────────────────────────── */

.site-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 1.4rem 0 1.1rem;
  border-bottom: 1px solid var(--rule);
}
.brand {
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-decoration: none;
}
.brand b { color: var(--orange-ink); font-weight: 700; }
.site-nav { display: flex; gap: 1.4rem; font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase; }
.site-nav a { text-decoration: none; color: var(--ink-soft); }
.site-nav a:hover { color: var(--cut); }

/* ── hero ──────────────────────────────────────────────────────────────── */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
  padding: clamp(2.5rem, 7vw, 5.5rem) 0 clamp(2.5rem, 6vw, 4.5rem);
}
@media (max-width: 56rem) { .hero { grid-template-columns: 1fr; } }

.hero h1 {
  font-size: clamp(2.5rem, 1.4rem + 4.6vw, 4.9rem);
  margin: 0.7rem 0 0;
}
.hero h1 .btc {
  color: var(--orange);
  font-style: normal;
  text-shadow: 0 1px 0 var(--orange-ink);
}
.hero h1 em {
  font-family: var(--body);
  font-weight: 400;
  font-style: italic;
  letter-spacing: -0.01em;
}
.lede {
  max-width: 34ch;
  margin: 1.35rem 0 0;
  color: var(--ink-soft);
  font-size: 1.06em;
}

/* price + CTA */
.buybox {
  margin-top: 2.1rem;
  display: flex;
  align-items: flex-end;
  gap: clamp(1rem, 3vw, 2rem);
  flex-wrap: wrap;
}
.price {
  font-family: var(--mono);
  font-size: clamp(1.9rem, 1.2rem + 2vw, 2.6rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1;
  color: var(--ink);
}
/* struck-through reference price next to the Fantastical offer price */
.price s {
  font-size: 0.62em;
  font-weight: 400;
  color: var(--ink-faint);
  text-decoration-thickness: 2px;
  margin-right: 0.4em;
}
.price small {
  display: block;
  font-size: 0.34em;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-top: 0.55rem;
}

.btn {
  --edge: var(--ink);
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.95rem 1.6rem;
  font-family: var(--display);
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 0.005em;
  text-decoration: none;
  color: var(--ink);
  background: var(--paper);
  border: 1.5px solid var(--edge);
  border-radius: 2px;
  overflow: hidden;
  isolation: isolate;
  transition: color 0.28s ease, transform 0.18s cubic-bezier(.2,.9,.3,1), box-shadow 0.28s ease;
  box-shadow: 3px 3px 0 var(--ink);
}
.btn::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--orange);
  transform: translateX(-101%);
  transition: transform 0.34s cubic-bezier(.65,0,.35,1);
}
.btn:hover::before, .btn:focus-visible::before { transform: translateX(0); }
.btn:hover, .btn:focus-visible { transform: translate(-1px, -1px); box-shadow: 5px 5px 0 var(--ink); }
.btn:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--ink); }
/* Not-orderable state for the order buttons — used while no Stripe Payment Link
   is live (and reusable for "ausverkauft"). A <button disabled> rather than a
   dead <a>: not clickable, not focusable, announced as disabled. Keeps .btn's
   shape so the layout does not shift when the link comes back — only the ink
   and the lift go away. Unused since the link went live 2026-08-07; kept
   deliberately, do not delete. */
.btn-off {
  color: var(--ink-faint);
  border-color: var(--ink-faint);
  box-shadow: 3px 3px 0 var(--ink-faint);
  cursor: not-allowed;
}
.btn-off:hover, .btn-off:focus-visible {
  transform: none;
  box-shadow: 3px 3px 0 var(--ink-faint);
}
.btn-off::before { content: none; }

.btn .arrow { transition: transform 0.28s ease; }
.btn:hover .arrow { transform: translateX(4px); }

.buynote {
  margin: 1.15rem 0 0;
  font-family: var(--mono);
  font-size: 0.72rem;
  line-height: 1.9;
  letter-spacing: 0.04em;
  color: var(--ink-faint);
}
.buynote span::before { content: '·'; margin: 0 0.55rem; color: var(--rule); }
.buynote span:first-child::before { content: none; margin: 0; }

/* hero figure — the piece presented as a dimensioned drawing */
.plate {
  position: relative;
  aspect-ratio: 1;
}
.plate img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  filter: drop-shadow(0 26px 34px rgba(30, 22, 10, 0.24));
  animation: hover-float 9s ease-in-out infinite;
}
@keyframes hover-float {
  0%, 100% { transform: translateY(0) rotate(-1.2deg); }
  50%      { transform: translateY(-11px) rotate(1.2deg); }
}
@media (prefers-reduced-motion: reduce) { .plate img { animation: none; } }

.dims {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: visible;
}
.dims line, .dims path { stroke: var(--engrave); stroke-width: 0.6; fill: none; }
.dims text {
  font-family: var(--mono);
  font-size: 3.1px;
  letter-spacing: 0.12em;
  fill: var(--engrave);
}

/* ── section scaffolding ───────────────────────────────────────────────── */

.sect { padding: clamp(3rem, 8vw, 6rem) 0; }
.sect-head { max-width: 46ch; }
.sect-head h2 {
  font-size: clamp(1.7rem, 1.2rem + 2vw, 2.7rem);
  margin-top: 0.6rem;
}
.sect-head p { color: var(--ink-soft); }

/* the three-up explainer */
.trio {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: clamp(1.5rem, 3vw, 2.6rem);
  margin-top: clamp(2rem, 4vw, 3rem);
}
.trio article {
  border-top: 1.5px solid var(--ink);
  padding-top: 1rem;
}
.trio h3 { font-size: 1.16rem; letter-spacing: -0.015em; }
.trio p { margin: 0.55rem 0 0; color: var(--ink-soft); font-size: 0.96em; }
.trio .n {
  font-family: var(--mono);
  font-size: 0.68rem;
  color: var(--cut);
  letter-spacing: 0.14em;
}

/* NOTE: the `.exhibit` / `.legend` / `.swatch` rules that lived here styled a
   technical drawing of the cut file (assets/img/cutfile.svg). Owner call
   2026-08-07: the cut geometry is NOT public information — section, sketch and
   styles removed together. Do not reinstate a cut-file drawing on this page. */

/* full-bleed system band */
.band {
  position: relative;
  margin: clamp(2rem, 6vw, 4rem) 0;
  padding: clamp(3rem, 8vw, 6rem) 0;
  background: var(--ink);
  color: var(--paper);
  overflow: hidden;
}
.band::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url('img/plate.jpg') center 30% / cover no-repeat;
  opacity: 0.62;
  filter: contrast(1.06) saturate(0.85);
}
/* scrim so the copy stays readable over the busiest part of the plate */
.band::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, var(--ink) 0%, rgba(22,19,15,0.88) 34%, rgba(22,19,15,0.15) 78%);
}
/* z-index is load-bearing: ::after is the band's last child, so without it the
   scrim paints ON TOP of the copy instead of under it. */
.band .wrap { position: relative; z-index: 1; }
.band h2 { font-size: clamp(1.7rem, 1.1rem + 2.4vw, 2.9rem); max-width: 18ch; }
.band p { max-width: 44ch; color: #ded6c6; }
.band .tag { color: var(--orange); }
.band a { color: var(--orange); }

/* spec sheet */
.specs {
  width: 100%;
  border-collapse: collapse;
  margin-top: clamp(1.6rem, 3vw, 2.4rem);
  font-family: var(--mono);
  font-size: 0.82rem;
}
.specs th, .specs td {
  text-align: left;
  padding: 0.72rem 0.4rem;
  border-bottom: 1px solid var(--rule);
  vertical-align: top;
}
.specs th {
  width: 34%;
  font-weight: 400;
  color: var(--ink-faint);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-size: 0.7rem;
}
.specs tr:first-child th, .specs tr:first-child td { border-top: 1.5px solid var(--ink); }

.notice {
  margin-top: 1.6rem;
  padding: 1rem 1.2rem;
  border-left: 3px solid var(--cut);
  background: rgba(210, 55, 42, 0.05);
  font-size: 0.92em;
  color: var(--ink-soft);
}

/* order block */
.order {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(1.6rem, 4vw, 3.5rem);
  align-items: start;
  padding: clamp(1.8rem, 4vw, 3rem);
  border: 1.5px solid var(--ink);
  background: rgba(255, 253, 247, 0.7);
  box-shadow: 8px 8px 0 var(--paper-deep);
}
@media (max-width: 52rem) { .order { grid-template-columns: 1fr; } }
.order h2 { font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.3rem); }
.order dl { margin: 0; font-family: var(--mono); font-size: 0.8rem; }
.order dt { color: var(--ink-faint); letter-spacing: 0.06em; text-transform: uppercase; font-size: 0.68rem; margin-top: 1rem; }
.order dt:first-child { margin-top: 0; }
.order dd { margin: 0.25rem 0 0; }

/* ── footer ────────────────────────────────────────────────────────────── */

.site-foot {
  border-top: 1px solid var(--rule);
  padding: clamp(2rem, 4vw, 3rem) 0 3rem;
  font-size: 0.9rem;
  color: var(--ink-soft);
}
.foot-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
  gap: 1.8rem;
}
.foot-grid h3 {
  font-family: var(--mono);
  font-size: 0.68rem;
  font-weight: 400;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 0.7rem;
}
.foot-grid ul { list-style: none; margin: 0; padding: 0; }
.foot-grid li { margin-bottom: 0.35rem; }
.foot-note {
  margin-top: 2.2rem;
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.05em;
  color: var(--ink-faint);
}

/* ── prose pages (Impressum / AGB / Datenschutz) ───────────────────────── */

.prose { width: min(100% - 2 * var(--gut), 44rem); margin-inline: auto; padding: clamp(2.5rem, 6vw, 4.5rem) 0; }
.prose h1 { font-size: clamp(2rem, 1.4rem + 2.4vw, 3rem); margin-bottom: 0.4rem; }
.prose h2 {
  font-size: 1.18rem;
  margin: 2.6rem 0 0.6rem;
  padding-top: 0.9rem;
  border-top: 1px solid var(--rule);
  letter-spacing: -0.01em;
}
.prose h3 { font-size: 1rem; margin: 1.5rem 0 0.3rem; }
.prose p, .prose li { color: var(--ink-soft); }
.prose li { margin-bottom: 0.35rem; }
.prose address { font-style: normal; font-family: var(--mono); font-size: 0.86rem; line-height: 1.8; }
.prose .updated { font-family: var(--mono); font-size: 0.7rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-faint); }
.backlink { font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase; text-decoration: none; color: var(--ink-faint); }
.backlink:hover { color: var(--cut); }

/* ── entrance choreography ─────────────────────────────────────────────── */

@media (prefers-reduced-motion: no-preference) {
  .rise { animation: rise 0.85s cubic-bezier(.16,.84,.44,1) backwards; }
  .rise:nth-child(1) { animation-delay: 0.05s; }
  .rise:nth-child(2) { animation-delay: 0.14s; }
  .rise:nth-child(3) { animation-delay: 0.23s; }
  .rise:nth-child(4) { animation-delay: 0.32s; }
  @keyframes rise {
    from { opacity: 0; transform: translateY(18px); }
    to   { opacity: 1; transform: none; }
  }
}

.skip {
  position: absolute;
  left: -9999px;
  background: var(--ink);
  color: var(--paper);
  padding: 0.6rem 1rem;
}
.skip:focus { left: var(--gut); top: 0.5rem; z-index: 99; }

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

@media print {
  body::before, body::after { display: none; }
  .btn { box-shadow: none; }
}
