/* ==========================================================================
   RAW Digital — main stylesheet
   ========================================================================== */

:root {
  --ink: #0b1117;
  --ink-2: #111a24;
  --navy: #0f2f4a;
  --accent: #34e8c6;
  --accent-dark: #127a86;
  --text: #1b2430;
  --muted: #5b6573;
  --muted-light: #a9b3bf;
  --line-dark: rgba(255, 255, 255, 0.16);
  --paper: #ffffff;
  --paper-2: #f1f3f6;

  --font-display: "Archivo", "Arial Black", "Helvetica Neue", Arial, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-script: "Caveat", "Segoe Print", "Bradley Hand", cursive;

  --container: 1200px;
  --gutter: clamp(20px, 5vw, 72px);
  --radius: 10px;
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--ink);
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; height: auto; }
ul, ol { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, p { margin: 0; }
a { color: inherit; text-decoration: none; }

.icon { width: 1em; height: 1em; flex-shrink: 0; }

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

.skip-link {
  position: absolute; left: 16px; top: -60px; z-index: 100;
  background: var(--accent); color: var(--ink); padding: 8px 14px; border-radius: 6px;
}
.skip-link:focus { top: 16px; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

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

/* ---------- Typography ---------- */
.display {
  font-family: var(--font-display);
  font-stretch: 125%;
  font-weight: 900;
  text-transform: uppercase;
  line-height: 0.98;
  letter-spacing: -0.005em;
  color: var(--ink);
}
.display--md { font-size: clamp(1.75rem, 3.1vw, 2.6rem); line-height: 1.05; }
.display--sm { font-size: clamp(1.5rem, 2.4vw, 2.05rem); line-height: 1.05; }

.eyebrow {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.42em;
  text-transform: uppercase;
  color: var(--navy);
  margin-bottom: 14px;
}
.eyebrow--light { color: #d9dee5; }

.scribble {
  font-family: var(--font-script);
  font-weight: 500;
  color: #fff;
  line-height: 1.02;
  transform: rotate(-14deg);
  position: relative;
  pointer-events: none;
}
.scribble::after {
  content: "";
  display: block;
  width: 1.4em;
  height: 0.45em;
  margin-top: 0.15em;
  margin-left: 1.3em;
  background: no-repeat center / contain
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 60 14'%3E%3Cpath d='M2 11C18 5 36 3 58 3' fill='none' stroke='%2334e8c6' stroke-width='4' stroke-linecap='round'/%3E%3C/svg%3E");
}
.scribble--dark { color: var(--ink); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 52px;
  padding: 0 26px;
  border-radius: 999px;
  border: 1.5px solid transparent;
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s, border-color 0.2s, transform 0.2s, box-shadow 0.2s;
}
.btn .icon { width: 17px; height: 17px; stroke-width: 2.2; transition: transform 0.2s; }
.btn:hover .icon { transform: translateX(3px); }
.btn--sm { min-height: 42px; padding: 0 20px; font-size: 0.85rem; }

.btn--primary { background: var(--accent); color: var(--ink); }
.btn--primary:hover { background: #6ff2da; box-shadow: 0 8px 28px rgba(52, 232, 198, 0.35); }

.btn--light { background: #fff; color: var(--ink); }
.btn--light:hover { background: var(--accent); }

.btn--outline-light { border-color: rgba(255, 255, 255, 0.85); color: #fff; }
.btn--outline-light:hover { background: rgba(255, 255, 255, 0.1); }

.btn--outline-accent { border-color: var(--accent); color: #fff; }
.btn--outline-accent:hover { background: var(--accent); color: var(--ink); }

.btn--outline-dark { border-color: var(--ink); color: var(--ink); }
.btn--outline-dark:hover { background: var(--ink); color: #fff; }

.btn__play {
  display: grid; place-items: center;
  width: 26px; height: 26px; border-radius: 50%;
  background: #fff; color: var(--ink);
}
.btn__play svg { width: 18px; height: 18px; }

.text-link {
  display: inline-flex; align-items: center; gap: 10px;
  color: var(--accent);
  font-size: 0.85rem; font-weight: 600;
  padding-bottom: 2px;
  border-bottom: 1px solid currentColor;
  white-space: nowrap;
}
.text-link .icon { width: 16px; height: 16px; transition: transform 0.2s; }
.text-link:hover .icon { transform: translateX(3px); }

.circle-arrow {
  display: grid; place-items: center; flex-shrink: 0;
  width: 34px; height: 34px; border-radius: 50%;
  border: 1.5px solid var(--accent);
  color: var(--accent);
  transition: background-color 0.2s, color 0.2s;
}
.circle-arrow .icon { width: 16px; height: 16px; stroke-width: 2.2; }

/* ---------- Logo ---------- */
.logo { display: inline-flex; flex-direction: column; color: #fff; line-height: 1; }
.logo__mark {
  font-family: var(--font-display);
  font-stretch: 112%;
  font-weight: 900;
  font-size: 2.35rem;
  letter-spacing: -0.02em;
}
.logo__sub {
  font-size: 0.62rem;
  letter-spacing: 0.72em;
  text-transform: uppercase;
  margin-top: 4px;
  opacity: 0.9;
}

/* ---------- Header ---------- */
.site-header {
  position: absolute; inset: 0 0 auto; z-index: 20;
  padding-top: 22px;
}
.site-header__inner { display: flex; align-items: center; gap: 32px; }
.site-nav { flex: 1; display: flex; align-items: center; }
.site-nav__list { display: flex; gap: clamp(20px, 3vw, 46px); margin-inline: auto; }
.site-nav__link {
  position: relative; display: block;
  color: #fff; font-size: 0.9rem; font-weight: 500;
  padding: 8px 0;
  transition: color 0.2s;
}
.site-nav__link::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0;
  height: 2px; border-radius: 2px; background: var(--accent);
  transform: scaleX(0); transition: transform 0.25s;
}
.site-nav__link:hover { color: var(--accent); }
.site-nav__link.is-active { color: var(--accent); }
.site-nav__link.is-active::after,
.site-nav__link:hover::after { transform: scaleX(1); }

.nav-toggle {
  display: none; margin-left: auto;
  width: 44px; height: 44px; border-radius: 50%;
  border: 1px solid var(--line-dark); background: rgba(0, 0, 0, 0.35);
  color: #fff; cursor: pointer;
  place-items: center;
}
.nav-toggle .icon { width: 22px; height: 22px; }
.nav-toggle__close { display: none; }
.nav-toggle[aria-expanded="true"] .nav-toggle__open { display: none; }
.nav-toggle[aria-expanded="true"] .nav-toggle__close { display: block; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  min-height: clamp(620px, 50vw, 760px);
  background: #06080c;
  color: #fff;
  display: flex;
  align-items: center;
}
.hero__media {
  position: absolute; inset: 0 0 0 auto;
  width: min(72%, 1180px);
}
.hero__media img { width: 100%; height: 100%; object-fit: cover; object-position: 12% center; }
.hero__media::before {
  content: ""; position: absolute; inset: 0; z-index: 1;
  background:
    linear-gradient(90deg, #06080c 0%, rgba(6, 8, 12, 0.92) 20%, rgba(6, 8, 12, 0.55) 45%, rgba(6, 8, 12, 0.2) 70%, rgba(6, 8, 12, 0.15) 100%),
    linear-gradient(180deg, rgba(6, 8, 12, 0.7) 0%, rgba(6, 8, 12, 0.1) 26%, rgba(6, 8, 12, 0.35) 100%);
}
.hero__inner { position: relative; z-index: 2; padding-top: 130px; padding-bottom: 60px; }
.hero__content { max-width: 640px; }
.hero__content .eyebrow { margin-bottom: 26px; line-height: 1.8; }
.hero__title {
  color: #fff;
  font-size: clamp(2.3rem, 4.1vw, 3.6rem);
  line-height: 0.94;
  max-width: 12.5ch;
}
.hero__lead {
  margin-top: 26px;
  max-width: 520px;
  font-size: clamp(1rem, 1.3vw, 1.18rem);
  line-height: 1.5;
  color: #e7ebf0;
}
.hero__actions { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 34px; }
.hero__actions .btn { min-width: 206px; }
.hero__scribble {
  position: absolute;
  right: var(--gutter);
  bottom: 70px;
  font-size: clamp(1.8rem, 2.8vw, 2.5rem);
}

/* ---------- Sections ---------- */
.section { padding-block: clamp(64px, 7vw, 96px); background: var(--paper); }
.section--dark { background: var(--ink-2); color: #fff; }
.section--dark .display { color: #fff; }

/* What we do */
.what-we-do__grid {
  display: grid;
  grid-template-columns: minmax(300px, 1fr) 1.5fr;
  gap: clamp(24px, 3vw, 56px);
  align-items: start;
}
.what-we-do__intro .display { margin-bottom: 22px; }
.what-we-do__intro p:last-child { color: #3d4652; font-size: 0.95rem; line-height: 1.7; }

.services { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; }
.service { text-align: center; }
.service__icon {
  display: grid; place-items: center;
  width: 84px; height: 78px; margin: 0 auto 18px;
  border-radius: 8px;
  transition: transform 0.25s;
}
.service:hover .service__icon { transform: translateY(-4px); }
.service__icon .icon { width: 36px; height: 36px; stroke-width: 1.6; }
.service__icon--violet { background: #eef0fd; color: #3b35c9; }
.service__icon--rose   { background: #fdeef0; color: #e64a5b; }
.service__icon--mint   { background: #e5faf3; color: #17a888; }
.service__icon--lilac  { background: #efeefd; color: #3b35c9; }
.service__icon--sky    { background: #edf1fe; color: #3b35c9; }
.service__title { font-size: 0.95rem; font-weight: 700; line-height: 1.3; color: var(--ink); margin-bottom: 12px; }
.service__text { font-size: 0.8rem; line-height: 1.5; color: var(--muted); }

/* Featured solutions */
.section-head {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 24px;
  margin-bottom: 26px;
}
.section-head .eyebrow { margin-bottom: 10px; }

.solution-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; }
.solution-card { border: 1px solid var(--line-dark); background: #0e161f; transition: border-color 0.25s, transform 0.25s; }
.solution-card:hover { border-color: rgba(52, 232, 198, 0.6); transform: translateY(-4px); }
.solution-card:hover .circle-arrow { background: var(--accent); color: var(--ink); }
.solution-card__link { display: flex; flex-direction: column; height: 100%; }
.solution-card__media { aspect-ratio: 7 / 6; overflow: hidden; }
.solution-card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s; }
.solution-card:hover .solution-card__media img { transform: scale(1.05); }
.solution-card__body {
  flex: 1;
  display: flex; align-items: flex-start; justify-content: space-between; gap: 10px;
  padding: 16px 12px 18px;
}
.solution-card__title { font-size: 0.95rem; font-weight: 600; line-height: 1.3; margin-bottom: 10px; }
.solution-card__text { font-size: 0.82rem; line-height: 1.45; color: var(--muted-light); }

/* How it works */
.how-it-works .container { position: relative; }
.how-it-works__scribble {
  position: absolute; top: -26px; right: var(--gutter);
  font-size: clamp(1.6rem, 2.4vw, 2.1rem);
}
.steps {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 24px;
  margin-top: 42px;
}
.step { position: relative; }
.step:not(:last-child)::after {
  content: "";
  position: absolute; top: 20px; right: -2px;
  width: 16px; height: 16px;
  background: no-repeat center / contain
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23556070' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12h14'/%3E%3Cpath d='m12 5 7 7-7 7'/%3E%3C/svg%3E");
}
.step__badge { display: flex; align-items: flex-start; margin-bottom: 18px; }
.step__num {
  position: relative; z-index: 1;
  display: grid; place-items: center;
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--navy); color: #fff;
  font-size: 0.72rem; font-weight: 700;
}
.step__icon {
  display: grid; place-items: center;
  width: 54px; height: 54px; border-radius: 50%;
  margin-left: 14px; margin-top: 2px;
  background: #eef2f6; color: var(--accent-dark);
  transition: background-color 0.25s;
}
.step:hover .step__icon { background: #dcf8f1; }
.step__icon .icon { width: 24px; height: 24px; }
.step__title { font-size: 0.95rem; font-weight: 700; line-height: 1.3; color: var(--ink); margin-bottom: 8px; }
.step__text { font-size: 0.82rem; line-height: 1.5; color: var(--muted); max-width: 30ch; }

/* Split: agencies + work */
.split { display: grid; grid-template-columns: 1fr 1fr; }
.split__panel { position: relative; overflow: hidden; min-height: 400px; }

.agencies { color: #fff; background: #0d1522; display: flex; align-items: center; }
.agencies__bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.agencies::before {
  content: ""; position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(90deg, rgba(8, 12, 20, 0.92) 0%, rgba(8, 12, 20, 0.7) 50%, rgba(8, 12, 20, 0.25) 100%);
}
.agencies__content {
  position: relative; z-index: 2;
  max-width: 460px;
  padding: 48px 32px 48px max(var(--gutter), calc((100vw - var(--container)) / 2));
}
.agencies .display { color: #fff; margin-bottom: 20px; }
.agencies p:not(.eyebrow) { font-size: 0.88rem; line-height: 1.6; color: #e3e7ec; margin-bottom: 24px; }
.agencies__scribble {
  position: absolute; z-index: 2; right: 7%; bottom: 44px;
  font-size: clamp(1.4rem, 2vw, 1.8rem);
}
.agencies__scribble::after { display: none; }

.work { background: var(--paper-2); display: grid; grid-template-columns: 1fr 1fr; }
.work__content {
  align-self: center;
  padding: 48px 28px;
}
.work .display { margin-bottom: 20px; }
.work p:not(.eyebrow) { font-size: 0.85rem; line-height: 1.6; color: #444d58; margin-bottom: 28px; }
.work__gallery { display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; gap: 4px; background: var(--paper-2); }
.work__gallery li { overflow: hidden; }
.work__gallery img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s; }
.work__gallery li:hover img { transform: scale(1.06); }

/* ---------- Footer ---------- */
.site-footer { background: #0a0e13; color: #fff; padding-top: 36px; }
.site-footer__top {
  display: flex; align-items: center; flex-wrap: wrap; gap: 24px 40px;
  padding-bottom: 32px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}
.site-footer__brand { display: flex; align-items: center; gap: 20px; }
.site-footer__brand .logo__mark { font-size: 1.9rem; }
.site-footer__brand p { font-size: 0.82rem; color: #d7dce2; }
.site-footer__nav { display: flex; flex-wrap: wrap; gap: 12px clamp(16px, 2.2vw, 32px); margin-left: auto; }
.site-footer__nav a,
.site-footer__legal a { font-size: 0.8rem; color: #d7dce2; transition: color 0.2s; }
.site-footer__nav a:hover,
.site-footer__legal a:hover { color: var(--accent); }
.site-footer__social { display: flex; gap: 16px; }
.site-footer__social a { display: grid; place-items: center; width: 28px; height: 28px; color: #fff; transition: color 0.2s; }
.site-footer__social a:hover { color: var(--accent); }
.site-footer__social .icon { width: 17px; height: 17px; }
.site-footer__bottom {
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px;
  padding-block: 20px 24px;
  font-size: 0.72rem; color: #9aa4af;
}
.site-footer__legal { display: flex; }
.site-footer__legal li + li::before { content: "|"; margin-inline: 12px; color: #4b545e; }
.site-footer__legal a { font-size: 0.72rem; color: #9aa4af; }

/* ---------- Inner pages ---------- */
.page-hero {
  background: #06080c;
  color: #fff;
  padding-block: 150px 56px;
}
.page-hero .display { color: #fff; }

.page-hero .container,
.prose { max-width: calc(760px + var(--gutter) * 2); }
.prose { color: #2a323c; }
.prose .updated { color: var(--muted); font-size: 0.9rem; margin-bottom: 28px; }
.prose h2 {
  margin-top: 44px;
  padding-bottom: 8px;
  border-bottom: 1px solid #e3e7ec;
  font-size: 1.25rem;
  line-height: 1.3;
  color: var(--ink);
}
.prose h3 { margin: 28px 0 0; font-size: 1.02rem; color: var(--ink); }
.prose p,
.prose li { font-size: 0.97rem; line-height: 1.75; }
.prose p { margin-top: 14px; }
.prose ul { margin-top: 12px; padding-left: 22px; list-style: disc; }
.prose li + li { margin-top: 6px; }
.prose li::marker { color: var(--accent-dark); }
.prose a { color: var(--accent-dark); text-decoration: underline; text-underline-offset: 3px; overflow-wrap: anywhere; }
.prose strong { color: var(--ink); }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 900px) {
  .what-we-do__grid { grid-template-columns: 1fr; }
  .solution-grid { grid-template-columns: repeat(3, 1fr); }
  .steps { grid-template-columns: repeat(3, 1fr); row-gap: 40px; }
  .step:nth-child(3)::after { display: none; }
  .split { grid-template-columns: 1fr; }
  .agencies__content { padding-left: var(--gutter); }
  .site-footer__nav { margin-left: 0; }
}

@media (max-width: 860px) {
  .nav-toggle { display: grid; }
  .site-nav {
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 20px;
    margin: 12px var(--gutter) 0;
    padding: 20px;
    border-radius: var(--radius);
    background: rgba(11, 17, 23, 0.97);
    border: 1px solid var(--line-dark);
    backdrop-filter: blur(10px);
    opacity: 0; visibility: hidden; transform: translateY(-8px);
    transition: opacity 0.2s, transform 0.2s, visibility 0.2s;
  }
  .site-nav.is-open { opacity: 1; visibility: visible; transform: none; }
  .site-nav__list { flex-direction: column; gap: 4px; margin: 0; }
  .site-nav__link { padding: 10px 0; font-size: 1rem; }
  .site-nav__link::after { right: auto; width: 28px; }

  .hero { align-items: flex-end; min-height: 760px; }
  .hero__media { width: 100%; }
  .hero__media img { object-position: 22% center; }
  .hero__media::before {
    background: linear-gradient(180deg, rgba(6, 8, 12, 0.6) 0%, rgba(6, 8, 12, 0.2) 25%, rgba(6, 8, 12, 0.85) 58%, #06080c 100%);
  }
  .hero__scribble { top: 130px; bottom: auto; }

  .services { grid-template-columns: repeat(3, 1fr); row-gap: 32px; }
  .work { grid-template-columns: 1fr; }
  .work__content { padding: 56px var(--gutter) 32px; }
  .work__gallery { aspect-ratio: 1 / 1; }
}

@media (max-width: 640px) {
  .section-head { flex-direction: column; align-items: flex-start; }
  .solution-grid { grid-template-columns: repeat(2, 1fr); }
  .services { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: 1fr; }
  .step::after { display: none; }
  .how-it-works__scribble { position: static; margin: 20px 0 0 auto; width: max-content; }
  .hero__title { font-size: clamp(1.9rem, 9vw, 2.3rem); }
  .hero__actions .btn { flex: 1 1 100%; }
  .hero__scribble { display: none; }
  .agencies__scribble { position: static; margin: 0 0 40px var(--gutter); }
  .agencies { flex-direction: column; align-items: flex-start; }
  .site-footer__brand { flex-direction: column; align-items: flex-start; gap: 12px; }
}

@media (max-width: 420px) {
  .solution-grid { grid-template-columns: 1fr; }
}

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