/* ============================================================
   OAKRIDGE TAILORS — warm heritage-editorial system
   Cormorant (display serif) · Hanken Grotesk (grotesque body)
   ============================================================ */

:root {
  /* palette — warm, low-chroma */
  --paper:      #f3eee4;
  --paper-2:    #ece4d6;
  --ink:        #211c16;
  --ink-soft:   #564d41;
  --ink-faint:  #8a8073;
  --accent:     #9c7740;   /* brass — overridden by Tweaks */
  --accent-ink: #3d2f18;
  --line:       rgba(33, 28, 22, 0.14);
  --line-soft:  rgba(33, 28, 22, 0.08);

  /* type */
  --display: "Cormorant", Georgia, serif;
  --body:    "Hanken Grotesk", system-ui, sans-serif;

  --maxw: 1240px;
  --gut: clamp(20px, 5vw, 84px);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.6;
  font-weight: 400;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

/* ---------- typography ---------- */
.eyebrow {
  font-family: var(--body);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0;
}

.display {
  font-family: var(--display);
  font-weight: 500;
  line-height: 0.98;
  letter-spacing: -0.01em;
  margin: 0;
  text-wrap: balance;
}

.serif-lead {
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(1.6rem, 3.2vw, 2.7rem);
  line-height: 1.22;
  letter-spacing: -0.005em;
  text-wrap: pretty;
  max-width: 28ch;
  margin: 0;
}

.prose { max-width: 70ch; }

h1, h2, h3 { margin: 0; }

a { color: inherit; text-decoration: none; }

.container {
  max-width: var(--maxw);
  margin: 0 auto;
  padding-inline: var(--gut);
}

/* ---------- buttons ---------- */
.btn {
  font-family: var(--body);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  border: none;
  cursor: pointer;
  padding: 0;
  background: none;
  color: inherit;
  white-space: nowrap;
}

.btn-fill {
  background: var(--ink);
  color: var(--paper);
  padding: 15px 30px;
  border-radius: 2px;
  transition: background .35s ease, transform .35s ease;
}
.btn-fill:hover { background: var(--accent); transform: translateY(-1px); }

.btn-accent {
  background: var(--accent);
  color: var(--paper);
  padding: 15px 30px;
  border-radius: 2px;
  transition: filter .3s ease, transform .35s ease;
}
.btn-accent:hover { filter: brightness(1.08); transform: translateY(-1px); }

.btn-ghost {
  border: 1px solid var(--line);
  color: var(--ink);
  padding: 14px 28px;
  border-radius: 2px;
  transition: border-color .3s ease, color .3s ease, background .3s ease;
}
.btn-ghost:hover { border-color: var(--ink); }

/* link with underline draw */
.link-underline {
  position: relative;
  display: inline-block;
  font-weight: 600;
  font-size: 0.84rem;
  letter-spacing: 0.04em;
  padding-bottom: 3px;
}
.link-underline::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 100%; height: 1px;
  background: currentColor;
  transform: scaleX(1);
  transform-origin: left;
  transition: transform .4s cubic-bezier(.6,0,.2,1);
}
.link-underline:hover::after { transform: scaleX(0); transform-origin: right; }

/* ---------- image placeholder ---------- */
.ph {
  position: relative;
  overflow: hidden;
  background-color: var(--paper-2);
  background-image:
    repeating-linear-gradient(135deg,
      rgba(33,28,22,0.05) 0px,
      rgba(33,28,22,0.05) 1px,
      transparent 1px,
      transparent 11px);
  display: flex;
  align-items: flex-end;
  justify-content: flex-start;
}
.ph-dark {
  background-color: #2b251d;
  background-image:
    repeating-linear-gradient(135deg,
      rgba(255,255,255,0.045) 0px,
      rgba(255,255,255,0.045) 1px,
      transparent 1px,
      transparent 11px);
}
.ph-label {
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 0.64rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-faint);
  background: var(--paper);
  padding: 5px 9px;
  margin: 12px;
  border: 1px solid var(--line);
  border-radius: 1px;
}
.ph-dark .ph-label { color: rgba(243,238,228,0.7); background: rgba(0,0,0,0.35); border-color: rgba(255,255,255,0.14); }

/* ---------- reveal-on-scroll (progressive enhancement) ----------
   Content is visible by DEFAULT so it can never get stuck behind a frozen
   animation clock (hidden tabs / screenshot + PDF export harnesses where
   document.visibilityState === 'hidden' pins the timeline at 0). The
   hide-then-animate behavior only engages once JS adds .anim-on to <html>,
   which it does only when the document is actually visible. */
@keyframes revealIn {
  from { opacity: 0; transform: translateY(26px); }
  to   { opacity: 1; transform: none; }
}
.reveal { opacity: 1; }
html.anim-on .reveal { opacity: 0; }
html.anim-on .reveal.in { animation: revealIn .9s cubic-bezier(.2,.6,.2,1) both; }

/* ---------- hero scrim (image legibility) ---------- */
.hero-scrim-light {
  background:
    linear-gradient(96deg, var(--paper) 0%, rgba(243,238,228,0.95) 33%, rgba(243,238,228,0.58) 55%, rgba(243,238,228,0.12) 82%, rgba(243,238,228,0.04) 100%),
    linear-gradient(0deg, rgba(243,238,228,0.55) 0%, rgba(243,238,228,0) 34%);
}
.hero-scrim-dark {
  background:
    linear-gradient(96deg, rgba(20,16,12,0.78) 0%, rgba(20,16,12,0.55) 38%, rgba(20,16,12,0.2) 66%, rgba(20,16,12,0.05) 100%),
    linear-gradient(0deg, rgba(20,16,12,0.7) 0%, rgba(20,16,12,0) 42%);
}
@media (max-width: 760px) {
  .hero-scrim-light {
    background: linear-gradient(178deg, rgba(243,238,228,0.35) 0%, rgba(243,238,228,0.74) 48%, rgba(243,238,228,0.93) 100%);
  }
  .hero-scrim-dark {
    background: linear-gradient(178deg, rgba(20,16,12,0.35) 0%, rgba(20,16,12,0.62) 50%, rgba(20,16,12,0.82) 100%);
  }
}

/* ---------- section rhythm ---------- */
.section { padding-block: clamp(72px, 11vw, 168px); }
.hairline { height: 1px; background: var(--line); border: none; margin: 0; }

/* utility */
.muted { color: var(--ink-soft); }
.faint { color: var(--ink-faint); }
.center { text-align: center; }

/* ---------- keyframes ---------- */
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@keyframes bkFade  { from { opacity: 0; } to { opacity: 1; } }
@keyframes bkRise  { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }

/* ---------- responsive ---------- */
.nav-burger { display: none; }

@media (max-width: 900px) {
  body { font-size: 16px; }
  .section { padding-block: clamp(56px, 12vw, 100px); }
  [data-grid="services"], [data-grid="proc"], [data-grid="house"], [data-grid="about"],
  [data-grid="visit"], [data-grid="craft"], [data-grid="stats"] { grid-template-columns: 1fr !important; }
  [data-grid="proc"] { grid-template-columns: 1fr 1fr !important; }
  [data-grid="stats"] { grid-template-columns: 1fr 1fr !important; }
  [data-hide="mobile"] { display: none !important; }
}
@media (max-width: 640px) {
  .nav-links { display: none !important; }
  .nav-burger { display: inline-flex !important; }
  [data-grid="proc"] { grid-template-columns: 1fr 1fr !important; }
}
@media (max-width: 560px) {
  [data-grid="proc"] { grid-template-columns: 1fr !important; }
  [data-grid="svc-modal"] { grid-template-columns: 1fr !important; }
  [data-grid="form"] { grid-template-columns: 1fr !important; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  html.anim-on .reveal { opacity: 1; }
  html.anim-on .reveal.in { animation: none; }
  [style*="marquee"] { animation: none !important; }
}
