/* Source of truth: shared/css/digital.css. Copied to breachwaydigital/css/site.css by scripts/sync-shared.sh. */

@font-face {
  font-family: "Inter Tight";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/inter-tight-latin-400-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Inter Tight";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/fonts/inter-tight-latin-500-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Inter Tight";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/fonts/inter-tight-latin-600-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Instrument Serif";
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/instrument-serif-latin-400-italic.woff2") format("woff2");
}
@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/jetbrains-mono-latin-400-normal.woff2") format("woff2");
}
@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/fonts/jetbrains-mono-latin-500-normal.woff2") format("woff2");
}

:root {
  --page: #0c0e0e;
  --text: #f4f1ea;
  --text-2: #c9cdcb;
  --text-3: #a7adab;
  --line: #262a2a;
  --line-inner: #1c2020;
  --sea-glass: #7fd1c4;
  --ticker: #757c7a; /* spec #5E6563 is 3.24:1; lightened to pass 4.5:1 */

  --light-bg: #f4f1ea;
  --light-text: #0c0e0e;
  --light-label: #0a4f49;
  --light-body: #3a3f3e;
  --light-line: #d6d1c6;

  --sans: "Inter Tight", system-ui, -apple-system, "Segoe UI", sans-serif;
  --serif: "Instrument Serif", Georgia, "Times New Roman", serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  --max: 1320px;
  --gutter: 32px;
  --section-y: clamp(80px, 11vw, 144px);
  --header-h: 88px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--page);
  color: var(--text);
  font-family: var(--sans);
  font-size: 18px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1,
h2,
h3,
p,
ul,
ol {
  margin: 0;
}

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

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
}

:focus-visible {
  outline: 2px solid var(--sea-glass);
  outline-offset: 4px;
}

[id] {
  scroll-margin-top: var(--header-h);
}

.container {
  width: 100%;
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -100px;
  z-index: 100;
  padding: 12px 20px;
  border-radius: 999px;
  background: var(--text);
  color: var(--page);
  font-weight: 500;
  text-decoration: none;
}

.skip-link:focus {
  top: 16px;
}

/* Type */

.label {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.5;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--sea-glass);
}

.accent {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  letter-spacing: -0.01em;
}

h1,
h2 {
  font-weight: 600;
  letter-spacing: -0.045em;
  line-height: 0.95;
  text-wrap: balance;
}

h1 {
  font-size: clamp(50px, 8vw, 124px);
  line-height: 0.92;
}

h2 {
  font-size: clamp(40px, 5vw, 72px);
}

h3 {
  font-size: 26px;
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.1;
}

/* Buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 56px;
  padding: 0 28px;
  border-radius: 999px;
  font-size: 17px;
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.btn--primary {
  min-height: 60px;
  padding: 0 32px;
  background: var(--text);
  color: var(--page);
}

.btn--primary:hover {
  background: var(--sea-glass);
}

.btn--outline {
  border: 1px solid var(--text);
  color: var(--text);
  font-size: 15px;
  padding: 0 24px;
}

.btn--outline:hover {
  background: var(--text);
  color: var(--page);
}

/* Header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(12, 14, 14, 0.9);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: var(--header-h);
  padding-block: 16px;
}

/* Lockup: wordmark | rule | "Digital". --h is the wordmark's rendered height; everything else scales off it. */
.brand {
  --h: 22px;
  display: inline-flex;
  align-items: center;
  gap: calc(var(--h) * 0.5);
  text-decoration: none;
  flex-shrink: 0;
}

.brand img {
  width: auto;
  height: var(--h);
}

.brand-rule {
  width: 1px;
  height: calc(var(--h) * 1.15);
  background: #3a4040;
}

/* Wordmark baseline sits 0.1667H above the image's bottom edge (SVG viewBox -690..138, baseline at 0).
   The nudge drops the serif's baseline onto it; measured in Chromium against the loaded font. */
.brand-word {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  font-size: calc(var(--h) * 1.3);
  line-height: 1;
  color: var(--text);
  position: relative;
  top: calc(var(--h) * -0.07);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 36px;
}

.site-nav ul {
  display: flex;
  gap: 32px;
}

.site-nav ul a {
  font-size: 15px;
  font-weight: 500;
  color: var(--text-2);
  text-decoration: none;
  transition: color 0.2s ease;
}

.site-nav ul a:hover {
  color: var(--text);
}

/* Hero */

.hero {
  position: relative;
  padding-block: clamp(80px, 12vw, 160px) clamp(72px, 9vw, 120px);
}

.hero > .container {
  position: relative;
  z-index: 1;
}

.hero-tide,
.hero-shade {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hero-tide {
  display: block;
}

.hero-shade {
  background: linear-gradient(90deg, rgba(12, 14, 14, 0.92) 0%, rgba(12, 14, 14, 0.55) 46%, rgba(12, 14, 14, 0) 75%);
}

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

.hero h1 .accent {
  color: var(--sea-glass);
}

.hero-foot {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 48px;
  margin-top: clamp(48px, 6vw, 80px);
}

.hero-foot p {
  max-width: 600px;
  font-size: 20px;
  line-height: 1.55;
  color: var(--text-2);
}

/* Hero entrance: runs once on load. Nothing starts invisible, so the h1 is in the first paint. */

.hero-eyebrow,
.hero-foot p {
  animation: hero-fade 1s cubic-bezier(0.16, 1, 0.3, 1) both;
}

/* The button slides with the subline but stays opaque: a light pill at .25 opacity fails contrast. */
.hero-foot .btn {
  animation: hero-slide 1s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.hero-foot p,
.hero-foot .btn {
  animation-delay: 1.15s;
}

.hero h1 {
  animation: hero-rise 0.9s cubic-bezier(0.16, 1, 0.3, 1) 0.12s both;
}

/* Words stay inline so the whole h1 is one text block (and the LCP element); they sweep in by color. */
.hw {
  animation: hero-word 0.9s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.hw-1 { animation-delay: 0.12s; }
.hw-2 { animation-delay: 0.21s; }
.hw-3 { animation-delay: 0.3s; }
.hw-4 { animation-delay: 0.39s; }
.hw-5 { animation-delay: 0.48s; }
.hw-6 { animation-delay: 0.57s; }
.hw-7 { animation-delay: 0.66s; }

@keyframes hero-fade {
  from {
    opacity: 0.25;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes hero-slide {
  from {
    transform: translateY(12px);
  }
  to {
    transform: none;
  }
}

@keyframes hero-rise {
  from {
    transform: translateY(10px);
  }
  to {
    transform: none;
  }
}

@keyframes hero-word {
  from {
    color: #646b69;
  }
  to {
    color: var(--text);
  }
}

/* Rotating last word. All four share one grid cell; hero-motion.js swaps the classes. */

.tw-stack {
  display: inline-grid;
  justify-items: start;
  white-space: nowrap;
  padding-right: 0.08em;
  animation: hero-stack 1.2s cubic-bezier(0.16, 1, 0.3, 1) 0.9s both;
}

.tw-stack > span {
  grid-area: 1 / 1;
}

@keyframes hero-stack {
  from {
    color: #44736c;
    transform: translateY(14px);
  }
  to {
    color: var(--sea-glass);
    transform: none;
  }
}

.tw-on {
  opacity: 1;
  transform: none;
  filter: blur(0);
  transition: opacity 0.75s cubic-bezier(0.16, 1, 0.3, 1) 0.18s, transform 0.75s cubic-bezier(0.16, 1, 0.3, 1) 0.18s, filter 0.75s cubic-bezier(0.16, 1, 0.3, 1) 0.18s;
}

.tw-out {
  opacity: 0;
  transform: translateY(-0.16em);
  filter: blur(6px);
  transition: opacity 0.4s cubic-bezier(0.7, 0, 0.84, 0), transform 0.4s cubic-bezier(0.7, 0, 0.84, 0), filter 0.4s cubic-bezier(0.7, 0, 0.84, 0);
}

.tw-wait {
  opacity: 0;
  transform: translateY(0.22em);
  filter: blur(6px);
  transition: none;
}

.visually-hidden {
  position: absolute;
  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;
}

/* Pause control: icon-only button with a visual tooltip. The accessible name stays "Pause motion";
   aria-pressed carries the state. */

.motion-control {
  position: absolute;
  z-index: 1;
  bottom: clamp(14px, 2vw, 28px);
  right: max(var(--gutter), calc((100% - var(--max)) / 2 + var(--gutter)));
}

.motion-control[hidden] {
  display: none;
}

.motion-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--page);
  color: var(--text-2);
  cursor: pointer;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.motion-toggle:hover {
  color: var(--text);
  border-color: var(--text-3);
}

.motion-toggle svg {
  width: 14px;
  height: 14px;
  fill: currentColor;
}

.motion-toggle[aria-pressed="true"] .icon-pause,
.motion-toggle[aria-pressed="false"] .icon-play {
  display: none;
}

/* Sits to the left of the button so it never covers it or runs off the right edge. */
.motion-tip {
  position: absolute;
  top: 50%;
  right: calc(100% + 8px);
  transform: translateY(-50%);
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--page);
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  line-height: 1.4;
  white-space: nowrap;
  color: var(--text-2);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.15s ease, visibility 0.15s;
}

/* Bridges the gap to the button so the pointer can move onto the tooltip (WCAG 1.4.13). */
.motion-tip::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 100%;
  width: 10px;
}

.motion-control:hover:not(.tip-off) .motion-tip,
.motion-control:not(.tip-off) .motion-toggle:focus-visible + .motion-tip {
  opacity: 1;
  visibility: visible;
}

/* Ticker */

.ticker {
  overflow: hidden;
  border-block: 1px solid var(--line);
  padding-block: 28px;
}

.ticker-track {
  display: flex;
  width: max-content;
  animation: ticker 42s linear infinite;
}

.ticker-track ul {
  display: flex;
  flex-shrink: 0;
}

.ticker-track li {
  display: flex;
  align-items: center;
  font-size: clamp(32px, 4vw, 56px);
  font-weight: 500;
  letter-spacing: -0.035em;
  line-height: 1.1;
  color: var(--ticker);
  white-space: nowrap;
}

.ticker-track li::after {
  content: "/";
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  color: var(--sea-glass);
  margin-inline: 0.5em;
}

@keyframes ticker {
  to {
    transform: translateX(-50%);
  }
}

/* Sections */

.section {
  padding-block: var(--section-y);
}

.section--rule {
  border-top: 1px solid var(--line);
}

.section-head .label {
  margin-bottom: 28px;
}

.section-head h2 {
  max-width: 16ch;
}

/* Ways to work together (light band) */

.band-light {
  background: var(--light-bg);
  color: var(--light-text);
}

.band-light :focus-visible {
  outline-color: var(--light-label);
}

.band-light .label {
  color: var(--light-label);
}

.ways {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin-top: clamp(56px, 7vw, 96px);
  border-top: 1px solid var(--light-line);
}

.ways li {
  display: flex;
  flex-direction: column;
  padding: 40px 36px 8px;
}

.ways li:first-child {
  padding-left: 0;
}

.ways li:last-child {
  padding-right: 0;
}

.ways li + li {
  border-left: 1px solid var(--light-line);
}

.ways h3 {
  font-size: clamp(30px, 3vw, 40px);
  margin: 20px 0 20px;
}

.ways .desc {
  font-size: 17px;
  color: var(--light-body);
}

.ways .best-for {
  margin-top: auto;
  padding-top: 32px;
}

.ways .best-for .label {
  margin-bottom: 8px;
}

.ways .best-for .fit {
  color: var(--light-text);
  font-weight: 500;
}

/* AI */

.ai h2 {
  font-size: clamp(44px, 6vw, 92px);
  max-width: 14ch;
}

.ai h2 .accent {
  color: var(--sea-glass);
}

.ai-intro {
  display: grid;
  grid-template-columns: 7fr 5fr;
  gap: 64px;
  align-items: end;
  margin-top: clamp(40px, 5vw, 64px);
}

.ai-intro p:first-child {
  font-size: clamp(20px, 2vw, 24px);
  line-height: 1.5;
  color: var(--text-2);
  max-width: 34em;
}

.ai-intro p:last-child {
  color: var(--text-3);
  max-width: 30em;
}

.ai-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin-top: clamp(56px, 7vw, 96px);
  border-top: 1px solid var(--line);
}

.ai-cols > div {
  padding-top: 40px;
}

.ai-cols > div:first-child {
  padding-right: 48px;
}

.ai-cols > div + div {
  padding-left: 48px;
  border-left: 1px solid var(--line);
}

.ai-cols h3 {
  font-size: clamp(28px, 3vw, 40px);
  margin: 16px 0 28px;
}

/* Lists with hairlines; rows highlight on hover */

.rows li {
  padding: 14px 0;
  border-top: 1px solid var(--line-inner);
  color: var(--text-2);
  transition: color 0.2s ease, padding-left 0.25s ease;
}

.rows li:last-child {
  border-bottom: 1px solid var(--line-inner);
}

.rows li:hover {
  color: var(--text);
  padding-left: 10px;
  box-shadow: inset 2px 0 0 var(--sea-glass);
}

/* Capabilities */

.cap-head {
  display: grid;
  grid-template-columns: 1fr minmax(0, 380px);
  gap: 48px;
  align-items: end;
}

.cap-head h2 {
  max-width: 12ch;
}

.cap-head p {
  color: var(--text-2);
}

.cap-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
  margin-top: clamp(56px, 7vw, 96px);
}

.cap-grid > li {
  border-top: 1px solid var(--line);
  padding-top: 24px;
}

.cap-grid h3 {
  margin: 14px 0 24px;
}

.cap-grid .rows li {
  font-size: 17px;
  padding-block: 12px;
}

.cap-grid .rows li:first-child {
  border-top: 0;
}

/* Who we work with */

.panels {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-top: clamp(48px, 6vw, 80px);
}

.panel {
  border: 1px solid var(--line);
  padding: clamp(28px, 3.5vw, 48px);
}

.panel h3 {
  font-size: clamp(28px, 2.6vw, 36px);
  margin-bottom: 20px;
}

.panel p {
  color: var(--text-2);
}

.panel a {
  color: var(--sea-glass);
  text-underline-offset: 3px;
}

.panel a:hover {
  color: var(--text);
}

/* About */

.about-body {
  max-width: 820px;
  margin-top: clamp(40px, 5vw, 64px);
}

.about-body > p + p {
  margin-top: 24px;
}

.about-body > p {
  color: var(--text-2);
}

.about-body > p:first-child {
  font-size: clamp(20px, 2vw, 24px);
  line-height: 1.5;
  color: var(--text);
}

.pills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 40px;
}

.pills li {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 16px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  line-height: 1.4;
  color: var(--text-2);
}

.about-body .note {
  margin-top: 28px;
  font-size: 15px;
  color: var(--text-3);
}

/* Selected brands (light band) */

.brands .section-head {
  text-align: center;
}

.brands .section-head h2 {
  margin-inline: auto;
}

.brands .label {
  color: #4a4f4e;
}

.logos {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 16px 32px;
  margin-top: clamp(48px, 6vw, 80px);
}

.logos li {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 96px;
}

.logo {
  width: auto;
  height: auto;
  max-width: 100%;
  filter: grayscale(1);
  opacity: 0.72;
}

.logo--bigmikes {
  filter: grayscale(1) brightness(0);
}

.logo--foster { max-height: 44px; }
.logo--magnivision { max-height: 34px; }
.logo--corinne { max-height: 22px; }
.logo--alexani { max-height: 40px; }
.logo--arctic { max-height: 44px; }
.logo--atomi { max-height: 40px; }
.logo--americat { max-height: 52px; }
.logo--greenjuju { max-height: 40px; }
.logo--headlight { max-height: 52px; }
.logo--bigmikes { max-height: 56px; }
.logo--rarebreed { max-height: 56px; }

@media (max-width: 1099px) {
  .logos {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (max-width: 699px) {
  .logos {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px 16px;
  }

  .logos li {
    height: 80px;
  }
}

.brands-note {
  margin-top: 40px;
  text-align: center;
  font-size: 14px;
  color: #4a4f4e;
}

/* Contact */

.contact h2 {
  font-size: clamp(48px, 7.6vw, 116px);
  line-height: 0.92;
  max-width: 13ch;
}

.contact-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 24px 40px;
  margin-top: clamp(48px, 6vw, 80px);
}

.contact-row p {
  max-width: 32em;
  color: var(--text-3);
}

/* Footer */

.site-footer {
  border-top: 1px solid var(--line);
  padding-block: 32px;
}

.site-footer .container {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px 32px;
}

.site-footer p {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  line-height: 1.6;
  color: var(--text-3);
}

.site-footer a {
  color: var(--text-2);
  text-underline-offset: 3px;
}

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

/* 404 */

.not-found {
  min-height: 60vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.not-found .label {
  margin-bottom: 32px;
}

.not-found h1 {
  max-width: 12ch;
}

.not-found .contact-row p a {
  color: var(--text-2);
  text-underline-offset: 3px;
}

/* Responsive */

@media (max-width: 1080px) {
  .cap-grid {
    grid-template-columns: repeat(2, 1fr);
    row-gap: 56px;
  }
}

@media (max-width: 900px) {
  .site-nav ul {
    display: none;
  }

  .hero-foot,
  .ai-intro,
  .cap-head {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 32px;
  }

  .ways,
  .ai-cols,
  .panels {
    grid-template-columns: 1fr;
  }

  .ways li,
  .ways li:first-child,
  .ways li:last-child {
    padding: 36px 0;
  }

  .ways li + li {
    border-left: 0;
    border-top: 1px solid var(--light-line);
  }

  .ai-cols > div,
  .ai-cols > div:first-child,
  .ai-cols > div + div {
    padding: 36px 0 0;
    border-left: 0;
  }

  .ai-cols > div + div {
    margin-top: 40px;
    border-top: 1px solid var(--line);
  }
}

@media (max-width: 699px) {
  .brand {
    --h: 18px;
  }
}

@media (max-width: 640px) {
  :root {
    --gutter: 20px;
    --header-h: 76px;
  }

  body {
    font-size: 17px;
  }

  .site-header .container {
    padding-block: 10px;
  }

  .btn--outline {
    padding: 0 18px;
    font-size: 14px;
  }

  .hero-foot p {
    font-size: 18px;
  }

  .cap-grid {
    grid-template-columns: 1fr;
  }

  .contact-row .btn {
    width: 100%;
    padding: 0 20px;
    font-size: 16px;
  }
}

@media (max-width: 400px) {
  .site-header .container {
    gap: 12px;
  }
}

@media (max-width: 399px) {
  .brand {
    --h: 16px;
  }
}

/* Full lockup + header button need 358px even at H = 16px; below that only the wordmark stays. */
@media (max-width: 357px) {
  .brand-rule,
  .brand-word {
    display: none;
  }
}

@media (max-width: 359px) {
  .contact-row .btn {
    font-size: 14px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }

  .rows li:hover {
    padding-left: 0;
  }

  .motion-control {
    display: none;
  }
}

.nowrap {
  white-space: nowrap;
}
