/* ==========================================================================
   STUDIO MOGLI | styles.css
   Premium Industrial Dark Mode. Brutalist, functional, flat.

   House rules
   - No drop shadows, no button gradients, no rounded corners.
   - The only gradients on the page are the hero blueprint grid and glow.
   - Accent orange (--color-accent) is used on CTA buttons only.

   Contents
   01. Design tokens
   02. Reset and base
   03. Typography
   04. Layout helpers
   05. Buttons
   06. Header
   07. Hero (.hero-bg)
   08. Framework cards
   09. Proof of Performance
   10. Gateway (contact + form)
   11. Footer
   12. Utilities
   13. Responsive
   14. Reduced motion
   ========================================================================== */


/* 01. DESIGN TOKENS ------------------------------------------------------- */
:root {
  /* Core palette */
  --color-bg: #0A0A0A;            /* True Black */
  --color-bg-alt: #141414;        /* Deep Charcoal */
  --color-text: #F5F5F5;          /* Off-White */
  --color-border: #333333;        /* Faint technical grey */
  --color-accent: #FF5722;        /* Industrial Orange: CTA buttons ONLY */

  /* Supporting greys (secondary copy, labels, placeholders) */
  --color-text-muted: #A3A3A3;
  --color-text-dim: #7A7A7A;

  /* Hero blueprint pattern */
  --glow: rgba(245, 245, 245, 0.10);
  --grid-line-major: rgba(245, 245, 245, 0.085);
  --grid-line-minor: rgba(245, 245, 245, 0.045);
  --grid-size-major: 160px;
  --grid-size-minor: 32px;

  /* Typography */
  --font-sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  /* Layout */
  --container-max: 1320px;
  --gutter: clamp(1rem, 4vw, 2.5rem);
  --section-pad: clamp(4.5rem, 11vw, 9rem);
  --header-h: 6.25rem;            /* two-row header on small screens */

  color-scheme: dark;
}


/* 02. RESET AND BASE ------------------------------------------------------ */
*,
*::before,
*::after {
  box-sizing: border-box;
  border-radius: 0;               /* square corners everywhere */
}

* {
  margin: 0;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-h);
}

body {
  min-height: 100vh;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

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

ul,
ol {
  padding: 0;
  list-style: none;
}

button,
input,
textarea {
  font: inherit;
  color: inherit;
}

strong {
  font-weight: 600;
  color: var(--color-text);
}

::selection {
  background: var(--color-text);
  color: var(--color-bg);
}

:focus-visible {
  outline: 2px solid var(--color-text);
  outline-offset: 3px;
}


/* 03. TYPOGRAPHY ---------------------------------------------------------- */
h1,
h2,
h3 {
  font-weight: 800;
  line-height: 1.04;
  letter-spacing: -0.035em;
  text-wrap: balance;
}

p {
  text-wrap: pretty;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  margin-bottom: 1.5rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

.eyebrow::before {
  content: "";
  flex: none;
  width: 2rem;
  height: 1px;
  background: var(--color-text-muted);
}


/* 04. LAYOUT HELPERS ------------------------------------------------------ */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section {
  padding-block: var(--section-pad);
  border-bottom: 1px solid var(--color-border);
}

.section-alt {
  background: var(--color-bg-alt);
}

.section-head {
  margin-bottom: clamp(2.5rem, 6vw, 4.5rem);
}

.section-title {
  max-width: 24ch;
  font-size: clamp(2.125rem, 5.4vw, 4.5rem);
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.045em;
}

.section-sub {
  max-width: 40rem;
  margin-top: 1.5rem;
  font-size: clamp(1.0625rem, 1.6vw, 1.25rem);
  line-height: 1.55;
  color: var(--color-text-muted);
}


/* 05. BUTTONS ------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.875rem;
  padding: 1.125rem 2rem;
  border: 1px solid transparent;
  background: transparent;
  color: inherit;
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.1em;
  text-align: center;
  text-transform: uppercase;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

/* Primary CTA: the only element on the page that carries the accent colour. */
.btn-primary {
  background: var(--color-accent);
  border-color: var(--color-accent);
  color: var(--color-bg);
}

.btn-primary::after {
  content: "\2192";
  content: "\2192" / "";
  font-size: 1.125em;
  line-height: 1;
  transition: transform 0.15s ease;
}

.btn-primary:hover {
  background: var(--color-text);
  border-color: var(--color-text);
  color: var(--color-bg);
}

.btn-primary:hover::after {
  transform: translateX(4px);
}

.btn-primary:disabled {
  cursor: wait;
  opacity: 0.6;
}

.btn-primary:disabled::after {
  content: none;
}

.btn-block {
  width: 100%;
}


/* 06. HEADER -------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--color-bg);
  border-bottom: 1px solid var(--color-border);
}

.header-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  min-height: 3.5rem;
  font-size: 1.25rem;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.logo::before {
  content: "";
  width: 0.75rem;
  height: 0.75rem;
  background: var(--color-text);
}

/* Small screens: nav becomes a full-width second row of three equal cells. */
.nav {
  flex: 0 0 calc(100% + var(--gutter) * 2);
  margin-inline: calc(var(--gutter) * -1);
  border-top: 1px solid var(--color-border);
}

.nav-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.nav-list > li + li {
  border-left: 1px solid var(--color-border);
}

.nav-link {
  position: relative;
  display: block;
  padding: 0.875rem 0.5rem;
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: 0.14em;
  text-align: center;
  text-transform: uppercase;
  color: var(--color-text-muted);
  transition: color 0.15s ease;
}

.nav-link:hover {
  color: var(--color-text);
}


/* 07. HERO ---------------------------------------------------------------- */
.hero {
  display: flex;
  align-items: center;
  min-height: calc(100vh - var(--header-h));
  min-height: calc(100svh - var(--header-h));
  padding-block: clamp(4rem, 12vh, 8rem);
  border-bottom: 1px solid var(--color-border);
}

/* Blueprint background. Layers are listed top to bottom:
   1. faint radial glow behind the headline
   2. edge vignette that fades the grid out toward the borders
   3. major technical grid (160px)
   4. minor technical grid (32px) */
.hero-bg {
  background-color: var(--color-bg);
  background-image:
    radial-gradient(ellipse 60% 55% at 38% 48%, var(--glow) 0%, rgba(245, 245, 245, 0.035) 40%, rgba(245, 245, 245, 0) 72%),
    radial-gradient(ellipse 90% 90% at 50% 42%, rgba(10, 10, 10, 0) 30%, var(--color-bg) 100%),
    linear-gradient(to right, var(--grid-line-major) 1px, transparent 1px),
    linear-gradient(to bottom, var(--grid-line-major) 1px, transparent 1px),
    linear-gradient(to right, var(--grid-line-minor) 1px, transparent 1px),
    linear-gradient(to bottom, var(--grid-line-minor) 1px, transparent 1px);
  background-size:
    100% 100%,
    100% 100%,
    var(--grid-size-major) var(--grid-size-major),
    var(--grid-size-major) var(--grid-size-major),
    var(--grid-size-minor) var(--grid-size-minor),
    var(--grid-size-minor) var(--grid-size-minor);
}

.hero-title {
  font-size: clamp(2.5rem, 7vw, 6rem);
  font-weight: 900;
  line-height: 0.98;
  letter-spacing: -0.045em;
}

.hero-title-dim {
  display: block;
  color: var(--color-text-dim);
}

.hero-sub {
  max-width: 42rem;
  margin-top: clamp(1.75rem, 3vw, 2.5rem);
  font-size: clamp(1.125rem, 1.9vw, 1.5rem);
  line-height: 1.45;
  color: var(--color-text-muted);
}

.hero-actions {
  margin-top: clamp(2rem, 4vw, 3rem);
}


/* 08. FRAMEWORK CARDS ----------------------------------------------------- */
/* A 1px gap over a border-coloured backdrop draws shared hairlines between panels. */
.pillars {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1px;
  background: var(--color-border);
  border: 1px solid var(--color-border);
}

.card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: var(--color-bg-alt);
}

.card-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.875rem 1.5rem;
  border-bottom: 1px solid var(--color-border);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

.card-meter {
  display: flex;
  gap: 3px;
}

.meter-seg {
  display: block;
  width: 0.875rem;
  height: 0.25rem;
  background: var(--color-border);
}

.meter-seg.is-on {
  background: var(--color-text);
}

.card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 2rem 1.5rem 2.25rem;
}

.card-title {
  margin-bottom: 1.25rem;
  font-size: 1.5rem;
  line-height: 1.1;
  letter-spacing: -0.03em;
}

.card-number {
  display: block;
  margin-bottom: 1.75rem;
  font-size: clamp(2.5rem, 4vw, 3.5rem);
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.05em;
  font-variant-numeric: tabular-nums;
  color: var(--color-text-dim);
}

.card-text {
  font-size: 0.9375rem;
  line-height: 1.7;
  color: var(--color-text-muted);
}


/* 09. PROOF OF PERFORMANCE ------------------------------------------------ */
.proof-list {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
}

.proof-list > li + li {
  border-top: 1px solid var(--color-border);
}

.proof-item {
  display: grid;
  grid-template-columns: 2.5rem minmax(0, 1fr);
  grid-template-areas:
    "index main"
    ".     action";
  column-gap: 0.5rem;
  row-gap: 1.25rem;
  align-items: baseline;
  padding: 1.5rem 1.25rem;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.proof-index {
  grid-area: index;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  font-variant-numeric: tabular-nums;
  color: var(--color-text-dim);
}

.proof-main {
  grid-area: main;
  min-width: 0;
}

.proof-name {
  display: block;
  font-size: clamp(1.875rem, 4.6vw, 3.25rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.04em;
  overflow-wrap: break-word;
}

.proof-domain {
  display: block;
  margin-top: 0.5rem;
  font-size: 0.9375rem;
  color: var(--color-text-muted);
}

.proof-action {
  grid-area: action;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.proof-arrow {
  display: inline-block;
  transition: transform 0.15s ease;
}

/* High-contrast inversion on hover and keyboard focus. */
.proof-item:hover,
.proof-item:focus-visible {
  background: var(--color-text);
  color: var(--color-bg);
}

.proof-item:hover .proof-index,
.proof-item:hover .proof-domain,
.proof-item:focus-visible .proof-index,
.proof-item:focus-visible .proof-domain {
  color: var(--color-border);
}

.proof-item:hover .proof-arrow,
.proof-item:focus-visible .proof-arrow {
  transform: translate(3px, -3px);
}

.proof-item:focus-visible {
  outline: 2px solid var(--color-bg);
  outline-offset: -6px;
}


/* 10. GATEWAY (CONTACT + FORM) -------------------------------------------- */
.gateway {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(2.5rem, 6vw, 5rem);
}

.gateway-lead {
  max-width: 28rem;
  margin-bottom: 2.5rem;
  font-size: clamp(1.0625rem, 1.5vw, 1.1875rem);
  line-height: 1.6;
  color: var(--color-text-muted);
}

/* Contact info rows */
.info-list {
  border-top: 1px solid var(--color-border);
}

.info-row {
  padding-block: 1.5rem;
  border-bottom: 1px solid var(--color-border);
}

.info-label {
  margin-bottom: 0.75rem;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

.info-value {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.875rem;
}

.info-link {
  font-size: clamp(1.5rem, 3.6vw, 2.25rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.015em;       /* looser than headings so digit groups stay legible */
  word-spacing: 0.14em;
  white-space: nowrap;
  text-decoration: underline;
  text-decoration-color: var(--color-border);
  text-decoration-thickness: 2px;
  text-underline-offset: 0.25em;
  transition: text-decoration-color 0.15s ease;
}

.info-link:hover {
  text-decoration-color: var(--color-text);
}

.info-sub {
  padding-bottom: 0.25rem;
  border-bottom: 1px solid var(--color-border);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  transition: color 0.15s ease, border-color 0.15s ease;
}

.info-sub:hover {
  border-color: var(--color-text);
  color: var(--color-text);
}

/* Form panel */
.panel {
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
}

.panel-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1rem;
  padding: 0.875rem 1.5rem;
  border-bottom: 1px solid var(--color-border);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

.form {
  padding: 1.5rem;
}

.form-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1.25rem;
}

.form-label {
  display: block;
  margin-bottom: 0.5rem;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

.form-control {
  display: block;
  width: 100%;
  padding: 0.9375rem 1rem;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  color: var(--color-text);
  font-size: 1rem;                /* 16px stops iOS zoom-on-focus */
  line-height: 1.4;
  -webkit-appearance: none;
  appearance: none;
  transition: border-color 0.15s ease;
}

.form-control::placeholder {
  color: var(--color-text-dim);
  opacity: 1;
}

.form-control:hover {
  border-color: var(--color-text-dim);
}

.form-control:focus {
  border-color: var(--color-text);
  outline: 1px solid var(--color-text);
  outline-offset: 0;
}

textarea.form-control {
  min-height: 9rem;
  resize: vertical;
}

/* Keep browser autofill on-palette without using box-shadow. */
.form-control:-webkit-autofill,
.form-control:-webkit-autofill:hover,
.form-control:-webkit-autofill:focus {
  -webkit-text-fill-color: var(--color-text);
  caret-color: var(--color-text);
  transition: background-color 600000s 0s, color 600000s 0s;
}

.form .btn {
  margin-top: 1.5rem;
}

.form-status {
  margin-top: 1rem;
  padding: 0.875rem 1rem;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-left: 3px solid var(--color-text);
  font-size: 0.9375rem;
  line-height: 1.5;
}

.form-status:empty {
  margin: 0;
  padding: 0;
  border: 0;
}

.form-status.is-success::before {
  content: "\2713\00a0\00a0";
  font-weight: 700;
}

.form-status.is-error::before {
  content: "\2715\00a0\00a0";
  font-weight: 700;
}


/* 11. FOOTER -------------------------------------------------------------- */
.site-footer {
  padding-block: 2rem;
  font-size: 0.8125rem;
  color: var(--color-text-muted);
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 2rem;
}

.footer-link {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transition: color 0.15s ease;
}

.footer-link:hover {
  color: var(--color-text);
}


/* 12. UTILITIES ----------------------------------------------------------- */
.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  top: -4rem;
  left: var(--gutter);
  z-index: 200;
  padding: 0.75rem 1rem;
  background: var(--color-text);
  color: var(--color-bg);
  font-size: 0.875rem;
  font-weight: 700;
  transition: top 0.15s ease;
}

.skip-link:focus {
  top: 0.75rem;
}


/* 13. RESPONSIVE (mobile-first) ------------------------------------------- */

/* 640px and up: single-row header, two-column cards, side-by-side form fields */
@media (min-width: 640px) {
  :root {
    --header-h: 4.5rem;
  }

  .logo {
    min-height: 4.5rem;
  }

  .nav {
    flex: 0 1 auto;
    margin-inline: 0;
    border-top: 0;
  }

  .nav-list {
    display: flex;
    gap: 2.5rem;
  }

  .nav-list > li + li {
    border-left: 0;
  }

  .nav-link {
    padding: 0.5rem 0;
    text-align: left;
  }

  .nav-link::after {
    content: "";
    position: absolute;
    right: 0;
    bottom: 0.125rem;
    left: 0;
    height: 1px;
    background: var(--color-text);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.2s ease;
  }

  .nav-link:hover::after {
    transform: scaleX(1);
  }

  .pillars {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .form-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .form {
    padding: 2rem;
  }

  .panel-bar {
    padding-inline: 2rem;
  }
}

/* 900px and up: proof rows go horizontal, gateway splits into two columns */
@media (min-width: 900px) {
  .proof-item {
    grid-template-columns: 4rem minmax(0, 1fr) auto;
    grid-template-areas: "index main action";
    column-gap: 2rem;
    align-items: center;
    padding: 2rem;
  }

  .gateway {
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    align-items: start;
  }
}

/* 1200px and up: the four pillars sit in one row */
@media (min-width: 1200px) {
  .pillars {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}


/* 14. REDUCED MOTION ------------------------------------------------------ */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}
