/* ===========================================================
   MEDIA DIGITAL BUSINESS - editorial dark studio
   =========================================================== */

:root {
  --bg: #0a0a0c;
  --bg-2: #101015;
  --surface: rgba(255, 255, 255, 0.026);
  --surface-2: rgba(255, 255, 255, 0.05);
  --border: rgba(255, 255, 255, 0.1);
  --border-soft: rgba(255, 255, 255, 0.07);

  --bone: #f3efe6;
  --ink: #15130e;

  --text: #ece9e6;
  --text-soft: #b6b2ad;
  --muted: #847f79;

  --gold-1: #f3d9a6;
  --gold-2: #d6a849;
  --gold-3: #c9962e;
  --accent: #e6c178;
  --accent-soft: rgba(230, 193, 120, 0.13);
  --accent-line: rgba(230, 193, 120, 0.34);

  --font-display: "Bricolage Grotesque", system-ui, sans-serif;
  --font-serif: "Fraunces", Georgia, serif;
  --font-body: "Inter", system-ui, -apple-system, sans-serif;

  --shell: 1280px;
  --radius: 14px;
  --radius-lg: 22px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 90px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  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: hidden;
  overflow-wrap: break-word;
}

h1, h2, h3 { margin: 0; font-family: var(--font-display); font-weight: 600; line-height: 1.04; letter-spacing: -0.025em; }
p { margin: 0; }
a { color: inherit; text-decoration: none; }
img, svg, canvas { display: block; max-width: 100%; }
em { font-style: normal; }

::selection { background: var(--accent); color: #1a1407; }

.shell { width: 100%; max-width: var(--shell); margin-inline: auto; padding-inline: 40px; }

.skip-link {
  position: absolute; left: -999px; top: 8px; z-index: 300;
  background: var(--accent); color: #14100a; padding: 10px 16px; border-radius: 8px; font-weight: 600;
}
.skip-link:focus { left: 16px; }

/* ---------- Grain ---------- */
.grain {
  position: fixed; inset: -50%; z-index: 400; pointer-events: none; opacity: 0.04;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- Custom cursor ---------- */
.cursor { position: fixed; top: 0; left: 0; z-index: 500; pointer-events: none; mix-blend-mode: difference; }
.cursor-dot, .cursor-ring {
  position: fixed; top: 0; left: 0; border-radius: 50%; transform: translate(-50%, -50%);
}
.cursor-dot { width: 7px; height: 7px; background: #fff; transition: width 0.2s, height 0.2s; }
.cursor-ring {
  width: 38px; height: 38px; border: 1px solid rgba(255, 255, 255, 0.6);
  transition: width 0.25s var(--ease), height 0.25s var(--ease), opacity 0.25s, background 0.25s;
}
body.cursor-grow .cursor-ring { width: 64px; height: 64px; background: rgba(255, 255, 255, 0.08); }
body.cursor-grow .cursor-dot { width: 0; height: 0; }
@media (hover: none), (pointer: coarse) { .cursor { display: none; } }

/* ---------- Intro reveal ---------- */
.intro { display: none; }
/* Pure-CSS self-dismissing intro - never depends on JS to clear. */
.js .intro {
  position: fixed; inset: 0; z-index: 600; background: var(--bg);
  display: flex; align-items: center; justify-content: center;
  animation: introOut 1.5s var(--ease) forwards;
}
@keyframes introOut {
  0%, 48% { transform: translateY(0); }
  100% { transform: translateY(-101%); }
}
.intro-word {
  font-family: var(--font-display); font-weight: 600; letter-spacing: 0.02em;
  font-size: clamp(1.1rem, 3.4vw, 2rem); color: var(--text);
  opacity: 0; transform: translateY(18px);
  animation: introWord 0.6s var(--ease) 0.1s forwards;
}
@keyframes introWord { to { opacity: 1; transform: none; } }

/* ---------- Header ---------- */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 200;
  border-bottom: 1px solid transparent;
  transition: background 0.4s var(--ease), border-color 0.4s var(--ease), backdrop-filter 0.4s;
}
.site-header.scrolled {
  background: rgba(10, 10, 12, 0.6); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border-bottom-color: var(--border-soft);
}
.nav { display: flex; align-items: center; justify-content: space-between; gap: 24px; height: 78px; }
.brand { display: inline-flex; align-items: center; gap: 12px; }
.brand-mark { flex-shrink: 0; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-name { font-family: var(--font-display); font-weight: 600; font-size: 0.86rem; letter-spacing: 0.04em; }
.brand-sub { font-size: 0.68rem; color: var(--muted); letter-spacing: 0.1em; text-transform: uppercase; }

.nav-links { display: flex; gap: 6px; margin-left: auto; }
.nav-links a { font-size: 0.9rem; color: var(--text-soft); padding: 8px 14px; border-radius: 100px; transition: color 0.2s, background 0.2s; }
.nav-links a span { position: relative; }
.nav-links a:hover { color: var(--text); background: var(--surface); }
.nav-cta { margin-left: 10px; }

.nav-toggle {
  display: none; flex-direction: column; justify-content: center; gap: 6px;
  width: 46px; height: 46px; background: transparent; border: 1px solid var(--border); border-radius: 12px; cursor: pointer;
}
.nav-toggle span { display: block; width: 18px; height: 1.6px; margin-inline: auto; background: var(--text); transition: transform 0.3s var(--ease), opacity 0.2s; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(3.8px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { transform: translateY(-3.8px) rotate(-45deg); }

.mobile-nav {
  display: none; flex-direction: column; gap: 2px; padding: 8px 40px 26px;
  background: rgba(10, 10, 12, 0.97); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}
.mobile-nav.open { display: flex; }
.mobile-nav a { padding: 14px 4px; color: var(--text-soft); border-bottom: 1px solid var(--border-soft); font-size: 1.05rem; }
.mobile-nav a:last-child { border-bottom: none; margin-top: 14px; text-align: center; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--font-body); font-weight: 600; font-size: 0.95rem;
  padding: 15px 30px; border-radius: 100px; border: 1px solid transparent; cursor: pointer; white-space: nowrap;
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease), background 0.3s, border-color 0.3s, color 0.2s;
}
.btn-sm { padding: 11px 22px; font-size: 0.875rem; }
.btn-block { width: 100%; }
.btn-primary { background: linear-gradient(135deg, var(--gold-1), var(--gold-2)); color: #1a1407; box-shadow: 0 14px 34px -14px rgba(214, 168, 73, 0.55); }
.btn-primary:hover { box-shadow: 0 20px 46px -14px rgba(214, 168, 73, 0.7); }
.btn-ghost { background: transparent; border-color: var(--border); color: var(--text); }
.btn-ghost:hover { border-color: var(--accent-line); background: var(--surface); }

.btn:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible, button:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 3px;
}

/* ---------- Hero ---------- */
.hero { position: relative; min-height: 100svh; display: flex; align-items: center; padding: 132px 0 84px; overflow: hidden; }
.hero-canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; opacity: 0.55; }
.hero-ambient {
  position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background:
    linear-gradient(180deg, rgba(10,10,12,0.55) 0%, rgba(10,10,12,0.35) 30%, rgba(10,10,12,0.82) 100%),
    radial-gradient(70% 55% at 82% 14%, rgba(214, 168, 73, 0.2), transparent 60%),
    url("assets/hero-ambient.webp");
  background-size: cover, cover, cover;
  background-position: center, center, center right;
}
.hero-ambient::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, var(--bg) 0%, rgba(10,10,12,0.2) 38%, transparent 65%); }
.hero-inner { position: relative; z-index: 1; width: 100%; }
.hero-meta {
  position: absolute; top: 122px; right: 48px; z-index: 1; display: flex; flex-direction: column; gap: 10px; align-items: flex-end;
  font-size: 0.72rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted);
}
.hero-meta span { padding-right: 16px; border-right: 1px solid var(--border); }

.eyebrow { display: inline-flex; align-items: center; gap: 12px; font-size: 0.8rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-soft); margin-bottom: 30px; }
.eyebrow-line { width: 40px; height: 1px; background: var(--accent); display: inline-block; }

.hero-title { font-size: clamp(2.9rem, 9.5vw, 8.4rem); font-weight: 600; letter-spacing: -0.035em; }
.hero-title .line { display: block; overflow: hidden; }
.hero-title .line > span { display: block; }
/* Pure-CSS headline reveal - self-completes regardless of JS. */
.js .hero-title .line > span { transform: translateY(110%); animation: heroUp 1s var(--ease) forwards; }
.js .hero-title .line:nth-child(1) > span { animation-delay: 0.95s; }
.js .hero-title .line:nth-child(2) > span { animation-delay: 1.08s; }
@keyframes heroUp { to { transform: translateY(0); } }
.hero-title em { font-family: var(--font-serif); font-style: italic; font-weight: 400; background: linear-gradient(120deg, var(--gold-1), var(--gold-3)); -webkit-background-clip: text; background-clip: text; color: transparent; }

.hero-foot { display: flex; justify-content: space-between; align-items: flex-end; gap: 40px; margin-top: 44px; flex-wrap: wrap; }
.hero-lead { font-size: clamp(1.02rem, 1.4vw, 1.2rem); color: var(--text-soft); max-width: 46ch; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }

/* ---------- Marquee ---------- */
.marquee { overflow: hidden; border-top: 1px solid var(--border-soft); border-bottom: 1px solid var(--border-soft); padding: 26px 0; background: var(--bg-2); }
.marquee-track { display: inline-flex; align-items: center; gap: 30px; white-space: nowrap; animation: marquee 38s linear infinite; font-family: var(--font-display); font-size: clamp(1.4rem, 3vw, 2.4rem); font-weight: 500; color: var(--text); }
.marquee-track .sep { color: var(--accent); font-family: var(--font-serif); font-style: italic; }
.marquee:hover .marquee-track { animation-play-state: paused; }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ---------- Sections ---------- */
.section { padding: 130px 0; position: relative; }
.section-head { max-width: 880px; margin-bottom: 64px; }
.section-eyebrow { display: inline-flex; align-items: center; gap: 12px; font-size: 0.78rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--accent); font-weight: 600; margin-bottom: 22px; }
.section-eyebrow span { font-family: var(--font-serif); font-style: italic; font-size: 1rem; }
.section-eyebrow.dark { color: #7e5c0e; }
.section-title { font-size: clamp(1.9rem, 4.4vw, 3.4rem); letter-spacing: -0.03em; }
.section-title.big { font-size: clamp(2.2rem, 6vw, 4.6rem); }
.section-title em, .studio-statement em { font-family: var(--font-serif); font-style: italic; font-weight: 400; color: var(--accent); }
.section-lead { color: var(--text-soft); font-size: 1.08rem; margin-top: 22px; max-width: 48ch; }

/* ---------- Services index ---------- */
.services { position: relative; }
.svc-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--border); }
.svc-row {
  display: grid; grid-template-columns: 64px minmax(0, 0.9fr) minmax(0, 1.1fr) 40px; align-items: center; gap: 24px;
  padding: 34px 8px; border-bottom: 1px solid var(--border); position: relative;
  transition: padding 0.4s var(--ease), color 0.3s;
}
.svc-row::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 0; background: linear-gradient(90deg, var(--accent-soft), transparent); transition: width 0.5s var(--ease); z-index: -1; }
.svc-num { font-family: var(--font-serif); font-style: italic; font-size: 1.1rem; color: var(--muted); transition: color 0.3s; }
.svc-name { font-family: var(--font-display); font-weight: 600; font-size: clamp(1.5rem, 3.2vw, 2.5rem); letter-spacing: -0.02em; transition: transform 0.4s var(--ease), color 0.3s; }
.svc-desc { color: var(--text-soft); font-size: 0.98rem; max-width: 42ch; opacity: 0.82; transition: opacity 0.3s; }
.svc-arrow { font-size: 1.4rem; color: var(--accent); opacity: 0; transform: translateX(-10px); transition: opacity 0.3s, transform 0.4s var(--ease); justify-self: end; }
.svc-row:hover { padding-left: 26px; }
.svc-row:hover::before { width: 100%; }
.svc-row:hover .svc-name { color: var(--accent); }
.svc-row:hover .svc-num { color: var(--accent); }
.svc-row:hover .svc-desc { opacity: 1; }
.svc-row:hover .svc-arrow { opacity: 1; transform: none; }

/* ---------- Capabilities grid ---------- */
.work { padding-bottom: 150px; }
.work-rail {
  max-width: var(--shell); margin-inline: auto; padding-inline: 40px; margin-top: 8px;
  display: flex; flex-wrap: wrap; justify-content: center; gap: 24px;
}
.work-card { flex: 0 1 calc(25% - 18px); min-width: 0; }
.work-visual { aspect-ratio: 3 / 2; border-radius: var(--radius-lg); overflow: hidden; border: 1px solid var(--border); background: var(--bg-2); }
.work-visual img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.7s var(--ease); }
.work-card:hover .work-visual img { transform: scale(1.06); }
.work-info { display: flex; align-items: baseline; gap: 14px; margin-top: 20px; flex-wrap: wrap; }
.work-tag { font-size: 0.72rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent); border: 1px solid var(--accent-line); border-radius: 100px; padding: 4px 12px; }
.work-info h3 { font-size: 1.4rem; }
.work-info p { color: var(--text-soft); font-size: 0.95rem; flex-basis: 100%; margin-top: 4px; }

/* ---------- Approach ---------- */
.approach-grid { display: grid; grid-template-columns: 0.85fr 1.15fr; gap: 70px; align-items: start; }
.approach-intro { position: sticky; top: 120px; }
.steps { list-style: none; margin: 0; padding: 0; }
.step { display: grid; grid-template-columns: auto 1fr; gap: 28px; padding: 36px 0; border-top: 1px solid var(--border); align-items: start; }
.step:last-child { border-bottom: 1px solid var(--border); }
.step-num { font-family: var(--font-serif); font-style: italic; font-size: 2rem; color: var(--accent); line-height: 1; }
.step h3 { font-size: 1.5rem; margin-bottom: 10px; }
.step p { color: var(--text-soft); font-size: 1rem; max-width: 46ch; }

/* ---------- Studio (light band) ---------- */
.studio { background: var(--bone); color: var(--ink); border-radius: 36px 36px 0 0; }
.studio-grid { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: 64px; align-items: center; }
.studio-visual { border-radius: var(--radius-lg); overflow: hidden; aspect-ratio: 4 / 5; }
.studio-visual img { width: 100%; height: 100%; object-fit: cover; }
.studio-statement { font-size: clamp(1.7rem, 3.4vw, 2.8rem); letter-spacing: -0.03em; line-height: 1.12; margin: 14px 0 28px; color: var(--ink); }
.studio-statement em { color: #7e5c0e; }
.studio-copy > p { color: #4a463e; font-size: 1.08rem; max-width: 54ch; }
.studio-points { list-style: none; margin: 34px 0 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 24px 40px; }
.studio-points li { font-size: 0.98rem; color: #4a463e; border-top: 1px solid rgba(21, 19, 14, 0.14); padding-top: 14px; }
.studio-points li span { display: block; font-family: var(--font-display); font-weight: 600; color: var(--ink); margin-bottom: 4px; }

/* ---------- Contact ---------- */
.contact { padding-top: 130px; }
.contact-grid { display: grid; grid-template-columns: 1fr 0.95fr; gap: 70px; align-items: start; }
.contact-lead { color: var(--text-soft); font-size: 1.08rem; margin: 24px 0 36px; max-width: 44ch; }
.contact-details { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 22px; }
.contact-details li { display: flex; flex-direction: column; gap: 5px; }
.contact-label { font-size: 0.72rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.contact-details a:hover { color: var(--accent); }

.contact-form { padding: 38px; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); display: flex; flex-direction: column; gap: 18px; }
.field { display: flex; flex-direction: column; gap: 8px; }
.field label { font-size: 0.86rem; font-weight: 500; color: var(--text-soft); }
.optional { color: var(--muted); font-weight: 400; }
.field input, .field textarea {
  font-family: var(--font-body); font-size: 0.96rem; color: var(--text);
  background: rgba(0, 0, 0, 0.28); border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px; resize: vertical;
  transition: border-color 0.2s, background 0.2s;
}
.field input::placeholder, .field textarea::placeholder { color: #8a8a99; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--accent); background: rgba(0, 0, 0, 0.42); }
.honeypot { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; opacity: 0; }
.form-status { font-size: 0.9rem; min-height: 1.2em; }
.form-status.success { color: #7ad19b; }
.form-status.error { color: #e88a8a; }

/* ---------- Footer ---------- */
.site-footer { padding: 90px 0 40px; border-top: 1px solid var(--border); }
.footer-wordmark {
  display: block; font-family: var(--font-display); font-weight: 600; letter-spacing: -0.03em; line-height: 0.95;
  font-size: clamp(2.2rem, 9vw, 8rem); color: var(--text); margin-bottom: 70px;
  transition: color 0.3s;
}
.footer-wordmark em { font-family: var(--font-serif); font-style: italic; font-weight: 400; color: var(--accent); }
.footer-wordmark:hover { color: #fff; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 0.8fr 1.2fr; gap: 48px; padding-bottom: 56px; }
.footer-tagline { color: var(--text-soft); font-size: 1rem; max-width: 34ch; margin-bottom: 22px; }
.footer-cta { color: var(--accent); font-weight: 600; }
.footer-col { display: flex; flex-direction: column; gap: 10px; }
.footer-h { font-size: 0.72rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
.footer-nav a { color: var(--text-soft); width: fit-content; transition: color 0.2s; }
.footer-nav a:hover { color: var(--accent); }
.footer-legal { color: var(--muted); font-size: 0.9rem; line-height: 1.7; }
.footer-company { color: var(--text-soft); font-family: var(--font-display); font-weight: 600; }
.footer-legal a:hover { color: var(--accent); }
.footer-bottom { display: flex; justify-content: space-between; gap: 16px; padding-top: 28px; border-top: 1px solid var(--border-soft); color: var(--muted); font-size: 0.85rem; flex-wrap: wrap; }

/* ---------- Reveal (enhancement only - visible without JS) ---------- */
.js .reveal { opacity: 0; transform: translateY(28px); transition: opacity 0.8s var(--ease), transform 0.8s var(--ease); }
.js .reveal.in { opacity: 1; transform: none; }
/* Failsafe: if main.js never runs, the inline timer adds .ready and forces everything visible. */
.ready .reveal { opacity: 1 !important; transform: none !important; }

/* ---------- Responsive ---------- */
@media (max-width: 1040px) {
  .approach-grid { grid-template-columns: 1fr; gap: 40px; }
  .approach-intro { position: static; }
  .studio-grid { grid-template-columns: 1fr; gap: 40px; }
  .studio-visual { aspect-ratio: 16 / 10; }
  .contact-grid { grid-template-columns: 1fr; gap: 44px; }
  .work-card { flex-basis: calc(50% - 12px); }
  .hero-meta { display: none; }
}
@media (max-width: 760px) {
  .shell { padding-inline: 24px; }
  .nav-links, .nav-cta { display: none; }
  .nav-toggle { display: flex; }
  .section { padding: 90px 0; }
  .svc-row { grid-template-columns: 40px 1fr; gap: 6px 16px; padding: 26px 4px; }
  .svc-num { grid-row: 1; }
  .svc-desc { grid-column: 2; max-width: none; opacity: 0.7; font-size: 0.92rem; }
  .svc-arrow { display: none; }
  .work-rail { padding-inline: 24px; }
  .footer-grid { grid-template-columns: 1fr; gap: 34px; }
  .studio-points { grid-template-columns: 1fr; gap: 18px; }
}
@media (max-width: 560px) {
  .work-card { flex-basis: 100%; }
}
@media (max-width: 440px) {
  .shell { padding-inline: 18px; }
  .brand-sub { display: none; }
  .contact-form { padding: 24px; }
  .marquee-track { font-size: 1.5rem; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; }
  .hero-title .line > span { transform: none; }
  .intro { display: none; }
  .hero-canvas { display: none; }
  .marquee-track { animation: none; }
}
