/* ==========================================================================
   Peltenar — styles.css
   1. Design tokens  2. Fonts  3. Reset  4. Base  5. Layout & components
   6. Sections (one block each)
   ========================================================================== */

/* 1. Design tokens ------------------------------------------------------- */
:root {
  /* Colours — use only these */
  --black: #0B0B0C;        /* hero, contact, footer */
  --surface: #161618;      /* cards on black */
  --line: #2A2A2D;         /* borders on black */
  --orange: #E8720C;       /* buttons, logo circle, orange band, big highlights */
  --dark-orange: #B85A0C;  /* drivers section; large orange headings on sand */
  --sand: #F3EEE3;         /* light sections */
  --text-orange: #9A4A08;  /* SMALL orange text on sand only */
  --muted-dark: #A9A9AE;   /* secondary text on black */
  --muted-light: #55504A;  /* secondary text on sand */
  --white: #FFFFFF;

  /* Font families */
  --font-head: "Inter Tight", "Helvetica Neue", Arial, sans-serif;
  --font-body: "IBM Plex Sans", "Helvetica Neue", Arial, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, Menlo, Consolas, monospace;

  /* Layout */
  --container-max: 1200px;
  --gutter: clamp(20px, 11.1vw - 23px, 120px); /* 20px at 390px -> 120px from ~1290px */
}

/* 2. Fonts (self-hosted WOFF2) ------------------------------------------- */
@font-face { font-family: "Inter Tight"; font-weight: 600; font-style: normal; font-display: swap; src: url("../assets/fonts/InterTight-SemiBold.woff2") format("woff2"); }
@font-face { font-family: "Inter Tight"; font-weight: 700; font-style: normal; font-display: swap; src: url("../assets/fonts/InterTight-Bold.woff2") format("woff2"); }
@font-face { font-family: "Inter Tight"; font-weight: 800; font-style: normal; font-display: swap; src: url("../assets/fonts/InterTight-ExtraBold.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-weight: 400; font-style: normal; font-display: swap; src: url("../assets/fonts/IBMPlexSans-Regular.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-weight: 500; font-style: normal; font-display: swap; src: url("../assets/fonts/IBMPlexSans-Medium.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-weight: 600; font-style: normal; font-display: swap; src: url("../assets/fonts/IBMPlexSans-SemiBold.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-weight: 400; font-style: normal; font-display: swap; src: url("../assets/fonts/IBMPlexMono-Regular.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-weight: 500; font-style: normal; font-display: swap; src: url("../assets/fonts/IBMPlexMono-Medium.woff2") format("woff2"); }

/* 3. Reset ---------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; }
img, svg { display: block; max-width: 100%; height: auto; }
input, button, textarea, select { font: inherit; color: inherit; }
button { background: none; border: 0; cursor: pointer; }
a { color: inherit; }
ul[role="list"], ol[role="list"] { list-style: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* 4. Base ----------------------------------------------------------------- */
body {
  min-height: 100vh;
  overflow-x: clip;
  background: var(--black);
  color: var(--white);
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: var(--font-head);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.03em;
  text-wrap: balance;
}
h1 { font-size: clamp(2.5rem, 6vw + 1rem, 5.5rem); letter-spacing: -0.04em; }
h2 { font-size: clamp(2rem, 4vw + 1rem, 3.75rem); letter-spacing: -0.04em; }
h3 { font-size: clamp(1.25rem, 1vw + 1rem, 1.5rem); font-weight: 700; letter-spacing: -0.02em; }
h4 { font-size: 1.125rem; font-weight: 600; letter-spacing: -0.01em; }

.label {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 0.8125rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
}

:focus-visible {
  outline: 3px solid var(--orange);
  outline-offset: 3px;
  border-radius: 4px;
}

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* 5. Layout & components -------------------------------------------------- */
.container {
  /* max-width applies to the content; the gutter sits outside it */
  width: min(100%, calc(var(--container-max) + 2 * var(--gutter)));
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.btn-primary,
.btn-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  min-height: 44px;
  padding: 0.625rem 1.5rem;
  border-radius: 999px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.9375rem;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.btn-primary {
  background: var(--orange);
  color: var(--black); /* never white on orange */
  border: 2px solid var(--orange);
}
.btn-primary:hover { background: var(--white); border-color: var(--white); }

.btn-outline {
  background: transparent;
  color: var(--white);
  border: 2px solid var(--muted-dark);
}
.btn-outline:hover { border-color: var(--white); }

/* Logo — the single place the brand mark is styled */
.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  min-height: 44px;
  color: var(--white);
  text-decoration: none;
}
.logo img { width: 32px; height: 32px; flex-shrink: 0; }
.logo span {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 1.125rem;
  letter-spacing: 0.14em;
  line-height: 1;
}

/* 6. Sections ------------------------------------------------------------- */

/* Header / nav */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--black);
  border-bottom: 1px solid var(--line);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  min-height: 72px;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 2vw, 2rem);
}
.nav-links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--muted-dark);
  font-weight: 500;
  font-size: 0.9375rem;
  text-decoration: none;
}
.nav-links a:hover { color: var(--white); }
.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.menu-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  color: var(--white);
}
.menu-toggle svg { width: 24px; height: 24px; }

@media (max-width: 900px) {
  .site-header nav { display: none; }
  .menu-toggle { display: inline-flex; }
}
@media (max-width: 420px) {
  .nav-actions { gap: 0.25rem; }
  .nav-actions .btn-primary { padding-inline: 1rem; font-size: 0.875rem; }
  .site-header .container { gap: 0.75rem; }
}

/* Hero */
#top {
  background: var(--black);
  padding-block: clamp(56px, 7vw, 96px) clamp(64px, 8vw, 112px);
}
.hero {
  display: grid;
  grid-template-columns: 7fr 5fr;
  gap: 56px;
  align-items: center;
}
.hero-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 28px;
  min-width: 0;
  container-type: inline-size; /* lets the h1 size itself to this column */
}
.hero-label { color: var(--orange); }
.hero h1 {
  /* Each line is ~7.1em wide, so 13.8% of the column keeps both lines unbroken.
     The brief's 7.8vw would make each line wrap inside the 7fr column. */
  font-size: clamp(48px, 13.8cqi, 112px);
  line-height: 0.92;
  letter-spacing: -0.04em;
  text-wrap: wrap;
}
.hero h1 span { display: block; }
.hero h1 .hero-accent { color: var(--orange); }
.hero-sub {
  max-width: 580px;
  color: var(--muted-dark);
  font-size: clamp(17px, 0.55vw + 15px, 21px);
  line-height: 1.55;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.hero-panel {
  display: flex;
  flex-direction: column;
  gap: 24px;
  min-width: 0;
  padding: 36px 32px 32px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 28px;
}
.hub .hub-fill { fill: var(--orange); }
.hub .hub-sun { stroke: var(--orange); }
.hub .hub-line { stroke: var(--white); stroke-opacity: 0.9; }
.hub .hub-empty { stroke: var(--muted-dark); stroke-opacity: 0.55; }

.record {
  padding: 20px 20px 14px;
  background: var(--black);
  border: 1px solid var(--line);
  border-radius: 16px;
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.4;
}
.record-head,
.record-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.record-head { padding-bottom: 12px; }
.record-tag {
  flex-shrink: 0;
  padding: 2px 8px;
  border: 1px solid color-mix(in srgb, var(--line), var(--white) 15%);
  border-radius: 6px;
  color: var(--muted-dark);
  font-size: 11px;
  letter-spacing: 0.1em;
}
.record-list li {
  padding-block: 10px;
  border-top: 1px dashed var(--line);
}
.record-list li > span:last-child { flex-shrink: 0; text-align: right; }
.status-ok { color: var(--orange); }
.status-offline { color: var(--muted-dark); }

/* Below 1180px the panel gets too narrow for the record rows, so stack */
@media (max-width: 1180px) {
  .hero { grid-template-columns: 1fr; }
  .hero-panel { max-width: 560px; }
}
@media (max-width: 600px) {
  .hero-actions { flex-direction: column; align-self: stretch; }
  .hero-actions a { width: 100%; }
  .hero-panel { padding: 24px 18px 18px; }
  .record { font-size: 12px; }
}

/* Orange band */
.band {
  background: var(--orange);
  color: var(--black);
  padding-block: 30px;
}
.band-list {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  font-family: var(--font-head);
  font-weight: 800;
  font-size: clamp(22px, 2.4vw, 34px);
  line-height: 1.15;
  letter-spacing: -0.02em;
}
.band-list li { display: flex; align-items: center; white-space: nowrap; }
.band-sep {
  margin-right: clamp(16px, 2.5vw, 40px);
  font-family: var(--font-mono);
  font-weight: 400;
  font-size: 22px;
  letter-spacing: 0;
}

@media (max-width: 900px) {
  .band-list {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    font-size: 25px;
  }
  .band-sep { display: none; }
}

/* Footer */
.site-footer {
  background: var(--black);
  border-top: 1px solid var(--line);
  padding-block: 2.5rem;
}
.site-footer .container {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.site-footer small {
  color: var(--muted-dark);
  font-size: 0.875rem;
}
