/* DR Supply Chain — site styles */

:root {
  /* Brand palette (_reference/Colors.png) — the only colors used */
  --navy: #181c2b;
  --paper: #e2e5ed;
  --teal: #5da5af;
  --teal-lt: #9dc7c8;
  --amber: #e8a63d;
  --amber-lt: #f2c46a;

  --font: "Karla", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;

  --fs-h1: clamp(2.6rem, 0.6rem + 3.9vw, 4.75rem);
  --fs-h2: clamp(1.9rem, 1.15rem + 2.6vw, 3.6rem);
  --fs-lead: clamp(1.2rem, 1rem + 0.7vw, 1.55rem);
  --fs-body: clamp(1.0625rem, 1rem + 0.2vw, 1.1875rem);
  --fs-label: 0.75rem;

  --gutter: clamp(16px, 4vw, 56px);
  --col-gap: clamp(16px, 2vw, 32px);
  --max: 1440px;
  --header-h: 72px;
  --section-y: clamp(80px, 11vw, 168px);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* Surfaces */
.surface-amber {
  --bg: var(--amber-lt);
  --fg: var(--navy);
  --fg-2: rgb(24 28 43 / 0.8);
  --fg-3: rgb(24 28 43 / 0.64);
  --rule: rgb(24 28 43 / 0.22);
  --btn-bg: var(--navy);
  --btn-fg: var(--paper);
}
.surface-light {
  --bg: var(--paper);
  --fg: var(--navy);
  --fg-2: rgb(24 28 43 / 0.74);
  --fg-3: rgb(24 28 43 / 0.58);
  --rule: rgb(24 28 43 / 0.16);
  --btn-bg: var(--navy);
  --btn-fg: var(--paper);
}
.surface-teal,
.surface-teal-lt {
  --fg: var(--navy);
  --fg-2: rgb(24 28 43 / 0.8);
  --fg-3: rgb(24 28 43 / 0.64);
  --rule: rgb(24 28 43 / 0.22);
  --btn-bg: var(--navy);
  --btn-fg: var(--paper);
}
.surface-teal { --bg: var(--teal); }
.surface-teal-lt { --bg: var(--teal-lt); }
.surface-dark {
  --bg: var(--navy);
  --fg: var(--paper);
  --fg-2: rgb(226 229 237 / 0.74);
  --fg-3: rgb(226 229 237 / 0.56);
  --rule: rgb(157 199 200 / 0.25);
  --btn-bg: var(--amber-lt);
  --btn-fg: var(--navy);
}
.surface-amber, .surface-light, .surface-teal, .surface-teal-lt, .surface-dark { background: var(--bg); color: var(--fg); }

/* Base */
*, *::before, *::after { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-h);
}
body {
  margin: 0;
  background: var(--paper);
  color: var(--navy);
  font-family: var(--font);
  font-size: var(--fs-body);
  line-height: 1.6;
  font-kerning: normal;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
img, svg, canvas { display: block; max-width: 100%; }
h1, h2, h3, p, ul, dl, dd, figure { margin: 0; }
ul { padding: 0; list-style: none; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
:focus-visible { outline: 2px solid var(--navy); outline-offset: 3px; }
.surface-dark :focus-visible { outline-color: var(--amber-lt); }
::selection { background: var(--amber-lt); color: var(--navy); }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip {
  position: fixed; top: 8px; left: 8px; z-index: 100;
  padding: 10px 14px; background: var(--amber-lt); color: var(--navy);
  font-weight: 700; text-decoration: none; transform: translateY(-200%);
}
.skip:focus { transform: none; }

.icon { width: 1.15em; height: 1.15em; flex: none; }

/* Layout */
.wrap {
  width: 100%;
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: max(var(--gutter), env(safe-area-inset-left));
}
.grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--col-gap);
}
.grid > * { grid-column: 1 / -1; }
.section { padding-block: var(--section-y); }

/* Type */
.label {
  font-size: var(--fs-label);
  font-weight: 800;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  line-height: 1.5;
}
.list-label { margin-bottom: 1rem; }
.section-title {
  font-size: var(--fs-h2);
  font-weight: 800;
  line-height: 1.02;
  letter-spacing: -0.045em;
  text-wrap: balance;
}
.highlight {
  background: var(--amber-lt);
  padding: 0 0.15em;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}
.sub-title {
  font-size: clamp(1.5rem, 1.1rem + 1.4vw, 2.4rem);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.04em;
  text-wrap: balance;
}
.body-l {
  margin-top: clamp(1.5rem, 2.5vw, 2.25rem);
  font-size: var(--fs-lead);
  line-height: 1.45;
  letter-spacing: -0.01em;
  color: var(--fg-2);
  max-width: 34em;
  text-wrap: pretty;
}
.line { display: block; overflow: clip; padding-bottom: 0.08em; margin-bottom: -0.08em; }
.line > span { display: inline-block; }

/* Buttons: a thin outer stroke, held off the fill by a gap */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  min-height: 52px;
  padding: 0.75em 1.35em;
  margin: 4px;
  background: var(--btn-bg);
  color: var(--btn-fg);
  outline: 1px solid var(--btn-bg);
  outline-offset: 3px;
  font-weight: 800;
  font-size: 1rem;
  letter-spacing: -0.01em;
  line-height: 1.2;
  text-decoration: none;
  border-radius: 2px;
  transition: background-color 0.25s var(--ease), color 0.25s var(--ease), outline-offset 0.3s var(--ease);
}
.btn:hover { background: var(--fg); color: var(--bg); outline-offset: 5px; }
.btn:focus-visible { outline-width: 2px; }
.btn--small { min-height: 40px; padding: 0.5em 1em; font-size: 0.9375rem; }
.btn--large { min-height: 60px; padding: 0.9em 1.6em; font-size: 1.125rem; }

/* Header */
.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  height: var(--header-h);
  --bg: var(--paper);
  --fg: var(--navy);
  --btn-bg: var(--navy);
  --btn-fg: var(--paper);
  color: var(--fg);
  transition: background-color 0.35s var(--ease), color 0.35s var(--ease), box-shadow 0.35s var(--ease);
}
.site-header[data-surface="dark"] { --fg: var(--paper); --btn-bg: var(--amber-lt); --btn-fg: var(--navy); }
.site-header.is-scrolled { background: var(--bg); box-shadow: 0 1px 0 rgb(24 28 43 / 0.12); }

.header-inner { display: flex; align-items: center; gap: 2rem; height: 100%; }
.brand { display: block; margin-right: auto; }
.logo { height: 46px; width: auto; }
.logo--dark, .logo--ink { display: none; }
.site-header[data-surface="dark"] .logo--light,
.site-header[data-surface="teal"] .logo--light { display: none; }
.site-header[data-surface="dark"] .logo--dark,
.site-header[data-surface="teal"] .logo--ink { display: block; }

.nav ul { display: flex; gap: clamp(1rem, 2vw, 2rem); }
.nav a {
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  text-decoration: none;
  padding-block: 0.5rem;
  background-image: linear-gradient(currentColor, currentColor);
  background-size: 0% 2px;
  background-position: 0 100%;
  background-repeat: no-repeat;
  transition: background-size 0.4s var(--ease);
}
.nav a:hover, .nav a[aria-current="true"] { background-size: 100% 2px; }

.menu-toggle { display: none; width: 44px; height: 44px; position: relative; margin-right: -10px; }
.menu-bar {
  position: absolute; left: 11px; right: 11px; height: 2px;
  background: currentColor;
  transition: transform 0.35s var(--ease);
}
.menu-bar:nth-child(2) { top: 18px; }
.menu-bar:nth-child(3) { top: 25px; }
.menu-toggle[aria-expanded="true"] .menu-bar:nth-child(2) { transform: translateY(3.5px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] .menu-bar:nth-child(3) { transform: translateY(-3.5px) rotate(-45deg); }

/* Hero: a contained amber panel beside the globe */
.hero { padding-top: calc(var(--header-h) + 8px); padding-bottom: var(--gutter); }
.hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 6fr) minmax(0, 6fr);
  gap: var(--col-gap);
  min-height: calc(100svh - var(--header-h) - 8px - var(--gutter));
}
.hero-panel {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 3rem;
  padding: clamp(24px, 3.5vw, 56px);
  /* Square cells at a fixed size, so the grid keeps its proportions at any width */
  background-image:
    linear-gradient(to right, rgb(24 28 43 / 0.07) 1px, transparent 1px),
    linear-gradient(to bottom, rgb(24 28 43 / 0.07) 1px, transparent 1px);
  background-size: 40px 40px;
  background-position: -1px -1px;
}
.hero-title {
  font-size: var(--fs-h1);
  font-weight: 800;
  line-height: 0.92;
  letter-spacing: -0.055em;
  margin-left: -0.04em;
}
.lead {
  margin-top: clamp(1.5rem, 3vw, 2.25rem);
  font-size: var(--fs-lead);
  font-weight: 400;
  line-height: 1.35;
  letter-spacing: -0.015em;
  max-width: 20em;
  text-wrap: balance;
}
.hero-scope { margin-top: 1rem; }
.hero-scope span { margin-inline: 0.3em; opacity: 0.45; }
.hero-text .btn { margin-top: clamp(1.75rem, 3vw, 2.5rem); }

.globe-cell {
  position: relative;
  display: grid;
  place-items: center;
}
.globe {
  width: 100%;
  max-width: 720px;
  aspect-ratio: 1;
  cursor: grab;
  touch-action: pan-y;
}
.globe.is-dragging { cursor: grabbing; }
.globe-hint {
  position: absolute;
  bottom: 0;
  left: 50%;
  translate: -50% 0;
  color: var(--fg-3);
}

/* Services */
.services-copy { grid-column: 1 / span 6; grid-row: 1; }
.flow-cell {
  grid-column: 7 / span 6;
  grid-row: 1;
  position: sticky;
  top: calc(var(--header-h) + 24px);
  align-self: start;
}
.flow { width: 100%; height: auto; overflow: visible; }
.services .list-label { margin-top: clamp(2.5rem, 5vw, 4rem); }
.service-list { border-top: 2px solid var(--fg); }
.service-list li {
  padding: 0.95rem 0;
  border-bottom: 1px solid var(--rule);
  font-size: clamp(1.125rem, 1rem + 0.45vw, 1.375rem);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.03em;
}
/* Flow figure (services) */
.flow .belt { fill: var(--paper); stroke: var(--navy); stroke-width: 1; vector-effect: non-scaling-stroke; stroke-linejoin: round; }
.flow .belt-mid { fill: none; stroke: rgb(24 28 43 / 0.25); stroke-width: 1; stroke-dasharray: 3 5; vector-effect: non-scaling-stroke; }
.flow .node-top { fill: var(--teal-lt); stroke: var(--navy); stroke-width: 1; vector-effect: non-scaling-stroke; stroke-linejoin: round; }
.flow .node-side { fill: var(--teal); stroke: var(--navy); stroke-width: 1; vector-effect: non-scaling-stroke; stroke-linejoin: round; }
.flow .source .node-top { fill: var(--amber-lt); }
.flow .source .node-side { fill: var(--amber); }
.flow .gate { fill: none; stroke: var(--navy); stroke-width: 1.5; vector-effect: non-scaling-stroke; stroke-linecap: round; }
.flow .box-top { fill: var(--paper); }
.flow .box-left { fill: var(--teal-lt); }
.flow .box-right { fill: var(--teal); }
.flow .box polygon { stroke: var(--navy); stroke-width: 1; vector-effect: non-scaling-stroke; stroke-linejoin: round; }
.flow .box-tape { stroke: var(--navy); stroke-width: 1; vector-effect: non-scaling-stroke; opacity: 0.5; }

/* About + Approach */
.portrait { grid-column: 1 / span 4; align-self: start; }
/* Duotone: navy shadows, paper highlights */
.portrait-frame { position: relative; isolation: isolate; aspect-ratio: 4 / 5; overflow: hidden; background: var(--paper); }
.portrait-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 30%;
  transform: scale(1.3);
  transform-origin: 50% 98%; /* just above the edge, so no hairline of background shows */
  filter: grayscale(1) contrast(1.1);
  mix-blend-mode: multiply;
}
.portrait-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--navy);
  mix-blend-mode: lighten;
  pointer-events: none;
}
.portrait-caption { margin-top: 0.9rem; padding-top: 0.9rem; border-top: 2px solid var(--fg); }
.about-body { grid-column: 6 / span 7; }
.about .sub-title { margin-top: clamp(3.5rem, 7vw, 6rem); max-width: 26ch; }
.principles {
  margin-top: 2rem;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: var(--col-gap);
  border-top: 2px solid var(--fg);
}
.principles li {
  padding: 1.1rem 0 1.4rem;
  border-bottom: 1px solid var(--rule);
  font-size: 1.0625rem;
  font-weight: 600;
  line-height: 1.4;
  text-wrap: pretty;
}

/* Success stories */
.stories .label { color: var(--teal-lt); }
.stories-head .intel-logo { width: clamp(88px, 9vw, 128px); margin-top: clamp(1.5rem, 3vw, 2.25rem); background: var(--teal-lt); }
.stories-head .label { margin-bottom: 1.25rem; }
.stories-title {
  font-size: clamp(1.75rem, 1rem + 2.2vw, 3.1rem);
  font-weight: 800;
  line-height: 1.02;
  letter-spacing: -0.045em;
  text-wrap: balance;
}
.stories-title [data-count] { font-variant-numeric: tabular-nums; }
@media (min-width: 901px) { .stories-title { white-space: nowrap; } }

/* Story cards: a 2-column grid of faint outlined panels */
.stories-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(10px, 1vw, 16px);
  margin-top: clamp(3rem, 6vw, 5rem);
}
.story {
  display: flex;
  flex-direction: column;
  padding: clamp(20px, 2.4vw, 32px);
  border: 1px solid var(--rule);
  border-radius: 2px;
  transition: border-color 0.35s var(--ease), background-color 0.35s var(--ease);
}
.story[hidden] { display: none; }
.story:hover { border-color: var(--amber-lt); background: rgb(226 229 237 / 0.04); }
.stories .story-num {
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--rule);
  color: var(--amber-lt);
  font-size: clamp(1.75rem, 1.2rem + 1.4vw, 2.6rem);
  line-height: 1;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
  transition: border-color 0.35s var(--ease);
}
.story:hover .story-num { border-bottom-color: rgb(242 196 106 / 0.5); }
.story-title {
  margin-top: clamp(1.25rem, 2.5vw, 2rem);
  font-size: clamp(1.6rem, 0.9rem + 2vw, 2.9rem);
  font-weight: 800;
  line-height: 0.98;
  letter-spacing: -0.045em;
  text-wrap: balance;
}
.story-title .line { padding-bottom: 0.1em; margin-bottom: -0.1em; }
.story-sub {
  margin-top: 0.5rem;
  font-size: clamp(1rem, 0.9rem + 0.35vw, 1.2rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.03em;
  color: var(--amber-lt);
  text-wrap: balance;
}
.story-points { margin-top: clamp(1.5rem, 2.5vw, 2rem); }
.story-points li { padding: 0.85rem 0; border-top: 1px solid var(--rule); font-size: 1rem; line-height: 1.45; color: var(--fg-2); text-wrap: pretty; }

.case-head { margin-top: clamp(6rem, 12vw, 10rem); }
/* Same two columns as the story cards, so the video lines up with them */
.case-study { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--col-gap); margin-top: clamp(2.5rem, 5vw, 4rem); align-items: end; }
.case-study .media { grid-column: 1; }
.case-study-copy { grid-column: 2; padding-left: clamp(0px, 2vw, 24px); }
.case-study-copy .card-meta { margin-top: 0; font-size: var(--fs-lead); line-height: 1.4; }
.case-study iframe { grid-column: 1; display: block; width: 100%; aspect-ratio: 16 / 9; border: 0; }
.media {
  display: block;
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 0;
  overflow: hidden;
  background: var(--teal);
}
/* 16 x 9 square cells: the grid scales with the card and keeps its proportions */
.media-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, rgb(24 28 43 / 0.14) 1px, transparent 1px),
    linear-gradient(to bottom, rgb(24 28 43 / 0.14) 1px, transparent 1px);
  background-size: calc(100% / 16) calc(100% / 9);
}
.intel-logo {
  position: relative;
  display: block;
  aspect-ratio: 108 / 42;
  -webkit-mask: url("/assets/img/intel.svg") center / contain no-repeat;
  mask: url("/assets/img/intel.svg") center / contain no-repeat;
}
.play {
  position: absolute;
  left: 50%; top: 50%;
  translate: -50% -50%;
  display: grid;
  place-items: center;
  width: clamp(56px, 6vw, 80px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--amber-lt);
  color: var(--navy);
  transition: transform 0.4s var(--ease);
}
.play svg { width: 40%; fill: currentColor; transform: translateX(6%); }
.video-poster:hover .play { transform: scale(1.08); }
.card-label { margin-top: 1.25rem; color: var(--teal-lt); }
.card-title { margin-top: 0.5rem; font-size: clamp(1.4rem, 1.1rem + 1vw, 2rem); font-weight: 800; line-height: 1.05; letter-spacing: -0.04em; }
.card-meta { margin-top: 0.5rem; color: var(--fg-2); font-size: 1rem; line-height: 1.5; }

/* Contact */
.contact .label { margin-bottom: 1.25rem; }
.contact-title {
  font-size: clamp(2.4rem, 0.4rem + 6.4vw, 7.5rem);
  font-weight: 800;
  line-height: 0.92;
  letter-spacing: -0.055em;
  text-wrap: balance;
}
.contact-note { margin-top: clamp(1.25rem, 2.5vw, 2rem); font-size: var(--fs-lead); line-height: 1.4; color: var(--fg-2); }
.contact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: clamp(2.5rem, 5vw, 4rem);
}

/* Footer */
.site-footer { padding-block: 2.5rem calc(2.5rem + env(safe-area-inset-bottom)); background: var(--navy); color: rgb(226 229 237 / 0.56); }
.footer-inner { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 2rem; font-size: 0.875rem; }
.footer-mark { height: 32px; width: auto; margin-right: auto; }

/* Pre-animation state while JS boots */
.js:not(.ready) .hero-in,
.js:not(.ready) .hero-title,
.js:not(.ready) .globe { opacity: 0; }

/* Responsive */
@media (max-width: 1100px) {
  .hero-inner { grid-template-columns: 1fr; min-height: 0; }
  .hero-panel { min-height: 64svh; }
  .globe-cell { padding-block: 1rem 2.5rem; }
  .globe { max-width: 560px; }
  .services-copy, .flow-cell { grid-column: 1 / -1; }
  .flow-cell { grid-row: 2; position: static; max-width: 720px; margin-top: 3rem; }
  .portrait { grid-column: 1 / span 5; }
  .about-body { grid-column: 7 / span 6; }
  .principles { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
  .nav { display: none; }
  .header-inner { gap: 1rem; }
  .menu-toggle { display: block; }
  .logo { height: 40px; }
  /* A fixed child of a fixed header still sits against the viewport, so drop it below the bar */
  .nav.is-open {
    display: block;
    position: fixed;
    inset: var(--header-h) 0 auto;
    height: calc(100dvh - var(--header-h));
    overflow-y: auto;
    padding: 2rem var(--gutter);
    background: var(--bg);
    color: var(--fg);
  }
  .nav.is-open ul { flex-direction: column; gap: 0; }
  .nav.is-open a {
    display: block;
    padding: 1rem 0;
    font-size: 2rem;
    letter-spacing: -0.04em;
    text-transform: none;
    border-bottom: 1px solid rgb(24 28 43 / 0.2);
    background: none;
  }
  .site-header[data-surface="dark"] .nav.is-open a { border-bottom-color: rgb(226 229 237 / 0.2); }

  .portrait, .about-body, .case-study .media, .case-study iframe, .case-study-copy { grid-column: 1 / -1; }
  .portrait { max-width: 440px; margin-bottom: 3rem; }
  .stories-grid, .case-study { grid-template-columns: 1fr; }
  .case-study-copy { padding-left: 0; }
}

@media (max-width: 640px) {
  .hero-panel { min-height: 0; }
  .contact-actions .btn { width: calc(100% - 8px); justify-content: center; }
}

/* Very narrow: the booking button keeps its icon */
@media (max-width: 420px) {
  .header-cta { padding-inline: 0.8em; }
  .header-cta-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0.01ms !important; }
}
