/* ==========================================================
   Sliceform — styles
   Colours: background #ECE8DF · deep teal #123630 · apricot #E39A66
   Fonts: Jost (headings) · Inter (text)
   ========================================================== */
:root {
  --bg: #ECE8DF;
  --teal: #123630;
  --apricot: #E39A66;
  --muted: #5d6a66;
  --line: rgba(18, 54, 48, .14);
  --max: 1120px;
  --pad: 32px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--teal);
  font: 400 17px/1.65 "Inter", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh; display: flex; flex-direction: column;
}
main { flex: 1; }
h1, h2, h3, .brand { font-family: "Jost", system-ui, sans-serif; font-weight: 500; letter-spacing: .01em; }
a { color: inherit; text-decoration: none; }
p a, .more a, .contact a, .footer a { border-bottom: 1px solid var(--line); transition: color .2s, border-color .2s; }
p a:hover, .more a:hover, .contact a:hover, .footer a:hover { color: var(--apricot); border-color: var(--apricot); }

/* ---------- header ---------- */
.topbar {
  width: 100%; max-width: var(--max); margin: 0 auto; padding: 28px var(--pad);
  display: flex; justify-content: space-between; align-items: center;
}
.brand { display: flex; align-items: center; gap: 10px; font-size: 18px; }
.brand img { display: block; }
.topbar nav a { margin-left: 28px; font-size: 15px; padding-bottom: 2px; border-bottom: 1px solid transparent; transition: color .2s, border-color .2s; }
.topbar nav a:hover { color: var(--apricot); }
.topbar nav a[aria-current="page"] { border-color: var(--apricot); }

/* ---------- hero ---------- */
.hero {
  min-height: 72vh; display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding: 20px var(--pad) 72px;
}
.hero .logo { width: min(260px, 56vw); }
.hero h1 { font-size: clamp(20px, 2.4vw, 26px); font-weight: 400; color: var(--muted); margin: 40px 0 0; }

/* ---------- sections ---------- */
.section { width: 100%; max-width: var(--max); margin: 0 auto; padding: 56px var(--pad) 96px; }
.section-title, .series-title {
  font-size: 14px; text-transform: uppercase; letter-spacing: .18em; margin: 0 0 40px; font-weight: 500;
}
.page-title { font-size: clamp(36px, 5vw, 52px); margin: 24px 0 8px; line-height: 1.1; }
.hint { margin: 0 0 64px; color: var(--muted); font-size: 15px; }
.more { margin: 64px 0 0; font-size: 16px; }
.series + .series { margin-top: 96px; }

/* ---------- grid + cards (3:4) ---------- */
.grid { display: grid; gap: 64px 48px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.card-link { display: block; }
.card .art { width: 100%; aspect-ratio: 3 / 4; }
.card-title { font-size: 22px; margin: 20px 0 2px; transition: color .2s; }
.card-link:hover .card-title { color: var(--apricot); }
.card-link:focus-visible { outline: 2px solid var(--apricot); outline-offset: 6px; }
.card .meta { margin: 0; color: var(--muted); font-size: 14px; }
.is-example .card-title { color: var(--muted); }
.tag {
  display: inline-block; vertical-align: middle; margin-left: 8px; padding: 3px 6px 2px;
  font: 500 10px/1.2 "Inter", sans-serif; letter-spacing: .1em; text-transform: uppercase;
  color: var(--apricot); border: 1px solid var(--apricot); border-radius: 2px;
}

/* ---------- artwork animation ---------- */
.art { display: block; cursor: pointer; }
.art svg, .logo svg { display: block; width: 100%; height: 100%; overflow: hidden; }
/* .piece shapes are moved by assets/js/motion.js via the SVG transform attribute.
   Don't add CSS transform-origin / transform-box to them. */
.is-waiting .piece { opacity: 0; }
/* quick "pop" of the whole card on hover (mouse only) */
.card .art svg { transition: transform .32s cubic-bezier(.34, 1.56, .64, 1); }
@media (hover: hover) {
  .card .art:hover svg { transform: scale(1.035); }
}

/* ---------- work page (work.html) — "D1 Split", square corners ---------- */
.work { --tone: #E7E5DE; display: grid; grid-template-columns: 60fr 40fr; width: 100%; max-width: 1360px; margin: 0 auto; align-items: start; }
.work-stage { background: var(--tone); display: flex; align-items: center; justify-content: center; padding: 64px; min-height: calc(100vh - 86px); position: sticky; top: 0; }
.work-art { width: min(100%, calc((100vh - 214px) * .75)); aspect-ratio: 3 / 4; }
.work-text { padding: 0 56px; }
.work-sticky { padding: 64px 0 48px; }
.kicker { margin: 0 0 10px; font-size: 12px; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); }
.work h1 { font-size: clamp(34px, 3.6vw, 48px); line-height: 1.05; margin: 0 0 12px; }
.meta-line { margin: 0 0 24px; font-size: 14px; color: var(--muted); }
.desc { margin: 0 0 32px; line-height: 1.75; }
.cta { display: inline-block; padding: 13px 20px; background: var(--teal); color: var(--bg); font-size: 15px; transition: background .2s, color .2s; }
.cta:hover { background: var(--apricot); color: var(--teal); }

.mini-title { margin: 0 0 14px; font: 500 11px/1 "Inter", sans-serif; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.mini-hint { letter-spacing: .04em; text-transform: none; margin-left: 6px; opacity: .7; }
.palette-block { margin-top: 44px; }
.palette { display: flex; flex-wrap: wrap; gap: 8px; }
.swatch {
  display: inline-flex; align-items: center; gap: 8px; padding: 5px 10px 5px 5px; min-width: 112px;
  background: none; border: 1px solid rgba(18, 54, 48, .14); border-radius: 0; color: var(--teal); cursor: pointer;
  transition: border-color .2s, background .2s;
}
.swatch:hover { border-color: var(--teal); }
.swatch:focus-visible { outline: 2px solid var(--apricot); outline-offset: 2px; }
.swatch .chip { width: 22px; height: 22px; flex: none; box-shadow: inset 0 0 0 1px rgba(18, 54, 48, .12); }
.swatch code { font: 400 12px/1 ui-monospace, "SF Mono", Menlo, Consolas, monospace; }
.swatch.copied { border-color: var(--apricot); background: rgba(227, 154, 102, .12); }
.swatch.copied code { font-family: "Inter", sans-serif; color: var(--teal); }
.shapes-block { margin-top: 32px; }
.shapes { display: flex; flex-wrap: wrap; gap: 12px; }
.shape { width: 52px; height: 52px; background: #E7E5DE; }
.shape svg { padding: 6px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.pn { display: grid; grid-template-columns: 1fr 1fr; margin-top: 44px; border-top: 1px solid var(--line); }
.pn a { display: flex; flex-direction: column; gap: 4px; padding: 16px 0; font-family: "Jost", sans-serif; font-size: 18px; transition: color .2s; }
.pn a:hover { color: var(--apricot); }
.pn .pn-next { text-align: right; align-items: flex-end; }
.pn-dir { font: 500 11px/1 "Inter", sans-serif; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.more-works { padding-top: 48px; }
.more-grid { grid-template-columns: repeat(auto-fill, minmax(200px, 240px)); }

/* ---------- about ---------- */
.about .bio { max-width: 600px; margin: 24px 0 48px; }
.about .bio p { font-size: 19px; line-height: 1.7; margin: 0 0 18px; }
.available { color: var(--apricot); font-weight: 500; }
.contact { list-style: none; padding: 0; margin: 0; max-width: 560px; border-top: 1px solid var(--line); }
.contact li { display: flex; gap: 24px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.contact span { width: 110px; color: var(--muted); font-size: 15px; }

/* ---------- footer ---------- */
.footer {
  width: 100%; max-width: var(--max); margin: 0 auto; padding: 32px var(--pad);
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  border-top: 1px solid var(--line); font-size: 14px; color: var(--muted);
}
.footer-links a + a { margin-left: 20px; }

/* ---------- mobile ---------- */
@media (max-width: 760px) {
  :root { --pad: 20px; }
  .topbar { padding-top: 20px; padding-bottom: 20px; }
  .topbar nav a { margin-left: 20px; }
  .hero { min-height: 64vh; }
  .grid { gap: 48px 20px; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
  .card-title { font-size: 18px; margin-top: 14px; }
  .work { grid-template-columns: 1fr; }
  .work-stage { position: static; min-height: 0; padding: 32px var(--pad); }
  .work-art { width: min(100%, 400px); }
  .work-text { padding: 0 var(--pad); }
  .work-sticky { padding: 32px 0 8px; }
  .more-grid { grid-template-columns: repeat(2, 1fr); }
  .about .bio p { font-size: 17px; }
  .contact li { gap: 12px; }
  .contact span { width: 84px; flex: none; }
  .contact a { overflow-wrap: anywhere; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .is-waiting .piece { opacity: 1; }
}
