/* Telemedico - public site. Tokens on :root, dark set under prefers-color-scheme (PORTFOLIO 2.11);
   no hard-coded colours outside this block. Fonts self-hosted (Inter, OFL; woff2 conversion = webpage 0.3). */

@font-face {
  font-family: 'Inter';
  src: url('/assets/fonts/Inter-Regular.ttf') format('truetype');
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: 'Inter';
  src: url('/assets/fonts/Inter-SemiBold.ttf') format('truetype');
  font-weight: 600;
  font-display: swap;
}

:root {
  color-scheme: light dark;
  --bg: #F4F8F7;
  --surface: #FFFFFF;
  --ink: #15201E;
  --muted: #4E615D;
  --accent: #0F766E;
  --on-accent: #FFFFFF;
  --border: #D6E2DF;
  --focus-ring: #0F766E;
  --focus-halo: #F4F8F7;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0F1B19;
    --surface: #172623;
    --ink: #EAF2F0;
    --muted: #A9BDB8;
    --accent: #5EEAD4;
    --on-accent: #06302B;
    --border: #2A3B38;
    --focus-ring: #5EEAD4;
    --focus-halo: #0F1B19;
  }
}
:root[data-theme="dark"] {
  --bg: #0F1B19;
  --surface: #172623;
  --ink: #EAF2F0;
  --muted: #A9BDB8;
  --accent: #5EEAD4;
  --on-accent: #06302B;
  --border: #2A3B38;
  --focus-ring: #5EEAD4;
  --focus-halo: #0F1B19;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; box-shadow: 0 0 0 4px var(--focus-halo); }
.skip-link {
  position: absolute; left: -999px; top: 8px; z-index: 100;
  background: var(--accent); color: var(--on-accent); padding: 8px 14px; border-radius: 8px; font-weight: 600;
}
.skip-link:focus { left: 8px; }

body {
  margin: 0;
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.55;
  overflow-wrap: break-word;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-underline-offset: 0.2em; }
img, svg { max-width: 100%; height: auto; }
.wrap { max-width: 880px; margin: 0 auto; padding: 0 16px; }

.site-header { border-bottom: 1px solid var(--border); }
.nav-row { display: flex; align-items: center; justify-content: space-between; min-height: 64px; }
/* Wordmark images (brand/, scripts/brand-assets.py): light / dark variant via <picture> media. */
.brand { display: inline-flex; align-items: center; min-height: 48px; border-radius: 8px; text-decoration: none; }
.brand img { display: block; height: 32px; width: auto; }
.lang-switch { display: flex; gap: 4px; list-style: none; margin: 0; padding: 0; }
.lang-switch a {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 48px; min-height: 48px; padding: 0 8px;
  border-radius: 12px; text-decoration: none; font-weight: 600; color: var(--muted);
}
.lang-switch a.active { color: var(--ink); background: var(--surface); border: 1px solid var(--border); box-shadow: inset 0 -3px 0 var(--accent); }

h1, h2, h3 { font-weight: 600; line-height: 1.15; }
h1 { font-size: clamp(2rem, 6vw, 2.75rem); letter-spacing: -0.01em; margin: 0 0 0.5em; }
h2 { font-size: clamp(1.6rem, 4.5vw, 2rem); margin: 0 0 0.6em; }
h3 { font-size: 1.2rem; margin: 0 0 0.3em; }
.hero { padding: 72px 0 40px; }
.section { padding: 24px 0 72px; }
.lead { font-size: 1.15rem; max-width: 38em; }
.note { color: var(--muted); max-width: 38em; }

.cards { list-style: none; padding: 0; margin: 24px 0; display: grid; gap: 16px; }
@media (min-width: 720px) { .cards { grid-template-columns: repeat(3, 1fr); } }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 20px; }
.card p { margin: 0; color: var(--muted); }

.button {
  display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 22px;
  border-radius: 999px; border: 1px solid transparent; background: var(--accent); color: var(--on-accent);
  font: inherit; font-weight: 600; text-decoration: none; cursor: pointer;
}

.site-footer { border-top: 1px solid var(--border); padding: 24px 0; color: var(--muted); font-size: 0.9rem; }
.site-footer p { margin: 0 0 6px; }

@media (forced-colors: active) {
  :focus-visible { outline: 3px solid Highlight; }
  .lang-switch a.active, .card, .button { border: 2px solid CanvasText; }
}
@media print {
  .site-header, .site-footer, .skip-link { display: none; }
  body { background: #fff; color: #000; }
}

/* Mail-link forms (webpage 1.5) */
.form label { font-weight: 600; }
.form input[type="password"] {
  width: 100%; max-width: 22em; min-height: 48px; padding: 0 14px; margin-top: 6px; font: inherit;
  color: var(--ink); background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
}

/* Info pages (webpage 1.4) */
.prose { max-width: 42em; }
.prose h2 { font-size: 1.35rem; margin: 1.6em 0 0.4em; }
.prose p { margin: 0 0 1em; }
.placeholder-banner {
  max-width: 38em; margin: 1.2em 0 0; padding: 12px 16px; border: 1px dashed var(--accent);
  border-radius: 12px; background: var(--surface); color: var(--ink);
}
.footer-links { list-style: none; margin: 0 0 12px; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 20px; }
.footer-links a { display: inline-flex; align-items: center; min-height: 44px; }
