/* ==========================================================================
   Thinkedia Group — design system
   One family (Archivo variable) + a mono for data. Brand palette from
   thinkedia.wixstudio.com. Cards, bento, generous air.
   ========================================================================== */

:root {
  /* brand */
  --violet:      #5E3BB8;
  --violet-700:  #4C2E99;
  --violet-300:  #8E57D9;   /* decorative only — 3.9:1 on navy */
  --violet-200:  #A57BE8;   /* text tint that clears AA on navy (5.7:1) */
  --violet-50:   #F4F1FD;
  --magenta:     #A82F98;
  --navy:        #162759;
  --navy-900:    #0B142D;

  /* surfaces */
  --bg:          #FFFFFF;
  --surface:     #F8F7FC;
  --surface-2:   #F1EFFA;
  --line:        rgba(22, 39, 89, 0.10);
  --line-strong: rgba(22, 39, 89, 0.18);
  --line-dark:   rgba(255, 255, 255, 0.14);

  /* text */
  --text:        #101B3C;
  --text-muted:  #5A6588;
  --text-onDark: #FFFFFF;
  --muted-onDark:#A9B4D4;

  /* shape */
  --r-sm: 8px;
  --r:    14px;
  --r-lg: 22px;
  --shadow-1: 0 1px 2px rgba(16, 27, 60, 0.06), 0 1px 3px rgba(16, 27, 60, 0.04);
  --shadow-2: 0 12px 32px -12px rgba(16, 27, 60, 0.18), 0 2px 6px rgba(16, 27, 60, 0.05);

  --sans: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --pad: clamp(1.15rem, 4vw, 2.5rem);
  --section: clamp(4.5rem, 9vw, 8rem);
  --max: 74rem;
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important; animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.6;
  font-variation-settings: "wdth" 100;
  -webkit-font-smoothing: antialiased;
}

img, svg, canvas { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }

::selection { background: var(--violet); color: #fff; }
:focus-visible { outline: 2px solid var(--violet); outline-offset: 3px; border-radius: 4px; }

.skip {
  position: absolute; left: -9999px; top: 0; z-index: 200;
  background: var(--navy-900); color: #fff; padding: .75rem 1rem;
  font-family: var(--mono); font-size: .75rem;
}
.skip:focus { left: .5rem; top: .5rem; border-radius: var(--r-sm); }

/* --- type ----------------------------------------------------------------- */
h1, h2, h3, h4 { margin: 0; font-weight: 620; letter-spacing: -0.028em; line-height: 1.06; text-wrap: balance; }
h1 { font-size: clamp(2.6rem, 1.5rem + 4.4vw, 4.4rem); font-variation-settings: "wdth" 96; }
h2 { font-size: clamp(1.9rem, 1.35rem + 2.1vw, 2.85rem); font-variation-settings: "wdth" 98; }
h3 { font-size: clamp(1.15rem, 1.05rem + .5vw, 1.4rem); letter-spacing: -0.02em; }
h4 { font-size: 1rem; letter-spacing: -0.015em; }

p { margin: 0 0 1rem; }
p:last-child { margin-bottom: 0; }
.lede { font-size: clamp(1.05rem, 1rem + .5vw, 1.25rem); line-height: 1.55; color: var(--text-muted); max-width: 40ch; }
.muted { color: var(--text-muted); }
.small { font-size: .92rem; }

/* eyebrow / label — the width axis is the house signature */
.eyebrow {
  display: inline-flex; align-items: center; gap: .5rem;
  font-family: var(--mono); font-size: .7rem; font-weight: 500;
  letter-spacing: .14em; text-transform: uppercase; color: var(--violet);
  margin: 0 0 1.1rem;
}
.eyebrow::before {
  content: ""; width: 18px; height: 1px; background: currentColor; opacity: .5;
}
.eyebrow--plain::before { display: none; }

.pill {
  display: inline-flex; align-items: center; gap: .5rem;
  border: 1px solid var(--line); background: var(--bg);
  border-radius: 999px; padding: .38rem .8rem;
  font-family: var(--mono); font-size: .7rem; letter-spacing: .08em;
  text-transform: uppercase; color: var(--text-muted);
  box-shadow: var(--shadow-1);
}
.pill .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--violet); }

/* --- layout --------------------------------------------------------------- */
.wrap { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: var(--pad); }
.section { padding-block: var(--section); }
.section--tight { padding-block: calc(var(--section) * .62); }
.section--surface { background: var(--surface); }
.section--dark { background: var(--navy-900); color: var(--text-onDark); }
.section--dark .lede, .section--dark .muted { color: var(--muted-onDark); }
.section--dark .eyebrow { color: var(--violet-200); }

.head { max-width: 46rem; margin-bottom: clamp(2.2rem, 4vw, 3.2rem); }
.head--center { margin-inline: auto; text-align: center; }
.head--center .eyebrow { justify-content: center; }
.head p { margin-top: 1rem; }

.split { display: grid; gap: clamp(2rem, 4vw, 3.5rem); }
@media (min-width: 60rem) { .split { grid-template-columns: 1fr 1fr; align-items: start; } }
@media (min-width: 60rem) { .split--wide { grid-template-columns: 1.15fr 1fr; } }

/* --- header --------------------------------------------------------------- */
.header {
  position: sticky; top: 0; z-index: 60;
  background: rgba(255,255,255,.82);
  backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.header__in { display: flex; align-items: center; gap: 1rem; min-height: 4.25rem; }
.brand { display: inline-flex; align-items: center; }
.brand img { height: 30px; width: auto; max-width: none; }
.header nav { margin-left: auto; display: flex; align-items: center; gap: clamp(.5rem, 2vw, 1.6rem); }
.header nav a.link {
  font-size: .92rem; font-weight: 500; color: var(--text-muted);
  padding: .45rem .2rem; transition: color .18s;
}
.header nav a.link:hover { color: var(--text); }
.header nav a.link[aria-current="page"] { color: var(--violet); }
/* phone: the header becomes two rows rather than squeezing the CTA into a
   two-line button */
@media (max-width: 38rem) {
  .header__in { flex-wrap: wrap; min-height: 0; padding-block: .6rem; gap: .5rem; }
  .header nav { margin-left: 0; width: 100%; justify-content: space-between; gap: .4rem; }
  .header nav a.link { font-size: .86rem; }
  .header .btn { padding: .5rem .8rem; font-size: .84rem; }
  .brand img { height: 26px; }
}

/* --- buttons -------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  white-space: nowrap;
  font-family: var(--sans); font-size: .95rem; font-weight: 550;
  padding: .72rem 1.15rem; border-radius: var(--r-sm);
  border: 1px solid transparent; cursor: pointer;
  transition: background .18s, border-color .18s, color .18s, transform .18s, box-shadow .18s;
}
.btn--primary { background: var(--violet); color: #fff; box-shadow: var(--shadow-1); }
.btn--primary:hover { background: var(--violet-700); transform: translateY(-1px); box-shadow: var(--shadow-2); }
.btn--ghost { border-color: var(--line-strong); color: var(--text); background: var(--bg); }
.btn--ghost:hover { border-color: var(--violet); color: var(--violet); }
.section--dark .btn--ghost { background: transparent; border-color: var(--line-dark); color: #fff; }
.section--dark .btn--ghost:hover { border-color: #fff; background: rgba(255,255,255,.08); }
.btns { display: flex; flex-wrap: wrap; gap: .7rem; margin-top: 2rem; }

.arrow { font-family: var(--mono); transition: transform .18s; }
.btn:hover .arrow, .cardlink:hover .arrow { transform: translateX(3px); }

/* --- hero ----------------------------------------------------------------- */
.hero { position: relative; overflow: hidden; padding-block: clamp(3.5rem, 7vw, 6.5rem) clamp(2.5rem, 5vw, 4rem); }
.hero::before {
  content: ""; position: absolute; z-index: -1;
  top: -34%; right: -12%; width: min(62rem, 90vw); aspect-ratio: 1;
  background: radial-gradient(closest-side, rgba(142,87,217,.20), rgba(168,47,152,.10) 55%, transparent 72%);
}
.hero h1 { max-width: 16ch; }
.hero .lede { margin-top: 1.4rem; max-width: 46ch; font-size: clamp(1.08rem, 1rem + .6vw, 1.3rem); }

.stats {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(9.5rem, 1fr));
  gap: 1rem clamp(1.5rem, 4vw, 3rem);
  margin-top: 3rem; padding-top: 1.6rem; border-top: 1px solid var(--line);
}
.stat { padding-block: .4rem; }
.stat b { display: block; font-size: 1.85rem; font-weight: 620; letter-spacing: -.03em; font-variation-settings: "wdth" 92; }
.stat span { font-family: var(--mono); font-size: .68rem; letter-spacing: .12em; text-transform: uppercase; color: var(--text-muted); }

/* --- bento ---------------------------------------------------------------- */
.bento { display: grid; gap: clamp(.8rem, 1.6vw, 1.15rem); grid-template-columns: 1fr; }
@media (min-width: 44rem) { .bento { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 68rem) { .bento { grid-template-columns: repeat(3, 1fr); } }
.bento .card--wide { grid-column: span 1; }
@media (min-width: 68rem) { .bento .card--wide { grid-column: span 2; } }

.card {
  position: relative;
  background: var(--bg); border: 1px solid var(--line);
  border-radius: var(--r-lg); padding: clamp(1.35rem, 2.4vw, 1.9rem);
  display: flex; flex-direction: column; gap: .85rem;
  box-shadow: var(--shadow-1);
  transition: transform .2s, box-shadow .2s, border-color .2s;
  min-height: 15rem;
}
.card--soft { background: var(--surface); box-shadow: none; }
a.card:hover, .card--interactive:hover { transform: translateY(-3px); box-shadow: var(--shadow-2); border-color: rgba(94,59,184,.35); }
.card__top { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; }
.card__label { font-family: var(--mono); font-size: .66rem; letter-spacing: .12em; text-transform: uppercase; color: var(--magenta); }
.card p { color: var(--text-muted); font-size: .96rem; }
.cardlink { margin-top: auto; font-size: .9rem; font-weight: 550; color: var(--violet); display: inline-flex; gap: .45rem; align-items: center; }

.icon {
  width: 42px; height: 42px; flex: none; border-radius: 12px;
  background: var(--violet-50); color: var(--violet);
  display: grid; place-items: center; border: 1px solid rgba(94,59,184,.14);
}
.icon svg { width: 21px; height: 21px; }
.icon--soft { background: #fff; }

.card--empty { border-style: dashed; box-shadow: none; background: transparent; }
.card--empty .icon { background: transparent; color: var(--text-muted); border-color: var(--line); }
.card--empty h3 { color: var(--text-muted); }

/* --- feature rows --------------------------------------------------------- */
.grid3 { display: grid; gap: clamp(1rem, 2.4vw, 2rem); grid-template-columns: 1fr; }
@media (min-width: 46rem) { .grid3 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 66rem) { .grid3 { grid-template-columns: repeat(3, 1fr); } }
.feature h4 { margin: .9rem 0 .4rem; }
.feature p { color: var(--text-muted); font-size: .95rem; }
.section--dark .feature p { color: var(--muted-onDark); }
.section--dark .icon { background: rgba(142,87,217,.16); border-color: rgba(255,255,255,.12); color: var(--violet-300); }

/* --- definition rows ------------------------------------------------------ */
.rows { border-top: 1px solid var(--line); margin: 0; }
.section--dark .rows, .section--dark .rows > div { border-color: var(--line-dark); }
.rows > div { display: grid; gap: .35rem 2rem; padding: 1.15rem 0; border-bottom: 1px solid var(--line); }
@media (min-width: 46rem) { .rows > div { grid-template-columns: 13rem 1fr; } }
.rows dt { font-weight: 560; }
.rows dd { margin: 0; color: var(--text-muted); }
.section--dark .rows dd { color: var(--muted-onDark); }
.rows a { color: var(--violet); text-decoration: underline; text-underline-offset: 3px; }
.section--dark .rows a { color: var(--violet-200); }

/* --- case cards ----------------------------------------------------------- */
.cases { display: grid; gap: clamp(.8rem, 1.6vw, 1.15rem); grid-template-columns: 1fr; }
@media (min-width: 46rem) { .cases { grid-template-columns: repeat(2, 1fr); } }
.case { display: flex; flex-direction: column; gap: .6rem; min-height: 0; }
.case__meta { font-family: var(--mono); font-size: .66rem; letter-spacing: .1em; text-transform: uppercase; color: var(--magenta); }
.case h4 { font-size: 1.08rem; }

/* --- client logos --------------------------------------------------------- */
.clients { list-style: none; margin: 0; padding: 0; display: grid; gap: .6rem; grid-template-columns: repeat(2, 1fr); }
@media (min-width: 40rem) { .clients { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 62rem) { .clients { grid-template-columns: repeat(6, 1fr); } }
.clients li {
  background: var(--bg); border: 1px solid var(--line); border-radius: var(--r);
  display: grid; place-items: center; padding: 1.1rem .9rem; min-height: 5.4rem;
}
.clients img { max-height: 2.5rem; width: auto; max-width: 86%; filter: grayscale(1); opacity: .85; transition: filter .2s, opacity .2s; }
/* on the studio page the logos are the evidence, so they keep their colour */
.clients--colour img { filter: none; opacity: 1; }
.clients li:hover img { filter: none; opacity: 1; }

/* --- cta band ------------------------------------------------------------- */
.cta { border-radius: var(--r-lg); background: var(--navy-900); color: #fff; padding: clamp(2rem, 5vw, 3.4rem); position: relative; overflow: hidden; }
.cta::after {
  content: ""; position: absolute; inset: auto -10% -60% auto; width: 32rem; aspect-ratio: 1;
  background: radial-gradient(closest-side, rgba(142,87,217,.45), transparent 70%);
}
.cta > * { position: relative; }
.cta h2 { max-width: 18ch; }
.cta p { color: var(--muted-onDark); max-width: 42ch; margin-top: 1rem; }

/* --- footer --------------------------------------------------------------- */
.footer { background: var(--surface); border-top: 1px solid var(--line); padding-block: clamp(2.5rem, 5vw, 4rem) 1.75rem; }
.footer__top { display: grid; gap: 2.2rem; }
@media (min-width: 54rem) { .footer__top { grid-template-columns: 1.6fr 1fr 1fr 1fr; } }
.footer h5 { margin: 0 0 .9rem; font-family: var(--mono); font-size: .68rem; font-weight: 500; letter-spacing: .13em; text-transform: uppercase; color: var(--text-muted); }
.footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .55rem; font-size: .93rem; }
.footer ul a { color: var(--text-muted); }
.footer ul a:hover { color: var(--violet); }
/* width-led, height auto: a fixed height plus the global max-width:100% was
   squashing the lockup inside the narrow footer column */
.footer__brand img { width: 200px; max-width: 100%; height: auto; }
.footer__note { margin-top: 2.5rem; padding-top: 1.25rem; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; font-family: var(--mono); font-size: .68rem; letter-spacing: .06em; color: var(--text-muted); text-transform: uppercase; }

/* --- reveal --------------------------------------------------------------- */
/* Content is visible by default. Only a page that has proved JS is running
   hides it to animate it in — so a script failure can never blank the site. */
.js [data-reveal] { opacity: 0; transform: translateY(14px); }
.js [data-reveal].is-in {
  opacity: 1; transform: none;
  transition: opacity .6s cubic-bezier(.2,.7,.3,1), transform .6s cubic-bezier(.2,.7,.3,1);
}
@media (prefers-reduced-motion: reduce) { .js [data-reveal] { opacity: 1; transform: none; } }

/* --- case study ----------------------------------------------------------- */
.case-hero { padding-block: clamp(3rem, 6vw, 5rem) clamp(2rem, 4vw, 3rem); }
.case-hero .lede { max-width: 52ch; }
.case-meta {
  display: flex; flex-wrap: wrap; gap: .5rem 2rem; margin-top: 2rem;
  padding-top: 1.4rem; border-top: 1px solid var(--line);
  font-family: var(--mono); font-size: .7rem; letter-spacing: .1em;
  text-transform: uppercase; color: var(--text-muted);
}
.case-meta b { display: block; color: var(--text); font-family: var(--sans);
  font-size: .95rem; letter-spacing: 0; text-transform: none; font-weight: 550; margin-top: .25rem; }

/* problem chips */
.chips { display: grid; gap: .6rem; grid-template-columns: repeat(2, 1fr); }
@media (min-width: 48rem) { .chips { grid-template-columns: repeat(3, 1fr); } }
.chip {
  border: 1px solid var(--line); background: var(--bg); border-radius: var(--r);
  padding: 1rem 1.1rem; font-family: var(--mono); font-size: .72rem;
  letter-spacing: .1em; text-transform: uppercase; color: var(--text);
  display: flex; align-items: center; gap: .6rem;
}
.chip::before { content: ""; width: 7px; height: 7px; border-radius: 2px; background: var(--magenta); flex: none; }

/* numbered steps */
.steps { display: grid; gap: clamp(1rem, 2.4vw, 1.6rem); grid-template-columns: 1fr; counter-reset: step; }
@media (min-width: 48rem) { .steps { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 64rem) { .steps--4 { grid-template-columns: repeat(4, 1fr); } }
.step { border-top: 2px solid var(--violet); padding-top: 1rem; }
.step__n { font-family: var(--mono); font-size: .72rem; letter-spacing: .12em; color: var(--violet); }
.step h4 { margin: .5rem 0 .4rem; }
.step p { color: var(--text-muted); font-size: .93rem; }
.section--dark .step { border-top-color: var(--violet-200); }
.section--dark .step__n { color: var(--violet-200); }
.section--dark .step p { color: var(--muted-onDark); }

/* figures */
.figure { margin: 0; }
.figure img {
  width: 100%; height: auto; border-radius: var(--r);
  border: 1px solid var(--line); background: var(--surface);
}
.figure figcaption {
  margin-top: .7rem; font-family: var(--mono); font-size: .68rem;
  letter-spacing: .1em; text-transform: uppercase; color: var(--text-muted);
}
.gallery { display: grid; gap: clamp(1rem, 2.5vw, 1.8rem); grid-template-columns: 1fr; }
@media (min-width: 54rem) { .gallery--2 { grid-template-columns: repeat(2, 1fr); } }

.pullquote {
  font-size: clamp(1.25rem, 1rem + 1.3vw, 1.85rem); line-height: 1.3;
  letter-spacing: -0.02em; font-weight: 560; max-width: 28ch; margin: 0;
}
.pullquote em { font-style: normal; color: var(--violet-200); }
