/* adfirm — styles
   Palette: warm paper, near-black ink, signal orange. Two type families. */

:root {
  --paper: #F5F2EA;
  --paper-2: #ECE8DC;
  --paper-3: #E2DDCE;
  --ink: #111318;
  --ink-2: #3B404B;
  --muted: #6E7380;
  --line: rgba(17, 19, 24, .12);
  --accent: #FF4E1F;
  --accent-deep: #E23F12;
  --dark: #111318;
  --dark-line: rgba(245, 242, 234, .14);
  --dark-muted: #A9ADB7;
  --radius: 16px;
  --radius-lg: 24px;
  --container: 1180px;
  --font-display: "Bricolage Grotesque", "Inter", system-ui, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
body.no-scroll { overflow: hidden; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
p { margin: 0 0 1em; }
h1, h2, h3, h4 { margin: 0; }

.container { width: min(var(--container), 100% - 48px); margin-inline: auto; }

.skip-link {
  position: absolute; left: 16px; top: -48px; z-index: 100;
  background: var(--ink); color: var(--paper); padding: 10px 14px; border-radius: 8px;
}
.skip-link:focus { top: 16px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

/* ---------- Brand ---------- */
.brand { display: inline-flex; align-items: center; gap: 9px; color: var(--ink); }
.brand-mark { height: 30px; width: auto; }
.brand-word { height: 26px; width: auto; }
.mark-cables { stroke: var(--accent); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 14px 22px; border-radius: 999px;
  font: 600 .95rem/1 var(--font-body);
  border: 1px solid transparent; cursor: pointer;
  transition: transform .2s var(--ease), background .2s, color .2s, border-color .2s;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-primary { background: var(--ink); color: var(--paper); }
.btn-primary:hover { background: var(--accent); color: #fff; }
.btn-ghost { border-color: var(--line); color: var(--ink); }
.btn-ghost:hover { border-color: var(--ink); }
.btn-accent { background: var(--accent); color: #fff; }
.btn-accent:hover { background: var(--accent-deep); }
.btn[disabled] { opacity: .6; cursor: default; transform: none; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(245, 242, 234, .84);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s;
}
.site-header.scrolled { border-bottom-color: var(--line); }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 72px; gap: 24px; }
.nav { display: flex; align-items: center; gap: 32px; }
.nav a { font-weight: 500; font-size: .95rem; color: var(--ink-2); transition: color .2s; }
.nav a:hover { color: var(--ink); }
.nav .nav-cta { color: var(--paper); padding: 12px 18px; margin-left: 8px; }
.nav .nav-cta:hover { color: #fff; }

.nav-toggle {
  display: none; width: 44px; height: 44px; border: 0; background: none; cursor: pointer;
  flex-direction: column; align-items: center; justify-content: center; gap: 6px; border-radius: 10px;
}
.nav-toggle span { display: block; width: 22px; height: 2px; background: var(--ink); transition: transform .3s var(--ease); }
.site-header.open .nav-toggle span:first-child { transform: translateY(4px) rotate(45deg); }
.site-header.open .nav-toggle span:last-child { transform: translateY(-4px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero { padding: 96px 0 24px; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px; margin: 0;
  font-size: .78rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-2);
}
.eyebrow::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); flex: none; }
h1 {
  font-family: var(--font-display); font-weight: 800;
  font-size: clamp(2.9rem, 7vw, 6rem); line-height: .96; letter-spacing: -.035em;
  margin: 22px 0 28px; max-width: 14ch; text-wrap: balance;
}
h1 .dim { color: var(--muted); }
.lead { font-size: clamp(1.1rem, 1.5vw, 1.3rem); color: var(--ink-2); max-width: 52ch; margin: 0 0 34px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- Sections ---------- */
.section { padding: 104px 0; }
.section-tight { padding-top: 72px; }
.section-head { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 6fr); gap: 24px 48px; align-items: end; margin-bottom: 48px; }
h2 {
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(2rem, 4.2vw, 3.2rem); line-height: 1.02; letter-spacing: -.03em;
  margin: 14px 0 0; text-wrap: balance;
}
.section-head p { margin: 0; color: var(--ink-2); font-size: 1.1rem; max-width: 48ch; }

/* Work */
.work-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 32px; }
.case { display: flex; flex-direction: column; gap: 18px; color: inherit; }
.shot {
  position: relative; aspect-ratio: 16 / 10; overflow: hidden;
  border-radius: var(--radius); border: 1px solid var(--line); background: var(--paper-3);
}
.shot-desktop { width: 100%; height: 100%; object-fit: cover; object-position: top; transition: transform .7s var(--ease); }
.case:hover .shot-desktop { transform: scale(1.03); }
.shot-phone {
  position: absolute; right: 6%; bottom: -3px; width: 23%; height: auto;
  border: 3px solid var(--ink); border-bottom: 0; border-radius: 18px 18px 0 0;
  background: var(--ink); box-shadow: 0 12px 32px rgba(17, 19, 24, .28);
}
.case-body h3 { font-family: var(--font-display); font-size: 1.45rem; font-weight: 700; letter-spacing: -.01em; display: flex; flex-wrap: wrap; align-items: baseline; gap: 10px 12px; }
.case-body .ext { font-family: var(--font-body); font-size: .9rem; font-weight: 500; color: var(--muted); }
.case-body .ext::after { content: " ↗"; }
.case:hover .ext { color: var(--accent); }
.case-body p { margin: 10px 0 14px; color: var(--ink-2); font-size: .98rem; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { font-size: .74rem; font-weight: 600; padding: 5px 10px; border-radius: 999px; border: 1px solid var(--line); color: var(--ink-2); white-space: nowrap; }

/* What we do */
.services { background: var(--dark); color: var(--paper); }
.services .eyebrow { color: var(--dark-muted); }
.services .section-head p { color: var(--dark-muted); }
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.step { border-top: 2px solid var(--dark-line); padding-top: 28px; transition: border-color .3s; }
.step:hover { border-top-color: var(--accent); }
.step .num { display: block; font-family: var(--font-display); font-size: 3rem; font-weight: 800; color: var(--accent); letter-spacing: -.04em; line-height: 1; }
.step h3 { font-family: var(--font-display); font-size: 1.3rem; font-weight: 700; margin: 22px 0 10px; }
.step p { margin: 0; color: var(--dark-muted); font-size: .98rem; }

/* Contact */
.contact { background: var(--paper-2); }
.contact-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 56px; align-items: start; }
.contact-info h2 { margin-bottom: 18px; }
.contact-info > p { color: var(--ink-2); font-size: 1.1rem; }
.contact-info .small { font-size: .98rem; color: var(--muted); }
.contact-info .mail {
  display: inline-block; margin: 8px 0 28px;
  font-family: var(--font-display); font-weight: 700; letter-spacing: -.02em;
  font-size: clamp(1.3rem, 2.4vw, 1.8rem); line-height: 1.2;
  border-bottom: 2px solid var(--accent); transition: color .2s;
}
.contact-info .mail:hover { color: var(--accent); }

.form-card { background: #fff; border-radius: var(--radius-lg); padding: 32px; border: 1px solid var(--line); }
.field { display: flex; flex-direction: column; gap: 8px; margin-bottom: 18px; }
.field label { font-size: .85rem; font-weight: 600; color: var(--ink-2); }
.field .opt { font-weight: 400; color: var(--muted); }
.field input, .field select, .field textarea {
  font: inherit; font-size: 1rem; padding: 13px 16px; width: 100%;
  border: 1px solid var(--line); border-radius: 12px; background: var(--paper); color: var(--ink);
  transition: border-color .2s, box-shadow .2s;
}
.field select { appearance: none; -webkit-appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%233B404B' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 6l4 4 4-4'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 40px; }
.field textarea { resize: vertical; min-height: 130px; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px rgba(17, 19, 24, .08); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-note { font-size: .85rem; color: var(--muted); margin: 16px 0 0; }
.form-note a { text-decoration: underline; text-underline-offset: 2px; }
.form-status { display: none; margin: 16px 0 0; padding: 12px 14px; border-radius: 10px; font-size: .95rem; }
.form-status.show { display: block; }
.form-status.ok { background: #EAF5EC; color: #1F5A2E; }
.form-status.err { background: #FDECE6; color: #9A2E12; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- Footer ---------- */
.site-footer { background: var(--dark); color: var(--paper); padding: 64px 0 32px; }
.site-footer .brand { color: var(--paper); }
.footer-tag { color: var(--dark-muted); margin: 18px 0 0; max-width: 30ch; }
.footer-grid { display: grid; grid-template-columns: minmax(0, 6fr) repeat(2, minmax(0, 3fr)); gap: 40px; padding-bottom: 40px; border-bottom: 1px solid var(--dark-line); }
.footer-grid h4 { font-size: .78rem; text-transform: uppercase; letter-spacing: .12em; color: var(--dark-muted); margin: 0 0 16px; font-weight: 600; }
.footer-grid ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; font-size: .95rem; color: var(--dark-muted); }
.footer-grid li a { color: var(--paper); opacity: .85; transition: opacity .2s; }
.footer-grid li a:hover { opacity: 1; }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; padding-top: 24px; font-size: .85rem; color: var(--dark-muted); }
.footer-bottom a { color: var(--paper); opacity: .85; }

/* ---------- Simple pages (privacy, 404) ---------- */
.page { padding: 64px 0 112px; }
.page .prose { max-width: 68ch; }
.page .prose h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); margin: 18px 0 28px; max-width: none; }
.page .prose h2 { font-size: 1.5rem; margin: 40px 0 12px; }
.page .prose p, .page .prose li { color: var(--ink-2); }
.page .prose a { text-decoration: underline; text-underline-offset: 2px; }
.page .meta { color: var(--muted); font-size: .9rem; }
.notfound { min-height: 60vh; display: grid; align-content: center; }
.notfound .big { font-family: var(--font-display); font-weight: 800; font-size: clamp(5rem, 18vw, 12rem); line-height: .9; letter-spacing: -.05em; color: var(--paper-3); }

/* ---------- Reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.in, .no-js .reveal { opacity: 1; transform: none; }
.work-grid .reveal:nth-child(2), .steps .reveal:nth-child(2) { transition-delay: .08s; }
.steps .reveal:nth-child(3) { transition-delay: .16s; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .btn, .shot-desktop { transition: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 860px) {
  .container { width: min(var(--container), 100% - 40px); }
  /* The header's backdrop-filter makes it the containing block for fixed
     descendants, so the menu is sized explicitly below the 72px bar. */
  .nav {
    display: none; position: fixed; top: 72px; left: 0; right: 0; z-index: 40;
    height: calc(100vh - 72px); height: calc(100dvh - 72px);
    background: var(--paper); flex-direction: column; align-items: flex-start;
    padding: 32px 24px; gap: 22px; overflow-y: auto;
  }
  .site-header.open { background: var(--paper); border-bottom-color: var(--line); }
  .nav a { font-family: var(--font-display); font-size: 1.75rem; font-weight: 600; color: var(--ink); }
  .nav .nav-cta { font-family: var(--font-body); font-size: 1rem; margin: 12px 0 0; padding: 16px 24px; }
  .site-header.open .nav { display: flex; }
  .nav-toggle { display: flex; }
  .hero { padding: 64px 0 16px; }
  .section { padding: 80px 0; }
  .section-tight { padding-top: 56px; }
  .section-head, .contact-grid { grid-template-columns: 1fr; }
  .section-head { margin-bottom: 36px; gap: 16px; }
  .work-grid { grid-template-columns: 1fr; gap: 40px; }
  .steps { grid-template-columns: 1fr; gap: 28px; }
  .contact-grid { gap: 40px; }
}
@media (max-width: 640px) {
  .container { width: min(var(--container), 100% - 32px); }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  .field-row { grid-template-columns: 1fr; gap: 0; }
  .form-card { padding: 24px 20px; }
  .brand-word { height: 24px; }
  .brand-mark { height: 28px; }
  .footer-bottom { flex-direction: column; }
}

/* ---------- Language switch ---------- */
.nav .lang {
  font-size: .82rem; font-weight: 600; letter-spacing: .04em;
  padding: 8px 12px; border: 1px solid var(--line); border-radius: 999px; color: var(--ink-2);
}
.nav .lang:hover { border-color: var(--ink); color: var(--ink); }
@media (max-width: 860px) {
  .nav .lang { font-family: var(--font-body); font-size: .95rem; padding: 10px 16px; margin-top: 4px; }
}
.footer-label { font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; color: var(--dark-muted); }
