/* DIB Works — dib.works */

@font-face {
  font-family: "Newsreader";
  font-style: normal;
  font-display: swap;
  font-weight: 200 800;
  src: url("newsreader.woff2") format("woff2-variations"), url("newsreader.woff2") format("woff2");
}
@font-face {
  font-family: "Hanken Grotesk";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url("hanken-grotesk.woff2") format("woff2-variations"), url("hanken-grotesk.woff2") format("woff2");
}

:root {
  --navy: #041b28;
  --ivory: #fff8ee;
  --muted: #d9e3e7;
  --orange: #ff8a00;
  --cyan: #22e4ee;
  --line: rgba(255, 248, 238, 0.5);
  --line-soft: rgba(255, 248, 238, 0.3);
  --serif: "Newsreader", Georgia, "Times New Roman", serif;
  --sans: "Hanken Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
  --gap: clamp(72px, 8vw, 112px);
  --gutter: clamp(20px, 3.6vw, 64px);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--navy);
  color: var(--ivory);
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; }
a:hover { color: #ffffff; }
:focus-visible { outline: 3px solid var(--orange); outline-offset: 3px; border-radius: 4px; }
[hidden] { display: none !important; }

.skip {
  position: absolute; left: -9999px; top: 12px; z-index: 10;
  background: var(--ivory); color: var(--navy);
  padding: 10px 14px; border-radius: 6px; font-weight: 600; text-decoration: none;
}
.skip:focus { left: 16px; }

.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;
}

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

/* Header ------------------------------------------------------------ */
.site-header {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 0 32px; padding: clamp(14px, 2vw, 26px) 0;
}
.wordmark {
  font-family: var(--serif); font-size: clamp(1.5rem, 2.1vw, 1.8rem); font-weight: 600;
  letter-spacing: -0.01em; color: var(--orange); text-decoration: none; padding: 8px 0;
}
.wordmark:hover { color: var(--orange); }
.menu-toggle {
  display: none; width: 44px; height: 44px; margin-right: -10px; padding: 0;
  align-items: center; justify-content: center;
  background: none; border: 0; border-radius: 8px; color: var(--ivory); cursor: pointer;
}
.menu-toggle .icon-close, .menu-toggle[aria-expanded="true"] .icon-open { display: none; }
.menu-toggle[aria-expanded="true"] .icon-close { display: block; }
.nav { display: flex; flex-wrap: wrap; gap: 0 clamp(18px, 2.6vw, 36px); }
.nav a {
  font-family: var(--serif); font-size: clamp(1rem, 1.45vw, 1.25rem);
  color: var(--ivory); text-decoration: none; padding: 11px 0;
}
.nav a:hover { text-decoration: underline; text-decoration-color: var(--orange); text-decoration-thickness: 2px; text-underline-offset: 6px; }

/* Hero -------------------------------------------------------------- */
/* Fills the first screen; the strip marks its bottom edge. */
.hero {
  --h1: clamp(5rem, 10.4vw, 9.75rem);
  display: flex; flex-direction: column;
  min-height: min(calc(100svh - var(--header-h, 104px)), 1040px);
}
.hero-row { flex: 1; display: flex; align-items: center; }
.hero-inner {
  display: flex; align-items: flex-end; gap: 56px; width: 100%;
  padding: clamp(24px, 4vh, 48px) 0 clamp(32px, 5vh, 56px);
}
.hero-text { flex: 0 0 auto; min-width: 0; }
.hero-art { flex: 1 1 auto; min-width: 0; max-width: 760px; margin-left: auto; }
.hero-art img { width: 100%; height: auto; }
h1 {
  margin: 0; font-family: var(--serif); font-size: var(--h1, clamp(5rem, 10.4vw, 9.75rem));
  line-height: 0.88; font-weight: 600; letter-spacing: -0.035em; color: var(--ivory);
}
h1 span { display: block; }
.underline { width: calc(var(--h1) * 2.45); max-width: 100%; height: auto; margin: calc(var(--h1) * -0.1) 0 34px; }
.purpose {
  margin: 0; font-family: var(--serif); font-size: clamp(1.375rem, 2vw, 1.875rem);
  line-height: 1.2; font-weight: 500; color: var(--ivory);
}
.hero-strip {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 6px 24px;
  border-top: 1px solid rgba(255, 248, 238, 0.18); padding: 18px 0 22px;
  font-size: 1rem; color: var(--ivory);
}
.hero-strip p { margin: 0; }
.hero-products a { color: var(--cyan); text-decoration: none; }
.hero-products a:hover { color: var(--cyan); text-decoration: underline; text-decoration-color: var(--orange); text-underline-offset: 5px; }
.hero-products span { color: var(--muted); }

/* Narrower screens: stack the drawing under the text. */
@media (max-width: 1023px) {
  .hero { min-height: 0; }
  .hero-inner { flex-direction: column; align-items: stretch; gap: 36px; padding: 20px 0 40px; }
  .hero-art { max-width: 680px; margin-left: 0; }
}

/* Section headings -------------------------------------------------- */
.section { padding-top: var(--gap); }
.section-title { color: var(--orange); }
h2 {
  margin: 0; font-family: var(--serif); font-size: clamp(2.125rem, 3.2vw, 2.75rem);
  line-height: 1.1; font-weight: 600;
}
.section-head {
  display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between;
  gap: 6px 24px; margin-bottom: 12px;
}
.intro { margin: 0 0 24px; max-width: 62ch; font-size: 1.0625rem; line-height: 1.55; color: var(--muted); }

/* Products carousel ------------------------------------------------- */
.carousel-controls {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 8px 24px; margin-bottom: 16px;
}
.product-picker { display: flex; flex-wrap: wrap; gap: 0 clamp(18px, 3vw, 40px); }
.product-picker button {
  background: none; border: 0; border-bottom: 3px solid transparent; border-radius: 0;
  padding: 8px 0 6px; min-height: 44px; cursor: pointer;
  font-family: var(--serif); font-size: clamp(1.125rem, 1.6vw, 1.375rem); font-weight: 500;
  color: var(--muted);
}
.product-picker button:hover { color: var(--ivory); }
.product-picker button[aria-pressed="true"] { color: var(--ivory); border-bottom-color: var(--orange); }
.arrows { display: flex; gap: 8px; }
.arrows button {
  width: 44px; height: 44px; display: flex; align-items: center; justify-content: center;
  background: none; border: 0; border-radius: 8px; padding: 0; cursor: pointer;
}
.arrows button:hover { background: rgba(255, 248, 238, 0.06); }

.cards { display: grid; gap: 20px; grid-template-columns: repeat(2, minmax(0, 1fr)); }

.card {
  position: relative; display: flex; flex-direction: column; gap: 12px; min-width: 0;
  border: 1px solid rgba(255, 248, 238, 0.45); border-radius: 16px;
  padding: 14px 14px 18px; background: rgba(255, 248, 238, 0.035);
}
.card:hover { border-color: rgba(255, 248, 238, 0.85); }
.shot { width: 100%; height: auto; aspect-ratio: 1.9; object-fit: cover; object-position: top; border-radius: 8px; }
.card-title { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding-top: 4px; }
h3 { margin: 0; font-family: var(--serif); font-size: 1.6875rem; line-height: 1.1; font-weight: 600; }
.card-title a { color: var(--ivory); text-decoration: none; display: inline-flex; align-items: center; gap: 8px; }
.card-title a::after { content: ""; position: absolute; inset: 0; border-radius: 16px; }
.card-title a:hover { text-decoration: underline; text-underline-offset: 5px; text-decoration-thickness: 1.5px; }
.card-title svg { flex: none; }
.tag {
  font-size: 0.6875rem; line-height: 1; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--ivory); border: 1px solid var(--line); border-radius: 999px; padding: 5px 9px;
}
.card p { margin: 0; font-size: 1rem; line-height: 1.45; color: var(--muted); }
.card .domain { margin-top: auto; font-size: 0.875rem; }

/* How we build ------------------------------------------------------ */
.principles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 30px; }
.principle { display: flex; flex-direction: column; gap: 14px; min-width: 0; padding: 4px 36px; border-left: 1px solid var(--line); }
.principle:first-child { padding-left: 0; border-left: 0; }
.principle img { width: 102px; height: 68px; }
.principle h3 { font-size: 1.5625rem; line-height: 1.15; }
.principle p { margin: 0; font-size: 1rem; line-height: 1.5; color: var(--muted); }

/* Footer ------------------------------------------------------------ */
.site-footer {
  margin-top: var(--gap); border-top: 1px solid var(--line); padding: 28px 0 44px;
  display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between;
  gap: 22px 48px; font-size: 0.9375rem; line-height: 1.6; color: var(--muted);
}
.site-footer p { margin: 0; }
.footer-name { font-family: var(--serif); font-size: 1.1875rem; font-weight: 600; color: var(--ivory); margin-bottom: 6px !important; }
.footer-links { display: flex; flex-direction: column; align-items: flex-start; }
.footer-links a { color: var(--ivory); padding: 4px 0; }
.footer-links p { margin-top: 8px; }

/* Legal page -------------------------------------------------------- */
.legal { max-width: 720px; padding-top: clamp(32px, 5vw, 72px); }
.legal h1 { font-size: clamp(2.75rem, 5vw, 4rem); line-height: 1; letter-spacing: -0.02em; margin-bottom: 10px; }
.legal h2 { font-size: 1.75rem; line-height: 1.2; margin: 40px 0 10px; }
.legal p { margin: 0 0 12px; font-size: 1.0625rem; line-height: 1.6; color: var(--muted); }
.legal p a { color: var(--ivory); }
.policy-list { margin-top: 8px; border-bottom: 1px solid var(--line-soft); }
.policy {
  display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between;
  gap: 4px 24px; padding: 14px 0; border-top: 1px solid var(--line-soft);
}
.policy h3 { font-size: 1.375rem; }
.policy div { display: flex; flex-wrap: wrap; gap: 0 22px; font-size: 0.9375rem; }
.policy a { color: var(--ivory); padding: 6px 0; }

/* 404 --------------------------------------------------------------- */
.notfound { padding: clamp(48px, 8vw, 120px) 0 0; max-width: 640px; }
.notfound h1 { font-size: clamp(3.5rem, 8vw, 6rem); }
.notfound p { font-family: var(--serif); font-size: clamp(1.375rem, 2vw, 1.75rem); line-height: 1.25; margin: 20px 0 0; }
.notfound a { color: var(--ivory); }

/* Small screens ----------------------------------------------------- */
@media (max-width: 767px) {
  .site-header.menu-ready .menu-toggle { display: inline-flex; }
  .site-header.menu-ready .nav {
    display: none; flex-basis: 100%; flex-direction: column;
    margin-top: 6px; padding: 6px 0 4px; border-top: 1px solid var(--line-soft);
  }
  .site-header.menu-ready.open .nav { display: flex; }
  .site-header.menu-ready .nav a { font-size: 1.1875rem; padding: 12px 0; }
  .br-wide { display: none; }
  .purpose { font-size: 1.5rem; max-width: 19ch; text-wrap: balance; }
  .hero-inner { padding: 16px 0 32px; }
  .hero-strip { flex-direction: column; align-items: flex-start; }
  .cards { grid-template-columns: 1fr; }
  .cards:not(.ready) > .card:nth-child(n+2) { display: none; }
  .shot { aspect-ratio: 6 / 5; }
  .principles { grid-template-columns: 1fr; }
  .principle { padding: 28px 0; border-left: 0; border-top: 1px solid rgba(255, 248, 238, 0.4); }
  .principle:first-child { padding: 4px 0 28px; border-top: 0; }
}
