/* ==========================================================================
   Customer highlight pages — builds on styles.css and website-design.css
   Client colours are set per page on .cs-page via --client-* tokens.
   ========================================================================== */

.cs-page {
  --client-dark: #0b4140;
  --client-light: #f3efe4;
  --client-accent: #c65a32;
}

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

.cs-hero .wd-hero-title {
  max-width: 14ch;
}

.cs-hero-visual.wd-hero-visual {
  position: relative;
  aspect-ratio: auto;
}

.cs-hero-photo {
  position: relative;
  margin: 0;
  transform: rotate(-1deg);
  box-shadow:
    0 32px 70px -26px rgba(26, 26, 26, 0.3),
    0 10px 24px -12px rgba(232, 93, 44, 0.2);
  transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

.cs-hero-visual:hover .cs-hero-photo {
  transform: rotate(-0.2deg) translateY(-6px);
}

.cs-hero-photo img {
  display: block;
  width: 100%;
  height: auto;
}

.cs-hero-logo {
  position: absolute;
  left: clamp(12px, 2vw, 20px);
  top: clamp(12px, 2vw, 20px);
  width: 34%;
  padding: 10px 12px;
  background: var(--client-dark);
}

.cs-hero-logo img {
  display: block;
  width: 100%;
  height: auto;
}

.cs-hero-visual .wd-redline--a {
  top: 14%;
  left: auto;
  right: -14px;
}

.cs-hero-visual .wd-redline--b {
  right: auto;
  left: -18px;
  bottom: -16px;
}

/* Facts strip — allow text values */
.cs-facts dd {
  font-size: clamp(1.375rem, 2.4vw, 1.875rem);
  line-height: 1.1;
}

/* Story -------------------------------------------------------------------- */

.cs-story {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  gap: clamp(40px, 6vw, 96px);
  align-items: start;
}

.cs-story .wd-section-head {
  margin-bottom: 0;
}

.cs-prose {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding-top: 4px;
}

.cs-prose p {
  margin: 0;
  font-size: clamp(1.0625rem, 1.4vw, 1.1875rem);
  line-height: 1.65;
  color: var(--text-muted);
  text-wrap: pretty;
}

.cs-prose p:first-child {
  font-size: clamp(1.25rem, 1.9vw, 1.5rem);
  line-height: 1.45;
  color: var(--text);
}

.cs-prose strong {
  font-weight: 500;
  color: var(--text);
}

/* Brand -------------------------------------------------------------------- */

.cs-brand {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(16px, 2vw, 24px);
}

.cs-brand-tile {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 32px;
  margin: 0;
  padding: clamp(24px, 3vw, 36px);
  min-height: clamp(240px, 26vw, 320px);
  background: var(--client-dark);
  color: var(--client-light);
}

.cs-brand-tile img {
  display: block;
  width: min(100%, 380px);
  height: auto;
  margin: auto 0;
}

.cs-brand-tile figcaption,
.cs-swatch-meta {
  font-family: ui-monospace, "SF Mono", "Menlo", "Consolas", monospace;
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.cs-brand-tile figcaption {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  color: rgba(243, 239, 228, 0.6);
}

.cs-brand-tile--photo {
  overflow: hidden;
  isolation: isolate;
}

.cs-brand-tile--photo > img:first-child {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  max-width: none;
  height: 100%;
  margin: 0;
  object-fit: cover;
}

.cs-brand-tile--photo::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, rgba(11, 65, 64, 0.15) 0%, rgba(11, 65, 64, 0.85) 100%);
}

.cs-swatches {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin: 0;
  padding: 0;
  list-style: none;
  border: 1px solid var(--border);
  background: var(--white);
}

.cs-swatch {
  display: flex;
  flex-direction: column;
}

.cs-swatch + .cs-swatch {
  border-left: 1px solid var(--border);
}

.cs-swatch-chip {
  height: clamp(72px, 9vw, 112px);
  background: var(--chip);
}

.cs-swatch-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px 16px 16px;
  color: var(--text-muted);
}

.cs-swatch-meta b {
  font-family: "DM Sans", sans-serif;
  font-size: 0.9375rem;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
  color: var(--text);
}

.cs-type-note {
  grid-column: 1 / -1;
  margin: 8px 0 0;
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--text-muted);
}

.cs-type-note strong {
  font-weight: 500;
  color: var(--text);
}

/* Showcase (website + store) ---------------------------------------------- */

.cs-showcase {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
}

.cs-showcase--flip {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr);
}

.cs-showcase--flip .cs-showcase-media {
  order: 2;
}

.cs-showcase-media {
  position: relative;
}

.cs-showcase-media .wd-browser {
  position: relative;
  box-shadow: 0 32px 70px -30px rgba(26, 26, 26, 0.32);
}

.cs-product-card {
  position: absolute;
  right: -16px;
  bottom: -28px;
  width: clamp(140px, 30%, 220px);
  margin: 0;
  background: var(--white);
  border: 1px solid rgba(26, 26, 26, 0.12);
  box-shadow: 0 24px 50px -24px rgba(26, 26, 26, 0.35);
  transform: rotate(2deg);
}

.cs-product-card img {
  display: block;
  width: 100%;
  height: auto;
}

.cs-product-card figcaption {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 12px;
  border-top: 1px solid var(--border);
  font-size: 0.75rem;
  font-weight: 500;
}

.cs-product-card figcaption span:last-child {
  color: var(--text-muted);
}

.cs-showcase-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 18px;
}

.cs-showcase-title {
  margin: 0;
  font-family: "roc-grotesk", "Roc Grotesk", sans-serif;
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: -0.03em;
}

.cs-showcase-copy p {
  margin: 0;
  font-size: 1rem;
  line-height: 1.65;
  color: var(--text-muted);
}

.cs-checks {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 4px 0 8px;
  padding: 0;
  list-style: none;
}

.cs-checks li {
  position: relative;
  padding-left: 20px;
  font-size: 0.9375rem;
  line-height: 1.5;
}

.cs-checks li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.5em;
  width: 7px;
  height: 7px;
  background: var(--orange);
}

/* Social ------------------------------------------------------------------- */

.cs-channels {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--charcoal);
}

.cs-channels li + li {
  border-left: 1px solid var(--border);
}

.cs-channels a {
  display: flex;
  flex-direction: column;
  gap: 8px;
  height: 100%;
  padding: 24px clamp(16px, 2vw, 24px) 24px;
  transition: background 0.25s ease;
}

.cs-channels li:first-child a {
  padding-left: 0;
}

.cs-channels a:hover {
  background: var(--white);
}

.cs-channels li:first-child a:hover {
  padding-left: clamp(16px, 2vw, 24px);
}

.cs-channel-name {
  font-family: "roc-grotesk", "Roc Grotesk", sans-serif;
  font-size: 1.375rem;
  font-weight: 500;
  letter-spacing: -0.02em;
}

.cs-channel-handle {
  font-family: ui-monospace, "SF Mono", "Menlo", "Consolas", monospace;
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}

.cs-channels a:hover .cs-channel-handle {
  color: var(--orange);
}

/* Facts we built the story on (dark band) --------------------------------- */

.cs-proof {
  margin: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 1px solid rgba(245, 242, 236, 0.12);
  border-left: 1px solid rgba(245, 242, 236, 0.12);
}

.cs-proof > div {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: clamp(28px, 3vw, 40px) clamp(20px, 2.4vw, 32px);
  border-right: 1px solid rgba(245, 242, 236, 0.12);
  border-bottom: 1px solid rgba(245, 242, 236, 0.12);
}

.cs-proof dt {
  font-family: "roc-grotesk", "Roc Grotesk", sans-serif;
  font-size: clamp(2rem, 3.6vw, 2.75rem);
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.03em;
  color: var(--orange);
}

.cs-proof dd {
  margin: 0;
  font-size: 0.9375rem;
  line-height: 1.6;
  color: rgba(245, 242, 236, 0.66);
}

/* Keyboard focus ----------------------------------------------------------- */

.cs-channels a:focus-visible {
  outline: 2px solid var(--orange);
  outline-offset: -2px;
}

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

@media (max-width: 1000px) {
  .cs-proof {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .cs-swatches {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .cs-swatch:nth-child(4) {
    border-left: 0;
  }

  .cs-swatch:nth-child(n + 4) {
    border-top: 1px solid var(--border);
  }
}

@media (max-width: 960px) {
  .cs-story,
  .cs-showcase,
  .cs-showcase--flip {
    grid-template-columns: 1fr;
  }

  .cs-showcase--flip .cs-showcase-media {
    order: 0;
  }

  .cs-hero-visual {
    max-width: 620px;
    width: 100%;
    margin: 0 auto;
  }

  .cs-channels {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .cs-channels li:nth-child(3) {
    border-left: 0;
  }

  .cs-channels li:nth-child(3) a {
    padding-left: 0;
  }

  .cs-channels li:nth-child(n + 3) {
    border-top: 1px solid var(--border);
  }
}

@media (max-width: 640px) {
  .cs-brand {
    grid-template-columns: 1fr;
  }

  .cs-swatches {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .cs-swatch:nth-child(n) {
    border-left: 0;
    border-top: 1px solid var(--border);
  }

  .cs-swatch:nth-child(-n + 2) {
    border-top: 0;
  }

  .cs-swatch:nth-child(even) {
    border-left: 1px solid var(--border);
  }

  .cs-swatch:last-child {
    grid-column: 1 / -1;
  }

  .cs-proof {
    grid-template-columns: 1fr;
  }

  .cs-product-card {
    right: 8px;
    bottom: -20px;
    width: clamp(104px, 30%, 160px);
  }

  .cs-product-card figcaption {
    padding: 6px 8px;
    font-size: 0.6875rem;
    white-space: nowrap;
  }

  .cs-product-card figcaption span:last-child {
    display: none;
  }

  /* Location is in the facts strip; keep one label clear of the logo */
  .cs-hero-visual .wd-redline--a {
    top: auto;
    right: 0;
    bottom: -14px;
  }

  .cs-hero-visual .wd-redline--b {
    display: none;
  }
}

@media (max-width: 480px) {
  .cs-channels {
    grid-template-columns: 1fr;
  }

  .cs-channels li + li {
    border-left: 0;
    border-top: 1px solid var(--border);
  }

  .cs-channels li a,
  .cs-channels li:nth-child(3) a {
    padding-left: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .cs-hero-photo,
  .cs-channels a {
    transition: none;
  }
}
