/* imkatriina.com — design tokens + page styles
   Extracted from the desktop mockup (imkatriina Main Page.dc.html).
   Typography-led, warm neutral palette. Light default; dark mode block at the end. */

/* Self-hosted fonts (latin subset). No requests to Google. */
@font-face { font-family: "Newsreader"; font-style: normal; font-weight: 400 500; font-display: swap; src: url(/fonts/newsreader.woff2) format("woff2"); }
@font-face { font-family: "Newsreader"; font-style: italic; font-weight: 400; font-display: swap; src: url(/fonts/newsreader-italic.woff2) format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 400; font-display: swap; src: url(/fonts/ibm-plex-mono-400.woff2) format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 500; font-display: swap; src: url(/fonts/ibm-plex-mono-500.woff2) format("woff2"); }

/* ----------------------------------------------------------------
   1. Tokens
   ---------------------------------------------------------------- */
:root {
  /* Colour */
  --bg:            #f7f6f3;   /* page */
  --bg-sunk:       #f2efe9;   /* footer */
  --ink:           #1b1b19;   /* headlines, primary UI */
  --ink-body:      #3d3a36;   /* body copy */
  --ink-muted:     #6d6862;   /* meta, captions, nav */
  --ink-faint:     #706b60;   /* eyebrow labels — 4.6:1 on --bg-sunk (WCAG AA) */
  --rule:          #e8e4da;   /* section dividers */
  --rule-strong:   #cec9bd;   /* button + link borders */
  --placeholder-a: #eae6dc;   /* image stand-in stripe */
  --placeholder-b: #e2ddd1;
  --placeholder-edge: #ddd8cb;

  /* Type */
  --font-serif: "Newsreader", Georgia, "Times New Roman", serif;
  --font-sans:  "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-mono:  "IBM Plex Mono", ui-monospace, Menlo, monospace;

  --step-hero:    clamp(38px, 6.2vw, 62px);  /* h1 */
  --step-section: clamp(28px, 3.6vw, 38px);  /* h2 — featured work */
  --step-cta:     clamp(32px, 4.4vw, 44px);  /* h2 — contact */
  --step-lead:    22px;   /* serif lead paragraph (About) */
  --step-quote:   21px;   /* serif summary line ("Before that:") */
  --step-body:    16px;
  --step-body-lg: 16.5px;
  --step-small:   14.5px;
  --step-meta:    13.5px;
  --step-fine:    12.5px;
  --step-label:   11px;   /* mono eyebrow */

  --lh-tight: 1.04;
  --lh-head:  1.1;
  --lh-lead:  1.45;
  --lh-body:  1.62;

  --tracking-head:  -0.025em;
  --tracking-label:  0.1em;

  /* Space */
  --page-max:    1080px;
  --page-pad:    40px;
  --gutter:      40px;
  --label-col:   172px;
  --section-y:   58px;
  --hero-y:      76px;
  --stack:       17px;   /* gap between body paragraphs */
  --radius:      2px;
}

/* ----------------------------------------------------------------
   2. Base
   ---------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: var(--step-body);
  line-height: var(--lh-body);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--ink); }
a:hover { color: var(--ink-faint); }
::selection { background: var(--rule); }

h1, h2, h3 { font-weight: 400; margin: 0; text-wrap: pretty; }
p { margin: 0; text-wrap: pretty; }

h1 {
  font-family: var(--font-serif);
  font-size: var(--step-hero);
  line-height: var(--lh-tight);
  letter-spacing: var(--tracking-head);
  max-width: 15ch;
}

h2 {
  font-family: var(--font-serif);
  font-size: var(--step-section);
  line-height: var(--lh-head);
  letter-spacing: -0.02em;
}

h3 { font-size: 15px; letter-spacing: 0.01em; line-height: 1.3; }

/* ----------------------------------------------------------------
   3. Layout
   ---------------------------------------------------------------- */
.shell { max-width: var(--page-max); margin: 0 auto; padding: 0 var(--page-pad); }

.site-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 24px;
  padding-top: 28px;
}
.site-header .wordmark {
  font-family: var(--font-serif);
  font-size: 19px;
  letter-spacing: -0.01em;
  text-decoration: none;
  white-space: nowrap;
}
.site-nav { display: flex; gap: 26px; font-size: var(--step-fine); letter-spacing: 0.02em; }
.site-nav a { color: var(--ink-muted); text-decoration: none; }

.section { border-top: 1px solid var(--rule); padding: var(--section-y) 0; }

/* Two-column "label + content" rows. Flex, so they collapse on narrow screens. */
.row { display: flex; flex-wrap: wrap; gap: 28px var(--gutter); }
.row > .label-col { flex: 0 0 var(--label-col); }
.row > .content-col { flex: 1 1 420px; min-width: 0; }

.eyebrow {
  font-family: var(--font-mono);
  font-size: var(--step-label);
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  color: var(--ink-faint);
}
.meta { font-size: 13px; color: var(--ink-muted); line-height: 1.5; }
.role { font-size: var(--step-meta); color: var(--ink-muted); line-height: 1.5; }

.prose { display: flex; flex-direction: column; gap: var(--stack); max-width: 62ch; }
.prose p { font-size: var(--step-body); line-height: var(--lh-body); color: var(--ink-body); }

/* ----------------------------------------------------------------
   4. Hero
   ---------------------------------------------------------------- */
.hero {
  display: flex;
  flex-wrap: wrap;
  gap: 56px;
  align-items: flex-start;
  padding: var(--hero-y) 0 64px;
}
.hero__text { flex: 1 1 440px; min-width: 0; }
.hero__eyebrow { margin-bottom: 26px; }
.hero__sub {
  margin-top: 28px;
  max-width: 46ch;
  font-size: var(--step-body-lg);
  color: var(--ink-body);
}
.hero__proof {
  margin-top: 30px;
  padding-top: 22px;
  border-top: 1px solid var(--rule);
  max-width: 48ch;
  font-size: var(--step-meta);
  line-height: 1.55;
  color: var(--ink-muted);
}
.hero__photo {
  flex: 0 0 auto;
  width: clamp(160px, 50vw, 360px);
  height: clamp(160px, 50vw, 360px);
  margin: 0 auto;
  border-radius: 50%;
  overflow: hidden;
}
.hero__photo img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ----------------------------------------------------------------
   5. Buttons & links
   ---------------------------------------------------------------- */
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }

.btn {
  display: inline-flex;
  align-items: center;
  padding: 13px 22px;
  font-size: 14px;
  letter-spacing: 0.01em;
  text-decoration: none;
  border-radius: var(--radius);
  white-space: nowrap;
}
.btn--solid { background: var(--ink); color: var(--bg); }
.btn--solid:hover { background: var(--ink-body); color: var(--bg); }
.btn--ghost { border: 1px solid var(--rule-strong); color: var(--ink); }
.btn--ghost:hover { border-color: var(--ink); color: var(--ink); }

.link-row { display: flex; flex-wrap: wrap; gap: 26px; margin-top: 22px; font-size: var(--step-small); }
.link-underline { text-decoration: none; border-bottom: 1px solid var(--ink); padding-bottom: 2px; }
.link-quiet { text-decoration: none; color: var(--ink-muted); border-bottom: 1px solid var(--rule-strong); padding-bottom: 2px; }
.link-inline { color: var(--ink); text-decoration: none; border-bottom: 1px solid #b7b1a4; }

/* ----------------------------------------------------------------
   6. Lists
   ---------------------------------------------------------------- */
.list { display: flex; flex-direction: column; gap: 12px; max-width: 62ch; padding: 0; margin: 0; list-style: none; }
.list li { position: relative; padding-left: 18px; font-size: var(--step-body); line-height: var(--lh-body); color: var(--ink-body); }
.list li::before { content: "–"; position: absolute; left: 0; color: var(--ink-faint); }
.list strong { color: var(--ink); font-weight: 500; }

/* ----------------------------------------------------------------
   7. Cards ("Also founded", "Internal tools")
   ---------------------------------------------------------------- */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
  gap: 20px;
}
.card {
  padding: 24px;
  background: var(--bg-sunk);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
}
.card h3 { font-family: var(--font-serif); font-size: 18px; }
.card__meta {
  margin-top: 6px;
  font-family: var(--font-mono);
  font-size: var(--step-label);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-faint);
  line-height: 1.5;
}
.card p:not(.card__meta) { margin-top: 14px; font-size: var(--step-small); line-height: 1.6; color: var(--ink-body); }

/* ----------------------------------------------------------------
   8. About
   ---------------------------------------------------------------- */
.about__body { display: flex; flex-direction: column; gap: var(--stack); max-width: 60ch; }
.about__body p { font-size: var(--step-body); line-height: var(--lh-body); color: var(--ink-body); }

/* ----------------------------------------------------------------
   9. Contact + footer
   ---------------------------------------------------------------- */
.contact { padding: 64px 0 70px; }
.contact h2 { font-size: var(--step-cta); line-height: 1.08; max-width: 22ch; }
.contact p { margin-top: 22px; max-width: 54ch; font-size: var(--step-body-lg); color: var(--ink-body); }
.contact p.meta { margin-top: 18px; font-size: 13px; color: var(--ink-muted); }

.contact-dialog {
  width: min(560px, calc(100% - 32px)); max-height: calc(100% - 32px);
  padding: 28px; border: 1px solid var(--rule-strong); border-radius: var(--radius);
  background: var(--bg); color: var(--ink);
}
.contact-dialog::backdrop { background: rgb(27 27 25 / 0.55); }
.contact-dialog__head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; }
.contact-dialog__head h2 { font-size: var(--step-section); }
.contact-dialog__close { background: none; border: 0; padding: 4px 8px; font-size: 28px; line-height: 1; color: var(--ink-muted); cursor: pointer; }
.contact-dialog__close:hover { color: var(--ink); }
.contact-form { margin-top: 24px; display: grid; gap: 18px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.form-field { display: flex; flex-direction: column; gap: 6px; }
.form-field label { font-family: var(--font-mono); font-size: var(--step-label); letter-spacing: var(--tracking-label); text-transform: uppercase; color: var(--ink-faint); }
.form-field input, .form-field textarea {
  font: inherit; font-size: var(--step-body); color: var(--ink);
  background: transparent; border: 1px solid var(--rule-strong); border-radius: var(--radius);
  padding: 10px 12px;
}
.form-field input:focus, .form-field textarea:focus { outline: 2px solid var(--ink); outline-offset: 1px; }
.form-field textarea { resize: vertical; }
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.contact-form .btn { justify-self: start; cursor: pointer; border: 0; font-family: inherit; }
.contact-form .form-note { font-size: var(--step-fine); color: var(--ink-muted); }
.contact-form .form-error { font-size: var(--step-small); color: #a3341f; }
.contact .btn { cursor: pointer; border: 0; font-family: inherit; }
@media (max-width: 600px) { .form-row { grid-template-columns: 1fr; } }

.site-footer nav { display: flex; gap: 20px; }

/* Legal pages */
.legal { padding: var(--hero-y) 0 var(--section-y); max-width: 64ch; }
.legal h1 { font-size: var(--step-section); }
.legal h2 { font-size: 20px; margin-top: 36px; }
.legal p { margin-top: 12px; color: var(--ink-body); }

.site-footer { border-top: 1px solid var(--rule); background: var(--bg-sunk); }
.site-footer__inner {
  display: flex;
  flex-wrap: wrap;
  gap: 20px var(--gutter);
  justify-content: space-between;
  align-items: baseline;
  padding: 28px var(--page-pad) 36px;
  max-width: var(--page-max);
  margin: 0 auto;
  font-size: var(--step-fine);
  line-height: 1.6;
  color: var(--ink-muted);
}
.site-footer a { color: var(--ink); text-decoration: none; border-bottom: 1px solid var(--rule-strong); }

/* ----------------------------------------------------------------
   10. Image component
   Photos swap via one config object; these styles hold either way.
   .photo--placeholder is the striped stand-in used in the mockup.
   ---------------------------------------------------------------- */
.photo { position: relative; aspect-ratio: 4 / 5; overflow: hidden; }
.photo img { width: 100%; height: 100%; object-fit: cover; display: block; }

.photo--placeholder {
  background: repeating-linear-gradient(135deg,
    var(--placeholder-a) 0 6px, var(--placeholder-b) 6px 12px);
  border: 1px solid var(--placeholder-edge);
  display: flex;
  align-items: flex-end;
  padding: 14px;
}
.photo--placeholder span {
  font-family: var(--font-mono);
  font-size: 10.5px;
  line-height: 1.5;
  color: var(--ink-muted);
  background: var(--bg);
  padding: 6px 8px;
}


/* ----------------------------------------------------------------
   How I work — intro + three numbered steps
   ---------------------------------------------------------------- */
.how__grid { display: flex; flex-wrap: wrap; gap: 36px var(--gutter) ; }
.how__intro { flex: 1 1 300px; min-width: 0; }
.how__intro h2 { margin-top: 18px; }
.how__lead { margin-top: 22px; max-width: 42ch; font-size: var(--step-body-lg); line-height: var(--lh-body); color: var(--ink-body); }
.how__steps { flex: 1 1 380px; min-width: 0; margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--rule-strong); }
.how__step { display: flex; gap: 22px; padding: 22px 0; border-bottom: 1px solid var(--rule); }
.how__num { flex: 0 0 auto; padding-top: 3px; font-family: var(--font-mono); font-size: var(--step-label); letter-spacing: var(--tracking-label); color: var(--ink-faint); }
.how__body h3 { font-family: var(--font-serif); font-size: 20px; color: var(--ink); }
.how__body p { margin-top: 8px; font-size: var(--step-small); line-height: 1.6; color: var(--ink-body); }

/* ----------------------------------------------------------------
   11. Dark mode (optional; light is default)
   ---------------------------------------------------------------- */
@media (prefers-color-scheme: dark) {
  :root[data-theme="auto"] {
    --bg:            #17181a;
    --bg-sunk:       #121315;
    --ink:           #f2f0eb;
    --ink-body:      #d8d4cd;
    --ink-muted:     #9b968e;
    --ink-faint:     #8a8578;
    --rule:          #2a2b2d;
    --rule-strong:   #3c3d3f;
    --placeholder-a: #232426;
    --placeholder-b: #1d1e20;
    --placeholder-edge: #2f3032;
  }
}

/* ----------------------------------------------------------------
   12. Motion / print
   ---------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

@media print {
  .site-nav, .actions { display: none; }
  body { background: #fff; }
}
