/* =============================================
   innmedi.eu — Main Stylesheet
   ============================================= */

/* --- Design tokens --- */
:root {
  --text-xs: clamp(0.75rem, .7rem + .25vw, .875rem);
  --text-sm: clamp(.875rem, .8rem + .35vw, 1rem);
  --text-base: clamp(1rem, .95rem + .25vw, 1.125rem);
  --text-lg: clamp(1.125rem, 1rem + .75vw, 1.5rem);
  --text-xl: clamp(1.5rem, 1.2rem + 1.25vw, 2.25rem);
  --text-2xl: clamp(2rem, 1.2rem + 2.5vw, 3.5rem);
  --text-3xl: clamp(2.5rem, 1rem + 4vw, 5rem);

  --s1: .25rem;  --s2: .5rem;   --s3: .75rem;  --s4: 1rem;
  --s5: 1.25rem; --s6: 1.5rem;  --s8: 2rem;    --s10: 2.5rem;
  --s12: 3rem;   --s16: 4rem;   --s20: 5rem;   --s24: 6rem;

  --r-sm: .375rem; --r-md: .5rem; --r-lg: .75rem;
  --r-xl: 1rem;    --r-full: 9999px;

  --tr: 180ms cubic-bezier(.16, 1, .3, 1);

  /* Layout widths — wider on desktop */
  --cw: min(1400px, 94vw);
  --cw-wide: min(1600px, 96vw);
  --cw-narrow: 680px;

  --font-d: 'Instrument Serif', Georgia, serif;
  --font-b: 'DM Sans', 'Helvetica Neue', sans-serif;
}

/* --- Colour themes --- */
:root, [data-theme="light"] {
  --bg: #f5f4f0; --surf: #f8f7f4; --surf2: #fafaf8;
  --surf-off: #ece9e3; --div: #dbd8d2; --brd: #d2cfc8;
  --tx: #1a1915; --tx-m: #68675f; --tx-f: #b2b0aa; --tx-inv: #fff;
  --acc: #01696f; --acc-h: #0c4e54; --acc-lit: #d0e8e7; --acc-dim: #e4f2f1;
  --sh-sm: 0 1px 2px oklch(.2 .01 80 / .06);
  --sh-md: 0 4px 12px oklch(.2 .01 80 / .08);
  --sh-lg: 0 12px 32px oklch(.2 .01 80 / .12);
}
[data-theme="dark"] {
  --bg: #0d0c0b; --surf: #131211; --surf2: #191816;
  --surf-off: #1e1d1b; --div: #282624; --brd: #323028;
  --tx: #e2dfd9; --tx-m: #888680; --tx-f: #4e4c49; --tx-inv: #0d0c0b;
  --acc: #4f98a3; --acc-h: #227f8b; --acc-lit: #1e3c3f; --acc-dim: #162a2d;
  --sh-sm: 0 1px 2px oklch(0 0 0 / .25);
  --sh-md: 0 4px 12px oklch(0 0 0 / .35);
  --sh-lg: 0 12px 32px oklch(0 0 0 / .5);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    --bg: #0d0c0b; --surf: #131211; --surf2: #191816;
    --surf-off: #1e1d1b; --div: #282624; --brd: #323028;
    --tx: #e2dfd9; --tx-m: #888680; --tx-f: #4e4c49; --tx-inv: #0d0c0b;
    --acc: #4f98a3; --acc-h: #227f8b; --acc-lit: #1e3c3f; --acc-dim: #162a2d;
    --sh-sm: 0 1px 2px oklch(0 0 0 / .25);
    --sh-md: 0 4px 12px oklch(0 0 0 / .35);
    --sh-lg: 0 12px 32px oklch(0 0 0 / .5);
  }
}

/* --- Reset & base --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  scroll-padding-top: var(--s16);
}
body {
  min-height: 100dvh;
  font-family: var(--font-b);
  font-size: var(--text-base);
  color: var(--tx);
  background: var(--bg);
  line-height: 1.65;
}
img, svg { display: block; max-width: 100%; height: auto; }
ul[role=list], ol[role=list] { list-style: none; }
h1, h2, h3, h4 { text-wrap: balance; line-height: 1.15; }
p, li { text-wrap: pretty; }
button { cursor: pointer; background: none; border: none; font: inherit; color: inherit; }
a, button, [role=button] {
  transition: color var(--tr), background var(--tr),
              border-color var(--tr), box-shadow var(--tr);
}
:focus-visible {
  outline: 2px solid var(--acc);
  outline-offset: 3px;
  border-radius: var(--r-sm);
}
::selection { background: oklch(from var(--acc) l c h / .22); color: var(--tx); }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
}

/* --- Skip link --- */
.skip {
  position: absolute; top: -999px; left: 1rem;
  background: var(--acc); color: var(--tx-inv);
  padding: .5rem 1rem; border-radius: var(--r-md);
  font-size: var(--text-sm); z-index: 9999;
}
.skip:focus { top: 1rem; }

/* --- Layout containers --- */
.container {
  width: 100%;
  max-width: var(--cw);
  margin-inline: auto;
  padding-inline: var(--s8);
}
.container--wide {
  width: 100%;
  max-width: var(--cw-wide);
  margin-inline: auto;
  padding-inline: var(--s8);
}
.container--narrow {
  width: 100%;
  max-width: var(--cw-narrow);
  margin-inline: auto;
  padding-inline: var(--s8);
}
section { padding-block: clamp(var(--s12), 7vw, var(--s24)); }

/* --- Header --- */
.header {
  position: sticky; top: 0; z-index: 100;
  background: oklch(from var(--bg) l c h / .88);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--div);
}
.header .container { max-width: var(--cw-wide); }
.header-inner {
  display: flex; align-items: center;
  justify-content: space-between;
  padding-block: var(--s4); gap: var(--s8);
}
.logo { display: flex; align-items: center; gap: var(--s3); text-decoration: none; color: var(--tx); }
.logo-name { font-family: var(--font-d); font-size: var(--text-lg); letter-spacing: -.02em; }
.logo-tag { font-size: var(--text-xs); color: var(--tx-m); letter-spacing: .04em; text-transform: uppercase; margin-top: 1px; }
nav { display: flex; align-items: center; gap: var(--s6); }
nav a { font-size: var(--text-sm); color: var(--tx-m); text-decoration: none; }
nav a:hover { color: var(--tx); }
.theme-btn {
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  color: var(--tx-m); border-radius: var(--r-md);
}
.theme-btn:hover { color: var(--tx); background: var(--surf-off); }

/* --- Hero --- */
.hero {
  padding-block: clamp(var(--s16), 10vw, var(--s24));
  position: relative; overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(ellipse 60% 55% at 65% 40%,
    oklch(from var(--acc) l c h / .08) 0%, transparent 70%);
  pointer-events: none;
}
.hero-inner {
  display: grid;
  grid-template-columns: 1fr;
  max-width: var(--cw-narrow);
  gap: var(--s16);
  align-items: center;
}
.hero-kicker {
  display: inline-flex; align-items: center; gap: var(--s2);
  font-size: var(--text-xs); text-transform: uppercase;
  letter-spacing: .1em; color: var(--acc);
  margin-bottom: var(--s5); padding: .3rem .8rem;
  border: 1px solid oklch(from var(--acc) l c h / .3);
  border-radius: var(--r-full);
}
.hero-kicker::before {
  content: ''; width: 6px; height: 6px;
  border-radius: 50%; background: var(--acc);
}
.hero h1 {
  font-family: var(--font-d); font-size: var(--text-3xl);
  line-height: 1.08; letter-spacing: -.03em; margin-bottom: var(--s6);
}
.hero h1 em { font-style: italic; color: var(--acc); }
.hero-desc {
  font-size: var(--text-lg); color: var(--tx-m);
  line-height: 1.6; margin-bottom: var(--s8);
  max-width: 52ch;
}
.hero-cta { display: flex; gap: var(--s4); flex-wrap: wrap; }


/* --- Buttons --- */
.btn {
  display: inline-flex; align-items: center; gap: var(--s2);
  padding: .65rem 1.35rem; border-radius: var(--r-md);
  font-size: var(--text-sm); font-weight: 500; text-decoration: none;
}
.btn-primary { background: var(--acc); color: var(--tx-inv); }
.btn-primary:hover { background: var(--acc-h); box-shadow: var(--sh-md); }
.btn-ghost { background: transparent; color: var(--tx); border: 1px solid var(--brd); }
.btn-ghost:hover { background: var(--surf-off); border-color: var(--tx-m); }

/* --- Section labels / headings --- */
.section-label {
  display: flex; align-items: center; gap: var(--s2);
  font-size: var(--text-xs); text-transform: uppercase;
  letter-spacing: .1em; color: var(--acc); margin-bottom: var(--s5);
}
.section-label::before { content: ''; width: 20px; height: 1px; background: var(--acc); }
.section-heading {
  font-family: var(--font-d); font-size: var(--text-2xl);
  letter-spacing: -.025em; margin-bottom: var(--s4); line-height: 1.1;
}
.section-sub {
  font-size: var(--text-base); color: var(--tx-m);
  max-width: 68ch; line-height: 1.7; margin-bottom: var(--s10);
}

/* --- About --- */
.about-body { max-width: 80ch; }
.about-body p { color: var(--tx-m); line-height: 1.8; margin-bottom: var(--s4); }
.about-body p:last-child { margin-bottom: 0; }

/* --- Expertise grid --- */
.expertise { background: var(--surf); }
.expertise-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--s4);
}
.exp-card {
  background: var(--bg); border: 1px solid var(--brd);
  border-radius: var(--r-xl); padding: var(--s8);
  transition: box-shadow var(--tr), border-color var(--tr);
}
.exp-card:hover {
  box-shadow: var(--sh-md);
  border-color: oklch(from var(--acc) l c h / .3);
}
.exp-icon { width: 40px; height: 40px; margin-bottom: var(--s5); color: var(--acc); }
.exp-title { font-weight: 600; font-size: var(--text-base); margin-bottom: var(--s3); }
.exp-body { font-size: var(--text-sm); color: var(--tx-m); line-height: 1.75; }

/* --- Applications grid --- */
.apps-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--s4);
}
.app-item {
  display: flex; gap: var(--s4);
  background: var(--surf); border: 1px solid var(--brd);
  border-radius: var(--r-xl); padding: var(--s6);
}
.app-icon { width: 36px; height: 36px; flex-shrink: 0; color: var(--acc); }
.app-title { font-weight: 600; margin-bottom: var(--s2); font-size: var(--text-base); }
.app-body { font-size: var(--text-sm); color: var(--tx-m); line-height: 1.7; }

/* --- Contact --- */
.contact-bg { background: var(--surf); }
.contact-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s16); align-items: start;
}
.contact-info { display: flex; flex-direction: column; gap: var(--s6); }
.contact-row { display: flex; align-items: flex-start; gap: var(--s4); }
.contact-icon { width: 36px; height: 36px; flex-shrink: 0; color: var(--acc); }
.contact-label {
  font-size: var(--text-xs); text-transform: uppercase;
  letter-spacing: .07em; color: var(--tx-m); margin-bottom: var(--s1);
}
.contact-val { font-size: var(--text-base); }
.contact-val a { color: var(--tx); text-decoration: none; }
.contact-val a:hover { color: var(--acc); }
.domain-list { display: flex; flex-wrap: wrap; gap: var(--s2); margin-top: var(--s3); }
.domain-pill {
  font-size: var(--text-xs); padding: .3rem .75rem;
  border-radius: var(--r-full); background: var(--bg);
  border: 1px solid var(--brd); color: var(--tx-m);
}
.domain-pill--main {
  background: var(--acc-dim);
  border-color: oklch(from var(--acc) l c h / .3);
  color: var(--acc); font-weight: 600;
}
.contact-card {
  background: var(--bg); border: 1px solid var(--brd);
  border-radius: var(--r-xl); padding: var(--s8); box-shadow: var(--sh-md);
}
.contact-card h3 { font-family: var(--font-d); font-size: var(--text-xl); margin-bottom: var(--s4); }
.contact-card p { font-size: var(--text-sm); color: var(--tx-m); line-height: 1.75; margin-bottom: var(--s4); }
.contact-card p:last-of-type { margin-bottom: var(--s6); }
.collab-tags { display: flex; flex-wrap: wrap; gap: var(--s2); }
.collab-tag {
  font-size: var(--text-xs); padding: .3rem .75rem;
  border-radius: var(--r-full);
  background: var(--acc-dim);
  border: 1px solid oklch(from var(--acc) l c h / .2);
  color: var(--acc);
}

/* --- Footer --- */
footer {
  border-top: 1px solid var(--div);
  padding-block: var(--s8);
}
.footer-inner {
  display: flex; align-items: center;
  justify-content: space-between; flex-wrap: wrap; gap: var(--s4);
}
.footer-copy { font-size: var(--text-xs); color: var(--tx-f); }

/* --- Email obfuscation --- */
.contact-jit-fallback { color: var(--tx-m); font-size: var(--text-sm); }
.contact-jit a { color: var(--tx); text-decoration: none; }
.contact-jit a:hover { color: var(--acc); }

/* =============================================
   Responsive breakpoints
   ============================================= */

/* Wide desktop (1400px+): bump expertise to 3 cols with more breathing room */
@media (min-width: 1400px) {
  .expertise-grid { grid-template-columns: repeat(3, 1fr); gap: var(--s6); }
  .apps-grid      { grid-template-columns: repeat(4, 1fr); }
}

/* Tablet landscape / small desktop (900px–1399px) */
@media (max-width: 1399px) and (min-width: 901px) {
  .expertise-grid { grid-template-columns: repeat(3, 1fr); }
  .apps-grid      { grid-template-columns: repeat(2, 1fr); }
}

/* Tablet portrait (600px–900px) */
@media (max-width: 900px) {
  .hero-inner, .contact-layout { grid-template-columns: 1fr; }
  .expertise-grid { grid-template-columns: repeat(2, 1fr); }
  .apps-grid      { grid-template-columns: repeat(2, 1fr); }
  .container, .container--wide { padding-inline: var(--s6); }
}

/* Mobile (≤600px) */
@media (max-width: 600px) {
  .expertise-grid, .apps-grid { grid-template-columns: 1fr; }
  nav { display: none; }
  .container, .container--wide { padding-inline: var(--s4); }
  .contact-layout { gap: var(--s8); }
}
