/* Savoir Digital — static site styles */
:root {
  --paper: #FAFAF8;
  --white: #FFFFFF;
  --ink: #23201E;
  --graphite: #443F3C;   /* taken from the logo */
  --graphite-2: #524C48;
  --muted: #6B6560;
  --line: #DAD6D1;
  --brass: #94744A;
  --font: "Jost", "Futura", "Century Gothic", "Avenir Next", system-ui, sans-serif;
  --wrap: 1200px;
  --gutter: clamp(20px, 4vw, 48px);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  font-weight: 400;
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
a:hover { color: var(--brass); }
:focus-visible { outline: 2px solid var(--brass); outline-offset: 3px; }
p { margin: 0 0 1em; }
h1, h2, h3 { font-weight: 300; line-height: 1.12; margin: 0; letter-spacing: 0.005em; }
h2 { font-size: clamp(2rem, 4.2vw, 3.25rem); }
h3 { font-size: 1.35rem; font-weight: 400; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.skip { position: absolute; left: -9999px; top: 8px; background: var(--ink); color: var(--paper); padding: 8px 14px; z-index: 100; }
.skip:focus { left: 8px; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 50; background: var(--paper); border-bottom: 1px solid transparent; transition: border-color .2s; }
.site-header.scrolled { border-bottom-color: var(--line); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 76px; }
.brand img { height: 44px; width: auto; }
.nav { display: flex; gap: clamp(18px, 2.4vw, 34px); align-items: center; }
.nav a { text-decoration: none; font-size: 0.98rem; padding: 6px 0; border-bottom: 1px solid transparent; }
.nav a[aria-current="page"] { border-bottom-color: var(--ink); }
.nav a.nav-cta { border: 1px solid var(--ink); padding: 7px 16px; }
.nav a.nav-cta:hover { background: var(--ink); color: var(--paper); }
.menu-btn { display: none; background: none; border: 0; padding: 10px; margin-right: -10px; cursor: pointer; color: var(--ink); font: inherit; }
.menu-btn span { display: block; width: 24px; height: 1.5px; background: currentColor; margin: 5px 0; transition: transform .25s, opacity .25s; }
.menu-btn[aria-expanded="true"] span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.menu-btn[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.menu-btn[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

@media (max-width: 880px) {
  .menu-btn { display: block; }
  .nav { position: fixed; inset: 76px 0 0 0; background: var(--paper); flex-direction: column; align-items: flex-start; gap: 0; padding: 20px var(--gutter) 40px; opacity: 0; visibility: hidden; transform: translateY(-8px); transition: opacity .25s ease, transform .25s ease, visibility 0s .25s; overflow-y: auto; }
  .nav.open { opacity: 1; visibility: visible; transform: none; transition: opacity .25s ease, transform .25s ease; }
  .nav a { font-size: 1.6rem; font-weight: 300; padding: 12px 0; width: 100%; border-bottom: 1px solid var(--line); }
  .nav a[aria-current="page"] { border-bottom-color: var(--line); color: var(--brass); }
  .nav a.nav-cta { border: 0; border-bottom: 1px solid var(--line); padding: 12px 0; }
}

/* Buttons */
.btn { display: inline-block; text-decoration: none; padding: 14px 26px; border: 1px solid var(--ink); font-size: 1rem; line-height: 1.2; transition: background .2s, color .2s; cursor: pointer; font-family: inherit; }
.btn-solid { background: var(--ink); color: var(--paper); }
.btn-solid:hover { background: var(--graphite-2); border-color: var(--graphite-2); color: var(--paper); }
.btn-line { background: transparent; color: var(--ink); }
.btn-line:hover { background: var(--ink); color: var(--paper); }
.on-dark .btn-solid { background: var(--paper); color: var(--ink); border-color: var(--paper); }
.on-dark .btn-solid:hover { background: transparent; color: var(--paper); }
.btn-row { display: flex; gap: 12px; flex-wrap: wrap; }

/* Sections */
.section { padding: clamp(64px, 9vw, 120px) 0; }
.section + .section { padding-top: 0; }
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 24px; margin-bottom: clamp(32px, 4vw, 52px); flex-wrap: wrap; }
.section-head p { max-width: 46ch; margin: 0; color: var(--muted); }
.lead { font-size: clamp(1.2rem, 1.8vw, 1.45rem); font-weight: 300; line-height: 1.5; max-width: 40ch; }
.muted { color: var(--muted); }
.text-link { text-decoration: none; border-bottom: 1px solid currentColor; padding-bottom: 2px; }

.on-dark { background: var(--graphite); color: var(--paper); }
.on-dark a:hover { color: #E3D3B8; }
.on-dark .muted, .on-dark .section-head p { color: #C9C3BD; }

/* Hero */
.hero { padding: clamp(56px, 9vw, 120px) 0 clamp(56px, 7vw, 96px); }
.hero h1 { font-size: clamp(2.7rem, 8.4vw, 7.4rem); font-weight: 300; line-height: 1.02; letter-spacing: 0.01em; }
.hero h1 .line { display: block; overflow: hidden; }
.hero h1 .line > span { display: inline-block; }
.hero h1 .line:nth-child(2) { padding-left: clamp(0px, 7vw, 120px); }
.hero h1 .line:nth-child(3) { padding-left: clamp(0px, 14vw, 240px); }
.hero-foot { display: grid; grid-template-columns: 1fr auto; gap: 32px 48px; align-items: end; margin-top: clamp(40px, 6vw, 76px); padding-top: 28px; border-top: 1px solid var(--line); }
.hero-foot p { margin: 0; }
.hero-foot .lead { max-width: 44ch; }
.hero-foot .facts { margin-top: 14px; color: var(--muted); font-size: 0.98rem; }
@media (max-width: 760px) { .hero-foot { grid-template-columns: 1fr; } }

@media (prefers-reduced-motion: no-preference) {
  .hero h1 .line > span { animation: rise .9s cubic-bezier(.2,.7,.2,1) both; }
  .hero h1 .line:nth-child(2) > span { animation-delay: .12s; }
  .hero h1 .line:nth-child(3) > span { animation-delay: .24s; }
  .hero-foot { animation: fade .8s .5s both; }
  @keyframes rise { from { transform: translateY(105%); } to { transform: none; } }
  @keyframes fade { from { opacity: 0; } to { opacity: 1; } }
}

/* Page intro (inner pages) */
.page-intro { padding: clamp(56px, 8vw, 104px) 0 clamp(40px, 5vw, 64px); }
.page-intro h1 { font-size: clamp(2.6rem, 6.4vw, 5.4rem); font-weight: 300; line-height: 1.04; max-width: 16ch; }
.page-intro .lead { margin-top: 28px; }

/* Work grid */
.work-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: clamp(28px, 3.5vw, 48px) clamp(20px, 3vw, 40px); }
.work-grid.featured .work:first-child { grid-column: 1 / -1; }
.work-grid.featured .work:first-child .work-img { aspect-ratio: 16 / 7; }
.work { margin: 0; }
.work-img { background: var(--white); border: 1px solid var(--line); aspect-ratio: 825 / 485; overflow: hidden; display: flex; align-items: center; justify-content: center; }
.work-img img { width: 100%; height: 100%; object-fit: contain; }
.work figcaption { display: flex; justify-content: space-between; gap: 16px; padding-top: 14px; align-items: baseline; }
.work .name { font-size: 1.2rem; font-weight: 400; }
.work .meta { color: var(--muted); font-size: 0.94rem; text-align: right; }
.work .desc { grid-column: 1 / -1; color: var(--muted); font-size: 0.98rem; margin: 4px 0 0; max-width: 52ch; }
.work .status { display: inline-block; font-size: 0.82rem; border: 1px solid var(--brass); color: var(--brass); padding: 1px 8px; margin-left: 8px; vertical-align: 2px; }
.work[hidden] { display: none; }
@media (max-width: 680px) {
  .work-grid { grid-template-columns: 1fr; }
  .work figcaption { flex-direction: column; gap: 2px; }
  .work .meta { text-align: left; }
  .work-grid.featured .work:first-child .work-img { aspect-ratio: 825 / 485; }
}

.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 36px; }
.filters button { font: inherit; font-size: 0.96rem; background: transparent; border: 1px solid var(--line); color: var(--ink); padding: 8px 16px; cursor: pointer; }
.filters button:hover { border-color: var(--ink); }
.filters button[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--paper); }

/* Capabilities: definition rows */
.caps { border-top: 1px solid var(--line); }
.cap { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 16px 40px; padding: 30px 0; border-bottom: 1px solid var(--line); }
.cap h3 { font-size: clamp(1.3rem, 2vw, 1.65rem); font-weight: 300; }
.cap ul { list-style: none; margin: 0; padding: 0; }
.cap li { padding: 3px 0; }
.cap p { margin: 0 0 10px; color: var(--muted); }
.on-dark .caps, .on-dark .cap { border-color: #6A635E; }
@media (max-width: 680px) { .cap { grid-template-columns: 1fr; } }

/* Process (a real sequence, so numbered) */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; counter-reset: step; border-top: 1px solid var(--line); }
.steps li { counter-increment: step; padding: 28px 28px 32px 0; border-bottom: 1px solid var(--line); }
.steps li::before { content: counter(step); display: block; font-size: 2.6rem; font-weight: 300; line-height: 1; color: var(--brass); margin-bottom: 14px; }
.steps h3 { margin-bottom: 8px; }
.steps p { margin: 0; color: var(--muted); }
@media (max-width: 880px) { .steps { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .steps { grid-template-columns: 1fr; } }

/* Logos */
.logos { display: grid; grid-template-columns: repeat(5, 1fr); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.logos li { list-style: none; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: center; padding: 28px 22px; min-height: 130px; background: var(--white); }
.logos img { max-height: 62px; width: auto; max-width: 100%; object-fit: contain; filter: grayscale(1); opacity: .78; }
.logos { margin: 0; padding: 0; }
@media (max-width: 880px) { .logos { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 520px) { .logos { grid-template-columns: repeat(2, 1fr); } .logos li { min-height: 104px; padding: 20px 14px; } .logos img { max-height: 48px; } }

/* Two-column text */
.split { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 32px 64px; }
.split .prose { max-width: 62ch; }
.prose h2 { font-size: clamp(1.6rem, 2.6vw, 2.1rem); margin: 1.6em 0 .5em; }
.prose h2:first-child { margin-top: 0; }
.prose ul { padding-left: 1.1em; }
.prose li { margin-bottom: .35em; }
@media (max-width: 820px) { .split { grid-template-columns: 1fr; } }

/* Statement */
.statement { font-size: clamp(1.5rem, 3vw, 2.35rem); font-weight: 300; line-height: 1.35; max-width: 34ch; }
.statement + p { margin-top: 24px; max-width: 58ch; }

/* Badges */
.badges { display: flex; gap: 20px 40px; flex-wrap: wrap; align-items: center; margin-top: 40px; }
.badges img { height: 56px; width: auto; }

/* CTA band */
.cta-band { padding: clamp(64px, 9vw, 112px) 0; }
.cta-band h2 { max-width: 18ch; margin-bottom: 32px; }

/* FAQ */
.faq details { border-bottom: 1px solid var(--line); }
.faq details:first-child { border-top: 1px solid var(--line); }
.faq summary { cursor: pointer; list-style: none; padding: 24px 40px 24px 0; font-size: 1.2rem; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; position: absolute; right: 6px; top: 50%; width: 12px; height: 12px; border-right: 1.5px solid var(--ink); border-bottom: 1.5px solid var(--ink); transform: translateY(-70%) rotate(45deg); transition: transform .25s; }
.faq details[open] summary::after { transform: translateY(-30%) rotate(-135deg); }
.faq .answer { padding: 0 0 26px; max-width: 64ch; color: var(--muted); }

/* Contact form */
.form { display: grid; gap: 20px; }
.form .row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media (max-width: 600px) { .form .row { grid-template-columns: 1fr; } }
.field label { display: block; font-size: 0.95rem; margin-bottom: 6px; }
.field input, .field select, .field textarea { width: 100%; font: inherit; color: var(--ink); background: var(--white); border: 1px solid var(--line); padding: 13px 14px; border-radius: 0; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--ink); }
.field textarea { min-height: 170px; resize: vertical; }
.hp { position: absolute; left: -9999px; }
.form-status { margin: 0; min-height: 1.6em; }
.form-status.ok { color: #3D6B4A; }
.form-status.err { color: #A3412F; }
.contact-aside dl { margin: 0; }
.contact-aside dt { color: var(--muted); font-size: 0.95rem; margin-top: 22px; }
.contact-aside dd { margin: 4px 0 0; font-size: 1.15rem; }

/* Footer */
.site-footer { background: var(--ink); color: var(--paper); padding: 64px 0 40px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 40px; }
.site-footer img { height: 34px; width: auto; margin-bottom: 18px; }
.site-footer p { color: #C9C3BD; max-width: 36ch; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { padding: 4px 0; }
.site-footer a { text-decoration: none; }
.site-footer a:hover { color: #E3D3B8; text-decoration: underline; }
.footer-head { color: #C9C3BD; font-size: 0.92rem; margin-bottom: 10px; }
.footer-base { margin-top: 56px; padding-top: 22px; border-top: 1px solid #45403C; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; color: #C9C3BD; font-size: 0.92rem; }
@media (max-width: 720px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-grid > :first-child { grid-column: 1 / -1; } }

/* 404 */
.notfound { min-height: 60vh; display: flex; align-items: center; }
/* Center the dark sections */
.cta-band .wrap { text-align: center; }
.cta-band h2,
.cta-band .lead { margin-left: auto; margin-right: auto; }
.cta-band .btn-row { justify-content: center; }

.on-dark .section-head { flex-direction: column; align-items: center; text-align: center; }
.on-dark .badges { justify-content: center; }
