/* McEwen Digital site styles
   Design plan: _planning/DESIGN-PLAN.md (approved by Darren, Nov 7, 2026) */

@font-face {
  font-family: "Archivo";
  src: url("/assets/fonts/archivo-latin-var.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
}

:root {
  --night: #12161B;
  --slate: #1B2129;
  --slate-hover: #202833;
  --mist: #C3CCD6;
  --daylight: #F3F5F7;
  --trace: #62C6FF;
  --trace-hover: #8AD5FF;
  --lamp: #E9A85C;
  --muted: #94A0AD;
  --ink: #06131D;
  --line: rgba(98, 198, 255, .38);
  --line-soft: rgba(98, 198, 255, .18);
  --field-border: #3A4552;
  --gutter: clamp(16px, 5vw, 64px);
  --max: 1240px;
  --step-0: 1.125rem;
  --step-1: 1.5rem;
  --step-2: 2rem;
  --step-3: 2.625rem;
  --step-4: 3.5rem;
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--night); color: var(--mist);
  font-family: "Archivo", system-ui, -apple-system, sans-serif;
  font-size: var(--step-0); line-height: 1.6;
  font-variation-settings: "wdth" 100;
}
img, video { display: block; max-width: 100%; height: auto; }
a { color: var(--trace); text-underline-offset: .2em; }
a:hover { color: var(--trace-hover); }
:focus-visible { outline: 2px solid var(--trace); outline-offset: 3px; border-radius: 4px; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }

.skip { position: absolute; left: 8px; top: -60px; z-index: 50; background: var(--daylight); color: var(--ink); padding: 10px 14px; border-radius: 6px; font-weight: 700; }
.skip:focus { top: 8px; }
.preview-bar { background: #2A2410; color: #F3E3A6; border-bottom: 1px solid #6B5A1F; font-size: 14px; line-height: 20px; text-align: center; padding: 6px var(--gutter); }

/* Type */
h1, h2, h3 {
  color: var(--daylight); font-weight: 800; letter-spacing: -.015em; line-height: 1.04;
  font-variation-settings: "wdth" 125; margin: 0;
}
h1 { font-size: clamp(2.5rem, 5.4vw, 4.75rem); letter-spacing: -.025em; }
h2 { font-size: clamp(var(--step-2), 4.2vw, var(--step-4)); }
h3 { font-size: var(--step-1); font-weight: 700; letter-spacing: -.005em; line-height: 1.15; }
p { margin: 0 0 1em; max-width: 36em; }
.lede { font-size: clamp(1.125rem, 1.6vw, 1.375rem); }
.small { font-size: 15px; color: var(--muted); }

/* Buttons and links */
.btn {
  display: inline-block; background: var(--trace); color: var(--ink); text-decoration: none;
  font: 700 17px/1.2 "Archivo", system-ui, sans-serif; padding: 15px 24px; border-radius: 6px; border: 0; cursor: pointer;
  transition: background-color 150ms var(--ease-out), transform 100ms var(--ease-out);
}
.btn:hover { background: var(--trace-hover); color: var(--ink); }
.btn:active { transform: scale(0.97); }
.btn-small { padding: 10px 16px; font-size: 15px; }
.btn-ghost { background: transparent; color: var(--daylight); box-shadow: inset 0 0 0 1px var(--line); }
.btn-ghost:hover { background: rgba(98,198,255,.1); color: var(--daylight); box-shadow: inset 0 0 0 1px var(--trace); }
.link-quiet { color: var(--daylight); font-weight: 600; text-decoration-color: var(--line); }
.link-quiet:hover { color: var(--daylight); text-decoration-color: var(--trace); }

/* Header */
.site-header { position: relative; z-index: 5; }
.home .site-header { position: absolute; left: 0; right: 0; }
.home.has-preview .site-header { top: 33px; }
.site-header .wrap { display: flex; align-items: center; gap: 24px; min-height: 76px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 12px; color: var(--daylight); text-decoration: none; font-weight: 700; font-variation-settings: "wdth" 112; font-size: 19px; }
.brand:hover { color: var(--daylight); }
.brand img { width: 24px; height: auto; }
.nav { margin-left: auto; display: flex; gap: 28px; align-items: center; }
.nav a:not(.btn) { color: var(--mist); text-decoration: none; font-weight: 600; font-size: 16px; padding: 6px 0; }
.nav a:not(.btn):hover, .nav a[aria-current="page"] { color: var(--daylight); }
.nav a[aria-current="page"] { box-shadow: inset 0 -2px 0 var(--trace); }
.menu-btn { display: none; margin-left: auto; background: none; border: 1px solid var(--line); color: var(--daylight); font: 600 16px "Archivo", sans-serif; padding: 8px 14px; border-radius: 6px; cursor: pointer; }

/* Home hero */
.hero { position: relative; min-height: min(100svh, 56.25vw, 920px); display: flex; align-items: center; overflow: hidden; }
.hero-media { position: absolute; inset: 0; }
.hero-media img, .hero-media video { width: 100%; height: 100%; object-fit: cover; position: absolute; inset: 0; }
.hero-media video { transition: opacity 400ms var(--ease-in-out); }
.hero-media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, var(--night) 0%, rgba(18,22,27,.82) 30%, rgba(18,22,27,0) 62%); }
.hero-copy { position: relative; z-index: 2; width: 100%; padding-top: 130px; padding-bottom: 80px; }
.hero-copy > * { max-width: min(46rem, 52%); }
.hero h1 { font-size: clamp(2.75rem, 5.4vw, 5.25rem); line-height: .96; }
.hero h1 span { display: block; }
.hero .lede { max-width: 28em; margin: 28px 0 32px; }
.video-toggle { position: absolute; z-index: 3; left: var(--gutter); bottom: 24px; font: 600 14px "Archivo", sans-serif; color: var(--daylight); background: rgba(18,22,27,.6); border: 1px solid var(--line); border-radius: 999px; padding: 8px 14px; cursor: pointer; }
.video-toggle:hover { border-color: var(--trace); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px 26px; align-items: center; }

/* Inner page hero */
.page-hero { padding: clamp(56px, 8vw, 112px) 0 clamp(40px, 6vw, 72px); }
.page-hero h1 { max-width: 15em; }
.page-hero .lede { margin-top: 24px; }

/* Sections */
.section { padding: clamp(64px, 9vw, 128px) 0; border-top: 1px solid var(--line-soft); }
.section-head { margin-bottom: 40px; }
.section-head p { margin-top: 18px; }
.split { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(32px, 6vw, 88px); align-items: start; }
.split .intro p { margin-top: 20px; }

/* The shop window */
.window { display: grid; grid-template-columns: 1fr 1fr; border: 1px solid var(--line); border-radius: 3px; background: var(--slate); }
.pane { padding: clamp(24px, 3vw, 40px); border: 0 solid var(--line-soft); text-decoration: none; color: inherit; display: block; transition: background-color 150ms var(--ease-out); }
a.pane:hover { background: var(--slate-hover); color: inherit; }
.pane:nth-child(odd) { border-right-width: 1px; }
.pane:nth-child(-n+2) { border-bottom-width: 1px; }
.pane h3 { margin-bottom: 10px; }
.pane p { font-size: 16px; color: var(--muted); margin: 0 0 14px; }
.pane .more { color: var(--trace); font-weight: 600; font-size: 15px; }
.scope-note { margin-top: 14px; font-size: 15px; color: var(--muted); }

/* Lists inside a frame */
.frame-list { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line); border-radius: 3px; background: var(--slate); }
.frame-list li { padding: 16px 20px 16px 48px; border-top: 1px solid var(--line-soft); position: relative; }
.frame-list li:first-child { border-top: 0; }
.frame-list li::before { content: ""; position: absolute; left: 20px; top: 1.45em; width: 12px; height: 2px; background: var(--trace); }

/* Process: a real sequence */
.steps { list-style: none; margin: 48px 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--line); }
.steps li { padding: 28px 24px 0 0; }
.steps .n { display: block; font-weight: 800; font-variation-settings: "wdth" 125; font-size: var(--step-3); line-height: 1; color: var(--trace); margin-bottom: 18px; }
.steps li:first-child .n { color: var(--lamp); }
.steps h3 { margin-bottom: 8px; }
.steps p { font-size: 16px; color: var(--muted); }

/* Work gallery */
.filters { display: flex; gap: 8px; margin: 0 0 28px; flex-wrap: wrap; }
.filters button { font: 600 15px "Archivo", sans-serif; color: var(--mist); background: transparent; border: 1px solid var(--line-soft); padding: 9px 16px; border-radius: 999px; cursor: pointer; }
.filters button:hover { border-color: var(--line); color: var(--daylight); }
.filters button[aria-pressed="true"] { color: var(--ink); background: var(--daylight); border-color: var(--daylight); }
.no-js .filters { display: none; }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); gap: 24px; }
.gallery figure { margin: 0; }
.gallery figure[hidden] { display: none; }
.tile { aspect-ratio: 16/10; border: 1px solid var(--line); border-radius: 3px; position: relative; overflow: hidden; background: radial-gradient(120% 90% at 80% 20%, #22303D 0%, var(--slate) 60%); display: grid; place-items: center; color: var(--muted); font-size: 15px; text-align: center; padding: 24px; }
.tile.has-img { padding: 0; }
.tile.has-img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.badge { z-index: 1; position: absolute; left: 12px; top: 12px; background: rgba(18,22,27,.72); color: var(--mist); border: 1px solid rgba(243,245,247,.22); font-weight: 600; font-size: 12px; padding: 3px 9px; border-radius: 999px; }
.gallery figcaption { padding-top: 12px; font-size: 16px; }
.gallery figcaption strong { color: var(--daylight); font-weight: 600; }

/* Ad concept tile: square feed ad + tall Stories video */
.ad-tile { padding: 0; }
.ad-sq { position: absolute; left: 9.4%; top: 15%; width: 43.75%; border-radius: 6px; box-shadow: 0 18px 40px rgba(0,0,0,.45); }
.ad-tl { position: absolute; right: 10.6%; top: 9%; width: 28.8%; aspect-ratio: 9 / 16; object-fit: cover; border-radius: 12px; border: 4px solid #0E1216; box-shadow: 0 18px 40px rgba(0,0,0,.5); background: #0E1216; }
.replay { position: absolute; right: 10.6%; bottom: 1.2%; z-index: 1; font: 600 12px "Archivo", sans-serif; color: var(--daylight); background: rgba(18,22,27,.75); border: 1px solid var(--line); border-radius: 999px; padding: 5px 12px; min-height: 26px; cursor: pointer; }
.replay:hover { border-color: var(--trace); }
.no-js .replay { display: none; }

/* Proof (vidIQ badge) */
.proof { display: grid; grid-template-columns: minmax(0, 280px) minmax(0, 1fr); gap: clamp(28px, 5vw, 64px); align-items: center; }
.proof-badge { width: 100%; max-width: 280px; border-radius: 22px; box-shadow: 0 18px 40px rgba(0,0,0,.4); }
.proof h2 { margin-bottom: 18px; }

/* Commercial spotlight */
.spotlight { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(28px, 5vw, 64px); align-items: center; }
.spotlight-text h2 { margin-bottom: 18px; }
.spotlight-video { margin: 0; }
.spotlight-frame { position: relative; border: 1px solid var(--line); border-radius: 3px; overflow: hidden; background: #000; aspect-ratio: 16 / 9; }
.spotlight-frame video { display: block; width: 100%; height: 100%; object-fit: cover; }
.spotlight-vertical { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
.spotlight-vertical .spotlight-frame { aspect-ratio: 9 / 16; max-width: 360px; margin-left: auto; }

/* Case study (client work) */
.case { grid-column: 1 / -1; margin: 0; display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(28px, 5vw, 64px); align-items: center; border: 1px solid var(--line); border-radius: 3px; background: var(--slate); padding: clamp(20px, 3vw, 40px); }
.case-media { position: relative; padding: 0 9% 9% 0; }
.case-desktop { width: 100%; border-radius: 6px; border: 1px solid var(--line-soft); }
.case-phone { position: absolute; right: 0; bottom: 0; width: 26%; border-radius: 14px; border: 3px solid #2A323C; box-shadow: 0 18px 40px rgba(0,0,0,.45); }
.case-label { display: inline-block; color: var(--muted); font-weight: 600; font-size: 15px; margin-bottom: 10px; }
.case-text h3 { font-size: var(--step-2); margin-bottom: 14px; }
.case-list { list-style: none; margin: 0 0 18px; padding: 0; border-top: 1px solid var(--line-soft); }
.case-list li { padding: 10px 0 10px 24px; border-bottom: 1px solid var(--line-soft); position: relative; font-size: 16px; }
.case-list li::before { content: ""; position: absolute; left: 0; top: 1.25em; width: 12px; height: 2px; background: var(--trace); }
.case[hidden] { display: none; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Founder */
.founder { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: clamp(28px, 6vw, 80px); align-items: center; }
.founder img { width: 100%; border-radius: 3px; border: 1px solid var(--line-soft); }
.founder h2 { margin-bottom: 22px; }

/* Prose pages (privacy, service detail) */
.prose { max-width: 44rem; }
.prose h2 { font-size: var(--step-2); margin: 48px 0 16px; }
.prose h2:first-child { margin-top: 0; }
.prose ul { padding-left: 1.2em; margin: 0 0 1em; }
.prose li { margin-bottom: .5em; }
.two-col { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(32px, 6vw, 88px); align-items: start; }
.aside-box { border: 1px solid var(--line); border-radius: 3px; background: var(--slate); padding: clamp(22px, 3vw, 32px); }
.aside-box h2 { font-size: var(--step-1); margin-bottom: 12px; }

/* FAQ */
.faq { border-top: 1px solid var(--line-soft); max-width: 50rem; }
.faq details { border-bottom: 1px solid var(--line-soft); }
.faq summary { cursor: pointer; list-style: none; padding: 20px 40px 20px 0; position: relative; color: var(--daylight); font-weight: 600; font-size: 19px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; position: absolute; right: 6px; top: 50%; width: 12px; height: 12px; border-right: 2px solid var(--trace); border-bottom: 2px solid var(--trace); transform: translateY(-70%) rotate(45deg); transition: transform 200ms var(--ease-out); }
.faq details[open] summary::after { transform: translateY(-30%) rotate(-135deg); }
.faq details p { padding-bottom: 18px; }

/* CTA block */
.cta-inner { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: clamp(32px, 6vw, 80px); align-items: start; }
.cta-actions { display: flex; flex-wrap: wrap; gap: 14px 26px; align-items: center; margin-top: 28px; }

/* Forms */
.form { background: var(--slate); border: 1px solid var(--line); border-radius: 3px; padding: clamp(22px, 3vw, 34px); }
.form fieldset { border: 0; margin: 0 0 22px; padding: 0; min-width: 0; }
.form legend { color: var(--daylight); font-weight: 600; margin-bottom: 10px; padding: 0; }
.choice { display: flex; gap: 10px; align-items: flex-start; padding: 11px 12px; border: 1px solid var(--line-soft); border-radius: 6px; margin-bottom: 8px; font-size: 16px; cursor: pointer; }
.choice:has(input:checked) { border-color: var(--trace); background: rgba(98,198,255,.07); }
.choice input { margin-top: 3px; width: 18px; height: 18px; accent-color: var(--trace); flex: none; }
.field { margin-bottom: 16px; }
.field label { display: block; color: var(--daylight); font-weight: 600; font-size: 15px; margin-bottom: 6px; }
.field .opt { color: var(--muted); font-weight: 400; }
.field input, .field select, .field textarea {
  width: 100%; font: 400 17px "Archivo", sans-serif; color: var(--daylight); background: var(--night);
  border: 1px solid var(--field-border); border-radius: 6px; padding: 12px 13px;
}
.field textarea { min-height: 120px; resize: vertical; }
.field input:focus-visible, .field select:focus-visible, .field textarea:focus-visible { border-color: var(--trace); outline-offset: 1px; }
.field .hint { font-size: 14px; color: var(--muted); margin: 6px 0 0; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; margin: 6px 0 20px; }
.check input { margin-top: 2px; width: 18px; height: 18px; accent-color: var(--trace); flex: none; }
.hp { position: absolute; left: -9999px; }
.form .btn { width: 100%; }
.form .small { margin: 12px 0 0; }
.field[hidden] { display: none; }

/* Areas */
.area-list { display: grid; grid-template-columns: repeat(4, 1fr); list-style: none; margin: 0; padding: 0; border: 1px solid var(--line); border-radius: 3px; background: var(--slate); }
.area-list li { padding: 22px 24px; border: 0 solid var(--line-soft); border-right-width: 1px; border-bottom-width: 1px; color: var(--daylight); font-weight: 600; font-variation-settings: "wdth" 112; font-size: 20px; }
.area-list li:nth-child(4n) { border-right-width: 0; }
.area-list li:nth-last-child(-n+4) { border-bottom-width: 0; }

/* Footer */
.site-footer { border-top: 1px solid var(--line-soft); padding: 56px 0 40px; font-size: 16px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1.4fr; gap: 32px; }
.footer-name { color: var(--daylight); font-weight: 700; font-variation-settings: "wdth" 112; font-size: 19px; margin-bottom: 8px; }
.footer-head { color: var(--daylight); font-weight: 600; margin-bottom: 8px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 6px; }
.site-footer nav a, .footer-grid div:last-child a { color: var(--mist); text-decoration: none; }
.site-footer nav a:hover, .footer-grid div:last-child a:hover { color: var(--daylight); text-decoration: underline; }
.footer-base { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--line-soft); font-size: 14px; color: var(--muted); }
.footer-base p { margin: 0; }

/* Phone: its own composition */
@media (max-width: 760px) {
  .menu-btn { display: inline-block; }
  .js .nav { display: none; width: 100%; flex-direction: column; align-items: stretch; gap: 0; padding: 8px 0 20px; }
  .js .nav.open { display: flex; }
  .js .nav a:not(.btn) { padding: 14px 0; border-bottom: 1px solid var(--line-soft); font-size: 18px; }
  .js .nav a[aria-current="page"] { box-shadow: none; color: var(--trace); }
  .js .nav .btn { margin-top: 16px; text-align: center; }
  .no-js .menu-btn { display: none; }
  .no-js .nav { width: 100%; flex-wrap: wrap; gap: 8px 18px; margin: 0 0 12px; }
  .home .site-header .wrap { background: transparent; }
  .home .nav.open { background: var(--night); margin: 0 calc(var(--gutter) * -1); padding-left: var(--gutter); padding-right: var(--gutter); }

  .hero { min-height: 100svh; align-items: flex-start; }
  .hero-media::after { background: linear-gradient(180deg, var(--night) 0%, rgba(18,22,27,.86) 32%, rgba(18,22,27,.15) 56%, rgba(18,22,27,.55) 100%); }
  .hero-copy { padding-top: 112px; padding-bottom: 40px; min-height: 100svh; display: flex; flex-direction: column; }
  .hero-copy > * { max-width: none; }
  .hero .lede { margin: 18px 0 0; }
  .hero-actions { margin-top: auto; }
  .hero-actions .btn { width: 100%; text-align: center; }
  .hero-actions .link-quiet { width: 100%; text-align: center; }
  .video-toggle { left: auto; right: 12px; bottom: auto; top: 84px; padding: 6px 12px; font-size: 13px; }

  .split, .founder, .cta-inner, .two-col { grid-template-columns: 1fr; }
  .window { grid-template-columns: 1fr; }
  .pane { border-right-width: 0 !important; border-bottom-width: 1px; }
  .pane:last-child { border-bottom-width: 0; }
  .steps { grid-template-columns: 1fr; border-top: 0; }
  .steps li { padding: 22px 0 18px; border-top: 1px solid var(--line-soft); display: grid; grid-template-columns: 56px 1fr; column-gap: 12px; }
  .steps .n { grid-row: span 2; font-size: var(--step-2); margin: 0; }
  .founder img { max-width: 280px; }
  .case { grid-template-columns: 1fr; }
  .spotlight, .spotlight-vertical { grid-template-columns: 1fr; }
  .spotlight-vertical .spotlight-frame { margin: 0 auto; max-width: 300px; }
  .proof { grid-template-columns: 1fr; }
  .proof-badge { max-width: 220px; }
  .badge { font-size: 11px; padding: 2px 8px; left: 8px; top: 8px; }
  .area-list { grid-template-columns: 1fr 1fr; }
  .area-list li { border-right-width: 1px !important; border-bottom-width: 1px !important; }
  .area-list li:nth-child(2n) { border-right-width: 0 !important; }
  .area-list li:nth-last-child(-n+2) { border-bottom-width: 0 !important; }
  .footer-grid { grid-template-columns: 1fr; }
  .cta-actions .btn { width: 100%; text-align: center; }
}

/* Reduced motion: drop movement, keep gentle colour and fade changes */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; }
  .btn:active { transform: none; }
  .btn { transition: background-color 150ms var(--ease-out); }
  .faq summary::after { transition: none; }
}
