/* Alchemy Surf Collective — site styles */
@font-face { font-family: "Pirata One"; src: url("../fonts/pirata-one-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Courier Prime"; src: url("../fonts/courier-prime-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Courier Prime"; src: url("../fonts/courier-prime-latin-700-normal.woff2") format("woff2"); font-weight: 700; font-display: swap; }

:root {
  --ink: #120f0e;
  --coal: #1e1a18;
  --slab: #2b2522;
  --line: #3a322d;
  --cream: #decfbe;
  --ash: #9a8f84;
  --gold: #c9a06a;
  --red: #ae261d;
  --red-hot: #c8342a;
  --rust: #ac6551;
  --green: #60ba6f;
  --blue: #2951be;
  --head: "Pirata One", "Old English Text MT", Georgia, serif;
  --mono: "Courier Prime", "Courier New", monospace;
  --sans: "Helvetica Neue", Arial, system-ui, sans-serif;
  --pad: clamp(1rem, 4vw, 3rem);
  --max: 1280px;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--ink); color: var(--cream);
  font-family: var(--sans); font-size: 17px; line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
.tile img { height: 100%; }
a { color: var(--gold); text-decoration: none; }
a:hover { color: var(--cream); }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

h1, h2, h3 { font-family: var(--head); font-weight: 400; line-height: 1.05; margin: 0 0 .4em; letter-spacing: .01em; }
h1 { font-size: clamp(2.6rem, 7vw, 5.5rem); }
h2 { font-size: clamp(2rem, 4.5vw, 3.4rem); }
h3 { font-size: 1.7rem; color: var(--gold); }
p { margin: 0 0 1em; }
.kicker { font-family: var(--mono); font-size: .8rem; letter-spacing: .12em; text-transform: uppercase; color: var(--gold); margin-bottom: .8rem; display: block; }
.muted { color: var(--ash); }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--pad); }
section { padding: clamp(3rem, 8vw, 6rem) 0; }

/* ---------- header / tabs ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(18, 15, 14, .92); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { display: flex; align-items: center; gap: 1.5rem; height: 68px; }
.brand { display: flex; align-items: center; gap: .6rem; flex-shrink: 0; }
.brand img { height: 42px; width: auto; }
.tabs { display: flex; gap: .4rem; margin-left: auto; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs a {
  font-family: var(--mono); font-weight: 700; font-size: .78rem; letter-spacing: .1em; text-transform: uppercase;
  color: var(--cream); padding: .55rem .9rem; border: 1px solid var(--line); white-space: nowrap;
  transition: background .2s, border-color .2s;
}
.tabs a:hover { border-color: var(--gold); color: var(--cream); }
.tabs a[aria-current="page"] { background: var(--red); border-color: var(--red); }
@media (max-width: 720px) {
  .site-header .wrap { flex-direction: column; height: auto; padding-top: .6rem; padding-bottom: .6rem; gap: .5rem; }
  .brand img { height: 34px; }
  .tabs { margin-left: 0; width: 100%; }
  .tabs a { flex: 1; text-align: center; padding: .5rem .5rem; font-size: .7rem; }
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: .5rem; cursor: pointer;
  font-family: var(--mono); font-weight: 700; font-size: .85rem; letter-spacing: .1em; text-transform: uppercase;
  padding: .9rem 1.4rem; border: 1px solid var(--red); background: var(--red); color: var(--cream);
  transition: background .2s, transform .2s;
}
.btn:hover { background: var(--red-hot); color: var(--cream); transform: translateY(-1px); }
.btn.ghost { background: transparent; border-color: var(--cream); }
.btn.ghost:hover { background: var(--cream); color: var(--ink); }
.btn.gold { background: var(--gold); border-color: var(--gold); color: var(--ink); }
.btn-row { display: flex; flex-wrap: wrap; gap: .8rem; }

/* ---------- hero ---------- */
.hero { position: relative; min-height: calc(100vh - 68px); display: grid; grid-template-columns: 1fr 1fr; padding: 0; }
.hero-copy { display: flex; flex-direction: column; justify-content: center; padding: var(--pad); padding-left: max(var(--pad), calc((100vw - var(--max)) / 2 + var(--pad))); }
.hero-copy .wm { width: min(230px, 55%); margin-bottom: .6rem; }
.hero-copy .wm2 { width: min(300px, 70%); margin-bottom: 1.8rem; }
.hero-copy .lead { font-size: 1.25rem; max-width: 30ch; }
.hero-copy h1 { color: var(--gold); font-size: clamp(2.2rem, 4.2vw, 3.6rem); }
.hero-img { background: url("../img/hero-batik.webp") center / cover no-repeat; min-height: 420px; }
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; min-height: auto; }
  .hero-img { order: -1; min-height: 52vh; }
  .hero-copy .wm, .hero-copy .wm2 { display: none; }
  .hero-copy { padding-top: 2rem; padding-bottom: 2.5rem; }
}

/* page intro */
.page-intro { padding-bottom: 1.5rem; }
.page-intro p { max-width: 62ch; font-size: 1.1rem; }

/* ---------- gallery wall (horizontal scroll) ---------- */
.wall-wrap { position: relative; }
.wall {
  display: flex; gap: 1rem; overflow-x: auto; scroll-snap-type: x mandatory;
  padding: .5rem var(--pad) 1.5rem; scrollbar-color: var(--gold) var(--coal);
  cursor: grab;
}
.wall.dragging { cursor: grabbing; scroll-snap-type: none; }
.wall::-webkit-scrollbar { height: 8px; }
.wall::-webkit-scrollbar-track { background: var(--coal); }
.wall::-webkit-scrollbar-thumb { background: var(--gold); }
.tile {
  position: relative; flex: 0 0 auto; height: clamp(320px, 62vh, 620px); scroll-snap-align: start;
  background: var(--coal); overflow: hidden; border: 0; padding: 0; cursor: zoom-in;
}
.tile img { height: 100%; width: auto; object-fit: cover; transition: transform .6s ease, filter .4s; filter: saturate(.95); user-select: none; -webkit-user-drag: none; }
.tile:hover img { transform: scale(1.03); filter: saturate(1.1); }
.tile .tag {
  position: absolute; left: 0; bottom: 0; background: var(--gold); color: var(--ink);
  font-family: var(--mono); font-weight: 700; font-size: .75rem; letter-spacing: .1em; text-transform: uppercase; padding: .35rem .7rem;
}
.wall-nav { display: flex; gap: .5rem; justify-content: flex-end; padding: 0 var(--pad); max-width: none; }
.wall-nav button {
  width: 46px; height: 46px; border: 1px solid var(--line); background: var(--coal); color: var(--cream); font-size: 1.2rem; cursor: pointer;
}
.wall-nav button:hover { border-color: var(--gold); color: var(--gold); }
.wall-hint { font-family: var(--mono); font-size: .75rem; color: var(--ash); letter-spacing: .1em; text-transform: uppercase; }

/* ---------- lightbox ---------- */
.lightbox { position: fixed; inset: 0; z-index: 100; background: rgba(10, 8, 7, .96); display: none; align-items: center; justify-content: center; padding: 2rem; }
.lightbox.open { display: flex; }
.lightbox figure { margin: 0; display: grid; grid-template-columns: auto minmax(0, 360px); gap: 2rem; align-items: center; max-height: 100%; }
.lightbox img { max-height: 86vh; max-width: 60vw; width: auto; }
.lightbox figcaption h3 { font-size: 2.2rem; }
.lightbox .close { position: absolute; top: 1rem; right: 1rem; }
.lightbox .prev, .lightbox .next { position: absolute; top: 50%; transform: translateY(-50%); }
.lightbox .prev { left: 1rem; } .lightbox .next { right: 1rem; }
.lightbox button.icon { width: 48px; height: 48px; background: var(--coal); border: 1px solid var(--line); color: var(--cream); font-size: 1.3rem; cursor: pointer; }
@media (max-width: 800px) {
  .lightbox figure { grid-template-columns: 1fr; gap: 1rem; }
  .lightbox img { max-width: 100%; max-height: 62vh; }
}

/* ---------- generic grids ---------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.split.rev > :first-child { order: 2; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } .split.rev > :first-child { order: 0; } }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1rem; }
.card { background: var(--coal); padding: 1.6rem; }
.card .num { font-family: var(--head); font-size: 3rem; color: var(--red-hot); line-height: 1; }
.photo-frame { position: relative; }
.photo-frame img { width: 100%; height: auto; }
.photo-frame .tag { position: absolute; left: 0; bottom: 0; background: var(--gold); color: var(--ink); font-family: var(--mono); font-weight: 700; font-size: .75rem; letter-spacing: .1em; text-transform: uppercase; padding: .35rem .7rem; }

.statement { background: var(--coal); text-align: center; }
.statement h2 { color: var(--gold); font-size: clamp(2.4rem, 6vw, 4.6rem); }

/* not list */
.nots { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1rem; }
.nots span { font-family: var(--mono); font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; border: 1px solid var(--red); color: var(--cream); padding: .3rem .7rem; text-decoration: line-through; text-decoration-color: var(--red-hot); }

/* ---------- board models ---------- */
.models { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1rem; }
.model { background: var(--coal); display: flex; flex-direction: column; }
.model img { aspect-ratio: 3 / 4; object-fit: cover; width: 100%; }
.model .body { padding: 1.3rem 1.4rem 1.6rem; flex: 1; display: flex; flex-direction: column; }
.model dl { display: grid; grid-template-columns: auto 1fr; gap: .2rem .9rem; font-size: .92rem; margin: 0 0 1.2rem; }
.model dt { font-family: var(--mono); font-size: .75rem; text-transform: uppercase; letter-spacing: .08em; color: var(--ash); padding-top: .15rem; }
.model dd { margin: 0; }
.model .btn { margin-top: auto; align-self: flex-start; }

/* ---------- configurator ---------- */
.config { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 2.5rem; align-items: start; }
@media (max-width: 980px) { .config { grid-template-columns: 1fr; } .config-aside { position: static !important; order: -1; } }
.config fieldset { border: 0; margin: 0 0 2.2rem; padding: 0; }
.config legend { font-family: var(--head); font-size: 2rem; color: var(--gold); margin-bottom: .2rem; padding: 0; }
.config legend .step { font-family: var(--mono); font-size: .8rem; color: var(--ash); letter-spacing: .1em; margin-right: .6rem; vertical-align: middle; }
.config .hint { color: var(--ash); font-size: .92rem; margin-bottom: 1rem; }
.fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 1rem; }
.field label, .field .label { display: block; font-family: var(--mono); font-size: .75rem; text-transform: uppercase; letter-spacing: .1em; color: var(--ash); margin-bottom: .35rem; }
.field input:not([type="radio"]), .field select, .field textarea {
  width: 100%; background: var(--coal); border: 1px solid var(--line); color: var(--cream);
  font: inherit; font-size: 1rem; padding: .7rem .8rem; border-radius: 0; appearance: none;
}
.field select { background-image: linear-gradient(45deg, transparent 50%, var(--gold) 50%), linear-gradient(135deg, var(--gold) 50%, transparent 50%); background-position: calc(100% - 18px) 55%, calc(100% - 12px) 55%; background-size: 6px 6px; background-repeat: no-repeat; padding-right: 2rem; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--gold); outline: none; }
.field textarea { min-height: 110px; resize: vertical; }
.field.wide { grid-column: 1 / -1; }
.chips { display: flex; flex-wrap: wrap; gap: .5rem; }
.chips { position: relative; }
.chips input { position: absolute; left: 0; top: 0; width: 1px; height: 1px; margin: 0; opacity: 0; pointer-events: none; }
.chips label {
  cursor: pointer; font-family: var(--mono); font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em;
  border: 1px solid var(--line); padding: .55rem .85rem; color: var(--cream); background: var(--coal); margin: 0;
}
.chips input:checked + label { background: var(--red); border-color: var(--red); }
.chips input:focus-visible + label { outline: 2px solid var(--gold); outline-offset: 2px; }
.swatch { display: inline-block; width: 12px; height: 12px; margin-right: .4rem; vertical-align: -1px; border: 1px solid rgba(255,255,255,.25); }

.config-aside { position: sticky; top: 92px; background: var(--coal); padding: 1.5rem; }
.preview-board { display: flex; justify-content: center; padding: .5rem 0 1rem; }
.preview-board svg { height: 340px; width: auto; overflow: visible; }
.summary { font-family: var(--mono); font-size: .85rem; border-top: 1px solid var(--line); padding-top: 1rem; margin-bottom: 1.2rem; }
.summary div { display: flex; justify-content: space-between; gap: 1rem; padding: .15rem 0; }
.summary span:first-child { color: var(--ash); text-transform: uppercase; letter-spacing: .06em; }
.summary span:last-child { text-align: right; }
.send { display: grid; gap: .6rem; }
.send .btn { justify-content: center; }
.send small { color: var(--ash); font-size: .8rem; line-height: 1.4; }
.form-error { color: #ff8a80; font-size: .85rem; min-height: 1.2em; }
.toast { position: fixed; left: 50%; bottom: 2rem; transform: translateX(-50%) translateY(150%); background: var(--gold); color: var(--ink); font-family: var(--mono); font-weight: 700; padding: .8rem 1.2rem; transition: transform .3s, opacity .3s; z-index: 200; opacity: 0; pointer-events: none; }
.toast.show { transform: translateX(-50%) translateY(0); opacity: 1; }

/* ---------- steps ---------- */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; counter-reset: s; }
@media (max-width: 760px) { .steps { grid-template-columns: 1fr; } }

/* ---------- footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding: 3rem 0 2rem; margin-top: 2rem; }
.site-footer .wrap { display: grid; grid-template-columns: 1.2fr 1fr 1fr; gap: 2rem; }
.site-footer img.sym { width: 64px; opacity: .85; margin-bottom: 1rem; }
.site-footer h4 { font-family: var(--mono); font-size: .75rem; letter-spacing: .12em; text-transform: uppercase; color: var(--gold); margin: 0 0 .8rem; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: .4rem; }
.site-footer .legal { grid-column: 1 / -1; font-family: var(--mono); font-size: .75rem; color: var(--ash); border-top: 1px solid var(--line); padding-top: 1.2rem; }
@media (max-width: 760px) { .site-footer .wrap { grid-template-columns: 1fr; } }

/* reveal on scroll */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } html { scroll-behavior: auto; } }
