/* ==========================================================================
   Wise Merch — one page.

   Palette, type and stroke-first treatment are Chisel's (chisel.to), because
   they are one company and should not look like two. Light and dark both
   ship: the theme follows the system by default and the toggle overrides it,
   stored under the same key Chisel uses so a visitor who set dark on one
   arrives to dark on the other.

   The logo is a raster in two cuts rather than one recoloured SVG — the
   supplied artwork is PNG, and swapping the file per theme is honest about
   that instead of filtering a black PNG white and hoping.
   ========================================================================== */
:root{
  --carbon:#141414; --warm-white:#C9C9C9; --parchment:#BFBFBF;
  --slate:#4E4E4E; --ember:#933006; --brand:#df4826;

  --bg:var(--warm-white);
  --bg-sunken:var(--parchment);
  --ink:var(--carbon);
  --muted:var(--slate);
  --faint:#686868;
  --border:#B4B4B4;
  --accent:var(--ember);
  --hover:rgb(38 38 37 / 0.05);

  --font-display:'thermal-variable','Iowan Old Style',Palatino,Georgia,serif;
  --font-sans:'Montserrat',-apple-system,'Segoe UI',system-ui,sans-serif;
  --font-mono:'ibm-plex-mono',ui-monospace,Consolas,monospace;
}
:root[data-theme='dark']{
  --bg:var(--carbon);
  --bg-sunken:#1c1c1b;
  --ink:#E8E8E6;
  --muted:#A0A09C;
  --faint:#7A7A76;
  --border:#3A3A38;
  /* The light-slab ember is too dark to read on carbon; the brand orange is
     the right step here and clears contrast against it. */
  --accent:#E0663C;
  --hover:rgb(255 255 255 / 0.06);
}
@media (prefers-color-scheme: dark){
  :root:not([data-theme='light']){
    --bg:var(--carbon); --bg-sunken:#1c1c1b; --ink:#E8E8E6; --muted:#A0A09C;
    --faint:#7A7A76; --border:#3A3A38; --accent:#E0663C;
    --hover:rgb(255 255 255 / 0.06);
  }
}

*{box-sizing:border-box;margin:0;padding:0}
html{scroll-behavior:smooth;-webkit-text-size-adjust:100%}
body{
  background:var(--bg);color:var(--ink);
  font-family:var(--font-sans);font-size:16px;line-height:1.65;
  -webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;
  transition:background .2s,color .2s;
}
.wrap{max-width:1100px;margin:0 auto;padding:0 28px}
a{color:inherit}
h1,h2{font-family:var(--font-display);font-weight:400;line-height:1.1;letter-spacing:-.015em}
h1{font-size:clamp(2.5rem,6.5vw,4.6rem)}
h2{font-size:clamp(1.7rem,3.6vw,2.6rem);margin-bottom:10px}
h3{font-size:1rem;font-weight:700;margin-bottom:6px}
p{color:var(--muted)}
.label{
  font-family:var(--font-mono);font-size:.6875rem;font-weight:600;
  text-transform:uppercase;letter-spacing:.11em;color:var(--accent);
  margin-bottom:10px;
}
section{padding:84px 0;border-top:1px dotted var(--border)}

/* ---- header ---- */
header{
  position:sticky;top:0;z-index:20;background:var(--bg);
  border-bottom:1px dotted var(--border);
}
.bar{display:flex;align-items:center;gap:26px;height:66px}
.logo{display:flex;align-items:center;text-decoration:none}
.logo img{height:26px;width:auto;display:block}
/* One lockup per theme. The white cut is hidden in light and vice versa. */
:root[data-theme='dark'] .logo__light,
:root:not([data-theme='light']) .logo__light{display:none}
:root[data-theme='dark'] .logo__dark{display:block}
.logo__dark{display:none}
@media (prefers-color-scheme: dark){
  :root:not([data-theme='light']) .logo__dark{display:block}
  :root[data-theme='light'] .logo__dark{display:none}
  :root[data-theme='light'] .logo__light{display:block}
}
nav{margin-left:auto;display:flex;align-items:center;gap:24px;font-size:.875rem}
nav a{color:var(--muted);text-decoration:none;transition:color .15s}
nav a:hover{color:var(--ink)}
.theme{
  display:grid;place-items:center;width:34px;height:34px;
  border:1px solid var(--border);background:transparent;color:var(--muted);
  cursor:pointer;transition:color .15s,border-color .15s;
}
.theme:hover{color:var(--ink);border-color:var(--ink)}
.theme svg{width:16px;height:16px}
:root[data-theme='dark'] .icon-sun,
:root:not([data-theme='light']) .icon-sun{display:none}
.icon-moon{display:none}
:root[data-theme='dark'] .icon-moon{display:block}
@media (prefers-color-scheme: dark){
  :root:not([data-theme='light']) .icon-moon{display:block}
  :root:not([data-theme='light']) .icon-sun{display:none}
  :root[data-theme='light'] .icon-sun{display:block}
  :root[data-theme='light'] .icon-moon{display:none}
}
@media(max-width:860px){nav a:not(.nav-cta){display:none}}

/* ---- hero ---- */
.hero{position:relative;overflow:hidden;border-top:none;padding:0}
.hero__media{position:relative;min-height:min(78vh,660px);display:flex;align-items:flex-end}
.hero__media img{
  position:absolute;inset:0;width:100%;height:100%;
  object-fit:cover;object-position:center;
}
/* The artwork is white and orange, so the copy needs its own ground rather
   than relying on the image staying light where the text sits. */
.hero__veil{
  position:absolute;inset:0;
  background:linear-gradient(180deg,rgb(201 201 201 / .10) 0%,rgb(201 201 201 / .82) 62%,var(--bg) 100%);
}
:root[data-theme='dark'] .hero__veil{
  background:linear-gradient(180deg,rgb(20 20 20 / .30) 0%,rgb(20 20 20 / .86) 62%,var(--bg) 100%);
}
@media (prefers-color-scheme: dark){
  :root:not([data-theme='light']) .hero__veil{
    background:linear-gradient(180deg,rgb(20 20 20 / .30) 0%,rgb(20 20 20 / .86) 62%,var(--bg) 100%);
  }
}
.hero__inner{position:relative;width:100%;padding:0 0 56px}
.hero h1{max-width:16ch}
.hero .lede{font-size:1.15rem;max-width:58ch;margin-top:20px;color:var(--ink);opacity:.86}

.actions{display:flex;flex-wrap:wrap;gap:12px;margin-top:34px}
.btn{
  display:inline-block;padding:13px 26px;border:1px solid var(--ink);
  font-size:.9375rem;font-weight:600;text-decoration:none;
  transition:background .15s,color .15s,border-color .15s;
}
.btn:hover{background:var(--ink);color:var(--bg)}
.btn--primary{background:var(--accent);border-color:var(--accent);color:#fff}
.btn--primary:hover{background:var(--ink);border-color:var(--ink);color:var(--bg)}
.note{font-size:.8125rem;color:var(--faint);margin-top:16px}

/* ---- grids ---- */
.grid{display:grid;gap:1px;background:var(--border);border:1px solid var(--border);margin-top:34px}
.grid--3{grid-template-columns:repeat(3,1fr)}
.cell{background:var(--bg);padding:26px}
.cell p{font-size:.9375rem}

/* ---- work grid ----
   Mockup slots. To swap one, replace the file in images/ or change the src —
   nothing else needs touching. Aspect is locked at 4:3 and the image is
   cropped to fill, so mixed-size renders still line up as a grid instead of
   producing a ragged wall. A slot with no image left in it shows its own
   label rather than a broken-image icon. */
.work{display:grid;grid-template-columns:repeat(3,1fr);gap:1px;background:var(--border);border:1px solid var(--border);margin-top:34px}
/* Square by default, because four of the five renders ARE square. The old
   4:3 crop was cutting a quarter off the top and bottom of every product —
   the images were fine, the frame was wrong. */
.work__item{position:relative;background:var(--bg-sunken);aspect-ratio:1/1;overflow:hidden;display:flex;align-items:center;justify-content:center;text-decoration:none;color:inherit}
/* The Kunhai bottle is 1200x2666. In a square frame it became a horizontal
   band of label. Given two rows it stands up at close to its own proportion. */
.work__item--tall{grid-row:span 2;aspect-ratio:auto}
.work__item img{width:100%;height:100%;object-fit:cover;display:block;transition:transform .5s ease}
.work__item:hover img{transform:scale(1.04)}
.work__empty{font-family:var(--font-mono);font-size:.6875rem;letter-spacing:.1em;text-transform:uppercase;color:var(--faint)}
.work__cap{
  position:absolute;left:0;right:0;bottom:0;padding:14px 16px;
  font-family:var(--font-mono);font-size:.6875rem;letter-spacing:.09em;text-transform:uppercase;
  color:#fff;background:linear-gradient(180deg,rgb(0 0 0 / 0) 0%,rgb(0 0 0 / .78) 100%);
  display:flex;align-items:center;justify-content:space-between;gap:8px;
}
/* An outbound arrow only on the ones that go somewhere, so the linked tiles
   are distinguishable from the unlinked without a second colour. */
.work__cap em{font-style:normal;opacity:0;transform:translateX(-4px);transition:opacity .25s,transform .25s}
.work__item:hover .work__cap em{opacity:1;transform:translateX(0)}
.work__cta{
  grid-column:1/-1;background:var(--bg);padding:22px 16px;text-align:center;
  font-family:var(--font-mono);font-size:.6875rem;letter-spacing:.1em;text-transform:uppercase;color:var(--faint);
}
@media(max-width:860px){
  .work{grid-template-columns:repeat(2,1fr)}
  .work__item--tall{grid-row:span 2}
}
@media(max-width:520px){
  .work{grid-template-columns:1fr}
  .work__item--tall{grid-row:span 1;aspect-ratio:3/4}
}
.num{font-family:var(--font-mono);font-size:.75rem;color:var(--accent);display:block;margin-bottom:12px}
@media(max-width:860px){.grid--3{grid-template-columns:1fr}}

/* ---- table ---- */
.scroll{overflow-x:auto;margin-top:30px}
table{width:100%;border-collapse:collapse;font-size:.9375rem;min-width:520px}
th,td{text-align:left;padding:13px 14px;border-bottom:1px dotted var(--border)}
th{font-family:var(--font-mono);font-size:.6875rem;text-transform:uppercase;letter-spacing:.08em;color:var(--faint);font-weight:600}
td:not(:first-child){font-family:var(--font-mono);white-space:nowrap}
tbody tr:last-child td{border-bottom:none}

/* ---- callout ---- */
.callout{border:1px solid var(--ink);padding:30px;margin-top:34px;max-width:640px}
.callout dl{display:grid;grid-template-columns:1fr auto;gap:11px 24px;margin-top:18px;font-size:.9375rem}
.callout dt{color:var(--muted)}
.callout dd{font-family:var(--font-mono);text-align:right}

/* ---- disclosure ---- */
details{border-bottom:1px dotted var(--border);padding:18px 0}
summary{cursor:pointer;font-weight:600;font-size:.9375rem;list-style:none;display:flex;gap:12px}
summary::-webkit-details-marker{display:none}
summary::before{content:'+';color:var(--accent);font-family:var(--font-mono);flex-shrink:0}
details[open] summary::before{content:'–'}
details p{margin-top:12px;font-size:.9375rem;max-width:72ch}
details p+p{margin-top:10px}

/* ---- footer ---- */
footer{border-top:1px dotted var(--border);padding:52px 0;font-size:.875rem;color:var(--muted)}
.foot{display:flex;flex-wrap:wrap;gap:36px;justify-content:space-between}
.stack{display:flex;flex-direction:column;gap:5px}
.stack strong{color:var(--ink)}
footer a{color:var(--muted);text-decoration:none}
footer a:hover{color:var(--ink)}
