/* Fadeworks design tokens — the CMS Colours and Fonts tabs map onto these custom properties.
   Warm sand pages, near-black bands, an orange accent and a yellow colour block;
   tall condensed display caps over a plain grotesk. */
:root {
  --color-primary: #f26b2a;          /* orange accent */
  --color-primary-dark: #d4561a;
  --color-on-primary: #1d1917;
  --color-secondary: #262220;        /* ink: dark bands, buttons, headings */
  --color-secondary-soft: #34302d;
  --color-accent: #f5c242;           /* yellow colour block */
  --color-sand: #bcab9b;             /* page */
  --color-sand-soft: #c8b9aa;
  --color-sand-deep: #a99686;
  --color-surface: #f4ead8;          /* cream cards */
  --color-line: #8f7f71;
  --color-muted: #5f5249;
  --color-default: #2b2522;
  --color-cream: #f4ead8;
  --color-on-dark: #e9dfcf;
  --color-on-dark-muted: #a79c90;
  --font-heading: 'Anton', 'Impact', 'Arial Narrow', sans-serif;
  --font-default: 'Archivo', system-ui, sans-serif;
  --font-label: 'Archivo Narrow', 'Archivo', system-ui, sans-serif;
  --radius: 0px;
  --section-max-width: 82rem;
  --header-h: 78px;
  --section-pad-y: 110px;
  --base-size: 16px;
  --ease: cubic-bezier(.2, .75, .25, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { font-size: var(--base-size); scroll-behavior: smooth; }
body { font-family: var(--font-default); color: var(--color-default); line-height: 1.6; font-weight: 400;
  background: var(--color-sand); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
h1, h2, h3, h4, h5 { font-family: var(--font-heading); color: var(--color-secondary); font-weight: 400; line-height: .95; text-transform: uppercase; letter-spacing: .005em; }
a { color: inherit; text-decoration: none; transition: color .25s ease; }
img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; }
::selection { background: var(--color-primary); color: var(--color-on-primary); }

.container { max-width: var(--section-max-width); margin: 0 auto; padding: 0 28px; }
section { padding: var(--section-pad-y) 0; position: relative; }
section, footer { overflow-x: clip; }
section.dark { background: var(--color-secondary); color: var(--color-on-dark-muted); }
section.dark h1, section.dark h2, section.dark h3 { color: var(--color-on-dark); }

/* ── Type helpers ── */
.display { font-family: var(--font-heading); text-transform: uppercase; line-height: .9; }
.stack { display: flex; flex-direction: column; }
.label, .eyebrow { font-family: var(--font-label); font-weight: 700; font-size: .78rem; letter-spacing: .14em; text-transform: uppercase; color: var(--color-secondary); }
section.dark .label, section.dark .eyebrow { color: var(--color-on-dark); }
.eyebrow { display: inline-flex; align-items: center; gap: .6rem; }
.eyebrow::before { content: ''; width: 22px; height: 2px; background: var(--color-primary); }
.hl { color: var(--color-primary); }
.lead { font-size: 1.04rem; max-width: 52ch; }
.muted { color: var(--color-muted); }

/* wavy underline (Squiggle component) */
.squiggle { display: block; width: 120px; height: 10px; color: var(--color-secondary); }
section.dark .squiggle { color: var(--color-on-dark-muted); }

/* ── Buttons: square ink blocks with a divider + arrow ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .9rem; padding: 1rem 1.4rem; border: 0; border-radius: 0; cursor: pointer;
  background: var(--color-secondary); color: var(--color-cream); font: 700 .8rem/1 var(--font-label); letter-spacing: .14em; text-transform: uppercase; white-space: nowrap;
  transition: background .25s ease, color .25s ease, transform .3s var(--ease), box-shadow .3s ease;
}
.btn .bar { width: 1px; height: 14px; background: currentColor; opacity: .45; }
.btn svg { width: 17px; height: 17px; transition: transform .3s var(--ease); }
.btn:hover { background: var(--color-primary); color: var(--color-on-primary); }
.btn:hover svg { transform: translateX(4px); }
.btn.orange { background: var(--color-primary); color: var(--color-on-primary); }
.btn.orange:hover { background: var(--color-cream); color: var(--color-secondary); }
.btn.light { background: var(--color-cream); color: var(--color-secondary); }
.btn.light:hover { background: var(--color-primary); }
.btn.ghost { background: transparent; color: var(--color-secondary); box-shadow: inset 0 0 0 1.5px var(--color-secondary); }
.btn.ghost:hover { background: var(--color-secondary); color: var(--color-cream); }
section.dark .btn.ghost, .on-dark .btn.ghost { color: var(--color-on-dark); box-shadow: inset 0 0 0 1.5px var(--color-on-dark-muted); }
section.dark .btn.ghost:hover { background: var(--color-cream); color: var(--color-secondary); }
.btn.small { padding: .75rem 1rem; font-size: .72rem; }
.btn[disabled] { opacity: .6; pointer-events: none; }
.link { display: inline-flex; align-items: center; gap: .55rem; font: 700 .78rem var(--font-label); letter-spacing: .14em; text-transform: uppercase; color: var(--color-secondary);
  border-bottom: 1.5px solid currentColor; padding-bottom: 3px; }
.link svg { width: 16px; height: 16px; transition: transform .3s var(--ease); }
.link:hover { color: var(--color-primary); }
.link:hover svg { transform: translateX(4px); }
section.dark .link { color: var(--color-on-dark); }
section.dark .link:hover { color: var(--color-primary); }

/* live open / closed status */
.status { display: inline-flex; align-items: center; gap: .55rem; font: 600 .8rem var(--font-label); letter-spacing: .1em; text-transform: uppercase; }
.status .dot { width: 9px; height: 9px; border-radius: 50%; background: #d1462f; box-shadow: 0 0 0 4px color-mix(in srgb, #d1462f 22%, transparent); }
.status.open .dot { background: #2fa463; box-shadow: 0 0 0 4px color-mix(in srgb, #2fa463 25%, transparent); animation: fw-pulse 2.4s ease-in-out infinite; }
@keyframes fw-pulse { 50% { box-shadow: 0 0 0 7px color-mix(in srgb, #2fa463 0%, transparent); } }

/* section heads */
.head { display: grid; gap: 1rem; margin-bottom: 56px; }
.head h2 { font-size: clamp(2.6rem, 6vw, 4.6rem); }
.head.split { grid-template-columns: 1fr minmax(0, 420px); align-items: end; gap: 28px 60px; }
.head.center { justify-items: center; text-align: center; }

/* filter / category tabs */
.tabs { display: flex; flex-wrap: wrap; gap: 6px 22px; }
.tabs button { position: relative; padding: .3rem 0; border: 0; background: none; cursor: pointer; color: var(--color-muted);
  font: 400 1.35rem/1 var(--font-heading); text-transform: uppercase; letter-spacing: .01em; transition: color .2s ease; }
.tabs button:hover { color: var(--color-secondary); }
.tabs button.on { color: var(--color-secondary); padding-left: 26px; }
.tabs button.on::before { content: ''; position: absolute; left: 0; top: 50%; width: 16px; height: 2px; background: var(--color-primary); }

/* ── Forms ── */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 18px; }
.form-grid .full { grid-column: 1 / -1; }
.form-grid label { display: block; font: 700 .72rem var(--font-label); letter-spacing: .14em; text-transform: uppercase; color: var(--color-secondary); margin-bottom: .45rem; }
.form-grid input, .form-grid select, .form-grid textarea {
  width: 100%; background: var(--color-cream); border: 1.5px solid var(--color-secondary); border-radius: 0; padding: .85rem 1rem; color: var(--color-secondary);
  transition: border-color .2s ease, box-shadow .2s ease;
}
.form-grid select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%);
  background-position: calc(100% - 20px) 52%, calc(100% - 15px) 52%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 2.4rem; }
.form-grid input:focus, .form-grid select:focus, .form-grid textarea:focus { outline: none; border-color: var(--color-primary); box-shadow: 4px 4px 0 var(--color-primary); }
.form-grid ::placeholder { color: var(--color-muted); }
.field-err { color: #b3261e; font-size: .82rem; margin-top: .35rem; }
.form-ok { display: flex; gap: 12px; align-items: flex-start; padding: 16px 18px; background: color-mix(in srgb, #2fa463 16%, var(--color-cream)); color: #1d5e3a; border-left: 4px solid #2fa463; }
.form-ok svg { width: 22px; height: 22px; flex: none; margin-top: 2px; }
.form-bad { padding: 12px 16px; background: #fbe5e1; color: #9b2a1d; font-size: .9rem; border-left: 4px solid #c43c2a; }

/* dash list */
.dash-list { list-style: none; display: grid; gap: .6rem; }
.dash-list li { position: relative; padding-left: 1.6rem; }
.dash-list li::before { content: ''; position: absolute; left: 0; top: .78em; width: 12px; height: 2px; background: var(--color-primary); }
.tick-list { list-style: none; display: grid; gap: .6rem; }
.tick-list li { position: relative; padding-left: 1.6rem; }
.tick-list li::before { content: ''; position: absolute; left: 0; top: .78em; width: 12px; height: 2px; background: var(--color-primary); }

.stars { display: inline-flex; gap: 2px; color: #e7a91d; }
.stars svg { width: 14px; height: 14px; fill: currentColor; }

/* vertical rotated caption */
.vtext { writing-mode: vertical-rl; transform: rotate(180deg); font: 700 .78rem var(--font-label); letter-spacing: .2em; text-transform: uppercase; color: var(--color-secondary); }

/* ── Logo ── */
.logo { display: inline-flex; align-items: center; gap: .6rem; font: 400 1.5rem/1 var(--font-heading); text-transform: uppercase; color: var(--color-secondary); letter-spacing: .02em; min-width: 0; }
.logo img { max-height: 42px; width: auto; max-width: min(46vw, 220px); object-fit: contain; }
.logo .wordmark { display: inline-flex; flex-direction: column; justify-content: center; line-height: 1; min-width: 0; }
.logo .wl { display: block; }
.logo .sub { display: block; margin-top: .3em; font: 600 .42em var(--font-label); letter-spacing: .14em; color: var(--color-muted); }

/* ══ Motion: section-enter animations (plugins/motion.client.ts) ══
   Hidden states apply only while html.fw-motion is set and the section has not
   entered the frame yet; --i staggers siblings, --d adds a fixed delay. */
.fw-motion [data-anim] {
  transition:
    opacity .8s var(--ease) calc(var(--i, 0) * 90ms + var(--d, 0ms)),
    transform 1s var(--ease) calc(var(--i, 0) * 90ms + var(--d, 0ms)),
    filter .9s var(--ease) calc(var(--i, 0) * 90ms + var(--d, 0ms)),
    clip-path 1.1s var(--ease) calc(var(--i, 0) * 90ms + var(--d, 0ms));
}
.fw-motion section:not(.fw-inview) [data-anim], .fw-motion footer:not(.fw-inview) [data-anim] { opacity: 0; }
.fw-motion section:not(.fw-inview) [data-anim="up"], .fw-motion footer:not(.fw-inview) [data-anim="up"] { transform: translateY(40px); }
.fw-motion section:not(.fw-inview) [data-anim="down"] { transform: translateY(-34px); }
.fw-motion section:not(.fw-inview) [data-anim="left"] { transform: translateX(60px); }
.fw-motion section:not(.fw-inview) [data-anim="right"] { transform: translateX(-60px); }
.fw-motion section:not(.fw-inview) [data-anim="zoom"] { transform: scale(.88); }
.fw-motion section:not(.fw-inview) [data-anim="pop"] { transform: translateY(18px) scale(.8) rotate(-6deg); }
.fw-motion section:not(.fw-inview) [data-anim="rise"] { clip-path: inset(0 0 100% 0); transform: translateY(40%); }
.fw-motion section.fw-inview [data-anim="rise"] { clip-path: inset(-10% -5% -20% -5%); }
.fw-motion section:not(.fw-inview) [data-anim="clip"] { opacity: 1; clip-path: inset(0 0 100% 0); }
.fw-motion section.fw-inview [data-anim="clip"] { clip-path: inset(0 0 0 0); }
.fw-motion [data-anim="clip"] img { transition: transform 1.6s var(--ease) calc(var(--i, 0) * 90ms + var(--d, 0ms)); }
.fw-motion section:not(.fw-inview) [data-anim="clip"] img { transform: scale(1.18); }
.fw-motion section:not(.fw-inview) [data-anim="draw"] { opacity: 1; transform: scaleX(0); transform-origin: left; }
.fw-motion [data-anim="draw"] { transition-duration: 1.4s; }
.fw-motion section:not(.fw-inview) [data-anim="block"] { opacity: 1; transform: scaleY(0); transform-origin: bottom; }

/* idle motion for doodles */
@keyframes fw-sway { 0%, 100% { transform: rotate(-4deg); } 50% { transform: rotate(4deg); } }
.sway { animation: fw-sway 7s ease-in-out infinite; transform-origin: 50% 20%; }
@keyframes fw-marquee { to { transform: translateX(-50%); } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .sway, .status.open .dot { animation: none; }
}
@media (max-width: 900px) {
  .head.split { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  :root { --section-pad-y: 78px; }
  .container { padding: 0 18px; }
  .form-grid { grid-template-columns: 1fr; }
  .head { margin-bottom: 38px; }
  .tabs button { font-size: 1.15rem; }
}
.logo .mark { flex: none; width: 14px; height: 14px; background: var(--color-primary); transform: rotate(45deg); box-shadow: 4px -4px 0 -1px var(--color-secondary); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
