/* ============================================================
   Flow family — shared base stylesheet
   Used by marketflow.no, imageflow.no, newsflow.no and pageflow.no.
   Each site symlinks this file to css/flow.css and layers its own
   css/site.css on top (fonts, accent colours, hero, unique sections).
   ============================================================ */

/* ---------- Tokens ---------- */
:root {
  /* Family neutrals: warm paper and soft ink */
  --paper: #FAF7F1;
  --paper-2: #F2EDE3;
  --paper-3: #E8E1D4;
  --ink: #17171F;
  --ink-2: #2B2B36;
  --ink-soft: #4B4B58;
  --muted: #6F6E79;
  --line: rgba(23, 23, 31, 0.12);
  --line-strong: rgba(23, 23, 31, 0.22);
  --white: #FFFFFF;

  /* Product colours, the same on every site (used in the family strip) */
  --nf: #E86C2A;
  --if: #D9A441;
  --mf: #1F8A5B;
  --af: #D64B7A;
  --pf: #F2C14E;

  /* Site accent — overridden by each site.css */
  --accent: #E86C2A;
  --accent-ink: #FFFFFF;
  --accent-soft: rgba(232, 108, 42, 0.14);
  --accent-2: #1F8A5B;
  --brand-ink: #1A1A2E;      /* the site's dark surface */
  --brand-ink-2: #24243C;
  --on-ink: #F3F0EA;
  --on-ink-muted: rgba(243, 240, 234, 0.68);

  /* Type */
  --font-body: 'Instrument Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-display: var(--font-body);
  --font-mono: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;

  --step--1: clamp(0.86rem, 0.84rem + 0.15vw, 0.95rem);
  --step-0: clamp(1.02rem, 0.98rem + 0.25vw, 1.15rem);
  --step-1: clamp(1.18rem, 1.1rem + 0.45vw, 1.4rem);
  --step-2: clamp(1.4rem, 1.25rem + 0.8vw, 1.85rem);
  --step-3: clamp(1.75rem, 1.45rem + 1.4vw, 2.5rem);
  --step-4: clamp(2.1rem, 1.6rem + 2.4vw, 3.4rem);
  --step-5: clamp(2.7rem, 1.8rem + 4.4vw, 5.2rem);

  /* Shape and motion */
  --radius: 18px;
  --radius-sm: 10px;
  --radius-xs: 6px;
  --pill: 999px;
  --shadow-soft: 0 14px 40px -18px rgba(23, 23, 31, 0.25);
  --shadow-hard: 6px 6px 0 var(--ink);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --speed: 0.3s;

  --container: 1180px;
  --container-wide: 1340px;
  --gutter: clamp(18px, 4vw, 40px);
  --header-h: 76px;
  --section: clamp(72px, 9vw, 136px);
  --section-sm: clamp(48px, 6vw, 88px);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 12px);
}
body {
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}
img, picture, svg, video { display: block; max-width: 100%; }
img { height: auto; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; }
a { color: inherit; text-decoration: none; }
p a, li a, small a { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
ul[role="list"], ol[role="list"] { list-style: none; padding: 0; }
h1, h2, h3, h4 {
  font-family: var(--font-display);
  line-height: 1.1;
  letter-spacing: -0.015em;
  font-weight: 700;
  text-wrap: balance;
}
h1 { font-size: var(--step-5); }
h2 { font-size: var(--step-4); }
h3 { font-size: var(--step-2); }
h4 { font-size: var(--step-1); }
p { text-wrap: pretty; }
strong { font-weight: 700; }
em { font-style: italic; }
[hidden] { display: none !important; }
::selection { background: var(--accent); color: var(--accent-ink); }

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

/* ---------- Utilities ---------- */
.container {
  width: min(var(--container), 100% - 2 * var(--gutter));
  margin-inline: auto;
}
.container--wide { width: min(var(--container-wide), 100% - 2 * var(--gutter)); }
.container--narrow { width: min(820px, 100% - 2 * var(--gutter)); }
.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: 16px; top: -60px;
  z-index: 1000;
  padding: 10px 16px;
  background: var(--ink); color: var(--white);
  border-radius: var(--radius-sm);
  font-weight: 600;
  transition: top var(--speed) var(--ease);
}
.skip-link:focus { top: 16px; }
.lead { font-size: var(--step-1); line-height: 1.5; color: var(--ink-soft); }
.muted { color: var(--muted); }
.center { text-align: center; }
.mono { font-family: var(--font-mono); font-size: 0.85em; letter-spacing: 0.01em; }

/* Wavy "flow" underline — the family signature */
.u-flow {
  text-decoration: underline wavy var(--accent);
  text-decoration-thickness: 0.07em;
  text-underline-offset: 0.14em;
  text-decoration-skip-ink: none;
}
.u-mark {
  background: linear-gradient(transparent 58%, var(--accent-soft) 58%);
  padding-inline: 0.08em;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}

/* Wordmark: "Market" + "Flow" in the accent */
.wordmark {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 1.35rem;
  letter-spacing: -0.03em;
  line-height: 1;
  color: inherit;
}
.wordmark b { font-weight: inherit; color: var(--accent); }
.wordmark__mark { width: 30px; height: 30px; flex: none; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5em;
  padding: 0.82em 1.45em;
  border-radius: var(--pill);
  border: 2px solid transparent;
  font-weight: 600;
  font-size: var(--step-0);
  line-height: 1.15;
  white-space: nowrap;
  transition: transform var(--speed) var(--ease), box-shadow var(--speed) var(--ease), background var(--speed), color var(--speed), border-color var(--speed);
  text-decoration: none;
}
.btn svg { width: 1.05em; height: 1.05em; flex: none; transition: transform var(--speed) var(--ease); }
.btn:hover svg { transform: translateX(3px); }
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn--primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.btn--primary:hover { box-shadow: 0 10px 24px -10px var(--accent); }
.btn--ink { background: var(--ink); color: var(--white); border-color: var(--ink); }
.btn--ink:hover { box-shadow: 0 10px 24px -10px rgba(0, 0, 0, 0.5); }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--line-strong); }
.btn--ghost:hover { border-color: var(--ink); }
.btn--light { background: var(--white); color: var(--ink); border-color: var(--white); }
.btn--outline-light { background: transparent; color: var(--on-ink); border-color: rgba(255, 255, 255, 0.4); }
.btn--outline-light:hover { border-color: var(--on-ink); }
.btn--lg { padding: 1em 1.8em; font-size: var(--step-1); }
.btn--sm { padding: 0.55em 1.05em; font-size: var(--step--1); }
.btn--hard { box-shadow: 4px 4px 0 var(--ink); border-color: var(--ink); }
.btn--hard:hover { box-shadow: 6px 6px 0 var(--ink); transform: translate(-1px, -1px); }
.btn--hard:active { box-shadow: 2px 2px 0 var(--ink); transform: translate(2px, 2px); }
.btn[disabled] { opacity: 0.6; pointer-events: none; }

/* ---------- Stickers, eyebrows, chips ---------- */
.sticker {
  display: inline-block;
  padding: 0.35em 0.8em;
  background: var(--pf);
  color: var(--ink);
  border: 2px solid var(--ink);
  border-radius: var(--radius-xs);
  box-shadow: 3px 3px 0 var(--ink);
  font-size: var(--step--1);
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.2;
  transform: rotate(-2.5deg);
  transition: transform var(--speed) var(--ease);
}
.sticker:hover { transform: rotate(0deg) scale(1.04); }
.sticker--accent { background: var(--accent); color: var(--accent-ink); }
.sticker--white { background: var(--white); }
.sticker--right { transform: rotate(2.5deg); }

.eyebrow {
  display: inline-flex; align-items: center; gap: 0.6em;
  font-size: var(--step--1);
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 14px;
}
.eyebrow::before {
  content: '';
  width: 1.6em; height: 3px;
  border-radius: 2px;
  background: currentColor;
}
.section--ink .eyebrow { color: var(--accent); }

/* Static grain on big flat colour fields (never animated) */
.grain { position: relative; isolation: isolate; }
.grain::before {
  content: '';
  position: absolute; inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.05;
  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' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 160px 160px;
  mix-blend-mode: multiply;
}
.section--ink.grain::before { mix-blend-mode: screen; opacity: 0.08; }

.chip {
  display: inline-flex; align-items: center; gap: 0.4em;
  padding: 0.3em 0.75em;
  border-radius: var(--pill);
  background: var(--paper-2);
  border: 1px solid var(--line);
  font-size: var(--step--1);
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
}
.chip--accent { background: var(--accent-soft); border-color: transparent; color: var(--ink); }
.chip--ink { background: var(--ink); color: var(--white); border-color: var(--ink); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  height: var(--header-h);
  background: color-mix(in srgb, var(--paper) 86%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--speed), box-shadow var(--speed), background var(--speed);
}
.site-header.is-scrolled {
  border-bottom-color: var(--line);
  box-shadow: 0 10px 30px -24px rgba(23, 23, 31, 0.35);
}
.site-header--ink {
  background: color-mix(in srgb, var(--brand-ink) 82%, transparent);
  color: var(--on-ink);
}
.site-header--ink.is-scrolled { border-bottom-color: rgba(255, 255, 255, 0.1); }
.site-header__inner {
  height: 100%;
  display: flex; align-items: center; gap: 24px;
}
.site-header .wordmark { margin-right: auto; }
.nav { display: flex; align-items: center; gap: 4px; }
.nav a {
  position: relative;
  padding: 8px 12px;
  border-radius: var(--pill);
  font-weight: 600;
  font-size: var(--step--1);
  color: inherit;
  opacity: 0.82;
  transition: opacity var(--speed), background var(--speed);
}
.nav a:hover, .nav a.is-active { opacity: 1; background: color-mix(in srgb, currentColor 8%, transparent); }
.header-actions { display: flex; align-items: center; gap: 12px; }

.lang-toggle {
  display: inline-flex;
  padding: 3px;
  border: 1px solid var(--line-strong);
  border-radius: var(--pill);
  gap: 2px;
}
.site-header--ink .lang-toggle { border-color: rgba(255, 255, 255, 0.25); }
.lang-toggle button {
  padding: 5px 10px;
  border-radius: var(--pill);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  opacity: 0.7;
  transition: background var(--speed), color var(--speed), opacity var(--speed);
}
.lang-toggle button[aria-pressed="true"] { background: var(--ink); color: var(--white); opacity: 1; }
.site-header--ink .lang-toggle button[aria-pressed="true"] { background: var(--on-ink); color: var(--brand-ink); }

.hamburger {
  display: none;
  width: 44px; height: 44px;
  flex-direction: column; align-items: center; justify-content: center; gap: 5px;
  border-radius: var(--radius-sm);
}
.hamburger span {
  display: block; width: 22px; height: 2px;
  background: currentColor;
  border-radius: 2px;
  transition: transform var(--speed) var(--ease), opacity var(--speed);
}
.hamburger.is-active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.is-active span:nth-child(2) { opacity: 0; }
.hamburger.is-active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mobile-nav {
  position: fixed; inset: var(--header-h) 0 0 0;
  z-index: 90;
  display: flex; flex-direction: column; gap: 6px;
  padding: 24px var(--gutter) 40px;
  background: var(--paper);
  overflow-y: auto;
  opacity: 0; visibility: hidden;
  transform: translateY(-8px);
  transition: opacity var(--speed) var(--ease), transform var(--speed) var(--ease), visibility 0s linear var(--speed);
}
.mobile-nav.is-open { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }
.mobile-nav a {
  padding: 14px 6px;
  border-bottom: 1px solid var(--line);
  font-family: var(--font-display);
  font-size: var(--step-2);
  font-weight: 700;
  letter-spacing: -0.01em;
}
.mobile-nav .btn { margin-top: 18px; border-bottom: 0; font-family: var(--font-body); font-size: var(--step-0); }
.mobile-nav .lang-toggle { margin-top: 24px; align-self: flex-start; }
body.nav-open { overflow: hidden; }

@media (max-width: 960px) {
  :root { --header-h: 64px; }
  .nav, .header-actions .lang-toggle, .header-actions .btn { display: none; }
  .hamburger { display: inline-flex; }
}

/* ---------- Sections ---------- */
.section { padding-block: var(--section); position: relative; }
.section--sm { padding-block: var(--section-sm); }
.section--tint { background: var(--paper-2); }
.section--white { background: var(--white); }
.section--ink { background: var(--brand-ink); color: var(--on-ink); }
.section--ink .muted, .section--ink .lead { color: var(--on-ink-muted); }
.section--accent { background: var(--accent); color: var(--accent-ink); }
.section__head { max-width: 760px; margin-bottom: clamp(36px, 5vw, 64px); }
.section__head--center { margin-inline: auto; text-align: center; }
.section__head--center .eyebrow { justify-content: center; }
.section__head h2 { margin-bottom: 16px; }
.section__head p { font-size: var(--step-1); line-height: 1.5; color: var(--ink-soft); }
.section--ink .section__head p { color: var(--on-ink-muted); }
.section__head .btn { margin-top: 24px; }

/* Flow divider: a wave between sections */
.flow-divider {
  display: block; width: 100%; height: clamp(28px, 5vw, 64px);
  color: var(--paper);
}
.flow-divider svg { width: 100%; height: 100%; }

/* ---------- Cards and grids ---------- */
.card {
  position: relative;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(22px, 3vw, 32px);
  transition: transform var(--speed) var(--ease), box-shadow var(--speed) var(--ease), border-color var(--speed);
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-soft); border-color: var(--line-strong); }
.card--flat:hover { transform: none; box-shadow: none; }
.card--hard { border: 2px solid var(--ink); box-shadow: var(--shadow-hard); }
.card--hard:hover { transform: translate(-2px, -2px); box-shadow: 8px 8px 0 var(--ink); }
.card--ink { background: var(--brand-ink-2); color: var(--on-ink); border-color: rgba(255, 255, 255, 0.08); }
.card--ink p { color: var(--on-ink-muted); }
.card--accent { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.card--tint { background: var(--paper-2); }
.card h3 { margin-bottom: 10px; }
.card p { color: var(--ink-soft); }
.card--ink h3, .card--accent h3 { color: inherit; }
.card--ink p { color: var(--on-ink-muted); }
.card--accent p { color: inherit; opacity: 0.9; }
.card__icon {
  width: 48px; height: 48px;
  display: grid; place-items: center;
  border-radius: 14px;
  background: var(--accent-soft);
  color: var(--accent);
  margin-bottom: 18px;
}
.card__icon svg { width: 24px; height: 24px; }
.card--ink .card__icon { background: rgba(255, 255, 255, 0.08); color: var(--accent); }
.card__badge {
  position: absolute; top: 18px; right: 18px;
}
.card__link {
  display: inline-flex; align-items: center; gap: 6px;
  margin-top: 18px;
  font-weight: 700;
  color: var(--accent);
}
.card__link svg { width: 1em; height: 1em; transition: transform var(--speed) var(--ease); }
.card:hover .card__link svg { transform: translateX(4px); }

.grid { display: grid; gap: clamp(16px, 2vw, 24px); }
.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid--auto { grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); }
@media (max-width: 1024px) {
  .grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .grid--2, .grid--3, .grid--4 { grid-template-columns: minmax(0, 1fr); }
}

/* Bento: 12 columns with span utilities */
.bento { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: clamp(16px, 2vw, 24px); }
.span-3 { grid-column: span 3; }
.span-4 { grid-column: span 4; }
.span-5 { grid-column: span 5; }
.span-6 { grid-column: span 6; }
.span-7 { grid-column: span 7; }
.span-8 { grid-column: span 8; }
.span-12 { grid-column: span 12; }
@media (max-width: 1024px) {
  .span-3, .span-4, .span-5, .span-6, .span-7, .span-8 { grid-column: span 6; }
}
@media (max-width: 640px) {
  .bento > * { grid-column: span 12; }
}

/* Check lists */
.checks { list-style: none; padding: 0; display: grid; gap: 10px; }
.checks li { position: relative; padding-left: 30px; line-height: 1.45; }
.checks li::before {
  content: '';
  position: absolute; left: 0; top: 0.2em;
  width: 20px; height: 20px;
  border-radius: 50%;
  background: var(--accent-soft);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='%2317171F' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5.5 10.5l3 3 6-7'/%3E%3C/svg%3E");
  background-size: 14px; background-position: center; background-repeat: no-repeat;
}
.section--ink .checks li::before, .card--ink .checks li::before { background-color: rgba(255, 255, 255, 0.12); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='%23fff' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5.5 10.5l3 3 6-7'/%3E%3C/svg%3E"); }
.checks--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 28px; }
@media (max-width: 720px) { .checks--2 { grid-template-columns: minmax(0, 1fr); } }

/* ---------- Steps ---------- */
.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(20px, 3vw, 40px); counter-reset: step; list-style: none; padding: 0; }
.steps--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.step { position: relative; counter-increment: step; padding-top: 18px; }
.step::before {
  content: counter(step, decimal-leading-zero);
  display: block;
  font-family: var(--font-display);
  font-size: var(--step-4);
  font-weight: 800;
  line-height: 1;
  color: var(--accent);
  margin-bottom: 14px;
}
.step::after {
  content: '';
  position: absolute; left: 0; top: 0;
  width: 44px; height: 4px;
  border-radius: 2px;
  background: var(--accent);
}
.step h3 { margin-bottom: 8px; font-size: var(--step-1); }
.step p { color: var(--ink-soft); }
@media (max-width: 900px) { .steps, .steps--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .steps, .steps--4 { grid-template-columns: minmax(0, 1fr); } }

/* ---------- Stats ---------- */
.stats { display: flex; flex-wrap: wrap; gap: clamp(20px, 4vw, 56px); }
.stat__value {
  display: block;
  font-family: var(--font-display);
  font-size: var(--step-3);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.02em;
}
.stat__label { display: block; margin-top: 6px; font-size: var(--step--1); color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; }
.section--ink .stat__label { color: var(--on-ink-muted); }

/* ---------- Marquee ---------- */
.marquee {
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.marquee__track {
  display: flex; align-items: center; gap: clamp(32px, 5vw, 72px);
  width: max-content;
  animation: marquee 48s linear infinite;
  will-change: transform;
}
.marquee:hover .marquee__track { animation-play-state: paused; }
.marquee__item { flex: none; }
@keyframes marquee { to { transform: translateX(-50%); } }
html:not(.js) .marquee__track { animation: none; width: auto; flex-wrap: wrap; }

/* ---------- Pricing ---------- */
.pricing-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(16px, 2vw, 28px); align-items: start; }
.price-card { display: flex; flex-direction: column; }
.price-card h3 { margin-bottom: 4px; }
.price-card__for { color: var(--muted); margin-bottom: 18px; min-height: 2.4em; }
.price-card__price { font-family: var(--font-display); font-size: var(--step-3); font-weight: 800; letter-spacing: -0.02em; margin-bottom: 18px; }
.price-card__price small { font-size: 0.45em; font-weight: 600; color: var(--muted); letter-spacing: 0; }
.price-card .checks { margin-bottom: 24px; flex: 1; }
.price-card .btn { align-self: flex-start; }
.price-card--featured { position: relative; }
.price-card--featured .sticker { position: absolute; top: -14px; right: 22px; }
@media (max-width: 960px) { .pricing-grid { grid-template-columns: minmax(0, 1fr); max-width: 560px; margin-inline: auto; } }

/* ---------- Family strip ---------- */
.family { background: var(--paper-2); }
.family__grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; }
.family__tile {
  --tile: var(--accent);
  position: relative;
  display: flex; flex-direction: column; gap: 8px;
  min-height: 190px;
  padding: 22px 20px 20px;
  background: var(--white);
  border: 1px solid var(--line);
  border-top: 5px solid var(--tile);
  border-radius: var(--radius-sm);
  overflow: hidden;
  transition: transform var(--speed) var(--ease), box-shadow var(--speed) var(--ease);
}
.family__tile:hover { transform: translateY(-4px); box-shadow: var(--shadow-soft); }
.family__tile::after {
  content: attr(data-letter);
  position: absolute; right: -6px; bottom: -28px;
  font-family: var(--font-display);
  font-size: 7rem; font-weight: 800; line-height: 1;
  color: var(--tile);
  opacity: 0.12;
  pointer-events: none;
}
.family__tile .wordmark { font-size: 1.15rem; }
.family__tile .wordmark b { color: var(--tile); }
.family__tile p { font-size: var(--step--1); color: var(--ink-soft); flex: 1; }
.family__tile .card__link { color: var(--tile); margin-top: 6px; font-size: var(--step--1); }
.family__tile--current { outline: 2px solid var(--tile); outline-offset: 2px; }
.family__tile .sticker { position: absolute; top: 12px; right: 12px; font-size: 0.68rem; padding: 0.25em 0.6em; box-shadow: 2px 2px 0 var(--ink); }
@media (max-width: 1024px) { .family__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 640px) { .family__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .family__tile { min-height: 160px; } }
@media (max-width: 400px) { .family__grid { grid-template-columns: minmax(0, 1fr); } }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: clamp(28px, 5vw, 72px); align-items: start; }
.contact-info h2 { margin-bottom: 16px; }
.contact-info > p { font-size: var(--step-1); color: var(--ink-soft); line-height: 1.5; }
.section--ink .contact-info > p { color: var(--on-ink-muted); }
.contact-lines { margin-top: 28px; display: grid; gap: 12px; }
.contact-lines a, .contact-lines span {
  display: inline-flex; align-items: center; gap: 12px;
  font-weight: 600;
}
.contact-lines svg { width: 22px; height: 22px; color: var(--accent); flex: none; }
.contact-form {
  background: var(--white);
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  box-shadow: var(--shadow-hard);
  padding: clamp(22px, 3vw, 36px);
  display: grid; gap: 16px;
  color: var(--ink);
}
.field { display: grid; gap: 6px; }
.field label { font-weight: 600; font-size: var(--step--1); }
.field .required { color: var(--accent); }
.field input, .field textarea {
  width: 100%;
  padding: 12px 14px;
  background: var(--paper);
  border: 1.5px solid var(--line-strong);
  border-radius: var(--radius-sm);
  transition: border-color var(--speed), box-shadow var(--speed), background var(--speed);
}
.field textarea { min-height: 140px; resize: vertical; }
.field input:focus, .field textarea:focus {
  outline: none;
  border-color: var(--accent);
  background: var(--white);
  box-shadow: 0 0 0 4px var(--accent-soft);
}
.field input.is-error, .field textarea.is-error { border-color: #D14343; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-notice { font-size: var(--step--1); color: var(--ink-soft); padding: 12px 14px; background: var(--paper-2); border-radius: var(--radius-sm); }
.form-fine { font-size: var(--step--1); color: var(--muted); }
.form-success {
  display: none;
  align-items: center; gap: 14px;
  padding: 18px 20px;
  background: var(--accent-soft);
  border-radius: var(--radius-sm);
  font-weight: 600;
}
.form-success.is-visible { display: flex; }
.form-success svg { width: 28px; height: 28px; color: var(--accent); flex: none; }
.form-success h3 { font-size: var(--step-1); margin-bottom: 2px; }
.form-success p { font-weight: 400; color: var(--ink-soft); }
.cf-turnstile { min-height: 65px; }
@media (max-width: 860px) { .contact-grid { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 560px) { .form-row { grid-template-columns: minmax(0, 1fr); } }

/* ---------- Footer ---------- */
.site-footer { background: var(--brand-ink); color: var(--on-ink); padding: clamp(48px, 6vw, 80px) 0 32px; }
.site-footer__grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: clamp(24px, 4vw, 48px); margin-bottom: clamp(32px, 5vw, 56px); }
.site-footer .wordmark { color: var(--on-ink); margin-bottom: 14px; }
.site-footer__brand p { color: var(--on-ink-muted); max-width: 32ch; }
.site-footer h4 { font-family: var(--font-body); font-size: var(--step--1); text-transform: uppercase; letter-spacing: 0.1em; color: var(--on-ink-muted); margin-bottom: 14px; }
.site-footer ul { list-style: none; padding: 0; display: grid; gap: 8px; }
.site-footer li, .site-footer address { color: var(--on-ink); font-style: normal; }
.site-footer a { text-decoration: none; opacity: 0.85; transition: opacity var(--speed); }
.site-footer a:hover { opacity: 1; text-decoration: underline; }
.site-footer__bar {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  font-size: var(--step--1);
  color: var(--on-ink-muted);
}
.site-footer__bar nav { display: flex; flex-wrap: wrap; gap: 6px 20px; }
.site-footer__flow { display: flex; align-items: center; gap: 10px; }
@media (max-width: 960px) { .site-footer__grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 540px) { .site-footer__grid { grid-template-columns: minmax(0, 1fr); } }

/* ---------- Tabs ---------- */
.tabs { display: inline-flex; flex-wrap: wrap; gap: 6px; padding: 6px; background: var(--paper-2); border-radius: var(--pill); }
.tabs button {
  padding: 10px 18px;
  border-radius: var(--pill);
  font-weight: 600;
  font-size: var(--step--1);
  color: var(--ink-soft);
  transition: background var(--speed), color var(--speed), box-shadow var(--speed);
}
.tabs button[aria-selected="true"] { background: var(--ink); color: var(--white); box-shadow: 0 6px 16px -8px rgba(0, 0, 0, 0.5); }
.tab-panel[hidden] { display: none; }

/* ---------- Mock browser frame ---------- */
.frame {
  background: var(--white);
  border: 2px solid var(--ink);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow-hard);
}
.frame__bar {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 14px;
  background: var(--paper-2);
  border-bottom: 2px solid var(--ink);
}
.frame__dots { display: flex; gap: 6px; }
.frame__dots span { width: 10px; height: 10px; border-radius: 50%; background: var(--ink); opacity: 0.25; }
.frame__dots span:first-child { background: #E0553E; opacity: 1; }
.frame__dots span:nth-child(2) { background: #F2C14E; opacity: 1; }
.frame__dots span:nth-child(3) { background: #3DBB7A; opacity: 1; }
.frame__url {
  flex: 1;
  padding: 5px 12px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--pill);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--muted);
  text-align: center;
}
.frame__body { background: var(--white); }
.frame img { width: 100%; height: auto; }
.frame--plain { box-shadow: var(--shadow-soft); border-color: var(--line); }
.frame--plain .frame__bar { border-bottom-color: var(--line); }

/* ---------- Reveal on scroll ---------- */
/* Only hidden once the inline <script> has flagged the document with .js, so
   content stays visible when JavaScript does not run. */
.js .reveal { opacity: 0; transform: translateY(22px); transition: opacity 0.8s var(--ease), transform 0.8s var(--ease); }
.js .reveal.is-in { opacity: 1; transform: none; }
.reveal-d1 { transition-delay: 0.08s; }
.reveal-d2 { transition-delay: 0.16s; }
.reveal-d3 { transition-delay: 0.24s; }
.reveal-d4 { transition-delay: 0.32s; }

/* Floating idle animation for playful elements */
@keyframes float { 0%, 100% { transform: translateY(0) rotate(var(--r, 0deg)); } 50% { transform: translateY(-8px) rotate(var(--r, 0deg)); } }
.float { animation: float 6s ease-in-out infinite; }
.float--slow { animation-duration: 9s; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001s !important; animation-iteration-count: 1 !important; transition-duration: 0.001s !important; }
  .js .reveal { opacity: 1; transform: none; }
  .marquee__track { animation: none; }
}

/* ---------- 404 page ---------- */
.lost { min-height: 100vh; display: grid; place-items: center; text-align: center; background: var(--brand-ink); color: var(--on-ink); padding: 40px var(--gutter); }
.lost .code { font-family: var(--font-mono); color: var(--accent); letter-spacing: 0.12em; margin-bottom: 12px; }
.lost h1 { margin-bottom: 14px; }
.lost .lead { color: var(--on-ink-muted); max-width: 44ch; margin-inline: auto; }
.lost .btn { margin-top: 24px; }
.lost .lost__en { margin-top: 28px; font-size: var(--step--1); color: var(--on-ink-muted); }
.lost .lost__en a { color: var(--on-ink); }
