/* ── Retrigo - editorial system: plum / ivory / lavender ── */

:root {
  --plum: #2a222b;
  --plum-deep: #241d25;
  --ivory: #faf9fb;
  --ivory-dim: rgba(250, 249, 251, 0.64);
  --ivory-faint: rgba(250, 249, 251, 0.38);
  --lavender: #b49fe8;
  --lavender-deep: #8d76c4;
  --lavender-soft: rgba(180, 159, 232, 0.14);
  --lavender-glow: rgba(180, 159, 232, 0.35);
  --ink: #2a222b;
  --ink-dim: rgba(42, 34, 43, 0.66);
  --ink-faint: rgba(42, 34, 43, 0.42);
  --hairline-dark: rgba(250, 249, 251, 0.14);
  --hairline-light: rgba(42, 34, 43, 0.14);
  --serif: "Schibsted Grotesk", -apple-system, "Helvetica Neue", sans-serif;
  --sans: "Schibsted Grotesk", -apple-system, "Helvetica Neue", sans-serif;
  --radius: 16px;
  --pad: clamp(1.25rem, 4vw, 3rem);
  --wrap: 1280px;
  --cycle: 5000ms;
}

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

::selection { background: var(--lavender); color: var(--plum); }

html { scroll-behavior: smooth; }

body {
  font-family: var(--sans);
  font-weight: 400;
  background: var(--plum);
  color: var(--ivory);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  line-height: 1.6;
}

a { color: inherit; text-decoration: none; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding-inline: var(--pad); }

/* ── Grain ── */
.grain::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 50;
  opacity: 0.04;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ── Utility type ── */
.eyebrow {
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--lavender);
}

/* ── Nav ── */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.4rem max(var(--pad), calc((100% - var(--wrap)) / 2 + var(--pad)));
  transition: padding 0.4s ease;
}

.nav::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: rgba(42, 34, 43, 0.72);
  -webkit-backdrop-filter: blur(1.2rem) saturate(1.2);
  backdrop-filter: blur(1.2rem) saturate(1.2);
  border-bottom: 1px solid var(--hairline-dark);
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
}

.nav.scrolled { padding-block: 0.9rem; }
.nav.scrolled::before { opacity: 1; }

.wordmark {
  font-family: var(--serif);
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1;
}

.nav-right { display: flex; align-items: center; gap: 2rem; }

.nav-link {
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--ivory-dim);
  transition: color 0.25s ease;
}
.nav-link:hover { color: var(--ivory); }

.nav-btn {
  font-size: 0.9rem;
  font-weight: 600;
  background: var(--ivory);
  color: var(--ink);
  padding: 0.6rem 1.25rem;
  border-radius: 12px;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.nav-btn:hover { transform: translateY(-1px); box-shadow: 0 10px 26px -10px rgba(0,0,0,0.55); }

/* ── Hero ── */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  padding: 9rem var(--pad) 3rem;
  max-width: var(--wrap);
  margin: 0 auto;
  width: 100%;
  isolation: isolate;
}

.hero::before {
  content: "";
  position: absolute;
  top: -20%;
  right: -15%;
  width: 60vw;
  height: 60vw;
  max-width: 900px;
  max-height: 900px;
  background: radial-gradient(circle at center, var(--lavender-soft) 0%, transparent 62%);
  z-index: -1;
  pointer-events: none;
}

.hero .eyebrow { margin-bottom: 0; }

.hero h1 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(3rem, 6.5vw, 6rem);
  line-height: 0.98;
  letter-spacing: -0.04em;
  margin: auto 0 0;
  padding-top: 3rem;
  max-width: 10ch;
}

.hero-row {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 1.5rem;
  align-items: end;
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--hairline-dark);
}

.hero .sub {
  grid-column: 1 / 7;
  font-size: clamp(1.02rem, 1.4vw, 1.2rem);
  color: var(--ivory-dim);
  max-width: 44ch;
}

.hero .cta-wrap { grid-column: 9 / -1; justify-self: end; }

.btn-cta {
  display: inline-block;
  background: var(--ivory);
  color: var(--ink);
  font-weight: 600;
  font-size: 1rem;
  padding: 0.95rem 1.8rem;
  border-radius: 12px;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.btn-cta:hover { transform: translateY(-2px); box-shadow: 0 16px 38px -12px rgba(0, 0, 0, 0.6); }

/* ── Hero index (the three pillars; the rule is the progress) ── */
.hero-index {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-top: 5rem;
}

.hindex {
  position: relative;
  padding-top: 1.4rem;
  cursor: pointer;
  color: var(--ivory-faint);
  transition: color 0.5s ease;
}

.hindex::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: var(--hairline-dark);
}

.hindex .bar {
  position: absolute;
  top: 0; left: 0;
  height: 1px;
  width: 100%;
  background: var(--lavender);
  transform: scaleX(0);
  transform-origin: left;
}

.hindex .tag {
  display: block;
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.hindex h3 {
  font-weight: 500;
  font-size: 1.2rem;
  letter-spacing: -0.01em;
  margin: 0.7rem 0 0.4rem;
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
}

.hindex p { font-size: 0.95rem; max-width: 30ch; }

.hindex.active { color: var(--ivory-dim); }
.hindex.active h3 { color: var(--ivory); }
.hindex.active .bar { animation: fill var(--cycle) linear forwards; }

@keyframes fill { to { transform: scaleX(1); } }

.pill-new {
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--lavender);
}

/* ── Hero load ── */
.reveal-load { opacity: 0; transform: translateY(14px); animation: rise 1s cubic-bezier(0.2, 0.6, 0.2, 1) forwards; }
.d1 { animation-delay: 0.05s; }
.d2 { animation-delay: 0.15s; }
.d3 { animation-delay: 0.3s; }
.d4 { animation-delay: 0.4s; }
.d5 { animation-delay: 0.5s; }
.d6 { animation-delay: 0.65s; }

@keyframes rise { to { opacity: 1; transform: none; } }

/* ── Statement ── */
.statement {
  padding: clamp(7rem, 14vw, 12rem) 0;
  position: relative;
}

.statement .wrap {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 1.5rem;
}

.statement h2 {
  grid-column: 1 / 8;
  grid-row: 1;
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(2.4rem, 5.4vw, 4.6rem);
  line-height: 1.0;
  letter-spacing: -0.04em;
  max-width: 16ch;
}

.statement .body {
  grid-column: 8 / -1;
  grid-row: 1;
  align-self: end;
  padding-top: 8rem;
}

.statement p {
  color: var(--ivory-dim);
  max-width: 50ch;
  font-size: clamp(1.02rem, 1.4vw, 1.18rem);
}

.statement .punch {
  margin-top: 1.5rem;
  color: var(--ivory);
}

.statement .punch em {
  font-style: italic;
  color: var(--lavender);
}

/* ── Capabilities (ivory ledger) ── */
.capabilities {
  background: var(--ivory);
  color: var(--ink);
  padding: clamp(6rem, 11vw, 9rem) 0;
}

.capabilities .eyebrow { color: var(--lavender-deep); }

.section-head {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 1.5rem;
  align-items: end;
}

.section-head .eyebrow { grid-column: 1 / -1; margin-bottom: 1.5rem; }

.section-head h2 {
  grid-column: 1 / 8;
  font-weight: 500;
  font-size: clamp(2rem, 4vw, 3.2rem);
  line-height: 1.02;
  letter-spacing: -0.04em;
}

.section-head p {
  grid-column: 9 / -1;
  color: var(--ink-dim);
  font-size: 1.05rem;
  max-width: 34ch;
}

.ledger {
  margin-top: 4.5rem;
  border-top: 1px solid var(--hairline-light);
}

.row {
  display: grid;
  grid-template-columns: 5fr 6fr 1fr;
  gap: 1.5rem;
  padding: 1.9rem 0;
  border-bottom: 1px solid var(--hairline-light);
  align-items: baseline;
  transition: padding-left 0.35s cubic-bezier(0.2, 0.6, 0.2, 1);
}

.row h3 {
  font-weight: 500;
  font-size: clamp(1.25rem, 2vw, 1.6rem);
  letter-spacing: -0.02em;
  line-height: 1.15;
  transition: color 0.3s ease;
}

.row p { color: var(--ink-dim); font-size: 1rem; max-width: 52ch; }

.row .go {
  justify-self: end;
  font-size: 1.35rem;
  line-height: 1;
  color: var(--ink-faint);
  transition: transform 0.3s ease, color 0.3s ease;
}

a.row:hover { padding-left: 0.6rem; }
a.row:hover h3, .row:hover .go { color: var(--lavender-deep); }
a.row:hover .go { transform: translateX(4px); }

/* ── Process (lavender) ── */
.process {
  background: var(--lavender);
  color: var(--plum);
  padding: clamp(6rem, 11vw, 9rem) 0;
}

.process .wrap {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 1.5rem;
}

.process .lead { grid-column: 1 / 6; }
.process .eyebrow { color: rgba(42, 34, 43, 0.55); }

.process h2 {
  font-weight: 500;
  font-size: clamp(2rem, 4vw, 3.2rem);
  line-height: 1.02;
  letter-spacing: -0.04em;
  margin-top: 1.5rem;
}

.process .lead p:not(.eyebrow) {
  margin-top: 1.25rem;
  color: rgba(42, 34, 43, 0.72);
  max-width: 36ch;
  font-size: 1.05rem;
}

.creed {
  grid-column: 7 / -1;
  list-style: none;
  border-top: 1px solid rgba(42, 34, 43, 0.25);
}

.creed li {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(1.7rem, 3.2vw, 2.7rem);
  line-height: 1.1;
  letter-spacing: -0.035em;
  padding: 1.1rem 0;
  border-bottom: 1px solid rgba(42, 34, 43, 0.25);
  color: rgba(42, 34, 43, 0.6);
}

.creed li.accent { color: var(--plum); font-weight: 700; }

/* ── Footer ── */
footer {
  padding: clamp(5rem, 9vw, 8rem) 0 2.5rem;
}

.foot-inner { max-width: var(--wrap); margin: 0 auto; padding-inline: var(--pad); }

.foot-tagline {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(2rem, 4vw, 3.6rem);
  line-height: 1.02;
  letter-spacing: -0.035em;
  max-width: 14ch;
  margin-bottom: 5rem;
}

.foot-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 2.5rem;
  padding: 2.5rem 0;
  border-top: 1px solid var(--hairline-dark);
}

.foot-brand { display: flex; flex-direction: column; gap: 1rem; align-items: flex-start; }
.foot-brand .wordmark { font-size: 1.6rem; display: inline-block; }

.foot-blurb {
  font-family: var(--serif);
  font-size: 1.2rem;
  line-height: 1.3;
  color: var(--ivory-dim);
  max-width: 26ch;
}

.foot-mail {
  display: inline-block;
  font-size: 0.95rem;
  color: var(--ivory-dim);
  border-bottom: 1px solid var(--hairline-dark);
  padding-bottom: 2px;
  transition: color 0.25s ease, border-color 0.25s ease;
}
.foot-mail:hover { color: var(--ivory); border-color: var(--lavender); }

.foot-col { display: flex; flex-direction: column; gap: 0.7rem; }

.foot-h {
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ivory-faint);
  margin-bottom: 0.35rem;
}

.foot-col a {
  width: fit-content;
  font-size: 0.95rem;
  color: var(--ivory-dim);
  transition: color 0.25s ease;
}
.foot-col a:hover, .foot-col a.active { color: var(--ivory); }

.foot-base {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--hairline-dark);
  font-size: 0.8rem;
  color: var(--ivory-faint);
}

@media (max-width: 760px) {
  .foot-grid { grid-template-columns: 1fr 1fr; gap: 2rem; }
  .foot-brand { grid-column: 1 / -1; }
}
@media (max-width: 440px) {
  .foot-grid { grid-template-columns: 1fr; }
}

/* ── Scroll reveal ── */
.reveal { opacity: 0; transform: translateY(12px); transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.2, 0.6, 0.2, 1); }
.reveal.visible { opacity: 1; transform: none; }

/* ── Contact page ── */
.contact-main {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 8rem var(--pad) 6rem;
  position: relative;
  isolation: isolate;
  max-width: 1120px;
  margin: 0 auto;
  width: 100%;
}

.contact-main::before {
  content: "";
  position: absolute;
  top: 0;
  left: -10%;
  width: 800px;
  height: 600px;
  background: radial-gradient(ellipse at center, var(--lavender-soft) 0%, transparent 65%);
  z-index: -1;
}

.contact-main h1 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2.8rem, 7vw, 5rem);
  letter-spacing: -0.015em;
  line-height: 1.08;
}

.contact-main .lede {
  margin-top: 1.75rem;
  color: var(--ivory-dim);
  max-width: 44ch;
  font-size: clamp(1.05rem, 1.6vw, 1.2rem);
}

.contact-email {
  display: inline-block;
  align-self: flex-start;
  margin-top: 3.5rem;
  font-family: var(--serif);
  font-size: clamp(1.6rem, 3.5vw, 2.6rem);
  letter-spacing: -0.01em;
  border-bottom: 1px solid var(--hairline-dark);
  padding-bottom: 0.35rem;
  transition: border-color 0.3s ease, color 0.3s ease;
}

.contact-email:hover { border-color: var(--lavender); color: var(--lavender); }

.contact-meta {
  margin-top: 4rem;
  font-size: 0.9rem;
  color: var(--ivory-faint);
}

/* ── Language switcher ── */
.lang {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.04em;
}
.lang a {
  color: var(--ivory-faint);
  padding: 2px 3px;
  transition: color 0.25s ease;
}
.lang a:hover { color: var(--ivory); }
.lang a.active { color: var(--lavender); }
.lang .sep { color: var(--ivory-faint); opacity: 0.45; }

/* ── Blog index ── */
.blog-main {
  max-width: 760px;
  margin: 0 auto;
  padding: 9rem var(--pad) 5rem;
  position: relative;
  isolation: isolate;
}
.blog-main::before {
  content: "";
  position: absolute;
  top: 0; left: 50%;
  transform: translateX(-50%);
  width: 800px; height: 520px;
  background: radial-gradient(ellipse at center, var(--lavender-soft) 0%, transparent 65%);
  z-index: -1;
}
.blog-head { margin-bottom: 3rem; }
.blog-head h1 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2.4rem, 6vw, 3.8rem);
  letter-spacing: -0.015em;
  line-height: 1.08;
}
.blog-head .lede {
  margin-top: 1.25rem;
  color: var(--ivory-dim);
  font-size: clamp(1.05rem, 1.6vw, 1.2rem);
  max-width: 52ch;
}

.post-list { list-style: none; display: flex; flex-direction: column; }
.post-list li { border-top: 1px solid var(--hairline-dark); }
.post-list li:last-child { border-bottom: 1px solid var(--hairline-dark); }
.post-list a { display: block; padding: 2rem 0; transition: padding-left 0.3s ease; }
.post-list a:hover { padding-left: 0.5rem; }
.post-list .meta {
  font-size: 0.76rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--lavender);
}
.post-list h2 {
  font-weight: 600;
  font-size: clamp(1.35rem, 2.6vw, 1.85rem);
  letter-spacing: -0.015em;
  margin: 0.7rem 0 0.5rem;
}
.post-list p { color: var(--ivory-dim); font-size: 1rem; max-width: 60ch; }

/* ── Article ── */
.article {
  max-width: 680px;
  margin: 0 auto;
  padding: 9rem var(--pad) 4rem;
  position: relative;
  isolation: isolate;
}
.article::before {
  content: "";
  position: absolute;
  top: 0; left: 50%;
  transform: translateX(-50%);
  width: 760px; height: 480px;
  background: radial-gradient(ellipse at center, var(--lavender-soft) 0%, transparent 65%);
  z-index: -1;
}
.article .back {
  display: inline-block;
  margin-bottom: 2.25rem;
  font-size: 0.9rem;
  color: var(--ivory-faint);
  transition: color 0.25s ease;
}
.article .back:hover { color: var(--ivory); }
.article .meta {
  font-size: 0.76rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--lavender);
}
.article h1 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2.3rem, 5.5vw, 3.6rem);
  line-height: 1.1;
  letter-spacing: -0.015em;
  margin: 1rem 0 1.25rem;
}
.article .dek {
  color: var(--ivory-dim);
  font-size: clamp(1.1rem, 1.7vw, 1.3rem);
  line-height: 1.5;
  margin-bottom: 2.75rem;
}
.article h2 {
  font-weight: 600;
  font-size: clamp(1.35rem, 2.4vw, 1.7rem);
  letter-spacing: -0.01em;
  margin: 2.75rem 0 0.85rem;
}
.article p { color: var(--ivory-dim); font-size: 1.08rem; line-height: 1.75; }
.article p + p { margin-top: 1.2rem; }
.article a.inline {
  color: var(--lavender);
  border-bottom: 1px solid rgba(180, 159, 232, 0.4);
  transition: border-color 0.25s ease;
}
.article a.inline:hover { border-color: var(--lavender); }

.post-foot { max-width: 680px; margin: 0 auto; padding: 1.5rem var(--pad) 5rem; }
.post-foot .rule { width: 56px; height: 1px; background: var(--lavender); margin-bottom: 1.75rem; }
.post-foot p { color: var(--ivory-dim); font-size: 1.05rem; line-height: 1.7; }
.post-foot a.inline {
  color: var(--lavender);
  border-bottom: 1px solid rgba(180, 159, 232, 0.4);
}

/* ── About closing line ── */
.lead-punch {
  font-family: var(--serif);
  font-size: clamp(1.3rem, 2.2vw, 1.7rem);
  color: var(--ivory);
  line-height: 1.3;
  margin-top: 2.25rem;
}
.lead-punch em { font-style: italic; color: var(--lavender); }

/* ── Polish: keyboard focus + typographic line-breaking ── */
:where(a, button):focus-visible {
  outline: 2px solid var(--lavender);
  outline-offset: 3px;
  border-radius: 3px;
}
.nav-btn:focus-visible, .btn-cta:focus-visible { outline-offset: 4px; }

.hero h1, .statement h2, .section-head h2, .blog-head h1,
.article h1, .contact-main h1, .foot-tagline, .lead-punch,
.post-list h2, .hcard h3, .cap h3, .creed li { text-wrap: balance; }

.hero .sub, .article p, .statement p, .section-head p,
.blog-head .lede, .contact-main .lede, .post-list p,
.post-foot p, .article .dek { text-wrap: pretty; }


.article .btn-cta { margin-top: 2.5rem; }

/* ── Responsive ── */
@media (max-width: 960px) {
  .hero h1 { font-size: clamp(2.8rem, 10vw, 5rem); max-width: none; }
  .statement h2 { grid-column: 1 / -1; }
  .statement .body { grid-column: 1 / -1; grid-row: auto; padding-top: 0; margin-top: 2.5rem; }
  .section-head h2 { grid-column: 1 / -1; }
  .section-head p { grid-column: 1 / -1; margin-top: 1rem; max-width: 52ch; }
  .process .lead, .creed { grid-column: 1 / -1; }
  .creed { margin-top: 2.5rem; }
}

@media (max-width: 720px) {
  .hero { padding-top: 7.5rem; justify-content: flex-start; min-height: 0; }
  .hero .eyebrow { margin-bottom: 0; }
  .hero-row { grid-template-columns: 1fr; gap: 1.75rem; margin-top: 2.25rem; }
  .hero .sub, .hero .cta-wrap { grid-column: 1 / -1; justify-self: start; }
  .hero-index { grid-template-columns: 1fr; gap: 0; margin-top: 3.5rem; }
  .hindex { padding-block: 1.2rem 1.4rem; }
  .row { grid-template-columns: 1fr; gap: 0.5rem; }
  .row .go { justify-self: start; }
  .nav-right { gap: 1rem; }
  .nav-right .nav-btn { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal, .reveal-load { opacity: 1; transform: none; }
  .hindex.active .bar { transform: scaleX(1); }
  html { scroll-behavior: auto; }
}
