/* Pocket Studio. Brand kit locked 11 Nov 2026.
   Flat colour only: no gradients, shadows, blur or glow anywhere. */

:root {
  --violet: #5240A0;   /* brand colour: buttons, links, dark sections */
  --apricot: #E9A070;  /* chips and rules only. Never text, never big areas */
  --paper: #F4F1F8;    /* page background */
  --panel: #E4DEF0;    /* cards and panels */
  --ink: #1F1A33;      /* text. Never pure black */
  --tint: #DDD6EC;     /* small text on violet only */

  --head: "Familjen Grotesk", "Helvetica Neue", Arial, sans-serif;
  --body: "Instrument Sans", "Helvetica Neue", Arial, sans-serif;

  --gutter: 20px;
  --radius: 18px;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img, svg { display: block; max-width: 100%; height: auto; }

h1, h2, h3 {
  font-family: var(--head);
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -0.015em;
  margin: 0;
}
p { margin: 0; }

a { color: var(--violet); text-underline-offset: 0.2em; text-decoration-thickness: 1.5px; }
a:hover { color: var(--ink); }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; border-radius: 4px; }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 var(--gutter); }

.sr {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip-path: inset(50%); white-space: nowrap;
}
.skip {
  position: absolute; left: 12px; top: -60px; z-index: 10;
  background: var(--ink); color: var(--paper); padding: 10px 14px; border-radius: 8px;
}
.skip:focus { top: 12px; color: var(--paper); }

/* ---------- Header ---------- */
.header-row {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; padding-top: 18px; padding-bottom: 18px;
}
.logo { flex: none; display: block; }
.logo img { width: 132px; }
nav { display: flex; gap: 18px; }
nav a {
  color: var(--ink); text-decoration: none; font-weight: 500; font-size: 0.9375rem;
  padding: 6px 0;
}
nav a:hover { color: var(--violet); text-decoration: underline; }

/* ---------- Hero ---------- */
.hero { padding: 28px 0 64px; }
.hero-grid { display: grid; gap: 36px; }
h1 {
  font-size: clamp(3.25rem, 15vw, 7rem);
  line-height: 0.92;
  letter-spacing: -0.03em;
  max-width: 6.5em;
}
.lead {
  margin-top: 24px; max-width: 31em;
  font-size: 1.1875rem; line-height: 1.5;
}
.button {
  display: inline-block; margin-top: 30px;
  background: var(--violet); color: var(--paper);
  font-weight: 500; text-decoration: none;
  padding: 15px 26px; border-radius: 999px;
}
.button::after {
  content: "\2193"; display: inline-block; margin-left: 10px;
  transition: transform 0.25s var(--ease);
}
.button:hover::after { transform: translateY(3px); }
.button:hover { background: var(--ink); color: var(--paper); }

.hero-panel {
  background: var(--violet); border-radius: 28px;
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 16px; padding: 22px 24px 24px 14px; min-height: 220px;
  overflow: hidden;
}
.hero-panel img { width: 128px; flex: none; }
.hero-panel p {
  color: var(--tint); font-weight: 500; font-size: 1rem; line-height: 1.35;
  text-align: right; padding-bottom: 8px;
}

/* ---------- Sections ---------- */
.section { padding: 64px 0; }
h2 { font-size: clamp(2rem, 7vw, 3rem); }
h2::before {
  content: ""; display: block; width: 44px; height: 6px;
  background: var(--apricot); border-radius: 3px; margin-bottom: 20px;
}
.section-head p { margin-top: 14px; max-width: 30em; }

/* ---------- Brand cards ---------- */
.cards {
  list-style: none; padding: 0; margin: 36px 0 0;
  display: grid; gap: 14px;
}
.card {
  background: var(--panel); border-radius: var(--radius);
  padding: 24px 22px 22px;
  display: flex; flex-direction: column; min-height: 210px;
}
.card-top {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 12px;
}
.card h3 { font-size: 1.75rem; letter-spacing: -0.02em; }
.card p { margin-top: 12px; max-width: 26em; }
.chip {
  flex: none; display: inline-flex; align-items: center; gap: 7px;
  background: var(--apricot); color: var(--ink);
  font-size: 0.8125rem; font-weight: 500; line-height: 1;
  padding: 7px 11px 7px 10px; border-radius: 999px; white-space: nowrap;
  margin-top: 3px;
}
.chip::before {
  content: ""; width: 7px; height: 7px; border-radius: 50%;
  border: 1.5px solid var(--ink);
}
.chip.is-live::before { background: var(--ink); }

.card-links {
  margin-top: auto; padding-top: 22px;
  display: flex; flex-wrap: wrap; gap: 6px 22px;
  font-weight: 500;
}
.card-links a::after {
  content: "\2197"; display: inline-block; margin-left: 5px;
  transition: transform 0.25s var(--ease);
}
.card-links a:hover::after { transform: translate(2px, -2px); }
.no-link { color: var(--ink); opacity: 0.68; font-weight: 400; }

/* ---------- How I work ---------- */
.how { background: var(--violet); color: var(--paper); }
.how h2 { color: var(--paper); }
.steps {
  list-style: none; padding: 0; margin: 40px 0 0;
  display: grid; gap: 0;
}
.steps li {
  position: relative;
  padding: 22px 0 28px;
  display: grid; grid-template-columns: 52px 1fr; column-gap: 8px;
}
.step-no {
  font-family: var(--head); font-weight: 600; font-size: 2.5rem; line-height: 1;
  color: var(--tint); grid-row: span 2;
}
.steps h3 { font-size: 1.5rem; padding-top: 6px; }
.steps p { margin-top: 8px; color: var(--tint); max-width: 24em; }

/* ---------- About ---------- */
.about { display: grid; gap: 28px; }
.facts { margin: 8px 0 0; }
.facts div {
  display: flex; justify-content: space-between; align-items: baseline; gap: 20px;
  border-top: 1.5px solid var(--ink); padding: 14px 0;
}
.facts div:last-child { border-bottom: 1.5px solid var(--ink); }
.facts dt { font-size: 0.8125rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; flex: none; }
.facts dd { margin: 0; font-weight: 500; text-align: right; }
.prose p + p { margin-top: 16px; }
.prose { max-width: 34em; }
.big {
  font-family: var(--head); font-weight: 600;
  font-size: clamp(1.5rem, 5vw, 2rem); line-height: 1.15; letter-spacing: -0.015em;
  color: var(--violet);
}

/* ---------- Contact ---------- */
.contact { padding-top: 0; }
.contact-panel {
  background: var(--panel); border-radius: 28px; padding: 36px 24px;
}
.contact-panel > p { margin-top: 14px; max-width: 28em; }
.contact-list { margin: 28px 0 0; display: grid; gap: 18px; }
.contact-list dt {
  font-size: 0.8125rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
}
.contact-list dd { margin: 4px 0 0; font-size: 1.125rem; font-weight: 500; overflow-wrap: anywhere; }

/* ---------- Footer ---------- */
.site-footer { padding: 8px 0 40px; font-size: 0.9375rem; }
.footer-row {
  display: grid; gap: 24px;
  border-top: 1.5px solid var(--ink); padding-top: 28px;
}
.footer-name { font-family: var(--head); font-weight: 600; font-size: 1.25rem; margin-bottom: 4px; }
.social { display: flex; gap: 8px; margin: 0 0 12px -10px; }
.social a {
  display: grid; place-items: center; width: 44px; height: 44px;
  color: var(--ink); border-radius: 50%;
}
.social a:hover { background: var(--panel); color: var(--violet); }

/* ---------- Privacy page ---------- */
.page { padding: 36px 0 72px; }
.page h1 { font-size: clamp(2.5rem, 10vw, 4rem); line-height: 1; }
.page .prose { margin-top: 28px; }
.page h2 { font-size: 1.5rem; margin-top: 36px; }
.page h2::before { display: none; }
.page h2 + p { margin-top: 10px; }
.page .back { display: inline-block; margin-top: 40px; font-weight: 500; }

/* ---------- Motion ----------
   Flat moves only: slide and fade. Everything is visible without JS,
   and it all switches off for people who ask for reduced motion. */
.steps li::before {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 1.5px;
  background: var(--tint); transform-origin: left;
}
.button, nav a, .social a { transition: background-color 0.2s, color 0.2s; }

@media (prefers-reduced-motion: no-preference) {
  /* Headline: each word rises out of its own line */
  h1 .w {
    display: inline-block; overflow: hidden; vertical-align: top;
    padding-bottom: 0.14em; margin-bottom: -0.14em;
  }
  h1 .w > span { display: inline-block; animation: word-up 0.8s var(--ease) both; }
  h1 .w:nth-child(2) > span { animation-delay: 0.07s; }
  h1 .w:nth-child(3) > span { animation-delay: 0.14s; }
  h1 .w:nth-child(4) > span { animation-delay: 0.21s; }

  .rise { animation: rise 0.7s var(--ease) both; animation-delay: var(--d, 0s); }

  /* The phone slides up out of the pocket */
  .hero-panel { animation: rise 0.8s var(--ease) 0.2s both; }
  .hero-panel img { animation: pocket-up 1s cubic-bezier(0.2, 0.9, 0.25, 1.08) 0.55s both; }
  .hero-panel p { animation: rise 0.7s var(--ease) 1.05s both; }

  /* Scroll reveals (the .js class is set in the page head) */
  .js [data-reveal] {
    opacity: 0; transform: translateY(22px);
    transition: opacity 0.7s var(--ease) var(--d, 0s), transform 0.7s var(--ease) var(--d, 0s);
  }
  .js [data-reveal].in { opacity: 1; transform: none; }

  .js .steps li::before { transform: scaleX(0); transition: transform 0.9s var(--ease) var(--d, 0s); }
  .js .steps li.in::before { transform: scaleX(1); }

  .js h2::before { transition: width 0.6s var(--ease) 0.25s; }
  .js h2[data-reveal]:not(.in)::before,
  .js [data-reveal]:not(.in) h2::before { width: 0; }

  .chip.is-live::before { animation: blink 2.4s ease-in-out infinite; }
}

@keyframes word-up { from { transform: translateY(105%); } to { transform: none; } }
@keyframes rise { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: none; } }
@keyframes pocket-up { from { transform: translateY(125%); } to { transform: none; } }
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }

/* ---------- Wider screens ---------- */
@media (min-width: 640px) {
  .cards { grid-template-columns: 1fr 1fr; gap: 18px; }
  .card { padding: 30px 28px 26px; min-height: 250px; }
  .contact-list { grid-template-columns: 1fr 1fr; }
  .footer-row { grid-template-columns: 1fr auto; align-items: end; }
  .footer-side { text-align: right; }
  .social { justify-content: flex-end; margin: 0 -10px 12px 0; }
}

@media (min-width: 900px) {
  :root { --gutter: 40px; }
  body { font-size: 1.125rem; }
  .header-row { padding-top: 28px; padding-bottom: 28px; }
  .logo img { width: 168px; }
  nav { gap: 34px; }
  nav a { font-size: 1rem; }

  .hero { padding: 48px 0 104px; }
  .hero-grid { grid-template-columns: 1.35fr 1fr; gap: 56px; align-items: stretch; }
  .hero-copy { align-self: center; padding: 24px 0; }
  .lead { font-size: 1.3125rem; margin-top: 32px; }
  .hero-panel {
    flex-direction: column; align-items: flex-start; justify-content: space-between;
    min-height: 520px; padding: 28px 36px 36px 20px;
  }
  .hero-panel img { width: 230px; }
  .hero-panel p { text-align: left; font-size: 1.25rem; padding: 0 0 0 16px; }

  .section { padding: 104px 0; }
  .cards { margin-top: 52px; }
  .card h3 { font-size: 2.125rem; }

  .steps { grid-template-columns: repeat(3, 1fr); column-gap: 40px; margin-top: 56px; }
  .steps li { display: block; padding: 26px 0 0; }
  .step-no { display: block; font-size: 4rem; margin-bottom: 36px; }
  .steps h3 { font-size: 1.75rem; padding-top: 0; }

  .about {
    grid-template-columns: 1fr 1.6fr; column-gap: 56px; row-gap: 0;
    grid-template-areas: "head prose" "facts prose"; align-items: start;
  }
  .about h2 { grid-area: head; }
  .about .prose { grid-area: prose; }
  .about .facts { grid-area: facts; align-self: end; margin: 48px 0 6px; }
  .facts div { display: block; }
  .facts dd { text-align: left; margin-top: 2px; }
  .big { font-size: 2.5rem; line-height: 1.08; }
  .prose p + p { margin-top: 20px; }
  .contact { padding-top: 0; }
  .contact-panel { padding: 64px 56px; }
  .site-footer { padding-bottom: 56px; }
}
