/* Carambaphon Productions — site styles
   Layout: full-bleed video hero, then calm bands on a deep-space ground; one column of text, grids for facts and divisions. */

@font-face { font-family: "Montserrat"; font-weight: 400; font-display: swap; src: url("../fonts/montserrat-v25-latin-regular.woff2") format("woff2"); }
@font-face { font-family: "Montserrat"; font-weight: 700; font-display: swap; src: url("../fonts/montserrat-v25-latin-700.woff2") format("woff2"); }
@font-face { font-family: "Open Sans"; font-weight: 400; font-display: swap; src: url("../fonts/open-sans-v34-latin-regular.woff2") format("woff2"); }
@font-face { font-family: "Open Sans"; font-weight: 700; font-display: swap; src: url("../fonts/open-sans-v34-latin-700.woff2") format("woff2"); }
@font-face { font-family: "Volkhov"; font-style: italic; font-weight: 400; font-display: swap; src: url("../fonts/volkhov-v17-latin-italic.woff2") format("woff2"); }

:root {
  /* Color: night side of the planet, lit limb as accent */
  --space: #050b16;        /* page ground */
  --orbit: #0a1628;        /* raised bands */
  --line: #1c2c45;         /* hairlines */
  --text: #e4ebf5;         /* running text */
  --muted: #8d9bb2;        /* secondary text */
  --limb: #5ab0ee;         /* accent, the lit horizon */
  --limb-deep: #1679bf;    /* Carambaphon blue (CI) */
  /* division accents */
  --systems: #4fc3e8;
  --stonecut: #c9ced6;
  --elx: #ff3b30;   /* ELX logo red */

  /* Type */
  --display: "Montserrat", "Helvetica Neue", Arial, sans-serif;
  --body: "Open Sans", "Segoe UI", Roboto, Arial, sans-serif;
  --quote: "Volkhov", Georgia, "Times New Roman", serif;

  --step--1: 0.8125rem;
  --step-0: 1.0625rem;
  --step-1: 1.25rem;
  --step-2: clamp(1.5rem, 1.2rem + 1.3vw, 2rem);
  --step-3: clamp(1.9rem, 1.3rem + 2.6vw, 3rem);

  --wrap: 72rem;
  --gutter-l: max(16px, env(safe-area-inset-left, 0px));
  --gutter-r: max(16px, env(safe-area-inset-right, 0px));

  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 5rem; }
body {
  margin: 0;
  background: var(--space);
  color: var(--text);
  font-family: var(--body);
  font-size: var(--step-0);
  line-height: 1.65;
  overflow-x: hidden;
}
img, video { max-width: 100%; display: block; }
a { color: var(--limb); text-underline-offset: 0.2em; }
a:hover { color: var(--text); }
:focus-visible { outline: 2px solid var(--limb); outline-offset: 3px; border-radius: 2px; }
h1, h2, h3 { font-family: var(--display); font-weight: 700; line-height: 1.2; text-wrap: balance; margin: 0; }
p { margin: 0; }
.skip { position: absolute; left: -999px; top: 0; background: var(--text); color: var(--space); padding: 0.5rem 1rem; z-index: 50; }
.skip:focus { left: 1rem; top: 1rem; }

.wrap {
  max-width: calc(var(--wrap) + 32px);
  margin-inline: auto;
  padding-left: var(--gutter-l);
  padding-right: var(--gutter-r);
}
.band { padding-block: clamp(4rem, 3rem + 5vw, 7.5rem); }
.band--raised { background: var(--orbit); }

.eyebrow {
  font-family: var(--display);
  font-size: var(--step--1);
  font-weight: 400;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--limb);
  margin-bottom: 1.25rem;
}

/* Header */
.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 20;
  padding-top: env(safe-area-inset-top, 0px);
  transition: background-color .3s ease, border-color .3s ease;
  border-bottom: 1px solid transparent;
}
.site-header.is-solid, .site-header--solid {
  background: rgba(5, 11, 22, 0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom-color: var(--line);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 4.25rem; }
.brand img { width: 150px; height: auto; }
.nav { display: flex; gap: 2rem; list-style: none; margin: 0; padding: 0; }
.nav a {
  font-family: var(--display);
  font-size: var(--step--1);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text);
  text-decoration: none;
}
.nav a:hover { color: var(--limb); }
.menu-btn { display: none; }

@media (max-width: 760px) {
  .menu-btn {
    display: inline-flex; align-items: center; gap: .5rem;
    background: none; border: 1px solid var(--line); color: var(--text);
    font: 400 var(--step--1)/1 var(--display); letter-spacing: .16em; text-transform: uppercase;
    padding: .65rem .9rem; border-radius: 2px; cursor: pointer;
  }
  .nav {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; gap: 0;
    background: rgba(5, 11, 22, 0.97); border-bottom: 1px solid var(--line);
    padding: .5rem var(--gutter-r) 1rem var(--gutter-l);
  }
  .nav.is-open { display: flex; }
  .nav a { display: block; padding: .9rem 0; border-top: 1px solid var(--line); }
  .site-header { background: rgba(5, 11, 22, 0.6); }
}

/* Hero video */
.hero { position: relative; background: #000; }
.hero video {
  width: 100%;
  aspect-ratio: 16 / 9;
  max-height: 88svh;
  object-fit: cover;
}
.hero::after {
  content: ""; position: absolute; inset: auto 0 0; height: 30%;
  background: linear-gradient(to bottom, rgba(5, 11, 22, 0), var(--space));
  pointer-events: none;
}

/* Services */
.lead {
  font-family: var(--display);
  font-size: var(--step-3);
  max-width: 22ch;
  font-weight: 700;
  margin-bottom: 2rem;
}
.lead span { color: var(--muted); font-weight: 400; }
.intro { max-width: 62ch; color: var(--text); font-size: var(--step-1); line-height: 1.6; }

.facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  margin: 3.5rem 0 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.facts div { padding: 1.5rem 1.5rem 1.5rem 0; }
.facts div + div { padding-left: 1.5rem; border-left: 1px solid var(--line); }
.facts dt {
  font-family: var(--display); font-size: var(--step--1); letter-spacing: .18em; text-transform: uppercase; color: var(--muted);
  margin-bottom: .5rem;
}
.facts dd { margin: 0; font-family: var(--display); font-size: var(--step-1); }

.pillars {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(2rem, 4vw, 3.5rem);
  margin-top: 3.5rem;
}
.pillars h3 { font-size: var(--step-1); margin-bottom: .9rem; }
.pillars p { color: var(--muted); }

@media (max-width: 860px) {
  .facts, .pillars { grid-template-columns: minmax(0, 1fr); }
  .facts div, .facts div + div { padding: 1.1rem 0; border-left: 0; }
  .facts div + div { border-top: 1px solid var(--line); }
}

/* Quote over the horizon */
.quote {
  position: relative;
  background: var(--space) center / cover no-repeat;
  background-image: url("../img/horizon.jpg");
  text-align: center;
}
.quote .wrap { padding-block: clamp(6rem, 5rem + 8vw, 11rem); }
.quote blockquote { margin: 0 auto; max-width: 46rem; }
.quote p {
  font-family: var(--display);
  font-weight: 700;
  font-size: var(--step-2);
  letter-spacing: .14em;
  text-transform: uppercase;
  line-height: 1.45;
  text-shadow: 0 2px 18px rgba(0, 0, 0, .6);
}
.quote cite {
  display: block; margin-top: 1.5rem;
  font-family: var(--quote); font-style: italic; font-size: var(--step-1);
  color: #cfe0f2;
}
@media (max-width: 700px) { .quote { background-image: url("../img/horizon-1024.jpg"); } }

/* Divisions */
.section-head { max-width: 46rem; margin-bottom: 3rem; }
.section-head h2 { font-size: var(--step-3); margin-bottom: 1rem; }
.section-head p { color: var(--muted); }

.divisions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.5rem;
  list-style: none; margin: 0; padding: 0;
}
.division {
  --acc: var(--limb);
  display: flex; flex-direction: column;
  background: var(--space);
  border: 1px solid var(--line);
  border-top: 2px solid var(--acc);
  min-width: 0;
}
.division--systems { --acc: var(--systems); }
.division--stonecut { --acc: var(--stonecut); }
.division--elx { --acc: var(--elx); }
.division__mark {
  aspect-ratio: 16 / 9; max-width: 100%;
  display: grid; place-items: center;
  background: #000; overflow: hidden;
  border-bottom: 1px solid var(--line);
}
.division__mark img { width: 100%; height: 100%; object-fit: cover; }
.division--stonecut .division__mark img { width: 62%; height: auto; object-fit: contain; }
.division--systems .division__mark { background: var(--space); }
.division--systems .division__mark img { width: 78%; height: auto; object-fit: contain; }
.division--elx .division__mark img.elx-mark { width: 72%; height: auto; object-fit: contain; }
.division__body { display: flex; flex-direction: column; gap: .9rem; padding: 1.5rem; flex: 1; }
.division__since { font-family: var(--display); font-size: var(--step--1); letter-spacing: .18em; text-transform: uppercase; color: var(--acc); }
.division h3 { font-size: var(--step-1); }
.division p { color: var(--muted); }
.division__link {
  margin-top: auto; padding-top: .5rem;
  font-family: var(--display); font-size: var(--step--1); letter-spacing: .14em; text-transform: uppercase;
  color: var(--acc); text-decoration: none;
}
.division__link:hover { color: var(--text); }
.division__link--soon { color: var(--muted); }

@media (max-width: 960px) { .divisions { grid-template-columns: minmax(0, 1fr); max-width: 34rem; } }

/* Story */
.timeline { list-style: none; margin: 0; padding: 0; border-left: 1px solid var(--line); max-width: 52rem; }
.timeline li { position: relative; padding: 0 0 2.5rem 2rem; }
.timeline li:last-child { padding-bottom: 0; }
.timeline li::before {
  content: ""; position: absolute; left: -5px; top: .55rem;
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--space); border: 2px solid var(--limb);
}
.timeline time {
  display: block; font-family: var(--display); font-weight: 700; font-size: var(--step-1);
  color: var(--limb); font-variant-numeric: tabular-nums; margin-bottom: .35rem;
}
.timeline p { color: var(--muted); max-width: 60ch; }
.timeline strong { color: var(--text); font-weight: 700; }

/* Contact */
.contact { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: clamp(2rem, 5vw, 5rem); align-items: start; }
.contact h2 { font-size: var(--step-3); margin-bottom: 1rem; }
.contact .note { color: var(--muted); max-width: 40ch; }
.contact address { font-style: normal; display: grid; gap: 1.25rem; }
.contact address > div { border-top: 1px solid var(--line); padding-top: 1rem; }
.contact dt, .contact .label { font-family: var(--display); font-size: var(--step--1); letter-spacing: .18em; text-transform: uppercase; color: var(--muted); margin-bottom: .25rem; }
.contact a { font-size: var(--step-1); text-decoration: none; }
@media (max-width: 760px) { .contact { grid-template-columns: minmax(0, 1fr); } }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom, 0px); }
.site-footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem 2rem; padding-block: 2rem; font-size: var(--step--1); color: var(--muted); }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 1.5rem; }
.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--text); }

/* Legal pages */
.legal { padding-top: calc(4.25rem + env(safe-area-inset-top, 0px)); }
.legal .wrap { max-width: calc(48rem + 32px); }
.legal h1 { font-size: var(--step-3); margin: 3rem 0 2rem; }
.legal h2 { font-size: var(--step-1); margin: 2.5rem 0 .75rem; }
.legal p, .legal li { color: #c3cddb; }
.legal p + p { margin-top: .9rem; }
.legal ul { padding-left: 1.2rem; margin: .75rem 0 0; }
.legal dl { display: grid; grid-template-columns: minmax(0, 13rem) minmax(0, 1fr); gap: .5rem 1.5rem; margin: 0; }
.legal dt { color: var(--muted); }
.legal dd { margin: 0; }
@media (max-width: 600px) { .legal dl { grid-template-columns: minmax(0, 1fr); gap: 0; } .legal dd { margin-bottom: .75rem; } }
.legal .back { margin: 3rem 0 4rem; }

.notfound { min-height: 70svh; display: grid; place-items: center; text-align: center; padding-top: 5rem; }
.notfound h1 { font-size: var(--step-3); margin-bottom: 1rem; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .site-header { transition: none; }
}
