/* sethlevanen.com — brand tokens from the approved Seth Levanen kit (Oct 2026) */
@font-face {
  font-family: "Bricolage Grotesque";
  src: url("fonts/bricolage-grotesque.woff2") format("woff2-variations");
  font-weight: 200 800;
  font-stretch: 75% 100%;
  font-display: swap;
}
@font-face {
  font-family: "Instrument Sans";
  src: url("fonts/instrument-sans-400.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Instrument Sans";
  src: url("fonts/instrument-sans-400-italic.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Instrument Sans";
  src: url("fonts/instrument-sans-600.woff2") format("woff2");
  font-weight: 600;
  font-display: swap;
}

:root {
  --bone: #EFEDE7;
  --ink: #1C1B19;
  --pine: #1F4D46;
  --saffron: #F5B301;
  --stone: #5E5A52;
  --line: #D6D2C8;
  --bone-on-pine: #E4EBE8;

  --display: "Bricolage Grotesque", "Arial Narrow", system-ui, sans-serif;
  --body: "Instrument Sans", system-ui, -apple-system, "Segoe UI", sans-serif;

  --measure: 66ch;
  --wide: 1120px;
  --gutter: clamp(16px, 4vw, 40px);
  --cut: 28px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bone);
  color: var(--ink);
  font-family: var(--body);
  font-size: 1.0625rem;
  line-height: 1.6;
  text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; }

a { color: var(--pine); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--pine); outline-offset: 3px; border-radius: 2px; }

.skip {
  position: absolute; left: -9999px; top: 8px;
  background: var(--ink); color: var(--bone); padding: 8px 14px; z-index: 10;
}
.skip:focus { left: 8px; }

.wrap { max-width: var(--wide); margin: 0 auto; padding: 0 var(--gutter); }

/* ---------- Header ---------- */
.site-head { padding: 22px 0; }
.site-head .wrap {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px 28px;
}
.brand {
  display: flex; align-items: center; gap: 12px;
  color: var(--ink); text-decoration: none;
  font-family: var(--display); font-weight: 700; font-size: 1.2rem; letter-spacing: -0.01em;
}
.brand svg { width: 40px; height: 40px; flex: none; }
.nav { display: flex; flex-wrap: wrap; gap: 4px 22px; margin: 0; padding: 0; list-style: none; }
.nav a {
  color: var(--ink); text-decoration: none; font-weight: 600; font-size: 0.98rem;
  padding: 6px 0; border-bottom: 2px solid transparent;
}
.nav a:hover { border-bottom-color: var(--ink); }
.nav a[aria-current="page"] { border-bottom-color: var(--saffron); }

/* ---------- Type ---------- */
h1, h2, h3 {
  font-family: var(--display);
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin: 0 0 0.5em;
  font-weight: 700;
}
h1 { font-size: clamp(2.6rem, 6.4vw, 5.4rem); font-weight: 800; font-stretch: 88%; letter-spacing: -0.035em; line-height: 0.98; }
h2 { font-size: clamp(1.8rem, 3.4vw, 2.6rem); }
h3 { font-size: 1.35rem; letter-spacing: -0.01em; line-height: 1.2; }
p { margin: 0 0 1.1em; max-width: var(--measure); }
.lede { font-size: clamp(1.15rem, 1.8vw, 1.32rem); line-height: 1.55; color: var(--ink); }
.muted { color: var(--stone); }

/* ---------- Buttons ---------- */
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.btn {
  display: inline-block; font-weight: 600; text-decoration: none;
  padding: 13px 22px; border: 2px solid var(--ink); border-radius: 4px;
  color: var(--ink); background: transparent; line-height: 1.2;
}
.btn:hover { background: var(--ink); color: var(--bone); }
/* Saffron on Bone always carries an Ink border (brand legibility rule) */
.btn-primary { background: var(--saffron); color: var(--ink); }
.btn-primary:hover { background: var(--ink); color: var(--saffron); }

/* ---------- Hero ---------- */
.hero { padding: clamp(36px, 7vw, 88px) 0 clamp(48px, 8vw, 104px); }
.hero .wrap { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(260px, 420px); gap: clamp(28px, 5vw, 72px); align-items: center; }
.hero h1 { max-width: 12ch; }
.hero .lede { margin-top: 1.2em; }

.smartcut { width: 100%; height: auto; }
.smartcut .route { fill: none; stroke: var(--ink); stroke-width: 3; stroke-dasharray: 2 9; stroke-linecap: round; }
.smartcut .cutline { fill: none; stroke: var(--saffron); stroke-width: 12; stroke-linecap: butt; }
.smartcut .node { fill: var(--bone); stroke: var(--ink); stroke-width: 3; }
.smartcut .node-end { fill: var(--ink); }
.smartcut text { font-family: var(--body); font-size: 15px; fill: var(--stone); }
.smartcut text.strong { fill: var(--ink); font-weight: 600; }

/* ---------- Sections ---------- */
.section { padding: clamp(48px, 7vw, 88px) 0; border-top: 1px solid var(--line); }
.section-head { max-width: var(--measure); margin-bottom: 36px; }

.focus-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 clamp(24px, 4vw, 56px); }
.focus-list li { border-top: 3px solid var(--ink); padding-top: 18px; }
.focus-list p { font-size: 1rem; }

/* The one signature device: a pine block with the top-right corner cut off */
.cut {
  position: relative;
  background: var(--pine); color: var(--bone-on-pine);
  clip-path: polygon(0 0, calc(100% - var(--cut) * 2) 0, 100% calc(var(--cut) * 2), 100% 100%, 0 100%);
  padding: clamp(32px, 5vw, 64px);
}
.cut h2, .cut h3 { color: var(--bone); }
.cut a { color: var(--bone); }
.cut .btn { border-color: var(--bone); color: var(--bone); }
.cut .btn:hover { background: var(--bone); color: var(--pine); }
.cut .btn-primary { background: var(--saffron); border-color: var(--saffron); color: var(--ink); }
.cut .btn-primary:hover { background: var(--bone); border-color: var(--bone); color: var(--ink); }
.cut-wrap { position: relative; }
.cut-wrap::after {
  /* the detached saffron bar, parallel to the cut, echoing the monogram */
  content: ""; position: absolute;
  width: calc(var(--cut) * 1.8); height: 10px; background: var(--saffron);
  top: calc(var(--cut) * 0.8 - 5px); right: calc(var(--cut) * -0.1);
  transform: rotate(45deg);
}
.paths { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(28px, 5vw, 64px); margin-top: 8px; }
.paths p { max-width: 46ch; }

/* ---------- Interior pages ---------- */
.page-head { padding: clamp(32px, 6vw, 72px) 0 clamp(24px, 4vw, 40px); }
.page-head h1 { font-size: clamp(2.3rem, 5.2vw, 4.2rem); max-width: 16ch; }
.prose { padding-bottom: clamp(48px, 7vw, 88px); }
.prose h2 { font-size: clamp(1.5rem, 2.6vw, 2rem); margin-top: 1.6em; }
.prose ul { padding-left: 1.2em; max-width: var(--measure); }
.prose li { margin-bottom: 0.5em; }
.updated { color: var(--stone); font-size: 0.95rem; }

.project { border-top: 3px solid var(--ink); padding: 24px 0 8px; margin-top: 32px; max-width: 78ch; }
.project .status { color: var(--stone); font-size: 0.95rem; margin-bottom: 0.6em; }
.facts { display: grid; grid-template-columns: max-content 1fr; gap: 6px 20px; margin: 0 0 1.2em; max-width: var(--measure); }
.facts dt { font-weight: 600; }
.facts dd { margin: 0; }

.contact-line { font-family: var(--display); font-size: clamp(1.4rem, 3.6vw, 2.4rem); font-weight: 700; letter-spacing: -0.02em; margin: 0.2em 0 0.8em; word-break: break-word; }
.contact-line a { color: var(--ink); text-decoration-color: var(--saffron); text-decoration-thickness: 4px; text-underline-offset: 6px; }

/* ---------- Footer ---------- */
.site-foot { border-top: 1px solid var(--line); padding: 32px 0 40px; color: var(--stone); font-size: 0.95rem; }
.site-foot .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px 32px; }
.site-foot ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 20px; }
.site-foot a { color: var(--ink); }
.site-foot p { margin: 0; }

/* ---------- Responsive ---------- */
@media (max-width: 820px) {
  .hero .wrap { grid-template-columns: 1fr; }
  .hero-art { max-width: 460px; }
  .focus-list { grid-template-columns: 1fr; gap: 28px; }
  .paths { grid-template-columns: 1fr; }
  :root { --cut: 20px; }
}
@media (max-width: 480px) {
  .facts { grid-template-columns: 1fr; gap: 2px; }
  .facts dd { margin-bottom: 10px; }
  .btn { width: 100%; text-align: center; }
}
@media (prefers-reduced-motion: no-preference) {
  .smartcut .cutline { stroke-dasharray: 400; stroke-dashoffset: 400; animation: draw 0.9s 0.35s ease-out forwards; }
  @keyframes draw { to { stroke-dashoffset: 0; } }
}
@media print {
  .site-head nav, .actions, .site-foot ul { display: none; }
  body { background: #fff; }
}
.prose .project h2 { margin-top: 0; }

/* Portrait with the brand cut corner */
.portrait { margin: 0; justify-self: end; width: 100%; max-width: 420px; }
.portrait img { width: 100%; height: auto; clip-path: polygon(0 0, calc(100% - var(--cut) * 2) 0, 100% calc(var(--cut) * 2), 100% 100%, 0 100%); }
.facts-line { font-weight: 600; font-size: 1rem; color: var(--ink); margin-top: 1.2em; border-left: 4px solid var(--saffron); padding-left: 14px; }
.section-head.split { max-width: none; display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 72px); align-items: center; }
.section-head.split .hero-art { max-width: 420px; justify-self: end; }
@media (max-width: 820px) {
  .portrait { justify-self: start; max-width: 70vw; order: -1; }
  .section-head.split { grid-template-columns: 1fr; }
  .section-head.split .hero-art { justify-self: start; max-width: 380px; }
}

/* Header action, diagrams, screen-reader text (added 2026-10-17) */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.nav a.nav-cta { border: 2px solid var(--ink); border-radius: 4px; padding: 4px 14px; }
.nav a.nav-cta:hover { background: var(--ink); color: var(--bone); border-color: var(--ink); }
.diagram { margin: 32px 0 0; border: 1px solid var(--line); overflow-x: auto; }
.diagram img { width: 100%; min-width: 1000px; height: auto; }
.scroll-hint { display: none; }
@media (max-width: 1060px) { .scroll-hint { display: inline; } }
.diagram figcaption { padding: 12px 16px; border-top: 1px solid var(--line); color: var(--stone); font-size: 0.95rem; }

/* Blog and shop (added 2026-10-22) */
.post-list { list-style: none; margin: 0; padding: 0 0 clamp(48px, 7vw, 88px); max-width: 78ch; }
.post-item { border-top: 3px solid var(--ink); padding: 22px 0 8px; margin-top: 28px; }
.post-item h2 { font-size: clamp(1.4rem, 2.6vw, 1.9rem); margin: 0.1em 0 0.4em; }
.post-item h2 a { color: var(--ink); text-decoration-color: var(--saffron); text-decoration-thickness: 3px; text-underline-offset: 5px; }
.post-item .updated, .page-head .updated { margin-bottom: 0.4em; }
.post { max-width: var(--measure); }
.post blockquote { margin: 1.4em 0; padding: 14px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); color: var(--ink); }
.post blockquote p { margin: 0; }
.post ol { padding-left: 1.3em; max-width: var(--measure); }
.post-foot { margin-top: 2.4em; padding-top: 1.2em; border-top: 1px solid var(--line); }
.page-head .updated a { color: var(--stone); }
.price { font-family: var(--display); font-size: 1.6rem; font-weight: 700; margin-bottom: 0.4em; }
.product .actions { margin-top: 8px; }

/* Grouped blog index (added 2026-10-22) */
.post-groups { padding-bottom: clamp(48px, 7vw, 88px); }
.post-group { margin-top: clamp(32px, 5vw, 56px); }
.post-group > h2 { font-size: clamp(1.5rem, 2.6vw, 2rem); margin-bottom: 0.2em; }
.post-group .count { color: var(--stone); font-weight: 600; font-size: 0.7em; }
.post-group .post-list { padding-bottom: 0; }
.post-item h3 { font-size: clamp(1.15rem, 2vw, 1.4rem); margin: 0.1em 0 0.35em; }
.post-item h3 a { color: var(--ink); text-decoration-color: var(--saffron); text-decoration-thickness: 3px; text-underline-offset: 5px; }

/* Product pages (added 2026-11-05) */
.product-top { display: grid; grid-template-columns: minmax(0, 340px) minmax(0, 1fr); gap: clamp(24px, 5vw, 64px); align-items: start; margin-bottom: clamp(32px, 5vw, 56px); }
.cover { margin: 0; border: 1px solid var(--line); }
.cover img { width: 100%; height: auto; }
.cover-type .cut { aspect-ratio: 8.5 / 11; display: flex; flex-direction: column; justify-content: flex-end; padding: 28px; }
.cover-type .cover-title { font-family: var(--display); font-weight: 800; font-size: clamp(1.8rem, 4vw, 2.4rem); line-height: 1; letter-spacing: -0.03em; color: var(--bone); margin: 0 0 0.6em; }
.cover-type .cut p { max-width: none; }
.buybox .price { font-size: clamp(2rem, 4vw, 2.8rem); margin: 0 0 0.3em; }
.buybox .facts { margin: 0.4em 0 0; }
.buybox .muted { font-size: 0.95rem; margin-top: 1em; }
.product-body { max-width: var(--measure); }
.product-body ol { padding-left: 1.3em; }
.product article h2 a, .product h2 a { color: var(--ink); text-decoration-color: var(--saffron); text-decoration-thickness: 3px; text-underline-offset: 5px; }
@media (max-width: 820px) { .product-top { grid-template-columns: 1fr; } .cover { max-width: 300px; } }
