/* ==========================================================================
   Cymbal Studio — one-pager
   Style reference: "Jeton" editorial fintech (DESIGN.md)
   ========================================================================== */

:root {
  /* Colors */
  --color-signal-orange: #f73b20;
  --color-brand-orange-tint: #f84d35;
  --color-ink-roast: #360802;
  --color-paper-white: #ffffff;
  --color-carbon-black: #000000;
  --color-ash-grey: #ababab;
  --color-sand-wash: #e7dcdb;
  --color-linen-blush: #fdedea;
  --color-citrus-wash: #f5ffbb;
  --color-mint-wash: #bcffbb;
  --color-coral-red: #fb2d54;
  --color-cobalt-blue: #477ee9;
  --color-emerald-green: #34c771;

  /* Ink variants */
  --ink-80: rgba(54, 8, 2, 0.8);
  --ink-60: rgba(54, 8, 2, 0.6);

  /* Typography
     Space Grotesk carries headlines & brand; body/UI runs on the
     geometric grotesque substitute stack from DESIGN.md. */
  --font-display: 'Space Grotesk', ui-sans-serif, system-ui, sans-serif;
  --font-body: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;

  /* Dark hero */
  --color-hero-bg: #0f0503;

  /* Layout */
  --page-max-width: 1200px;
  --section-gap: clamp(96px, 14vw, 160px);
  --gutter: clamp(20px, 4vw, 40px);

  /* Radius */
  --radius-nav: 84px;
  --radius-cards: 16px;
  --radius-media: 24px;
  --radius-links: 8px;
  --radius-pills: 9999px;
  --radius-buttons: 12px;

  /* Shadows */
  --shadow-lg: rgba(247, 59, 32, 0.1) 0px 8px 24px 0px, rgba(247, 59, 32, 0.05) 0px 2px 8px 0px;
  --shadow-md: rgba(0, 0, 0, 0.05) 0px -4px 16px 0px;

  /* Surfaces */
  --surface-category-tint: rgba(247, 59, 32, 0.05);
  --surface-close-tint: #f4edeb;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 104px;
}

body {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 17px;
  line-height: 1.5;
  color: var(--color-ink-roast);
  background: var(--color-paper-white);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

.container--wide {
  max-width: 1440px;
}

::selection {
  background: var(--color-signal-orange);
  color: var(--color-paper-white);
}

/* --------------------------------------------------------------------------
   Type
   -------------------------------------------------------------------------- */

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 500;
  letter-spacing: -0.015em;
}

h2 {
  font-size: clamp(38px, 5.5vw, 64px);
  line-height: 1.02;
  margin-bottom: clamp(24px, 3.5vw, 40px);
  max-width: 18ch;
}

p {
  max-width: 62ch;
}

.lede {
  font-size: clamp(22px, 2.6vw, 30px);
  line-height: 1.25;
  letter-spacing: 0.01em;
  font-weight: 500;
  margin-bottom: 24px;
  max-width: 30ch;
}

.eyebrow {
  color: var(--color-signal-orange);
  font-size: 14px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 500;
  margin-bottom: 24px;
}

.section__label {
  color: var(--color-signal-orange);
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 500;
  margin-bottom: 20px;
}

.section__intro {
  font-size: clamp(20px, 2.2vw, 23px);
  line-height: 1.3;
  color: var(--ink-80);
  margin-bottom: clamp(32px, 5vw, 56px);
  max-width: 44ch;
}

/* --------------------------------------------------------------------------
   Buttons & links
   -------------------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 450;
  letter-spacing: 0.03em;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.2s ease;
}

.btn--primary {
  background: var(--color-signal-orange);
  color: var(--color-paper-white);
  border-radius: var(--radius-buttons);
  padding: 14px 24px;
}

.btn--primary:hover {
  background: var(--color-brand-orange-tint);
  transform: translateY(-1px);
}

.btn--pill {
  background: var(--color-signal-orange);
  color: var(--color-paper-white);
  border-radius: var(--radius-pills);
  padding: 9px 20px;
  font-size: 14px;
}

.btn--pill:hover {
  background: var(--color-brand-orange-tint);
}

.link-ghost {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--color-signal-orange);
  text-decoration: none;
  font-size: 15px;
  font-weight: 450;
  letter-spacing: 0.03em;
  padding: 8px 0;
  border-radius: var(--radius-links);
}

/* Animated underline for text links — slides in from the left on hover */
.link-ghost,
a.follow-list__value,
.footer__links a {
  background-image: linear-gradient(currentColor, currentColor);
  background-repeat: no-repeat;
  background-size: 0% 1px;
  transition: background-size 0.3s ease, color 0.2s ease;
}

.link-ghost {
  background-position: 0 calc(100% - 5px);
}

a.follow-list__value,
.footer__links a {
  background-position: 0 100%;
}

.link-ghost:hover,
a.follow-list__value:hover,
.footer__links a:hover {
  background-size: 100% 1px;
}

/* --------------------------------------------------------------------------
   Nav
   -------------------------------------------------------------------------- */

.nav-wrap {
  position: fixed;
  top: 16px;
  left: 0;
  right: 0;
  z-index: 100;
  padding-inline: var(--gutter);
}

.nav {
  max-width: var(--page-max-width);
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 10px 12px 10px 24px;
  border-radius: var(--radius-nav);
  background: rgba(15, 5, 3, 0.6);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.09);
  transition: background-color 0.3s ease, border-color 0.3s ease;
}

.nav__brand {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.nav__lockup {
  height: 24px;
  width: auto;
  display: block;
  /* Optical centering — the wordmark's mass sits high in its bounding box */
  transform: translateY(2px);
}

.nav__links {
  display: flex;
  gap: 4px;
}

.nav__links a {
  color: rgba(255, 255, 255, 0.85);
  text-decoration: none;
  font-size: 14px;
  font-weight: 450;
  letter-spacing: 0.03em;
  padding: 8px 14px;
  border-radius: var(--radius-pills);
  transition: background-color 0.2s ease, color 0.2s ease;
}

.nav__links a:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

.nav__links a[aria-current="true"] {
  background: rgba(255, 255, 255, 0.16);
  color: #ffffff;
}

/* Light theme — applies once the nav leaves the dark hero */
.nav__lockup--on-light {
  display: none;
}

.nav--light {
  background: rgba(255, 255, 255, 0.72);
  border-color: rgba(54, 8, 2, 0.07);
}

.nav--light .nav__lockup--on-dark {
  display: none;
}

.nav--light .nav__lockup--on-light {
  display: block;
}

.nav--light .nav__links a {
  color: var(--color-ink-roast);
}

.nav--light .nav__links a:hover {
  background: var(--surface-category-tint);
  color: var(--color-signal-orange);
}

.nav--light .nav__links a[aria-current="true"] {
  background: rgba(54, 8, 2, 0.08);
  color: var(--color-ink-roast);
}

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */

.hero {
  position: relative;
  overflow: hidden;
  background: var(--color-hero-bg);
  color: #ffffff;
  border-radius: 0 0 32px 32px;
  padding: clamp(170px, 22vh, 230px) 0 clamp(96px, 12vw, 150px);
}

/* Background video — bleeds off the right edge, fades into the dark canvas */
.hero__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

/* Fade the rings into the dark canvas before they reach the copy */
.hero__bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, var(--color-hero-bg) 42%, rgba(15, 5, 3, 0) 68%);
  pointer-events: none;
}

.hero__bg video {
  /* The ring logo clips the video; it stands hero-height, cut off at the right edge */
  position: absolute;
  top: 50%;
  right: clamp(-300px, -20vw, -160px);
  transform: translateY(-50%);
  height: 100%;
  aspect-ratio: 1 / 1;
  width: auto;
  object-fit: cover;
  filter: contrast(1.05) saturate(1.15);
  -webkit-mask-image: url('../assets/img/cymbal-avatar-black.svg');
  mask-image: url('../assets/img/cymbal-avatar-black.svg');
  -webkit-mask-size: contain;
  mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
}

.hero__inner {
  position: relative;
  z-index: 2;
}

.hero__copy {
  max-width: 680px;
}

.hero__headline {
  font-size: clamp(52px, 7.2vw, 96px);
  line-height: 0.98;
  margin-bottom: clamp(24px, 3vw, 36px);
}

.hero__subhead {
  font-size: clamp(18px, 2vw, 21px);
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.78);
  max-width: 48ch;
  margin-bottom: clamp(28px, 3.5vw, 40px);
}

.hero__actions {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}

/* --------------------------------------------------------------------------
   Sections
   -------------------------------------------------------------------------- */

.section {
  margin-top: var(--section-gap);
}

.section__grid {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: clamp(24px, 4vw, 64px);
  align-items: start;
}

.section__grid .section__label {
  position: sticky;
  top: 104px;
}

.section__body p + p {
  margin-top: 20px;
}

.section__body p {
  font-size: clamp(17px, 1.8vw, 19px);
  line-height: 1.55;
  color: var(--ink-80);
}

.section__body .lede {
  color: var(--color-ink-roast);
}

/* CTA below copy — same breathing room as the hero uses above its buttons */
.section__body .section__cta {
  margin-top: clamp(28px, 3.5vw, 40px);
}

/* --------------------------------------------------------------------------
   Departments
   -------------------------------------------------------------------------- */

.dept-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

/* Canvas instrument band — drawn by js/main.js in the card's accent color */
.dept__art {
  position: relative;
  height: 224px;
  margin: 28px 0 24px;
}

.dept__art canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.dept {
  border-radius: var(--radius-cards);
  padding: clamp(36px, 4vw, 56px);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.dept p {
  font-size: 15px;
  line-height: 1.5;
  color: var(--ink-80);
}

.dept__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
}

.dept__index {
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.1em;
}

.dept h3 {
  font-size: clamp(22px, 2.2vw, 26px);
  line-height: 1.1;
}

.dept__role {
  font-size: 13px !important;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 500;
  margin-bottom: 12px;
}

/* Category coding — accent reserved per card (per DESIGN.md) */
.dept--research   { background: rgba(71, 126, 233, 0.06); }
.dept--research .dept__index,   .dept--research .dept__role   { color: var(--color-cobalt-blue); }

.dept--engineering { background: var(--surface-category-tint); }
.dept--engineering .dept__index, .dept--engineering .dept__role { color: var(--color-signal-orange); }

.dept--marketing  { background: rgba(251, 45, 84, 0.05); }
.dept--marketing .dept__index,  .dept--marketing .dept__role  { color: var(--color-coral-red); }

.dept--support    { background: rgba(52, 199, 113, 0.07); }
.dept--support .dept__index,    .dept--support .dept__role    { color: var(--color-emerald-green); }

/* Status pills */
.pill {
  display: inline-flex;
  align-items: center;
  border-radius: var(--radius-pills);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.04em;
  padding: 4px 12px;
  white-space: nowrap;
}

.pill--live {
  background: var(--color-mint-wash);
  color: #14713c;
}

.pill--build {
  background: var(--color-sand-wash);
  color: var(--ink-80);
}

/* --------------------------------------------------------------------------
   Products
   -------------------------------------------------------------------------- */

.product-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  align-items: stretch;
}

.product-card {
  background: var(--color-paper-white);
  border-radius: var(--radius-cards);
  box-shadow: var(--shadow-md);
  border: 1px solid rgba(54, 8, 2, 0.06);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.product-card--tinted {
  background: var(--surface-category-tint);
  border: none;
  box-shadow: none;
  justify-content: flex-end;
}

.product-card__art {
  position: relative;
  height: 200px;
  background: linear-gradient(160deg, var(--color-citrus-wash) 0%, var(--color-linen-blush) 70%);
  overflow: hidden;
}

.product-card__sun {
  position: absolute;
  bottom: -56px;
  left: 50%;
  transform: translateX(-50%);
  width: 112px;
  height: 112px;
  border-radius: 50%;
  background: var(--color-signal-orange);
}

.product-card__body {
  padding: 28px 28px 32px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
}

.product-card__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.product-card h3 {
  font-size: clamp(24px, 2.4vw, 29px);
  line-height: 1.1;
}

.product-card p {
  color: var(--ink-80);
  font-size: 16px;
  line-height: 1.5;
}

.product-card .link-ghost {
  margin-top: auto;
}

/* --------------------------------------------------------------------------
   The standard
   -------------------------------------------------------------------------- */

.standard {
  background: var(--color-linen-blush);
  border-radius: var(--radius-media);
  padding: clamp(40px, 6vw, 80px);
}

.standard .lede {
  max-width: 34ch;
}

.standard > p:last-child {
  font-size: clamp(16px, 1.8vw, 18px);
  line-height: 1.55;
  color: var(--ink-80);
  max-width: 66ch;
}

.standard__list {
  list-style: none;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 32px;
  margin: 32px 0 36px;
  max-width: 820px;
}

.standard__list li {
  position: relative;
  padding-left: 32px;
  font-size: clamp(16px, 1.8vw, 18px);
  font-weight: 450;
  line-height: 1.4;
}

.standard__list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--color-signal-orange);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 18'%3E%3Cpath d='M4 9.5l3.5 3.5L14 6' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 18'%3E%3Cpath d='M4 9.5l3.5 3.5L14 6' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat, linear-gradient(#000 0 0);
  mask-composite: exclude;
}

/* --------------------------------------------------------------------------
   Follow — tinted closing band that runs through the footer
   -------------------------------------------------------------------------- */

.section--close {
  background: var(--surface-close-tint);
  border-radius: 32px 32px 0 0;
  padding: clamp(80px, 10vw, 130px) 0 clamp(56px, 7vw, 96px);
}

.follow-list {
  list-style: none;
  max-width: 640px;
}

.follow-list__row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 24px;
  padding: 20px 4px;
  border-bottom: 1px solid var(--color-sand-wash);
}

.follow-list__row:first-child {
  border-top: 1px solid var(--color-sand-wash);
}

.follow-list__label {
  font-size: clamp(19px, 2vw, 23px);
  font-weight: 500;
  letter-spacing: 0.01em;
}

.follow-list__value {
  color: var(--color-ash-grey);
  font-size: 15px;
  letter-spacing: 0.03em;
}

a.follow-list__value {
  color: var(--color-signal-orange);
  text-decoration: none;
}


/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */

.footer {
  background: var(--surface-close-tint);
  border-top: 1px solid var(--color-sand-wash);
  padding: 48px 0 56px;
}

.footer__inner {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 32px;
  flex-wrap: wrap;
}

.footer__lockup {
  height: 22px;
  width: auto;
  display: block;
  margin-bottom: 12px;
}

.footer__line {
  font-size: 14px;
  line-height: 1.5;
  color: var(--ink-60);
  letter-spacing: 0.03em;
}

.footer__links {
  display: flex;
  gap: 24px;
}

.footer__links a {
  color: var(--color-ink-roast);
  text-decoration: none;
  font-size: 14px;
  letter-spacing: 0.03em;
}

.footer__links a:hover {
  color: var(--color-signal-orange);
}

/* --------------------------------------------------------------------------
   Reveal animation
   -------------------------------------------------------------------------- */

.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .link-ghost,
  a.follow-list__value,
  .footer__links a {
    transition: none;
  }
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */

@media (max-width: 960px) {
  .hero {
    padding-top: 150px;
  }

  /* Keep the hero text readable where the rings pass under it on small screens */
  .hero__bg video {
    right: -35%;
    opacity: 0.55;
  }

  .section__grid {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .section__grid .section__label {
    position: static;
  }
}

@media (max-width: 640px) {
  .nav__links {
    display: none;
  }

  .dept-grid,
  .product-grid,
  .standard__list {
    grid-template-columns: 1fr;
  }
}
