/* ============================================================
   PAPER & QUILL — site-wide styles
   Imports the design tokens and adds layout/chrome shared
   across every page. Keep this file lean — only cross-page
   conventions live here.
   ============================================================ */

@import url("./colors_and_type.css");

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body { background: var(--paper); color: var(--ink); }
img { display: block; max-width: 100%; }
button { font: inherit; }

/* ---------- Layout primitives ---------- */
.container       { max-width: 72rem; margin-inline: auto; padding-inline: clamp(1.25rem, 4vw, 3rem); }
.container.wide  { max-width: 84rem; }
.container.prose { max-width: 42rem; }

.section         { padding-block: clamp(4rem, 8vw, 8rem); }
.section.tight   { padding-block: clamp(2.5rem, 5vw, 5rem); }
.section.paper   { background: var(--paper); }
.section.linen   { background: var(--linen); }
.section.white   { background: var(--white); }
.section.ink     { background: var(--ink); color: var(--paper); }
.section.stone   { background: var(--stone); }

.rule          { height: 1px; background: var(--rule); border: 0; width: 100%; }
.rule.ink      { background: var(--ink); }
.rule.accent   { background: var(--ember); }
.rule.on-dark  { background: rgba(241,241,241,0.18); }
.rule.short    { width: 40px; }

/* ---------- Type helpers ---------- */
.eyebrow {
  font-family: var(--font-sans);
  font-size: 0.75rem; font-weight: 500;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--ash); line-height: 1; display: inline-block;
}
.eyebrow.accent { color: var(--ember); }
.eyebrow.on-dark { color: #e7a99a; }

.display {
  font-family: var(--font-display);
  font-size: clamp(2.75rem, 4vw + 1rem, 5rem);
  line-height: 1.05; letter-spacing: -0.015em; font-weight: 400;
  text-wrap: balance; margin: 0;
}
.display em, .display .em { color: inherit; font-style: italic; }

.h2 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 3vw + 1rem, 3.25rem);
  line-height: 1.1; letter-spacing: -0.015em; font-weight: 400;
  text-wrap: balance; margin: 0;
}
.h3 {
  font-family: var(--font-serif);
  font-size: clamp(1.5rem, 1vw + 1rem, 2rem);
  line-height: 1.15; letter-spacing: -0.005em; font-weight: 400;
  text-wrap: balance; margin: 0;
}
.lede {
  font-family: var(--font-sans);
  font-size: 1.375rem; line-height: 1.45;
  letter-spacing: -0.03em; color: var(--bark);
  font-weight: 400; text-wrap: pretty; margin: 0;
}
.body {
  font-size: var(--fs-body); line-height: 1.6;
  letter-spacing: -0.03em; color: var(--bark); margin: 0;
}
.caption {
  font-family: var(--font-caption); font-style: italic;
  font-size: 0.875rem; color: var(--ash); margin: 0;
}

a.inline {
  color: var(--ink); border-bottom: 1px solid var(--ash);
  text-decoration: none; padding-bottom: 1px;
  transition: color 200ms var(--ease-out), border-color 200ms var(--ease-out);
}
a.inline:hover { color: var(--ember); border-color: var(--ember); }

a.arrow {
  font-family: var(--font-sans); font-size: 0.9375rem; font-weight: 500;
  letter-spacing: -0.02em; color: var(--ember); border-bottom: 1px solid var(--ember);
  padding-bottom: 2px; text-decoration: none;
}
a.arrow:hover { color: var(--ember-deep); border-color: var(--ember-deep); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-sans); font-size: 0.9375rem; font-weight: 500;
  letter-spacing: -0.02em; line-height: 1.2;
  padding: 0.875rem 1.5rem; border-radius: 4px; border: 1px solid transparent;
  cursor: pointer; text-decoration: none;
  transition: all 200ms var(--ease-out);
}
.btn.primary    { background: var(--ember); color: var(--paper); border-color: var(--ember); }
.btn.primary:hover { background: var(--ember-deep); border-color: var(--ember-deep); }
.btn.secondary  { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn.secondary:hover { background: rgba(24,22,13,0.04); }
.btn.secondary-light { background: transparent; color: var(--paper); border-color: var(--paper); }
.btn.secondary-light:hover { background: rgba(241,241,241,0.08); }
.btn.ghost {
  background: transparent; color: var(--ink); border: 0; border-bottom: 1px solid var(--ink);
  border-radius: 0; padding: 0.5rem 0.125rem;
}
.btn.ghost:hover { color: var(--ember); border-bottom-color: var(--ember); }
.btn.pill {
  background: var(--ember); color: var(--paper); border-radius: 999px;
  padding: 0.875rem 1.75rem; box-shadow: 0 12px 32px -12px rgba(193,69,40,0.55);
}
.btn.pill:hover { background: var(--ember-deep); }

/* ---------- Header / Nav ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--paper);
  border-bottom: 1px solid transparent;
  transition: border-color 280ms ease;
}
.site-header.scrolled { border-bottom-color: var(--rule); }
.site-header-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 72px;
}
.site-header .logo { display: flex; align-items: center; border: 0; }
.site-header .logo img { height: 36px; }
.site-nav { display: flex; gap: 32px; align-items: center; }
.site-nav a {
  font-family: var(--font-sans); font-size: 0.9375rem;
  letter-spacing: -0.03em; color: var(--bark); text-decoration: none;
  padding-bottom: 2px; border-bottom: 1px solid transparent;
  transition: color 200ms, border-color 200ms;
}
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--ember); border-bottom-color: var(--ember); }
.nav-toggle {
  display: none; background: transparent; border: 0; cursor: pointer;
  width: 40px; height: 40px; padding: 0; color: var(--ink);
  align-items: center; justify-content: center;
}
.nav-toggle svg { width: 24px; height: 24px; }

/* mobile drawer */
.mobile-drawer {
  position: fixed; inset: 72px 0 0 0; z-index: 49;
  background: var(--paper);
  transform: translateY(-8px); opacity: 0; pointer-events: none;
  transition: transform 280ms var(--ease-out), opacity 280ms var(--ease-out);
  overflow-y: auto;
}
.mobile-drawer.open { transform: translateY(0); opacity: 1; pointer-events: auto; }
.mobile-drawer ul {
  list-style: none; padding: clamp(1.25rem, 4vw, 3rem); margin: 0;
  display: flex; flex-direction: column; gap: 0;
  border-top: 1px solid var(--rule);
}
.mobile-drawer li { border-bottom: 1px solid var(--rule); }
.mobile-drawer a {
  display: block; padding: 20px 0;
  font-family: var(--font-serif); font-size: 1.5rem; color: var(--ink);
  text-decoration: none; letter-spacing: -0.01em;
}
.mobile-drawer a:hover { color: var(--ember); }
.mobile-drawer .cta-row { padding: clamp(1.25rem, 4vw, 3rem); padding-top: 0; }

@media (max-width: 880px) {
  .site-nav { display: none; }
  .nav-toggle { display: inline-flex; }
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--ink); color: var(--paper);
  padding-block: clamp(3rem, 5vw, 5rem) 1.5rem;
}
.site-footer .top {
  display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 32px;
  padding-bottom: 2rem; border-bottom: 1px solid rgba(241,241,241,0.18);
}
.site-footer .col h4 {
  font-family: var(--font-sans); font-size: 0.75rem; font-weight: 500;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--ash); margin: 0 0 1rem 0;
}
.site-footer .col.accent h4 { color: var(--ember); }
.site-footer .col ul {
  list-style: none; padding: 0; margin: 0;
  display: flex; flex-direction: column; gap: 10px;
  font-family: var(--font-sans); font-size: 0.9375rem;
  letter-spacing: -0.03em; color: var(--stone);
}
.site-footer .col a { color: inherit; text-decoration: none; border-bottom: 1px solid transparent; padding-bottom: 1px; }
.site-footer .col a:hover { color: var(--paper); border-bottom-color: rgba(241,241,241,0.4); }
.site-footer .brandblock { display: flex; flex-direction: column; gap: 1rem; }
.site-footer .brandblock .lockup { display: flex; align-items: center; gap: 12px; }
.site-footer .brandblock .lockup img.wm { height: 16px; }
.site-footer .tagline {
  font-family: var(--font-caption); font-style: italic;
  font-size: 1rem; line-height: 1.5; color: var(--stone);
  margin: 0; max-width: 20rem;
}
.site-footer .bottom {
  display: flex; justify-content: space-between; align-items: center;
  padding-top: 1.25rem; flex-wrap: wrap; gap: 16px;
  font-family: var(--font-sans); font-size: 0.8125rem;
  color: var(--ash); letter-spacing: -0.03em;
}
.site-footer .bottom em { font-family: var(--font-caption); font-style: italic; color: var(--stone); }
@media (max-width: 880px) {
  .site-footer .top { grid-template-columns: 1fr 1fr; gap: 40px 24px; }
  .site-footer .brandblock { grid-column: 1 / -1; }
}
@media (max-width: 520px) {
  .site-footer .top { grid-template-columns: 1fr; }
}

/* ---------- Floating CTA ---------- */
.floating-cta {
  position: fixed; right: clamp(16px, 3vw, 24px); bottom: clamp(16px, 3vw, 24px); z-index: 40;
  opacity: 0; transform: translateY(12px) scale(0.96);
  transition: all 520ms var(--ease-out);
  pointer-events: none;
}
.floating-cta.visible { opacity: 1; transform: translateY(0) scale(1); pointer-events: auto; }

/* ---------- Common section header (eyebrow + h2 + lede) ---------- */
.section-head { max-width: 44rem; margin-bottom: clamp(2.5rem, 4vw, 4rem); }
.section-head .eyebrow + .h2 { margin-top: 1.25rem; }
.section-head .h2 + .lede { margin-top: 1.25rem; }

/* ---------- Hero (page header) ---------- */
.page-hero {
  padding-block: clamp(5rem, 9vw, 9rem) clamp(3rem, 6vw, 5rem);
  border-bottom: 1px solid var(--rule);
}
.page-hero .eyebrow + .display { margin-top: 1.5rem; }
.page-hero .display + .lede { margin-top: 1.75rem; max-width: 38rem; }

/* Reusable italic-ember accent inside displays */
em.ember, .display em.ember, .h2 em.ember { color: var(--ember); font-style: italic; }
em.peach, .display em.peach { color: #e7a99a; font-style: italic; }

/* ---------- Service / index list rows ---------- */
.entry-list { border-top: 1px solid var(--ink); }
.entry {
  display: grid; grid-template-columns: minmax(0,1.1fr) minmax(0,1fr);
  gap: clamp(2rem, 4vw, 4rem);
  padding: clamp(2.5rem, 4vw, 3.5rem) 0;
  border-bottom: 1px solid var(--rule);
  text-decoration: none; color: inherit;
  position: relative;
}
.entry .img { aspect-ratio: 4 / 3; overflow: hidden; background: var(--linen); }
.entry .img img { width: 100%; height: 100%; object-fit: cover; transition: transform 720ms var(--ease-out); }
.entry:hover .img img { transform: scale(1.04); }
.entry .body { display: flex; flex-direction: column; justify-content: center; gap: 16px; }
.entry .body .h3 { color: var(--ink); }
.entry .meta {
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  margin-top: 8px; flex-wrap: wrap;
}
.entry .read {
  font-family: var(--font-sans); font-size: 0.8125rem; font-weight: 500;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink);
  transition: all 280ms var(--ease-out);
}
.entry:hover .read { color: var(--ember); transform: translateX(4px); }
.entry.flip { direction: rtl; }
.entry.flip > * { direction: ltr; }
@media (max-width: 720px) {
  .entry, .entry.flip { grid-template-columns: 1fr; direction: ltr; }
}

/* ---------- Cards ---------- */
.card {
  background: var(--white); border: 1px solid var(--rule);
  padding: clamp(1.5rem, 2.5vw, 2.25rem);
  display: flex; flex-direction: column; gap: 12px;
}
.card .h3 { color: var(--ink); }

/* ---------- Stats strip ---------- */
.stats {
  display: grid; gap: 0;
  grid-template-columns: repeat(auto-fit, minmax(min(14rem, 100%), 1fr));
  border-top: 1px solid var(--ink); border-bottom: 1px solid var(--ink);
}
.stat {
  padding: clamp(1.5rem, 3vw, 2.5rem);
  border-right: 1px solid var(--rule);
  display: flex; flex-direction: column; gap: 8px;
}
.stat:last-child { border-right: 0; }
.stat .num {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 3vw + 1rem, 4rem);
  line-height: 1; letter-spacing: -0.015em; color: var(--ink);
}
.stat .num em { color: var(--ember); font-style: italic; }
.stat .label {
  font-family: var(--font-sans); font-size: 0.875rem;
  letter-spacing: -0.03em; color: var(--bark);
}
@media (max-width: 720px) {
  .stat { border-right: 0; border-bottom: 1px solid var(--rule); }
  .stat:last-child { border-bottom: 0; }
}

/* ---------- Reading column (article body) ---------- */
.reading {
  font-family: var(--font-serif); font-size: 1.1875rem; line-height: 1.75;
  color: var(--bark); letter-spacing: 0;
}
.reading p { margin: 0 0 1.25em; }
.reading h2 {
  font-family: var(--font-display); color: var(--ink);
  font-size: clamp(1.75rem, 1.5vw + 1rem, 2.25rem);
  line-height: 1.15; letter-spacing: -0.015em;
  margin: 2.5em 0 0.6em; font-weight: 400; text-wrap: balance;
}
.reading h3 {
  font-family: var(--font-serif); color: var(--ink);
  font-size: 1.375rem; margin: 2em 0 0.4em; font-weight: 700;
  letter-spacing: -0.005em;
}
.reading blockquote {
  margin: 2em 0; padding-left: 1.25em; border-left: 1px solid var(--ember);
  font-style: italic; color: var(--ink);
}
.reading em { font-style: italic; }
.reading a { color: var(--ink); border-bottom: 1px solid var(--ember); padding-bottom: 1px; text-decoration: none; }
.reading a:hover { color: var(--ember); }
.reading hr { border: 0; height: 1px; background: var(--rule); margin: 3em 0; }
.reading ul, .reading ol { padding-left: 1.25em; margin: 0 0 1.25em; }
.reading li { margin-bottom: 0.4em; }
.reading figure { margin: 2.5em 0; }
.reading figure img { width: 100%; }
.reading figcaption {
  margin-top: 0.75em; font-family: var(--font-caption);
  font-style: italic; color: var(--ash); font-size: 0.875rem;
  text-align: center;
}
.reading .footnote { color: var(--olive); }

/* ---------- Pull-quote (full-width) ---------- */
.pullquote {
  background: var(--ink); color: var(--paper);
  padding-block: clamp(4rem, 7vw, 7rem); text-align: center;
}
.pullquote blockquote {
  font-family: var(--font-display); font-style: italic;
  font-size: clamp(1.75rem, 2vw + 1rem, 2.75rem);
  line-height: 1.22; letter-spacing: -0.015em;
  color: var(--paper); text-wrap: balance; margin: 2rem 0 0;
}
.pullquote figcaption {
  margin-top: 2rem; font-family: var(--font-sans);
  font-size: 0.75rem; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--ash); font-weight: 500;
}

/* ---------- Form ---------- */
.field { display: flex; flex-direction: column; gap: 8px; }
.field-label {
  font-family: var(--font-sans); font-size: 0.75rem; font-weight: 500;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--ash);
  transition: color 200ms;
}
.field-input, .field-textarea {
  font-family: var(--font-sans); font-size: 1rem;
  letter-spacing: -0.03em; color: var(--ink); background: transparent;
  border: 0; border-bottom: 1px solid var(--ash);
  padding: 8px 0; outline: none; line-height: 1.5; width: 100%;
  transition: border-color 200ms;
}
.field-textarea { resize: vertical; min-height: 96px; }
.field:focus-within .field-label { color: var(--ember); }
.field:focus-within .field-input,
.field:focus-within .field-textarea { border-bottom-color: var(--ember); }

/* ---------- Photo card ---------- */
.photoblock {
  position: relative; overflow: hidden; background: var(--ink);
}
.photoblock img { width: 100%; height: 100%; object-fit: cover; opacity: 0.92; }
.photoblock .scrim {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(24,22,13,0.15) 0%, rgba(24,22,13,0.10) 35%, rgba(24,22,13,0.65) 100%);
}
.photoblock .text {
  position: absolute; inset: 0; display: flex; align-items: flex-end;
  padding: clamp(2rem, 4vw, 3.5rem); color: var(--paper);
}

/* ---------- Misc ---------- */
.kicker-row {
  display: flex; align-items: baseline; gap: 16px; margin-bottom: 12px;
}
.numero {
  font-family: var(--font-serif); font-style: italic;
  font-size: 1rem; color: var(--ember); letter-spacing: 0.02em;
}

::selection { background: var(--ember); color: var(--paper); }

/* ---------- Responsive grid helpers ---------- */
.grid-2 { display: grid; gap: 0; grid-template-columns: repeat(auto-fit, minmax(min(28rem,100%), 1fr)); }
.grid-3 { display: grid; gap: clamp(1.5rem, 2.5vw, 2.5rem); grid-template-columns: repeat(auto-fit, minmax(min(20rem,100%), 1fr)); }
