/* Pontis Services, styles.css
   Style recipe: monocle-magazine (web-design-skills, Editorial / Minimalist). Cream paper, ink, one editorial red,
   hairline rules, radius ~0, numbered rows. Adapted: no italics, no photo dependency, red kept to a single accent.
   Dials (design-taste-frontend): VARIANCE high, MOTION low, DENSITY medium.
   Type: Fraunces (display serif, upright only) + Hanken Grotesk (body/UI). Fallbacks: Georgia / system sans.

   PALETTE (tastemaker: generate_palette --mood warm studied for hue range, then tuned by hand to one vermilion
   accent and verified with check_contrast.py --matrix + WCAG math)
     paper   #f5efe3   ink     #1c1713   surface #ece4d3   rule  #cfc4ad (decorative hairline only)
     muted   #5e5447   accent  #b8321a   on-accent #f5efe3
     accent-on-ink #ef7b60   muted-on-ink #a89d8a
   CONTRAST CONTRACT
     ink/paper        15.52  text-safe    ink/surface      14.06  text-safe
     muted/paper       6.47  text-safe    muted/surface     5.86  text-safe
     accent/paper      5.23  text-safe    accent/surface    4.73  text-safe
     on-accent/accent  5.23  text-safe (button label)
     paper/ink        15.52  text-safe (dark sections)
     accent-on-ink     6.49  text-safe    muted-on-ink      6.65  text-safe
     rule/paper         1.5  decorative only, never carries meaning
   Rules: accent is never used on ink (use accent-on-ink). Ink text on accent fails (2.97), do not use.
*/

:root {
  --paper: #f5efe3;
  --surface: #ece4d3;
  --ink: #1c1713;
  --muted: #5e5447;
  --rule: #cfc4ad;
  --rule-strong: #1c1713;
  --accent: #b8321a;
  --on-accent: #f5efe3;
  --accent-on-ink: #ef7b60;
  --muted-on-ink: #a89d8a;

  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body: "Hanken Grotesk", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  /* type scale (fluid) */
  --step--1: clamp(0.8125rem, 0.79rem + 0.1vw, 0.875rem);
  --step-0: clamp(1.0625rem, 1.02rem + 0.2vw, 1.1875rem);
  --step-1: clamp(1.25rem, 1.15rem + 0.5vw, 1.5rem);
  --step-2: clamp(1.75rem, 1.5rem + 1.2vw, 2.5rem);
  --step-3: clamp(2.25rem, 1.7rem + 2.6vw, 4rem);
  --step-hero: clamp(3.1rem, 1.4rem + 8.2vw, 8.25rem);

  /* spacing scale */
  --s-1: 4px;
  --s-2: 8px;
  --s-3: 12px;
  --s-4: 16px;
  --s-5: 24px;
  --s-6: 32px;
  --s-7: 48px;
  --s-8: 72px;
  --s-9: 112px;
  --s-10: 168px;

  --radius: 2px;
  --gutter: clamp(20px, 4vw, 56px);
  --max: 1360px;
  --header-h: 64px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; }
h1, h2, h3, p { margin: 0; }
a { color: inherit; }
[id] { scroll-margin-top: calc(var(--header-h) + var(--s-6)); }

.wrap { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); }

/* focus */
:focus { outline: none; }
:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
  border-radius: var(--radius);
}
.on-ink :focus-visible { outline-color: var(--accent-on-ink); }

.skip {
  position: absolute; left: var(--s-4); top: -100px; z-index: 100;
  background: var(--ink); color: var(--paper);
  padding: var(--s-3) var(--s-4); text-decoration: none;
}
.skip:focus { top: var(--s-3); }

/* buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 0 var(--s-5);
  font: 600 1rem/1 var(--font-body); letter-spacing: 0.01em;
  text-decoration: none; border-radius: var(--radius);
  border: 1.5px solid var(--ink);
  transition: background-color 160ms var(--ease), color 160ms var(--ease), transform 160ms var(--ease);
}
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.btn-ghost { background: transparent; color: var(--ink); }
.btn:active { transform: translateY(1px); }
@media (hover: hover) {
  .btn-primary:hover { background: var(--ink); border-color: var(--ink); }
  .btn-ghost:hover { background: var(--ink); color: var(--paper); }
}
.btn-sm { min-height: 44px; padding: 0 var(--s-4); font-size: 0.9375rem; }

.link-arrow {
  display: inline-flex; align-items: center; min-height: 48px;
  font-weight: 600; text-decoration: underline; text-underline-offset: 6px;
  text-decoration-thickness: 1.5px;
}
@media (hover: hover) { .link-arrow:hover { color: var(--accent); } }

/* header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--paper);
  border-bottom: 1px solid var(--rule-strong);
}
.site-header .wrap {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  column-gap: var(--s-4);
}
.brand {
  display: inline-flex; align-items: center; gap: var(--s-3);
  min-height: var(--header-h); text-decoration: none;
}
.brand svg { width: 38px; height: 38px; flex: none; }
.brand-name {
  font-family: var(--font-display); font-weight: 600;
  font-size: 1.5rem; letter-spacing: -0.02em; line-height: 1;
}
.primary-nav {
  grid-column: 1 / -1; grid-row: 2;
  display: flex; justify-content: space-between;
  border-top: 1px solid var(--rule);
  margin-inline: calc(var(--gutter) * -1);
  padding-inline: var(--gutter);
}
.primary-nav a {
  display: inline-flex; align-items: center; min-height: 44px;
  padding-inline: var(--s-1);
  font-size: 0.9375rem; font-weight: 500; text-decoration: none;
}
@media (hover: hover) { .primary-nav a:hover { color: var(--accent); } }

@media (min-width: 880px) {
  .site-header .wrap { grid-template-columns: auto 1fr auto; }
  .primary-nav {
    grid-column: 2; grid-row: 1; border-top: 0; margin-inline: 0; padding-inline: 0;
    justify-content: center; gap: var(--s-6);
  }
  .primary-nav a { padding-inline: var(--s-2); font-size: 1rem; }
}

/* hero */
.hero { border-bottom: 1px solid var(--rule-strong); }
.hero-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--s-5);
  padding-block: var(--s-7) var(--s-7);
}
.hero-title {
  grid-column: 1 / -1;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: var(--step-hero);
  line-height: 0.96;
  letter-spacing: -0.035em;
  font-variation-settings: "opsz" 144;
  text-wrap: balance;
}
.hero-title .found { color: var(--accent); }
.hero-art {
  grid-column: 1 / -1;
  margin: var(--s-6) 0 var(--s-5);
  max-width: 340px;
  width: 100%;
  justify-self: start;
}
.hero-art svg { width: 100%; height: auto; }
.hero-art figcaption {
  display: flex; justify-content: space-between; gap: var(--s-4);
  margin-top: var(--s-3); padding-top: var(--s-2);
  border-top: 1px solid var(--rule-strong);
  font-size: var(--step--1); color: var(--muted);
}
.hero-art figcaption b { color: var(--ink); font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; }
.hero-body { grid-column: 1 / -1; }
.hero-sub { font-size: var(--step-1); line-height: 1.5; max-width: 34em; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-3) var(--s-5); margin-top: var(--s-6); }

@media (min-width: 880px) {
  .hero-grid { padding-block: var(--s-8) var(--s-8); row-gap: var(--s-7); }
  .hero-title { grid-column: 1 / 9; grid-row: 1; }
  .hero-art { grid-column: 9 / 13; grid-row: 1 / span 2; margin: 0; max-width: none; align-self: end; }
  .hero-body { grid-column: 1 / 8; grid-row: 2; align-self: end; }
}
@media (min-width: 1200px) {
  .hero-title { grid-column: 1 / 9; }
  .hero-art { grid-column: 9 / 13; }
}

@media (max-width: 879px) {
  .hero-title { order: 1; }
  .hero-body { order: 2; }
  .hero-art { order: 3; margin: var(--s-7) 0 0; }
}

/* section scaffolding for later sections: fine rules between sections */
.section { border-bottom: 1px solid var(--rule-strong); padding-block: var(--s-9); }
.section-head { display: flex; align-items: baseline; gap: var(--s-4); margin-bottom: var(--s-7); }
.section-title { font-family: var(--font-display); font-weight: 400; font-size: var(--step-3); line-height: 1.02; letter-spacing: -0.03em; }
.section.on-ink { background: var(--ink); color: var(--paper); }
.on-ink .muted { color: var(--muted-on-ink); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; }
}

/* ---- sections (invocation 2) ---- */
.eyebrow {
  font-size: var(--step--1); font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--accent); margin-bottom: var(--s-4);
}
.on-ink .eyebrow { color: var(--accent-on-ink); }
.section-intro { margin-bottom: var(--s-7); }
.section-sub { margin-top: var(--s-4); max-width: 32em; color: var(--muted); font-size: var(--step-1); line-height: 1.45; }
[tabindex="-1"]:focus-visible { outline: none; }

/* numbered rows: services + process */
.rows { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--rule-strong); }
.row {
  display: grid; grid-template-columns: 3rem 1fr; column-gap: var(--s-4); row-gap: var(--s-2);
  padding-block: var(--s-6); border-bottom: 1px solid var(--rule);
}
.row-num { font-family: var(--font-display); font-size: var(--step--1); font-weight: 500; letter-spacing: 0.06em; color: var(--accent); padding-top: 0.45em; font-variant-numeric: tabular-nums; }
.row-title { grid-column: 2; font-family: var(--font-display); font-weight: 400; font-size: var(--step-2); line-height: 1.1; letter-spacing: -0.02em; }
.row-text { grid-column: 2; color: var(--muted); max-width: 30em; }
.row .row-num { grid-row: 1; grid-column: 1; }

@media (min-width: 880px) {
  .row { grid-template-columns: 5rem minmax(0, 5fr) minmax(0, 6fr); column-gap: var(--s-5); padding-block: var(--s-7); align-items: baseline; }
  .row-title, .row-text { grid-column: auto; grid-row: 1; }
  .row-title { grid-column: 2; }
  .row-text { grid-column: 3; font-size: var(--step-0); }
  .row .row-num { padding-top: 0; }
}

/* work */
.work-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s-7) var(--s-5); }
.work-card { margin: 0; transition: opacity 700ms var(--ease), transform 700ms var(--ease); }
.work-frame { border: 1px solid var(--rule-strong); background: var(--surface); padding: var(--s-2); }
.work-frame a { display: block; }
.work-frame img { width: 100%; height: auto; }
.work-card figcaption {
  display: flex; gap: var(--s-4); align-items: baseline;
  margin-top: var(--s-3); font-size: var(--step--1); color: var(--muted);
}
.work-card figcaption .row-num { padding-top: 0; }
html.reveal-ready .work-card:not(.is-in) { opacity: 0; transform: translateY(18px); }

@media (min-width: 880px) {
  .work-grid { grid-template-columns: repeat(12, minmax(0, 1fr)); }
  .work-card:nth-child(1) { grid-column: 1 / 7; }
  .work-card:nth-child(2) { grid-column: 7 / 13; }
  .work-card:nth-child(3) { grid-column: 1 / 9; }
}

/* about */
.about-body { max-width: 36em; }
.about-lead { font-size: var(--step-1); line-height: 1.5; }
.about-note { margin-top: var(--s-5); padding-top: var(--s-3); border-top: 1px solid var(--rule-strong); color: var(--muted); font-size: var(--step--1); }
@media (min-width: 880px) {
  .about-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--s-5); }
  .about-grid .section-intro { grid-column: 1 / 7; margin-bottom: 0; }
  .about-body { grid-column: 7 / 13; padding-top: var(--s-6); }
}

/* contact */
.contact { padding-block: var(--s-9) var(--s-9); }
.contact-title { max-width: 14em; font-size: var(--step-3); }
.contact-copy { margin-top: var(--s-5); max-width: 30em; font-size: var(--step-1); color: var(--muted-on-ink); }
.btn-lg { margin-top: var(--s-6); min-height: 64px; padding: 0 var(--s-6); font-size: clamp(1rem, 0.9rem + 1.2vw, 1.5rem); max-width: 100%; overflow-wrap: anywhere; line-height: 1.2; }
@media (hover: hover) { .on-ink .btn-primary:hover { background: var(--paper); border-color: var(--paper); color: var(--ink); } }

/* footer */
.site-footer { background: var(--paper); border-top: 1px solid var(--rule-strong); padding-block: var(--s-7) var(--s-6); }
.footer-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s-5); align-items: center; }
.footer-brand { display: inline-flex; align-items: center; gap: var(--s-3); min-height: 44px; text-decoration: none; justify-self: start; }
.footer-brand svg { width: 32px; height: 32px; flex: none; }
.footer-links { display: flex; flex-wrap: wrap; gap: 0 var(--s-5); }
.footer-links a { display: inline-flex; align-items: center; min-height: 44px; font-size: 0.9375rem; font-weight: 500; text-underline-offset: 5px; overflow-wrap: anywhere; }
@media (hover: hover) { .footer-links a:hover { color: var(--accent); } }
.footer-copy { font-size: var(--step--1); color: var(--muted); padding-top: var(--s-4); border-top: 1px solid var(--rule); }
@media (min-width: 880px) {
  .footer-grid { grid-template-columns: auto 1fr auto; column-gap: var(--s-7); }
  .footer-links { justify-content: center; }
  .footer-copy { padding-top: 0; border-top: 0; }
}

/* legal pages */
.legal { padding-block: var(--s-8) var(--s-9); }
.legal-head { margin-bottom: var(--s-7); }
.legal-title { font-family: var(--font-display); font-weight: 400; font-size: var(--step-3); line-height: 1.02; letter-spacing: -0.03em; }
.legal-updated { margin-top: var(--s-4); font-size: var(--step--1); color: var(--muted); }
.legal-body { max-width: 38em; border-top: 1px solid var(--rule-strong); }
.legal-body section { padding-block: var(--s-6); border-bottom: 1px solid var(--rule); }
.legal-body h2 { font-family: var(--font-display); font-weight: 400; font-size: var(--step-2); line-height: 1.1; letter-spacing: -0.02em; margin-bottom: var(--s-3); }
.legal-body p + p { margin-top: var(--s-4); }
.legal-body a { color: var(--accent); text-underline-offset: 4px; overflow-wrap: anywhere; }
.legal-body .legal-mail { display: inline-flex; align-items: center; min-height: 44px; }
.footer-links a[aria-current="page"] { text-decoration-thickness: 2px; color: var(--accent); }
