/* =============================================================
   1. Tokens
   ============================================================= */
:root {
  --bg:        #0000ff;   /* Bungo blue — dominant field */
  --bg-alt:    #0000b8;   /* darker Bungo blue — section rhythm */
  --ink:       #05050a;   /* near-black — chips, footer, buttons */
  --paper:     #eef0ff;   /* pale blue-white — surfaces logos need to sit on */
  --white:     #ffffff;

  --text:      #ffffff;
  --text-soft: rgba(255,255,255,0.82);
  --text-mute: rgba(255,255,255,0.62);

  --ink-soft:  #34343a;   /* text color used ON light/paper surfaces */
  --ink-mute:  #6f6f76;   /* muted text used ON light/paper surfaces */

  --line:      rgba(255,255,255,0.24);   /* hairlines on blue */
  --line-soft: rgba(255,255,255,0.14);
  --line-panel:#cfd3fa;                   /* hairlines on paper/white panels */

  --font-display: "Big Shoulders Display", "Arial Narrow", sans-serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, monospace;

  --ease-out:  cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in:   cubic-bezier(0.7, 0, 0.84, 0);
  --ease-soft: cubic-bezier(0.25, 0.46, 0.45, 0.94);

  --nav-h: 84px;
  --gutter: clamp(1.25rem, 4vw, 2.5rem);
}

/* =============================================================
   2. Reset & base
   ============================================================= */
*, *::before, *::after { box-sizing: border-box; margin: 0; }
html {
  -webkit-text-size-adjust: 100%;
  tab-size: 2;
  overflow-x: clip;
  scroll-behavior: smooth;
}
body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
  overscroll-behavior-y: none;
}
img, svg, video { display: block; max-width: 100%; }
img { height: auto; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; }
a { color: inherit; text-decoration: none; }
p { text-wrap: pretty; }
h1, h2, h3, h4 { text-wrap: balance; line-height: 1.02; letter-spacing: -0.01em; }
::selection { background: var(--ink); color: #fff; }

:focus-visible {
  outline: 2px solid var(--white);
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

/* =============================================================
   3. Utilities
   ============================================================= */
.container {
  width: 100%;
  max-width: 1320px;
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.skip-link {
  position: fixed; top: -100px; left: 1rem;
  padding: .6rem 1rem; background: var(--white); color: var(--ink);
  z-index: 9999; font-weight: 600; font-size: .9rem;
}
.skip-link:focus { top: 1rem; }

.kicker {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-mute);
  margin-bottom: 1rem;
}

.section { padding-block: clamp(4rem, 9vw, 8rem); border-top: 1px solid var(--line); scroll-margin-top: var(--nav-h); }
#top { scroll-margin-top: 0; }

.section-heading {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2rem, 4.4vw, 3.6rem);
  line-height: 1.02;
  max-width: 20ch;
  margin-bottom: 2rem;
  color: var(--text);
}

/* Section background rhythm — same blue, two values, plus a black footer */
.hero, .services, .contact { background: var(--bg); }
.stats-strip, .manifesto, .work { background: var(--bg-alt); }

/* Reusable black/white chip — the signature detail */
.chip {
  display: inline-block;
  background: var(--ink);
  color: var(--white);
  padding: 0.1em 0.35em;
  font-style: normal;
}

/* =============================================================
   4. Reveal system
   ============================================================= */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .8s var(--ease-out), transform .8s var(--ease-out);
}
.reveal.is-visible { opacity: 1; transform: translateY(0); }

.reveal-line {
  display: block;
  opacity: 0;
  transform: translateY(100%);
  transition: opacity .7s var(--ease-out), transform .7s var(--ease-out);
}
.reveal-line.is-visible { opacity: 1; transform: translateY(0); }
.hero-title .reveal-line:nth-child(1) { transition-delay: 0.02s; }
.hero-title .reveal-line:nth-child(2) { transition-delay: 0.10s; }
.hero-title .reveal-line:nth-child(3) { transition-delay: 0.18s; }
.hero-title .reveal-line:nth-child(4) { transition-delay: 0.26s; }

/* =============================================================
   5. Buttons — black/white invert, works on any blue
   ============================================================= */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  padding: 0.95rem 1.6rem;
  border: 1px solid var(--ink);
  transition: background .35s var(--ease-out), color .35s var(--ease-out), border-color .35s var(--ease-out);
  white-space: nowrap;
}
.btn-primary { background: var(--ink); color: var(--white); border-color: var(--ink); }
.btn-primary:hover { background: var(--white); color: var(--ink); }
.btn-ghost { background: transparent; color: var(--white); border-color: var(--white); }
.btn-ghost:hover { background: var(--white); color: var(--ink); }
.btn-nav { display: none; }

@media (min-width: 720px) {
  .btn-nav { display: inline-flex; padding: 0.7rem 1.3rem; font-size: 0.78rem; }
}

/* =============================================================
   6. Header / nav
   ============================================================= */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(0,0,255,0.88);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: var(--nav-h);
  gap: 1rem;
}
.brand-mark { height: 34px; width: auto; }
.main-nav { display: none; gap: 2rem; font-family: var(--font-mono); font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.03em; color: var(--white); }
.main-nav a { position: relative; padding-bottom: 2px; }
.main-nav a::after {
  content: ""; position: absolute; left: 0; right: 100%; bottom: 0;
  height: 1px; background: var(--white);
  transition: right .35s var(--ease-out);
}
.main-nav a:hover::after { right: 0; }

@media (min-width: 960px) {
  .main-nav { display: flex; }
}

.nav-toggle {
  display: flex; flex-direction: column; justify-content: center; gap: 5px;
  width: 32px; height: 32px;
}
.nav-toggle span { display: block; height: 1.5px; background: var(--white); width: 100%; transition: transform .3s var(--ease-out), opacity .3s var(--ease-out); }
.nav-toggle[aria-expanded="true"] span:first-child { transform: translateY(3.25px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:last-child { transform: translateY(-3.25px) rotate(-45deg); }

@media (min-width: 960px) {
  .nav-toggle { display: none; }
}

.mobile-menu {
  display: none;
  position: fixed; inset: var(--nav-h) 0 0 0; z-index: 99;
  background: var(--bg);
  padding: 2rem var(--gutter);
  flex-direction: column;
  gap: 1.5rem;
  font-family: var(--font-mono);
  text-transform: uppercase;
  font-size: 1.4rem;
  color: var(--white);
}
.mobile-menu.is-open { display: flex; }
.mobile-menu a { border-bottom: 1px solid var(--line); padding-bottom: 1rem; }

@media (min-width: 960px) {
  .mobile-menu { display: none !important; }
}

/* =============================================================
   7. Hero
   ============================================================= */
.hero {
  position: relative;
  padding-block: clamp(3.5rem, 12vh, 7rem) clamp(3rem, 8vh, 5rem);
  min-height: 100svh;
  display: flex;
  align-items: center;
  overflow: hidden;
}
/* Oversized crest bleeding off the right edge — the page's one piece of art */
.hero-crest {
  position: absolute;
  right: -18%;
  top: 50%;
  transform: translateY(-50%);
  height: 92%;
  width: auto;
  opacity: 0.09;
  pointer-events: none;
  user-select: none;
}
.hero-inner { position: relative; z-index: 1; width: 100%; }

@media (min-width: 960px) {
  .hero-crest { right: 2%; height: 108%; opacity: 0.12; }
}
.hero-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2.6rem, 8vw, 6.4rem);
  line-height: 0.98;
  letter-spacing: -0.01em;
  margin-bottom: 2rem;
  overflow: hidden;
  color: var(--text);
}
.hero-title em { font-style: italic; background: var(--ink); color: var(--white); padding: 0 0.18em; }
.hero-sub {
  font-size: clamp(1.05rem, 1.6vw, 1.3rem);
  color: var(--text-soft);
  max-width: 46ch;
  margin-bottom: 2.5rem;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 1rem; }

/* =============================================================
   8. Stats strip
   ============================================================= */
.stats-strip { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.stats-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  padding-block: 2.5rem;
}
.stat { display: flex; flex-direction: column; gap: .35rem; }
.stat-value {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2.4rem, 5vw, 3.4rem);
  color: var(--text);
  line-height: 1;
}
.stat-label { font-family: var(--font-mono); font-size: 0.8rem; color: var(--text-mute); text-transform: uppercase; letter-spacing: 0.02em; }

@media (min-width: 720px) {
  .stats-grid { grid-template-columns: repeat(3, 1fr); }
  .stat:not(:last-child) { border-right: 1px solid var(--line); }
}

/* =============================================================
   9. Manifesto
   ============================================================= */
.manifesto-grid { display: grid; gap: 2rem; }
.manifesto-body { max-width: 68ch; }
.manifesto-body p { margin-bottom: 1.4rem; font-size: 1.1rem; color: var(--text-soft); }
.manifesto-body p:last-child { margin-bottom: 0; }

@media (min-width: 960px) {
  .manifesto-grid { grid-template-columns: 220px 1fr; }
}

/* =============================================================
   10. Services
   ============================================================= */
.service-list { margin-top: 2.5rem; border-top: 1px solid var(--line); }
.service-row {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1.5rem;
  padding-block: 2.4rem;
  border-bottom: 1px solid var(--line);
}
.service-index {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 2.4rem;
  color: var(--line);
  line-height: 1;
}
.service-need {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.3rem, 2.6vw, 1.9rem);
  margin-bottom: 0.6rem;
  color: var(--text);
}
.service-name {
  display: inline-block;
  background: var(--ink);
  color: var(--white);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.3em 0.55em;
  margin-bottom: 0.9rem;
}
.service-body { color: var(--text-soft); max-width: 60ch; }

@media (min-width: 720px) {
  .service-row { grid-template-columns: 100px 1fr; }
}

/* =============================================================
   11. Work / portfolio grid
   ============================================================= */
.work-note { color: var(--text-mute); margin-bottom: 2.5rem; max-width: 50ch; }

.logo-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--line-panel);
  border: 1px solid var(--line-panel);
  margin-bottom: 4rem;
}
.logo-tile {
  position: relative;
  background: var(--paper);
  aspect-ratio: 4 / 3;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  overflow: hidden;
  transition: background .4s var(--ease-out);
}
.logo-tile img {
  max-width: 100%;
  max-height: 64px;
  width: auto;
  transition: transform .5s var(--ease-out);
}
.logo-tile-wordmark {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.1rem;
  text-align: center;
  line-height: 1.15;
  color: var(--ink-mute);
}
.logo-tile-label {
  position: absolute;
  left: 1rem;
  bottom: 1rem;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--white);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity .35s var(--ease-out), transform .35s var(--ease-out);
}
.logo-tile:hover { background: var(--ink); }
.logo-tile:hover img { transform: scale(1.06); }
.logo-tile:hover .logo-tile-wordmark { color: var(--white); }
.logo-tile:hover .logo-tile-label { opacity: 1; transform: translateY(0); }

@media (min-width: 720px) {
  .logo-grid { grid-template-columns: repeat(3, 1fr); }
  .logo-tile img { max-height: 76px; }
}

/* Case list */
.case-list { border-top: 1px solid var(--line); }
.case { border-bottom: 1px solid var(--line); scroll-margin-top: calc(var(--nav-h) + 12px); }
.case-row {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  padding-block: 1.6rem;
}
.case-row-logo {
  width: 44px; height: 44px;
  object-fit: contain;
  background: var(--paper);
  padding: 6px;
  flex-shrink: 0;
}
.case-row-logo-text {
  width: 44px; height: 44px;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-mono); font-size: 0.7rem;
  background: var(--paper);
  color: var(--ink-mute);
  flex-shrink: 0;
}
.case-row-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.1rem, 2.4vw, 1.6rem);
  flex: 1;
  color: var(--text);
}
.case-row-icon {
  font-family: var(--font-mono);
  font-size: 1.4rem;
  color: var(--text-mute);
  transition: transform .35s var(--ease-out);
  width: 1.5rem; text-align: center;
}
.case.is-open .case-row-icon,
.case:target .case-row-icon { transform: rotate(45deg); }

.case-body {
  display: grid;
  grid-template-rows: 0fr;
  overflow: hidden;
  transition: grid-template-rows .45s var(--ease-out);
}
.case-body p {
  overflow: hidden;
  color: var(--text-soft);
  max-width: 62ch;
  padding-bottom: 0;
  transition: padding-bottom .45s var(--ease-out);
}
.case-body > p { min-height: 0; }
.case.is-open .case-body,
.case:target .case-body { grid-template-rows: 1fr; }
.case.is-open .case-body p,
.case:target .case-body p { padding-bottom: 1.8rem; }

/* =============================================================
   12. Contact
   ============================================================= */
.contact-heading { max-width: 16ch; }
.contact-sub { color: var(--text-soft); max-width: 50ch; margin-bottom: 3rem; }
.contact-grid { display: grid; gap: 3rem; }

.contact-email {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.6rem, 4.4vw, 2.6rem);
  color: var(--text);
  border-bottom: 2px solid var(--white);
  padding-bottom: .5rem;
  width: fit-content;
  transition: background .3s var(--ease-out), color .3s var(--ease-out), border-color .3s var(--ease-out);
}
.contact-email:hover { background: var(--ink); border-color: var(--ink); }

.contact-form { display: flex; flex-direction: column; gap: 1.4rem; max-width: 480px; }
.form-row { display: flex; flex-direction: column; gap: .5rem; }
.form-row label { font-family: var(--font-mono); font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.03em; color: var(--text-mute); }
.form-row input, .form-row textarea {
  font-family: var(--font-body);
  font-size: 1rem;
  padding: 0.85rem 1rem;
  border: 1px solid transparent;
  background: var(--paper);
  color: var(--ink);
  resize: vertical;
}
.form-row input:focus, .form-row textarea:focus { border-color: var(--ink); outline-color: var(--ink); }
.contact-form .btn { align-self: flex-start; }

@media (min-width: 960px) {
  .contact-grid { grid-template-columns: 1fr 1fr; align-items: start; }
}

/* =============================================================
   13. Footer
   ============================================================= */
.site-footer { background: var(--ink); color: var(--white); padding-block: 3rem; border-top: 1px solid var(--line-soft); }
.footer-inner {
  display: flex; flex-direction: column; align-items: flex-start; gap: 1.5rem;
}
.footer-mark { height: 30px; width: auto; opacity: 0.92; }
.footer-legal { display: flex; flex-direction: column; gap: .3rem; }
.footer-copy { font-family: var(--font-mono); font-size: 0.8rem; color: rgba(255,255,255,0.55); line-height: 1.5; }
.footer-copy a { border-bottom: 1px solid rgba(255,255,255,0.3); transition: color .3s var(--ease-out), border-color .3s var(--ease-out); }
.footer-copy a:hover { color: var(--white); border-color: var(--white); }
.footer-back { font-family: var(--font-mono); font-size: 0.8rem; color: var(--white); border-bottom: 1px solid rgba(255,255,255,0.4); }

@media (min-width: 720px) {
  .footer-inner { flex-direction: row; align-items: center; justify-content: space-between; }
}

/* =============================================================
   14. Responsive — breakpoints reference
   ============================================================= */
@media (min-width: 540px) {
  .logo-grid { grid-template-columns: repeat(3, 1fr); }
}

/* =============================================================
   15. Reduced motion — only intrusive effects
   ============================================================= */
/* This project has no autoplay media, particles or large parallax,
   so fades/hovers/reveals keep running for reduced-motion users too. */
