/* Bench-Work — editorial/legal. Warm paper, ink, oxblood.
   Hairlines and section marks borrow from a well-set brief. */

:root {
  --paper:      #f7f3ec;
  --paper-deep: #efe9de;
  --ink:        #17140f;
  --ink-soft:   #4a4239;
  --ink-faint:  #8a7f70;
  --rule:       #ddd4c4;
  --accent:     #8c2f23;
  --accent-lit: #a8432c;

  --display: "Fraunces", "Iowan Old Style", Georgia, serif;
  --body:    "Karla", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --mono:    "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --measure: 34rem;
  --gutter: clamp(1.25rem, 5vw, 5.5rem);
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper:      #14120e;
    --paper-deep: #1c1913;
    --ink:        #f0ebe1;
    --ink-soft:   #b3aa9c;
    --ink-faint:  #7d7466;
    --rule:       #2e2920;
    --accent:     #d4674f;
    --accent-lit: #e8836a;
  }
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: clamp(1rem, 0.95rem + 0.2vw, 1.0625rem);
  line-height: 1.7;
  font-feature-settings: "kern" 1;
  -webkit-font-smoothing: antialiased;
}

/* Paper grain. Sits above the ground, below everything else. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.32;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)' opacity='0.5'/%3E%3C/svg%3E");
}
@media (prefers-color-scheme: dark) {
  body::before { mix-blend-mode: screen; opacity: 0.14; }
}

.wrap { position: relative; z-index: 1; max-width: 72rem; margin: 0 auto; padding: 0 var(--gutter); }

a { color: inherit; }

/* ---------- masthead ---------- */

header.masthead {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 2rem 0 1.1rem;
  border-bottom: 1px solid var(--rule);
  flex-wrap: wrap;
}

.wordmark {
  font-family: var(--display);
  font-variation-settings: "SOFT" 0, "WONK" 1, "opsz" 40, "wght" 600;
  font-size: 1.35rem;
  letter-spacing: -0.02em;
  text-decoration: none;
  white-space: nowrap;
}
.wordmark .dash { color: var(--accent); }

nav.masthead-nav {
  display: flex;
  gap: 1.75rem;
  font-family: var(--mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.13em;
}
nav.masthead-nav a {
  text-decoration: none;
  color: var(--ink-soft);
  padding-bottom: 0.2rem;
  border-bottom: 1px solid transparent;
  transition: color 0.25s, border-color 0.25s;
}
nav.masthead-nav a:hover,
nav.masthead-nav a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--accent); }

/* ---------- hero ---------- */

.hero { padding: clamp(4rem, 11vw, 9rem) 0 clamp(3rem, 7vw, 6rem); }

.hero h1 {
  font-family: var(--display);
  font-variation-settings: "SOFT" 0, "WONK" 1, "opsz" 144, "wght" 480;
  font-size: clamp(2.75rem, 8.5vw, 6.5rem);
  line-height: 0.94;
  letter-spacing: -0.035em;
  margin: 0 0 2rem;
  max-width: 16ch;
  text-wrap: balance;
}
.hero h1 em {
  font-style: italic;
  font-variation-settings: "SOFT" 40, "WONK" 1, "opsz" 144, "wght" 480;
  color: var(--accent);
}

.hero .standfirst {
  max-width: var(--measure);
  font-size: clamp(1.05rem, 1rem + 0.4vw, 1.3rem);
  line-height: 1.6;
  color: var(--ink-soft);
  margin: 0;
}

/* ---------- sections ---------- */

section.band { border-top: 1px solid var(--rule); padding: clamp(3rem, 7vw, 5.5rem) 0; }

.mark {
  font-family: var(--mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--accent);
  display: block;
  margin-bottom: 1.75rem;
}

.split { display: grid; grid-template-columns: 1fr; gap: 2rem clamp(2rem, 6vw, 5rem); }
@media (min-width: 56rem) { .split { grid-template-columns: 14rem 1fr; } }

h2.section-title {
  font-family: var(--display);
  font-variation-settings: "SOFT" 0, "WONK" 1, "opsz" 60, "wght" 520;
  font-size: clamp(1.6rem, 1.3rem + 1.4vw, 2.4rem);
  line-height: 1.12;
  letter-spacing: -0.025em;
  margin: 0;
  text-wrap: balance;
}

.prose { max-width: var(--measure); }
.prose p { margin: 0 0 1.15rem; }
.prose p:last-child { margin-bottom: 0; }
.prose strong { font-weight: 700; }

.lede { font-size: 1.15rem; line-height: 1.62; }

/* ---------- product index ---------- */

.index { border-top: 1px solid var(--rule); margin-top: 2.5rem; }

.entry {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.5rem 2rem;
  padding: 1.9rem 0;
  border-bottom: 1px solid var(--rule);
  text-decoration: none;
  position: relative;
  transition: background-color 0.3s;
}
@media (min-width: 48rem) {
  .entry { grid-template-columns: minmax(0, 15rem) minmax(0, 1fr) 8rem; align-items: baseline; }
}
.entry:hover { background: var(--paper-deep); }
.entry::after {
  content: "";
  position: absolute; left: 0; bottom: -1px; height: 1px; width: 0;
  background: var(--accent);
  transition: width 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}
.entry:hover::after { width: 100%; }

.entry-name {
  font-family: var(--display);
  font-variation-settings: "SOFT" 0, "WONK" 1, "opsz" 40, "wght" 560;
  font-size: 1.3rem;
  letter-spacing: -0.02em;
  line-height: 1.2;
}
.entry-name .arrow { color: var(--accent); opacity: 0; margin-left: 0.4rem; transition: opacity 0.25s, transform 0.25s; display: inline-block; }
.entry:hover .entry-name .arrow { opacity: 1; transform: translateX(3px); }

.entry-desc { color: var(--ink-soft); font-size: 0.95rem; line-height: 1.6; }

.entry-status {
  font-family: var(--mono);
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--ink-faint);
  white-space: nowrap;
}
.entry-status.live::before {
  content: "";
  display: inline-block;
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--accent);
  margin-right: 0.5rem;
  vertical-align: middle;
}

/* ---------- pull quote / principle list ---------- */

.principles { list-style: none; margin: 0; padding: 0; }
.principles li {
  padding: 1.35rem 0 1.35rem 0;
  border-bottom: 1px solid var(--rule);
  display: grid;
  gap: 0.35rem 1.5rem;
  grid-template-columns: 1fr;
}
@media (min-width: 44rem) { .principles li { grid-template-columns: 2.5rem 1fr; } }
.principles li:first-child { border-top: 1px solid var(--rule); }
.principles .n {
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--accent);
  letter-spacing: 0.1em;
  padding-top: 0.35rem;
}
.principles .t { font-weight: 700; display: block; margin-bottom: 0.15rem; }
.principles .d { color: var(--ink-soft); font-size: 0.95rem; line-height: 1.62; }

/* ---------- footer ---------- */

footer.colophon {
  border-top: 1px solid var(--rule);
  margin-top: clamp(3rem, 7vw, 5rem);
  padding: 2.5rem 0 4rem;
  display: flex;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
  font-family: var(--mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.11em;
  color: var(--ink-faint);
}
footer.colophon a { color: var(--ink-soft); text-decoration: none; border-bottom: 1px solid var(--rule); padding-bottom: 1px; }
footer.colophon a:hover { color: var(--accent); border-bottom-color: var(--accent); }
footer.colophon .links { display: flex; gap: 1.5rem; flex-wrap: wrap; }

/* ---------- entrance ---------- */

@media (prefers-reduced-motion: no-preference) {
  .rise { opacity: 0; transform: translateY(14px); animation: rise 0.85s cubic-bezier(0.22, 1, 0.36, 1) forwards; }
  .rise:nth-child(1) { animation-delay: 0.05s; }
  .rise:nth-child(2) { animation-delay: 0.16s; }
  .rise:nth-child(3) { animation-delay: 0.27s; }
  @keyframes rise { to { opacity: 1; transform: none; } }
}

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* ---------- contact form ---------- */

.contact-form { margin-top: 2rem; max-width: var(--measure); }
.contact-form label {
  display: block;
  font-family: var(--mono);
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.13em;
  color: var(--ink-faint);
  margin: 0 0 0.45rem;
}
.contact-form input,
.contact-form textarea {
  width: 100%;
  background: transparent;
  color: var(--ink);
  border: 0;
  border-bottom: 1px solid var(--rule);
  padding: 0.5rem 0;
  font: inherit;
  font-size: 1rem;
  border-radius: 0;
  transition: border-color 0.25s;
}
.contact-form textarea { resize: vertical; line-height: 1.6; }
.contact-form input:focus,
.contact-form textarea:focus { outline: none; border-bottom-color: var(--accent); }
.contact-form input::placeholder,
.contact-form textarea::placeholder { color: var(--ink-faint); opacity: 0.75; }

.field-row { display: grid; grid-template-columns: 1fr; gap: 1.5rem; margin-bottom: 1.5rem; }
@media (min-width: 34rem) { .field-row { grid-template-columns: 1fr 1fr; } }

.contact-form .submit {
  font-family: var(--mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--accent);
  padding: 0.75rem 2rem;
  cursor: pointer;
  transition: background-color 0.25s, color 0.25s;
}
.contact-form .submit:hover { background: var(--accent); color: var(--paper); }

/* Honeypot. Clipped rather than pushed off-canvas: a -9999px offset extends the
   document box and gives the whole page a horizontal scrollbar. */
.contact-form .hp {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0; border: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}
