/* Dead Safe Consultancy — styles */
:root {
  --ink: #121412;
  --ink-2: #1b1e1b;
  --ink-3: #262a26;
  --paper: #f4f3ec;
  --paper-2: #e9e8df;
  --accent: #ff6b1a;
  --muted: #9a9e95;
  --line-dark: rgba(244, 243, 236, 0.14);
  --line-light: rgba(18, 20, 18, 0.14);
  --font: "Archivo", "Arial Narrow", Arial, sans-serif;
  --wrap: 1280px;
  --gutter: clamp(20px, 4vw, 48px);
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
body {
  margin: 0;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3 { margin: 0; font-stretch: 72%; font-weight: 900; line-height: 0.92; letter-spacing: -0.01em; text-transform: uppercase; }
p { margin: 0; }
::selection { background: var(--accent); color: var(--ink); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.section-pad { padding: clamp(80px, 11vw, 150px) 0; }

.skip-link {
  position: absolute; left: 16px; top: -60px; z-index: 100;
  background: var(--accent); color: var(--ink); padding: 10px 16px; font-weight: 800; text-decoration: none;
}
.skip-link:focus { top: 16px; }

/* Buttons & links */
.button {
  display: inline-flex; align-items: center; gap: 12px;
  background: var(--accent); color: var(--ink);
  padding: 17px 26px; border-radius: 999px;
  font-weight: 800; font-size: 15px; letter-spacing: 0.04em; text-transform: uppercase; text-decoration: none;
  transition: transform 0.25s var(--ease), background 0.25s, color 0.25s;
}
.button::after { content: "→"; transition: transform 0.25s var(--ease); }
.button:hover { transform: translateY(-2px); }
.button:hover::after { transform: translateX(4px); }
.button-small { padding: 11px 18px; font-size: 13px; }
.button-small::after { display: none; }
.button-black { background: var(--ink); color: var(--accent); }

.text-link {
  display: inline-flex; align-items: center; gap: 10px;
  font-weight: 800; font-size: 15px; letter-spacing: 0.04em; text-transform: uppercase; text-decoration: none;
  border-bottom: 2px solid currentColor; padding-bottom: 4px;
  transition: color 0.2s, gap 0.25s var(--ease);
}
.text-link::after { content: "↓"; }
.text-link:hover { color: var(--accent); gap: 14px; }

.eyebrow {
  display: flex; align-items: center; gap: 10px;
  font-size: 13px; font-weight: 800; letter-spacing: 0.16em; text-transform: uppercase;
}
.eyebrow .index { color: var(--accent); }
.small-cross {
  display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 6px;
  background: var(--accent); color: var(--ink); font-size: 18px; line-height: 1; font-weight: 900;
}

/* Header */
.header {
  position: fixed; inset: 0 0 auto; z-index: 50;
  display: flex; align-items: center; gap: 32px;
  padding: 18px var(--gutter);
  transition: background 0.3s, padding 0.3s, border-color 0.3s;
  border-bottom: 1px solid transparent;
}
.header.is-scrolled, .header.menu-open {
  background: rgba(18, 20, 18, 0.92);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  border-color: var(--line-dark);
  padding-top: 12px; padding-bottom: 12px;
}
.brand { display: block; text-decoration: none; flex-shrink: 0; }
.brand-crop { display: block; width: 128px; }
.brand-crop img { width: 100%; }
.desktop-nav { display: flex; gap: 30px; margin-left: auto; }
.desktop-nav a {
  font-size: 14px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; text-decoration: none;
  opacity: 0.85; transition: opacity 0.2s, color 0.2s;
}
.desktop-nav a:hover { opacity: 1; color: var(--accent); }
.menu-toggle {
  display: none; margin-left: auto; width: 46px; height: 46px; border-radius: 50%;
  border: 1px solid var(--line-dark); background: transparent; cursor: pointer;
  flex-direction: column; align-items: center; justify-content: center; gap: 6px;
}
.menu-toggle span { display: block; width: 18px; height: 2px; background: var(--paper); transition: transform 0.3s var(--ease); }
.menu-toggle[aria-expanded="true"] span:first-child { transform: translateY(4px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] span:last-child { transform: translateY(-4px) rotate(-45deg); }
.mobile-nav {
  position: absolute; top: 100%; left: 0; right: 0;
  display: flex; flex-direction: column;
  background: var(--ink); border-bottom: 1px solid var(--line-dark);
  padding: 8px var(--gutter) 28px;
}
.mobile-nav[hidden] { display: none; }
.mobile-nav a {
  padding: 16px 0; border-bottom: 1px solid var(--line-dark);
  font-size: 30px; font-weight: 900; font-stretch: 72%; text-transform: uppercase; text-decoration: none;
}
.mobile-nav a:last-child { color: var(--accent); border-bottom: 0; }

/* Hero */
.hero {
  position: relative; min-height: 100vh; min-height: 100svh;
  display: flex; flex-direction: column; justify-content: flex-end;
  overflow: hidden; isolation: isolate;
}
.hero-photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; animation: heroZoom 18s ease-out both; }
.hero-shade {
  position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(180deg, rgba(18,20,18,0.75) 0%, rgba(18,20,18,0.1) 30%, rgba(18,20,18,0.35) 55%, rgba(18,20,18,0.96) 100%),
    linear-gradient(90deg, rgba(18,20,18,0.7) 0%, rgba(18,20,18,0) 65%);
}
.hero-content { padding-top: 140px; padding-bottom: clamp(40px, 6vw, 72px); }
.hero-eyebrow { margin-bottom: 26px; }
.hero h1 { font-size: clamp(64px, 13vw, 196px); line-height: 0.84; }
.hero h1 span { color: var(--accent); }
.hero-content > p { margin-top: 28px; max-width: 540px; font-size: clamp(17px, 1.6vw, 21px); color: rgba(244,243,236,0.86); }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 22px 34px; margin-top: 38px; }
.hero-bottom {
  display: flex; justify-content: space-between; gap: 20px;
  padding-top: 20px; padding-bottom: 24px;
  border-top: 1px solid var(--line-dark);
  font-size: 12px; font-weight: 700; letter-spacing: 0.18em; color: var(--muted);
}
@keyframes heroZoom { from { transform: scale(1.08); } to { transform: scale(1); } }

/* Section headers */
.section-top {
  display: grid; grid-template-columns: 1fr 1.4fr 1fr; gap: 24px 40px; align-items: end;
  margin-bottom: clamp(48px, 7vw, 88px);
}
.section-top h2, .approach-intro h2, .contact h2 { font-size: clamp(44px, 6.4vw, 96px); }
.section-top > p:last-child { color: var(--muted); }
.section-top .eyebrow { align-self: start; }

/* Experience */
.experience { background: var(--ink); }
.client-grid { display: grid; grid-template-columns: repeat(5, 1fr); border-top: 1px solid var(--line-dark); border-left: 1px solid var(--line-dark); }
.client {
  position: relative; min-height: 300px; padding: 26px 24px;
  display: flex; flex-direction: column; justify-content: space-between;
  border-right: 1px solid var(--line-dark); border-bottom: 1px solid var(--line-dark);
  transition: background 0.35s var(--ease), color 0.35s;
}
.client-type { font-size: 11px; font-weight: 800; letter-spacing: 0.18em; color: var(--muted); transition: color 0.35s; }
.client h3 { font-size: clamp(28px, 2.6vw, 40px); }
.client h3 span { color: var(--accent); transition: color 0.35s; }
.client:hover { background: var(--accent); color: var(--ink); }
.client:hover .client-type, .client:hover h3 span { color: var(--ink); }

/* Services */
.services { background: var(--paper); color: var(--ink); }
.services .section-top > p:last-child { color: #5a5d56; }
.services .eyebrow .index { color: var(--ink); background: var(--accent); padding: 2px 6px; border-radius: 4px; }
.service-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.service-card {
  background: #fff; border: 1px solid var(--line-light); border-radius: 28px;
  padding: clamp(28px, 4vw, 48px);
  display: flex; flex-direction: column;
}
.service-card-dark { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.service-heading { display: flex; justify-content: space-between; align-items: center; margin-bottom: clamp(48px, 7vw, 96px); }
.service-number { font-size: 15px; font-weight: 900; }
.service-tag { font-size: 11px; font-weight: 800; letter-spacing: 0.18em; padding: 7px 12px; border-radius: 999px; border: 1px solid currentColor; }
.service-card-dark .service-tag { background: var(--accent); color: var(--ink); border-color: var(--accent); }
.service-card h3 { font-size: clamp(46px, 5.4vw, 80px); }
.service-card > p { margin-top: 22px; max-width: 470px; color: #4b4e48; }
.service-card-dark > p { color: rgba(244,243,236,0.72); }
.service-details { margin-top: auto; padding-top: 40px; }
.service-details details { border-top: 1px solid var(--line-light); }
.service-card-dark .service-details details { border-color: var(--line-dark); }
.service-details details:last-child { border-bottom: 1px solid var(--line-light); }
.service-card-dark .service-details details:last-child { border-color: var(--line-dark); }
.service-details summary {
  list-style: none; cursor: pointer;
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 19px 0; font-weight: 800; font-size: 17px;
}
.service-details summary::-webkit-details-marker { display: none; }
.service-details summary span {
  display: grid; place-items: center; flex-shrink: 0; width: 30px; height: 30px; border-radius: 50%;
  background: var(--paper-2); font-size: 20px; font-weight: 700;
  transition: transform 0.3s var(--ease), background 0.3s;
}
.service-card-dark .service-details summary span { background: var(--ink-3); color: var(--accent); }
.service-details details[open] summary span { transform: rotate(45deg); background: var(--accent); color: var(--ink); }
.service-details details p { padding: 0 48px 22px 0; color: #5a5d56; }
.service-card-dark .service-details details p { color: rgba(244,243,236,0.68); }

/* Film & TV */
.film-tv { background: var(--ink); }
.film-grid { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--line-dark); border-left: 1px solid var(--line-dark); }
.film-item {
  display: flex; flex-direction: column; gap: 18px; min-height: 340px; padding: 28px 24px;
  border-right: 1px solid var(--line-dark); border-bottom: 1px solid var(--line-dark);
}
.film-number { font-size: 52px; font-weight: 900; font-stretch: 72%; line-height: 0.9; color: var(--accent); margin-bottom: auto; }
.film-item h3 { font-size: clamp(28px, 2.4vw, 36px); }
.film-item p { color: rgba(244,243,236,0.7); }
.film-grid-3 { grid-template-columns: repeat(3, 1fr); }
.more-services { padding-top: 0; }

/* Approach */
.approach { background: var(--ink-2); }
.approach-layout { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(48px, 8vw, 120px); align-items: start; }
.approach-intro { position: sticky; top: 120px; }
.approach-intro h2 { margin: 26px 0 28px; }
.approach-intro p:not(.eyebrow) { max-width: 460px; color: rgba(244,243,236,0.74); margin-bottom: 36px; }
.approach-intro .text-link::after { content: "→"; }
.steps { border-top: 1px solid var(--line-dark); }
.step {
  display: grid; grid-template-columns: 90px 1fr; gap: 20px;
  padding: clamp(32px, 4vw, 48px) 0; border-bottom: 1px solid var(--line-dark);
}
.step > span { font-size: 52px; font-weight: 900; font-stretch: 72%; line-height: 0.9; color: var(--accent); }
.step h3 { font-size: clamp(30px, 3vw, 42px); margin-bottom: 14px; }
.step p { color: rgba(244,243,236,0.7); max-width: 440px; }

/* Contact */
.contact { background: var(--accent); color: var(--ink); }
.contact .eyebrow .index { color: var(--ink); }
.contact-layout { display: grid; grid-template-columns: 1.4fr 1fr; gap: 48px; align-items: end; margin-top: 36px; }
.contact h2 { font-size: clamp(64px, 11vw, 170px); line-height: 0.84; }
.contact-details { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; }
.contact-details > p { font-size: 19px; margin-bottom: 14px; }
.contact-person { display: flex; flex-direction: column; padding-top: 18px; border-top: 2px solid var(--ink); width: 100%; }
.contact-person strong { font-size: 26px; font-weight: 900; font-stretch: 80%; text-transform: uppercase; }
.contact-person span { font-size: 13px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; }
.email-link, .phone-link { font-size: clamp(18px, 1.8vw, 22px); font-weight: 800; text-decoration: none; overflow-wrap: anywhere; background: linear-gradient(currentColor, currentColor) 0 100% / 0 2px no-repeat; transition: background-size 0.3s var(--ease); }
.email-link:hover, .phone-link:hover { background-size: 100% 2px; }
.contact-details .button { margin-top: 14px; }

/* Footer */
.footer { background: var(--ink); padding: 64px 0 28px; }
.footer-main { display: flex; align-items: center; justify-content: space-between; gap: 32px; padding-bottom: 44px; border-bottom: 1px solid var(--line-dark); }
.footer-brand .brand-crop { width: 200px; }
.footer-main p { font-size: 14px; font-weight: 800; letter-spacing: 0.12em; color: var(--muted); }
.footer-main > a:last-child { font-size: 14px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; text-decoration: none; }
.footer-main > a:last-child::after { content: " ↑"; color: var(--accent); }
.footer-main > a:last-child:hover { color: var(--accent); }
.footer-bottom { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; padding-top: 24px; font-size: 13px; color: var(--muted); }
.credit-button { background: none; border: 0; padding: 0; color: inherit; font: inherit; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.credit-button:hover { color: var(--paper); }

/* Reveal on scroll (enabled by script.js) */
.js .reveal { opacity: 0; transform: translateY(28px); transition: opacity 0.8s var(--ease), transform 0.8s var(--ease); }
.js .reveal.is-visible { opacity: 1; transform: none; }

/* Responsive */
@media (max-width: 1100px) {
  .client-grid { grid-template-columns: repeat(3, 1fr); }
  .film-grid { grid-template-columns: repeat(2, 1fr); }
  .section-top { grid-template-columns: 1fr 1fr; }
  .section-top .eyebrow { grid-column: 1 / -1; }
}
@media (max-width: 900px) {
  .desktop-nav, .header-contact { display: none; }
  .menu-toggle { display: flex; }
  .service-columns, .approach-layout, .contact-layout { grid-template-columns: 1fr; }
  .approach-intro { position: static; }
  .client-grid { grid-template-columns: repeat(2, 1fr); }
  .client { min-height: 220px; }
}
@media (max-width: 640px) {
  .brand-crop { width: 108px; }
  .section-top { grid-template-columns: 1fr; }
  .client-grid, .film-grid { grid-template-columns: 1fr; }
  .client { min-height: 0; gap: 36px; }
  .film-item { min-height: 0; }
  .hero-bottom span:last-child { display: none; }
  .step { grid-template-columns: 1fr; gap: 14px; }
  .footer-main { flex-direction: column; align-items: flex-start; }
}
/* Installed app (iOS home screen): keep content clear of the notch and home bar */
@supports (padding: env(safe-area-inset-top)) {
  .header {
    padding-top: calc(18px + env(safe-area-inset-top));
    padding-left: max(var(--gutter), env(safe-area-inset-left));
    padding-right: max(var(--gutter), env(safe-area-inset-right));
  }
  .header.is-scrolled, .header.menu-open { padding-top: calc(12px + env(safe-area-inset-top)); }
  .hero-content { padding-top: calc(140px + env(safe-area-inset-top)); }
  .footer { padding-bottom: calc(28px + env(safe-area-inset-bottom)); }
  html { scroll-padding-top: calc(84px + env(safe-area-inset-top)); }
}
@media (display-mode: standalone) {
  body { -webkit-tap-highlight-color: transparent; overscroll-behavior-y: none; }
}

.install-hint {
  position: fixed; z-index: 60;
  left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom, 0px));
  display: flex; align-items: center; gap: 14px;
  max-width: 460px; margin: 0 auto; padding: 14px 14px 14px 16px;
  background: var(--paper); color: var(--ink);
  border-radius: 14px; box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
  font-size: 14px; line-height: 1.4;
  animation: hintIn 0.4s var(--ease) both;
}
.install-hint img { width: 44px; height: 44px; border-radius: 10px; flex-shrink: 0; }
.install-hint p { margin: 0; flex: 1; }
.install-hint strong { display: block; text-transform: uppercase; font-stretch: 72%; font-weight: 800; font-size: 16px; letter-spacing: 0.01em; }
.install-hint .share-icon { display: inline-block; width: 13px; height: 16px; vertical-align: -2px; }
.install-hint button {
  flex-shrink: 0; width: 34px; height: 34px; border: 0; border-radius: 50%;
  background: var(--paper-2); color: var(--ink); font: inherit; font-size: 20px; line-height: 1; cursor: pointer;
}
@keyframes hintIn { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .reveal { opacity: 1; transform: none; }
}
