/* Dark, product first. The colour on this page comes from CataEduca's own screens;
   the page itself stays neutral so they carry it. */

:root {
  --bg: #0c0c0e;
  --bg-raised: #141417;
  --ink: #ededee;
  --muted: #95959c;
  --faint: #5d5d65;
  --rule: #232328;
  --violet: #8b7bff;   /* CataEduca's button violet, the one accent */
  --max: 1160px;
  --pad: clamp(16px, 4.5vw, 48px);
  color-scheme: dark;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; overflow-x: clip; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 17px/1.6 "Schibsted Grotesk", ui-sans-serif, system-ui, sans-serif;
  overflow-x: clip;
}

a { color: inherit; text-underline-offset: 4px; text-decoration-color: var(--faint); }
a:hover { text-decoration-color: currentColor; }
a:focus-visible { outline: 2px solid var(--violet); outline-offset: 3px; border-radius: 4px; }
img, video { display: block; max-width: 100%; height: auto; }

h1, h2, h3 { margin: 0; letter-spacing: -0.02em; }

/* ---------- Bar ---------- */

.bar {
  max-width: var(--max); margin: 0 auto; padding: 20px var(--pad);
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.who { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 600; font-size: 15px; }
.who img { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; }
.bar nav { display: flex; gap: 22px; font-size: 15px; }
.bar nav a { text-decoration: none; color: var(--muted); }
.bar nav a:hover { color: var(--ink); }
@media (max-width: 560px) { .bar nav a:not(:last-child) { display: none; } }

main { max-width: var(--max); margin: 0 auto; padding: 0 var(--pad); }

/* ---------- Buttons-as-links ---------- */

.primary {
  display: inline-block; text-decoration: none; font-weight: 600;
  background: var(--ink); color: var(--bg); padding: 12px 20px; border-radius: 10px;
}
.primary:hover { background: #fff; }

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

.hero {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: clamp(32px, 7vw, 96px);
  align-items: center; padding: clamp(40px, 8vh, 96px) 0 clamp(64px, 10vh, 120px);
}
.hello { color: var(--muted); margin: 0 0 18px; font-size: 16px; }
.hero h1 {
  font-size: clamp(40px, 6.2vw, 76px); line-height: 1.02; font-weight: 800;
  letter-spacing: -0.035em; max-width: 13ch;
}
.sub { color: var(--muted); font-size: clamp(17px, 1.6vw, 19px); max-width: 44ch; margin: 24px 0 32px; }
.hero-links { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 24px; margin: 0; }
.hero-links a:not(.primary) { color: var(--muted); }

/* A phone, drawn rather than photographed: the screen is the real app. */
.phone {
  margin: 0; border-radius: 34px; padding: 8px; background: #1b1b1f;
  box-shadow: inset 0 0 0 1px #2c2c33, 0 40px 80px -40px rgba(0, 0, 0, .9);
}
.phone img, .phone video { border-radius: 27px; aspect-ratio: 9 / 16; width: 100%; object-fit: cover; background: #000; }
.phone-hero { width: clamp(240px, 26vw, 320px); transform: rotate(2deg); }

@media (max-width: 820px) {
  .hero { grid-template-columns: 1fr; }
  .phone-hero { width: min(72vw, 300px); justify-self: center; transform: none; }
}

/* ---------- Case study ---------- */

.case { padding: clamp(56px, 9vh, 104px) 0; border-top: 1px solid var(--rule); }

.case-head { display: grid; grid-template-columns: auto 1fr auto; gap: 20px; align-items: center; }
.case-icon { width: 72px; height: 72px; border-radius: 17px; }
.case-head h2 { font-size: clamp(32px, 4.4vw, 52px); font-weight: 800; line-height: 1; }
.case-head p { margin: 8px 0 0; color: var(--muted); font-size: 18px; }
.case-cta { display: flex; gap: 18px; align-items: center; }
.case-cta a:not(.primary) { color: var(--muted); }
@media (max-width: 760px) {
  .case-head { grid-template-columns: auto 1fr; }
  .case-cta { grid-column: 1 / -1; }
}

.case-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(24px, 4vw, 48px);
  margin: clamp(40px, 6vh, 64px) 0;
}
.case-grid h3 { font-size: 17px; font-weight: 700; margin-bottom: 8px; }
.case-grid p { color: var(--muted); margin: 0; }
@media (max-width: 820px) { .case-grid { grid-template-columns: 1fr; } }

.facts {
  display: grid; grid-template-columns: repeat(3, 1fr); margin: 0 0 clamp(48px, 7vh, 72px);
  border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule);
}
.facts div { padding: 24px 0; }
.facts div + div { padding-left: clamp(16px, 3vw, 32px); border-left: 1px solid var(--rule); }
.facts dt { font-size: clamp(32px, 4.6vw, 52px); font-weight: 800; letter-spacing: -0.03em; line-height: 1; }
.facts dd { margin: 8px 0 0; color: var(--muted); font-size: 15px; }
@media (max-width: 620px) {
  .facts { grid-template-columns: 1fr; }
  .facts div + div { padding-left: 0; border-left: 0; border-top: 1px solid var(--rule); }
}

/* Four real screens. A row on desktop, a swipeable strip on a phone. */
.screens { display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(14px, 2vw, 24px); }
.screens figcaption { text-align: center; color: var(--muted); font-size: 14px; padding: 12px 0 4px; }
.screens .phone { padding: 6px; border-radius: 28px; }
.screens .phone img { border-radius: 23px; }
@media (max-width: 820px) {
  .screens {
    grid-auto-flow: column; grid-template-columns: none; grid-auto-columns: 62%;
    overflow-x: auto; scroll-snap-type: x mandatory; margin: 0 calc(var(--pad) * -1);
    padding: 0 var(--pad) 8px; scrollbar-width: none;
  }
  .screens::-webkit-scrollbar { display: none; }
  .screens .phone { scroll-snap-align: center; }
}

.stackline { display: flex; flex-wrap: wrap; gap: 8px; margin: 40px 0 0; color: var(--muted); font-size: 14px; }
.stackline span { padding: 5px 10px; border: 1px solid var(--rule); border-radius: 6px; }

/* ---------- Work ---------- */

.work { padding: clamp(56px, 9vh, 104px) 0; border-top: 1px solid var(--rule); }
.work h2 { font-size: clamp(26px, 3vw, 34px); font-weight: 800; }
.work .lead { color: var(--muted); margin: 8px 0 28px; }

.work > ul { list-style: none; margin: 0; padding: 0; columns: 2; column-gap: clamp(24px, 5vw, 64px); }
.work > ul li {
  break-inside: avoid; display: flex; flex-direction: column;
  padding: 16px 0; border-top: 1px solid var(--rule);
}
.work > ul strong { font-weight: 600; }
.work > ul span { color: var(--muted); font-size: 15px; }
@media (max-width: 680px) { .work > ul { columns: 1; } }

.two {
  display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 80px);
  margin-top: clamp(56px, 9vh, 96px);
}
.two h2 { margin-bottom: 18px; }
.plain { margin: 0; padding: 0; list-style: none; }
.plain li { padding: 12px 0; border-top: 1px solid var(--rule); color: var(--muted); font-size: 15px; }
.plain a { color: var(--ink); font-weight: 600; text-decoration: none; }
.plain a:hover { text-decoration: underline; }
.tools { margin: 0; }
.tools div { display: grid; grid-template-columns: 96px 1fr; gap: 16px; padding: 12px 0; border-top: 1px solid var(--rule); font-size: 15px; }
.tools dt { color: var(--muted); }
.tools dd { margin: 0; }
@media (max-width: 760px) { .two { grid-template-columns: 1fr; } }

/* ---------- Contact ---------- */

.contact { padding: clamp(72px, 12vh, 136px) 0; border-top: 1px solid var(--rule); }
.contact h2 { font-size: clamp(32px, 5vw, 60px); font-weight: 800; letter-spacing: -0.035em; }
.mail {
  display: inline-block; margin-top: 18px; font-size: clamp(20px, 3vw, 32px); font-weight: 600;
  color: var(--violet); text-decoration-color: color-mix(in srgb, var(--violet) 40%, transparent);
  word-break: break-word;
}
.elsewhere { display: flex; gap: 24px; color: var(--muted); margin-top: 20px; }

.foot {
  max-width: var(--max); margin: 0 auto; padding: 28px var(--pad) 48px;
  color: var(--faint); font-size: 14px; border-top: 1px solid var(--rule);
}

@media (prefers-reduced-motion: reduce) {
  .phone-hero { transform: none; }
}
