/*
Theme Name: Total Web Lab
Theme URI: https://totalweblab.com
Description: Standalone theme for Total Web Lab, the web and app division of Total Media Lab. Dark, cinematic, TML-branded. Self-contained: bundles its own editable-content admin, page templates, and assets. No parent theme, no plugin dependencies.
Author: Total Media Lab
Author URI: https://totalmedialab.com
Version: 1.7.0
License: Proprietary
Text Domain: twl
*/

/* ============================================================
   DESIGN TOKENS — TML brand (shared family identity)
   ============================================================ */
:root {
  --twl-purple:        #662780;
  --twl-purple-bright: #8A3DAB;
  --twl-accent:        #9F77DD;
  --twl-gold:          #C4972A;
  --twl-ink:           #0A0A0F;
  --twl-panel:         #12121A;
  --twl-line:          #24242F;
  --twl-bone:          #F4EFE6;
  --twl-muted:         #9A96A4;
  --twl-radius:        12px;
  --twl-radius-sm:     9px;
  --twl-maxw:          1100px;
  --twl-display: "Archivo Black", "Archivo-fallback", system-ui, sans-serif;
  --twl-serif:   "Fraunces", Georgia, serif;
  --twl-body:    "Sora", "Sora-fallback", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

/* ============================================================
   BASE
   ============================================================ */
/* Size-adjusted fallback faces. While the brand fonts download, text is
   rendered in these system-backed fallbacks tuned to roughly match the
   brand fonts' metrics, so the swap causes little or no layout shift (CLS). */
@font-face {
  font-family: "Sora-fallback";
  src: local("Arial");
  size-adjust: 100%;
  ascent-override: 95%;
  descent-override: 25%;
  line-gap-override: 0%;
}
@font-face {
  font-family: "Archivo-fallback";
  src: local("Arial Black"), local("Arial Bold"), local("Arial");
  size-adjust: 108%;
  ascent-override: 92%;
  descent-override: 24%;
  line-gap-override: 0%;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--twl-ink);
  color: var(--twl-bone);
  font-family: var(--twl-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; }
img { max-width: 100%; display: block; }
.twl-wrap { max-width: var(--twl-maxw); margin: 0 auto; padding: 0 24px; }
.twl-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ============================================================
   HEADER / NAV
   ============================================================ */
.twl-nav {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 24px; max-width: var(--twl-maxw); margin: 0 auto;
  position: relative; z-index: 30;
}
.twl-logo { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; }
.twl-logo img { max-height: 34px; width: auto; }
.twl-logo-text {
  font-family: var(--twl-display); font-size: 18px; letter-spacing: .01em; color: var(--twl-bone);
}
.twl-logo-text span { color: var(--twl-gold); }
.twl-nav-links { display: flex; gap: 26px; align-items: center; }
.twl-nav-links a { font-size: 14px; color: #cfc8da; text-decoration: none; transition: color .15s ease; }
.twl-nav-links a:hover { color: var(--twl-bone); }
.twl-nav-toggle {
  display: none; background: none; border: 0; color: var(--twl-bone);
  font-size: 24px; cursor: pointer; padding: 4px 8px;
}

/* ============================================================
   BUTTONS
   ============================================================ */
.twl-btn {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--twl-body); font-weight: 600; font-size: 15px;
  padding: 14px 26px; border-radius: var(--twl-radius-sm); text-decoration: none;
  border: 1px solid transparent; cursor: pointer; line-height: 1;
  transition: transform .15s ease, background .15s ease, border-color .15s ease, color .15s ease;
}
.twl-btn-primary { background: var(--twl-purple); color: #fff; }
.twl-btn-primary:hover { background: var(--twl-purple-bright); transform: translateY(-2px); }
.twl-btn-gold { background: var(--twl-gold); color: var(--twl-ink); }
.twl-btn-gold:hover { transform: translateY(-2px); filter: brightness(1.05); }
.twl-btn-ghost { background: transparent; color: var(--twl-bone); border-color: var(--twl-line); }
.twl-btn-ghost:hover { border-color: var(--twl-purple-bright); color: #fff; transform: translateY(-2px); }

/* ============================================================
   HERO
   ============================================================ */
.twl-hero {
  position: relative; padding: 72px 0 64px; border-bottom: 1px solid var(--twl-line);
  overflow: hidden;
}
.twl-hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(55% 80% at 85% 0%, rgba(102,39,128,.40), transparent 70%),
    radial-gradient(45% 70% at 0% 100%, rgba(196,151,42,.12), transparent 70%);
}
.twl-hero::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(42,37,53,.45) 1px, transparent 1px),
    linear-gradient(90deg, rgba(42,37,53,.45) 1px, transparent 1px);
  background-size: 46px 46px; opacity: .4;
  -webkit-mask-image: radial-gradient(65% 60% at 72% 25%, #000, transparent 75%);
  mask-image: radial-gradient(65% 60% at 72% 25%, #000, transparent 75%);
}
.twl-hero .twl-wrap { position: relative; z-index: 1; }
.twl-hero-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; }
.twl-eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 11px; letter-spacing: .2em; text-transform: uppercase;
  color: var(--twl-gold); font-weight: 600; margin-bottom: 20px;
}
.twl-eyebrow::before { content: ""; width: 26px; height: 1px; background: var(--twl-gold); }
.twl-h1 {
  font-family: var(--twl-display); font-weight: 400;
  font-size: clamp(38px, 5.5vw, 56px); line-height: 1.02; letter-spacing: -.01em;
  margin: 0 0 18px;
}
.twl-h1 em, .twl-accent { font-family: var(--twl-serif); font-style: italic; font-weight: 400; color: var(--twl-accent); }
.twl-lead { font-size: clamp(16px, 2vw, 19px); color: var(--twl-muted); max-width: 46ch; margin: 0 0 28px; }
.twl-ctas { display: flex; flex-wrap: wrap; gap: 12px; }

/* Hero media panel (video or image, falls back to play placeholder) */
.twl-media {
  position: relative; border-radius: 14px; overflow: hidden; border: 1px solid var(--twl-line);
  aspect-ratio: 16 / 11; background: linear-gradient(135deg, #1a1226, #0d0a14);
  display: flex; align-items: center; justify-content: center;
}
.twl-media::before {
  content: ""; position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(42,37,53,.5) 1px, transparent 1px),
    linear-gradient(90deg, rgba(42,37,53,.5) 1px, transparent 1px);
  background-size: 30px 30px; opacity: .5;
}
.twl-media img, .twl-media video, .twl-media iframe {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border: 0;
}
.twl-media-play {
  position: relative; width: 64px; height: 64px; border-radius: 50%;
  background: var(--twl-purple); display: flex; align-items: center; justify-content: center;
  box-shadow: 0 0 0 10px rgba(102,39,128,.22); color: #fff; font-size: 22px;
}
.twl-media-tag {
  position: absolute; bottom: 12px; left: 14px; z-index: 2;
  font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: #cfc8da;
}

/* ============================================================
   SECTIONS
   ============================================================ */
.twl-section { padding: 64px 0; border-bottom: 1px solid var(--twl-line); }
.twl-section.panel { background: var(--twl-panel); }
.twl-kicker {
  font-size: 11px; letter-spacing: .18em; text-transform: uppercase;
  color: var(--twl-gold); font-weight: 600; margin-bottom: 12px;
}
.twl-h2 {
  font-family: var(--twl-display); font-weight: 400;
  font-size: clamp(26px, 4vw, 38px); line-height: 1.1; letter-spacing: -.01em;
  margin: 0 0 16px; max-width: 22ch;
}
.twl-h2 em { font-family: var(--twl-serif); font-style: italic; color: var(--twl-accent); }
.twl-sec-lead { color: var(--twl-muted); max-width: 60ch; font-size: 16px; margin: 0 0 36px; }

/* Pillar grid (ownership cards) */
.twl-grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.twl-card {
  border: 1px solid var(--twl-line); border-radius: var(--twl-radius); padding: 20px;
  background: linear-gradient(180deg, rgba(102,39,128,.06), transparent);
}
.twl-card .twl-mark {
  display: inline-grid; place-items: center; width: 36px; height: 36px;
  border-radius: 8px; background: rgba(159,119,221,.16); color: var(--twl-accent);
  font-size: 16px; margin-bottom: 12px;
}
.twl-card h3 { font-size: 15px; font-weight: 700; margin: 0 0 5px; color: var(--twl-bone); }
.twl-card p { margin: 0; color: var(--twl-muted); font-size: 13px; line-height: 1.5; }

/* Build / capability list (numbered sequence) */
.twl-build { display: grid; grid-template-columns: 44px 1fr; gap: 18px; padding: 20px 0; border-top: 1px solid var(--twl-line); align-items: start; }
.twl-build:last-child { border-bottom: 1px solid var(--twl-line); }
.twl-build-num { font-family: var(--twl-serif); font-style: italic; font-size: 26px; color: var(--twl-accent); line-height: 1; }
.twl-build h3 { font-size: 18px; font-weight: 700; margin: 0 0 5px; }
.twl-build p { margin: 0; color: var(--twl-muted); }

/* Two-column section head + body */
.twl-split { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: start; }

/* Steps */
.twl-steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.twl-step { border: 1px solid var(--twl-line); border-radius: var(--twl-radius); padding: 20px; }
.twl-step-k { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--twl-accent); margin-bottom: 10px; font-weight: 600; }
.twl-step h4 { margin: 0 0 6px; font-size: 16px; }
.twl-step p { margin: 0; color: var(--twl-muted); font-size: 14px; }

/* Funnel: division roster */
.twl-divs { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.twl-div {
  border: 1px solid var(--twl-line); border-radius: var(--twl-radius); padding: 24px;
  background: linear-gradient(180deg, rgba(196,151,42,.05), transparent);
  display: flex; flex-direction: column; gap: 8px;
}
.twl-div .twl-div-q { font-size: 12px; letter-spacing: .04em; color: var(--twl-gold); text-transform: uppercase; font-weight: 600; }
.twl-div h3 { font-family: var(--twl-display); font-weight: 400; font-size: 20px; margin: 0; }
.twl-div p { margin: 0; color: var(--twl-muted); font-size: 14px; }

/* CTA band */
.twl-cta { text-align: center; padding: 80px 0; position: relative; }
.twl-cta::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(60% 90% at 50% 0%, rgba(102,39,128,.28), transparent 70%);
}
.twl-cta .twl-wrap { position: relative; z-index: 1; }
.twl-cta .twl-h2 { margin: 0 auto 12px; }
.twl-cta .twl-sec-lead { margin: 0 auto 28px; }
.twl-cta .twl-ctas { justify-content: center; }

/* Forms (contact) */
.twl-form { display: grid; gap: 16px; max-width: 560px; }
.twl-field label { display: block; font-size: 13px; color: var(--twl-muted); margin-bottom: 6px; }
.twl-field input, .twl-field textarea, .twl-field select {
  width: 100%; padding: 13px 14px; font-size: 15px; font-family: var(--twl-body);
  border-radius: var(--twl-radius-sm); border: 1px solid var(--twl-line);
  background: var(--twl-panel); color: var(--twl-bone);
}
.twl-field input:focus, .twl-field textarea:focus, .twl-field select:focus {
  outline: none; border-color: var(--twl-purple-bright);
}
.twl-form-note { font-size: 13px; color: var(--twl-muted); }

/* ============================================================
   FOOTER
   ============================================================ */
.twl-footer {
  padding: 30px 24px; max-width: var(--twl-maxw); margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  font-size: 12px; color: #6b6878; flex-wrap: wrap;
}
.twl-footer .twl-logo-text { font-size: 14px; color: var(--twl-muted); }

/* ============================================================
   RESPONSIVE — mobile first priority
   ============================================================ */
@media (max-width: 880px) {
  .twl-hero-grid, .twl-split { grid-template-columns: 1fr; }
  .twl-grid-4 { grid-template-columns: 1fr 1fr; }
  .twl-steps { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 620px) {
  .twl-nav-links {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; gap: 0; background: var(--twl-panel);
    border-top: 1px solid var(--twl-line); border-bottom: 1px solid var(--twl-line); padding: 8px 0;
  }
  .twl-nav-links.open { display: flex; }
  .twl-nav-links a { padding: 14px 24px; width: 100%; }
  .twl-nav-links .twl-btn { margin: 8px 24px; width: calc(100% - 48px); justify-content: center; }
  .twl-nav-toggle { display: block; }
  .twl-divs, .twl-grid-4, .twl-steps { grid-template-columns: 1fr; }
  .twl-ctas { flex-direction: column; }
  .twl-btn { width: 100%; justify-content: center; }
  .twl-hero { padding: 48px 0 44px; }
  .twl-section { padding: 48px 0; }
}
