/* ==========================================================================
   Cre8tive PLM — Design System
   Brand palette lives here. Adjust these variables to fine-tune the match
   with www.ctnd.com — every page inherits from this single block.
   ========================================================================== */

:root {
  /* Brand — sampled from the Cre8tive gear-8 logo */
  --red: #d81f26;            /* Cre8tive signature red */
  --red-bright: #ff3a42;
  --red-deep: #9c1519;
  --silver: #c7c9cb;         /* gear silver */

  /* Neutrals — dark, minimalist, technical */
  --bg: #0a0d13;
  --bg-raised: #10141d;
  --surface: #141924;
  --surface-2: #1a2130;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.14);

  /* Text */
  --text: #eef1f6;
  --text-2: #a7b0bf;
  --text-3: #6b7484;

  /* Effects */
  --glow: rgba(216, 31, 38, 0.38);
  --grad: linear-gradient(135deg, var(--red) 0%, var(--red-bright) 100%);

  /* Type */
  --font-display: "Space Grotesk", "Segoe UI", system-ui, sans-serif;
  --font-body: "Inter", "Segoe UI", system-ui, sans-serif;

  /* Layout */
  --max: 1180px;
  --radius: 14px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16.5px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

::selection { background: var(--red); color: #fff; }

img, video, iframe { max-width: 100%; }

a { color: inherit; text-decoration: none; }

.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 24px;
}

/* --------------------------------------------------------------------------
   Typography
   -------------------------------------------------------------------------- */

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

h1 { font-size: clamp(2.4rem, 5.4vw, 4.2rem); }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.6rem); }
h3 { font-size: 1.25rem; }

.lead {
  font-size: clamp(1.05rem, 1.8vw, 1.3rem);
  color: var(--text-2);
  max-width: 46em;
}

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--red-bright);
  margin-bottom: 18px;
}

.kicker::before {
  content: "";
  width: 26px;
  height: 2px;
  background: var(--grad);
}

.accent { color: var(--red-bright); }

.grad-text {
  background: linear-gradient(100deg, #fff 30%, var(--red-bright) 85%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

/* --------------------------------------------------------------------------
   Navigation
   -------------------------------------------------------------------------- */

.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  background: rgba(10, 13, 19, 0.78);
  border-bottom: 1px solid var(--line);
}

.nav-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 24px;
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-style: italic;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.22rem;
  letter-spacing: -0.02em;
  white-space: nowrap;
}

.brand .eight { color: var(--red-bright); }

.brand-mark { width: 32px; height: 32px; flex: none; }

.brand-logo { height: 34px; width: auto; display: block; }

.footer-wordmark { width: 215px; max-width: 70%; display: block; margin-bottom: 16px; }

.footer-logo { width: 175px; max-width: 60%; display: block; margin-bottom: 16px; }

.brand small {
  font-weight: 500;
  font-size: 0.72rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--text-3);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
  list-style: none;
}

.nav-links a {
  display: block;
  padding: 8px 11px;
  border-radius: 8px;
  white-space: nowrap;
  font-size: 0.91rem;
  font-weight: 500;
  color: var(--text-2);
  transition: color 0.2s, background 0.2s;
}

.nav-links a:hover { color: var(--text); background: rgba(255, 255, 255, 0.05); }

.nav-links a.active { color: var(--text); }

.nav-links a.active:not(.btn) {
  box-shadow: inset 0 -2px 0 var(--red);
  border-radius: 8px 8px 0 0;
}

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  color: var(--text);
  width: 42px;
  height: 42px;
  font-size: 1.2rem;
  cursor: pointer;
}

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 26px;
  border-radius: 10px;
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  cursor: pointer;
  border: none;
  transition: transform 0.2s, box-shadow 0.2s, background 0.2s, border-color 0.2s;
}

.btn-primary {
  background: var(--grad);
  color: #fff;
  box-shadow: 0 8px 28px -8px var(--glow);
}

.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 14px 34px -8px var(--glow); }

.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--line-strong);
}

.btn-ghost:hover { border-color: var(--red); color: #fff; transform: translateY(-2px); }

.btn-sm { padding: 9px 18px; font-size: 0.88rem; }

.nav-links .btn-primary { color: #fff; }

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */

.hero {
  position: relative;
  padding: 180px 0 110px;
  overflow: hidden;
}

.hero.sub { padding: 160px 0 70px; }

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(ellipse 60% 45% at 75% 8%, rgba(216, 31, 38, 0.16), transparent 65%),
    radial-gradient(ellipse 45% 40% at 12% 90%, rgba(216, 31, 38, 0.07), transparent 60%);
}

.hero-bg::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 90% 80% at 50% 0%, #000 20%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 90% 80% at 50% 0%, #000 20%, transparent 75%);
}

.hero-net {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  mask-image: radial-gradient(ellipse 90% 80% at 50% 0%, #000 20%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 90% 80% at 50% 0%, #000 20%, transparent 75%);
}

.hero h1 { max-width: 15.5em; margin-bottom: 22px; }

.title-row {
  display: flex;
  align-items: center;
  gap: clamp(16px, 2.5vw, 30px);
  margin-bottom: 22px;
}

.title-row h1 { margin-bottom: 0; }

.title-mark {
  width: clamp(70px, 9vw, 130px);
  flex: none;
  filter: drop-shadow(0 10px 30px rgba(216, 31, 38, 0.35));
}

.hero .lead { margin-bottom: 36px; }

.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; }

.badges {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 48px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
  font-size: 0.84rem;
  font-weight: 500;
  color: var(--text-2);
}

.badge .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--red-bright);
  box-shadow: 0 0 10px var(--glow);
}

/* --------------------------------------------------------------------------
   Sections
   -------------------------------------------------------------------------- */

.section { padding: 92px 0; }

.section.tint { background: var(--bg-raised); border-block: 1px solid var(--line); }

.section-head { max-width: 700px; margin-bottom: 54px; }

.section-head.center { margin-inline: auto; text-align: center; }

.section-head.center .kicker { justify-content: center; }

.section-head p { color: var(--text-2); margin-top: 16px; }

/* --------------------------------------------------------------------------
   Cards & grids
   -------------------------------------------------------------------------- */

.grid { display: grid; gap: 22px; }

.grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
.grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid.cols-4 { grid-template-columns: repeat(4, 1fr); }

.card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 30px 28px;
  transition: transform 0.25s, border-color 0.25s, box-shadow 0.25s;
}

.card:hover {
  transform: translateY(-4px);
  border-color: rgba(216, 31, 38, 0.45);
  box-shadow: 0 18px 44px -18px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(216, 31, 38, 0.12);
}

.card h3 { margin: 18px 0 10px; }

.card p { color: var(--text-2); font-size: 0.95rem; }

.card .icon {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  background: rgba(216, 31, 38, 0.12);
  border: 1px solid rgba(216, 31, 38, 0.28);
  color: var(--red-bright);
}

.card .icon svg { width: 22px; height: 22px; }

a.card { display: block; }

a.card .more {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 16px;
  font-family: var(--font-display);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--red-bright);
}

a.card .more::after { content: "→"; transition: transform 0.2s; }

a.card:hover .more::after { transform: translateX(4px); }

/* Feature list (checkmarks) */
.check-list { list-style: none; display: grid; gap: 13px; }

.check-list li {
  position: relative;
  padding-left: 32px;
  color: var(--text-2);
}

.check-list li strong { color: var(--text); }

.check-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 5px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background:
    url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="white" stroke-width="3.4" stroke-linecap="round" stroke-linejoin="round"><polyline points="20 6 9 17 4 12"/></svg>')
    center / 10px no-repeat,
    var(--grad);
}

/* Stats */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }

.stat {
  text-align: center;
  padding: 34px 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.stat b {
  display: block;
  font-family: var(--font-display);
  font-size: 2.3rem;
  font-weight: 700;
  background: linear-gradient(100deg, #fff 30%, var(--red-bright) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.stat span { font-size: 0.88rem; color: var(--text-3); }

/* Split layout */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}

/* Callout panel */
.panel {
  position: relative;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 20px;
  padding: clamp(34px, 5vw, 64px);
}

.panel::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 55% 90% at 88% 10%, rgba(216, 31, 38, 0.14), transparent 60%);
  pointer-events: none;
}

.panel > * { position: relative; }

/* Timeline (implementation phases) */
.timeline { position: relative; display: grid; gap: 0; }

.tl-item {
  position: relative;
  padding: 0 0 42px 46px;
}

.tl-item::before {
  content: "";
  position: absolute;
  left: 13px;
  top: 30px;
  bottom: 0;
  width: 2px;
  background: linear-gradient(var(--red), rgba(216, 31, 38, 0.12));
}

.tl-item:last-child::before { display: none; }

.tl-item .tl-dot {
  position: absolute;
  left: 0;
  top: 2px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--bg);
  border: 2px solid var(--red);
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--red-bright);
}

.tl-item h3 { margin-bottom: 8px; }

.tl-item p { color: var(--text-2); font-size: 0.97rem; max-width: 42em; }

.tl-item .tl-tag {
  display: inline-block;
  margin-left: 10px;
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(216, 31, 38, 0.14);
  border: 1px solid rgba(216, 31, 38, 0.3);
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--red-bright);
  vertical-align: middle;
}

/* Video placeholder frame */
.video-frame {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius);
  border: 1px solid var(--line-strong);
  background:
    radial-gradient(ellipse 70% 90% at 50% 0%, rgba(216, 31, 38, 0.1), transparent 65%),
    var(--surface);
  display: grid;
  place-items: center;
  overflow: hidden;
}

.video-frame .play {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--grad);
  box-shadow: 0 10px 40px -6px var(--glow);
}

.video-frame .play svg { width: 26px; height: 26px; margin-left: 4px; }

.video-frame figcaption {
  position: absolute;
  bottom: 18px;
  font-size: 0.85rem;
  color: var(--text-3);
}

.video-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

.video-frame video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
}

/* Docs / publications list */
.doc-list { list-style: none; display: grid; gap: 12px; }

.doc-list a {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  transition: border-color 0.2s, transform 0.2s;
}

.doc-list a:hover { border-color: rgba(216, 31, 38, 0.5); transform: translateX(4px); }

.doc-list .doc-ico {
  flex: none;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: rgba(216, 31, 38, 0.12);
  color: var(--red-bright);
}

.doc-list .doc-ico svg { width: 19px; height: 19px; }

.doc-list b { display: block; font-size: 0.97rem; }

.doc-list span { font-size: 0.82rem; color: var(--text-3); }

/* Breadcrumb */
.crumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--text-3);
  margin-bottom: 26px;
}

.crumbs a:hover { color: var(--red-bright); }

.crumbs .sep { opacity: 0.5; }

/* --------------------------------------------------------------------------
   CTA band
   -------------------------------------------------------------------------- */

.cta-band {
  position: relative;
  overflow: hidden;
  text-align: center;
  padding: 96px 0;
  border-top: 1px solid var(--line);
  background:
    radial-gradient(ellipse 55% 75% at 50% 115%, rgba(216, 31, 38, 0.22), transparent 70%),
    var(--bg-raised);
}

.cta-band h2 { margin-bottom: 14px; }

.cta-band p { color: var(--text-2); max-width: 40em; margin: 0 auto 34px; }

/* --------------------------------------------------------------------------
   Forms
   -------------------------------------------------------------------------- */

.form-card {
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 20px;
  padding: clamp(28px, 4vw, 48px);
}

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }

.field { display: grid; gap: 8px; }

.field.full { grid-column: 1 / -1; }

.field label {
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-2);
}

.field label .req { color: var(--red-bright); }

.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 13px 16px;
  background: var(--bg);
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.97rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.field select { appearance: none; background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="12" height="8" viewBox="0 0 12 8"><path d="M1 1l5 5 5-5" stroke="%23a7b0bf" stroke-width="2" fill="none" stroke-linecap="round"/></svg>'); background-repeat: no-repeat; background-position: right 16px center; }

.field textarea { resize: vertical; min-height: 130px; }

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(216, 31, 38, 0.18);
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */

.footer {
  border-top: 1px solid var(--line);
  background: var(--bg-raised);
  padding: 64px 0 40px;
  font-size: 0.92rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 48px;
}

.footer h4 {
  font-size: 0.82rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: 16px;
}

.footer ul { list-style: none; display: grid; gap: 10px; }

.footer a { color: var(--text-2); transition: color 0.2s; }

.footer a:hover { color: var(--red-bright); }

.footer .brand { margin-bottom: 14px; }

.footer .tagline { color: var(--text-3); max-width: 30em; }

.footer-bottom {
  border-top: 1px solid var(--line);
  padding-top: 26px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  color: var(--text-3);
  font-size: 0.82rem;
}

/* --------------------------------------------------------------------------
   Reveal-on-scroll
   -------------------------------------------------------------------------- */

.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.7s cubic-bezier(0.2, 0.6, 0.2, 1), transform 0.7s cubic-bezier(0.2, 0.6, 0.2, 1);
}

.reveal.in { opacity: 1; transform: none; }

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

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */

@media (max-width: 980px) {
  .grid.cols-3, .grid.cols-4 { grid-template-columns: repeat(2, 1fr); }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .split { grid-template-columns: 1fr; gap: 44px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 720px) {
  .nav-toggle { display: grid; place-items: center; }

  .nav-links {
    position: absolute;
    top: 68px;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    padding: 14px 20px 22px;
    gap: 4px;
    background: rgba(10, 13, 19, 0.97);
    border-bottom: 1px solid var(--line);
    display: none;
  }

  .nav-links.open { display: flex; }

  .nav-links a { padding: 12px 14px; }

  .nav-links a.active:not(.btn) { box-shadow: inset 3px 0 0 var(--red); border-radius: 8px; }

  .grid.cols-2, .grid.cols-3, .grid.cols-4 { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .hero { padding: 140px 0 80px; }
  .section { padding: 68px 0; }
}
