/* ── Font Face ────────────────────────────────── */
@font-face {
  font-family: 'Outfit';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('/fonts/outfit-latin.woff2') format('woff2');
}
@font-face {
  font-family: 'Source Sans 3';
  font-style: normal;
  font-weight: 200 900;
  font-display: swap;
  src: url('/fonts/source-sans-3-latin.woff2') format('woff2');
}

/* ── Reset & Base ─────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --color-bg: #ffffff;
  --color-text: #1a1a1a;
  --color-muted: #666;
  --color-accent: #0055cc;
  --color-accent-hover: #003d99;
  --color-border: #e0e0e0;
  --color-card-bg: #f9f9f9;
  --font-sans: 'Source Sans 3', system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-heading: 'Outfit', system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: "SFMono-Regular", Consolas, monospace;
  --max-width: 900px;
  --spacing: 1.5rem;
}

h1, h2, h3, h4 { font-family: var(--font-heading); }

html { font-size: 18px; }

body {
  font-family: var(--font-sans);
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.7;
}

a { color: var(--color-accent); text-decoration: none; }
a:hover { color: var(--color-accent-hover); text-decoration: underline; }

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

/* ── Layout ───────────────────────────────────── */
header, main, footer {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--spacing);
}

main { padding-top: 2rem; padding-bottom: 4rem; min-height: 60vh; }

/* ── Header / Nav ─────────────────────────────── */
.site-header {
  display: flex;
  align-items: flex-end;
  gap: 2rem;
  padding: 1.2rem 0;
  border-bottom: 1px solid var(--color-border);
  flex-wrap: wrap;
}

.site-title {
  text-decoration: none;
}

.site-logo {
  height: 60px;
  width: auto;
  display: block;
}

nav { display: flex; gap: 1.2rem; margin-left: auto; }
nav a { color: var(--color-text); font-size: 0.9rem; font-weight: 500; }
nav a:hover { color: var(--color-accent); text-decoration: none; }

.lang-bar { display: flex; justify-content: flex-end; padding-top: 0.5rem; }
.lang-switcher { display: flex; gap: 0.4rem; align-items: center; }
.lang-switcher a { display: flex; line-height: 0; }
.lang-icon .bubble { stroke: transparent; transition: stroke 0.2s; }
.lang-icon .bubble-text { fill: var(--color-muted); transition: fill 0.2s; }
.lang-switcher a.active .bubble { stroke: var(--color-accent); }
.lang-switcher a.active .bubble-text { fill: var(--color-accent); }
.lang-switcher a:hover .bubble { stroke: var(--color-muted); }
.lang-switcher a:hover .bubble-text { fill: var(--color-accent); }
.lang-switcher a:hover { text-decoration: none; }

/* ── Footer ───────────────────────────────────── */
footer {
  border-top: 1px solid var(--color-border);
  padding-top: 1rem;
  padding-bottom: 1.5rem;
  font-size: 0.85rem;
  color: var(--color-muted);
  margin-top: 3rem;
}
footer .footer-reg {
  font-size: 0.75rem;
  margin-top: 0.25rem;
}

/* ── Hero ─────────────────────────────────────── */
.hero { padding: 1.5rem 0 2rem; }
.hero h1 { font-size: clamp(1.75rem, 3.4vw, 2.4rem); line-height: 1.2; margin-bottom: 1rem; }
.hero-content p { font-size: 1.1rem; color: var(--color-muted); max-width: 600px; }

.hero-eyebrow {
  font-size: 0.82rem; font-weight: 600; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--color-accent); margin-bottom: 0.6rem;
}
.hero-cta { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.15rem; }
.hero-cta .btn { margin-top: 0; }
.hero-proof { margin-top: 1.1rem; font-size: 0.9rem; color: var(--color-muted); }
.hero-micro { margin-top: 0.4rem; font-size: 0.82rem; color: var(--color-muted); }

/* The drawing leads the page and spans the full content measure. */
.hero-figure { margin: 0 0 1.25rem; }
.hero-figure img, .hero-figure video {
  width: 100%; height: auto; display: block; border-radius: 4px;
}
.hero-figure figcaption {
  margin-top: 0.7rem; font-size: 1rem; line-height: 1.5; color: var(--color-muted);
}

.card-price { font-size: 0.85rem; font-weight: 600; color: var(--color-accent); margin-top: 0.4rem; }

/* ── Home Sections ────────────────────────────── */
.home-section { margin-top: 3rem; }
.home-section h2 { font-size: 1.4rem; margin-bottom: 1.2rem; border-bottom: 2px solid var(--color-border); padding-bottom: 0.5rem; }

/* ── Post List ────────────────────────────────── */
.post-group-title { margin-top: 2rem; margin-bottom: 0.5rem; }
.guide-grid { margin-bottom: 2rem; }
.card-body .card-meta { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 0.5rem; }
.post-list { list-style: none; }
.os-tag { background: var(--color-card-bg); border: 1px solid var(--color-border); border-radius: 999px; color: var(--color-muted); font-size: 0.72rem; line-height: 1; padding: 0.25em 0.7em; white-space: nowrap; }
.post-list li { padding: 0.5rem 0; border-bottom: 1px solid var(--color-border); display: flex; gap: 1rem; align-items: baseline; flex-wrap: wrap; }
.post-date { color: var(--color-muted); font-size: 0.85rem; white-space: nowrap; }
.scope { color: var(--color-muted); font-size: 0.9rem; }

/* ── Cards (Portfolio grid) ───────────────────── */
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1.5rem; margin-top: 1rem; }
/* Equal columns that stay equal as services are added — 2 up at two
   services, 3 up at three, rather than orphaning the last card. */
.card-grid.services-grid { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }

.card {
  border: 1px solid var(--color-border);
  border-radius: 8px;
  overflow: hidden;
  background: var(--color-card-bg);
  text-decoration: none;
  color: var(--color-text);
  transition: box-shadow 0.2s;
  display: flex;
  flex-direction: column;
}
.card:hover { box-shadow: 0 4px 16px rgba(0,0,0,0.1); text-decoration: none; }
.card img { width: 100%; height: 180px; object-fit: cover; }
.card-body { padding: 1rem; }
.card-body h2 { font-size: 1.2rem; margin-bottom: 0.3rem; }
.card-body h3 { font-size: 1rem; margin-bottom: 0.3rem; }
.card-body .scope { font-size: 0.85rem; color: var(--color-muted); }
.card-body .url { font-size: 0.8rem; color: var(--color-muted); word-break: break-all; }

/* ── Buttons ──────────────────────────────────── */
.btn {
  display: inline-block;
  margin-top: 1rem;
  padding: 0.5rem 1.2rem;
  border: 1px solid var(--color-accent);
  border-radius: 4px;
  color: var(--color-accent);
  font-size: 0.9rem;
  transition: background 0.2s, color 0.2s;
}
.btn:hover { background: var(--color-accent); color: #fff; text-decoration: none; }
.btn-primary { background: var(--color-accent); color: #fff; }
.btn-primary:hover { background: var(--color-accent-hover); }
.btn-lg { font-size: 1.05rem; padding: 0.8rem 1.6rem; }

/* ── Article ──────────────────────────────────── */
.article-header { margin-bottom: 2rem; }
.article-header h1 { font-size: 2rem; line-height: 1.2; }
.article-meta { color: var(--color-muted); font-size: 0.9rem; margin-top: 0.4rem; }
.featured-image { border-radius: 8px; margin-bottom: 2rem; width: 100%; }

.article-content h2 { font-size: 1.4rem; margin: 2rem 0 0.8rem; }
.article-content h3 { font-size: 1.1rem; margin: 1.5rem 0 0.5rem; }
.article-content p { margin-bottom: 1rem; }
.article-content ul, .article-content ol { margin: 0 0 1rem 1.5rem; }
.article-content li { margin-bottom: 0.3rem; }
.article-content blockquote { border-left: 4px solid var(--color-border); padding-left: 1rem; color: var(--color-muted); margin: 1rem 0; }
.article-content code { font-family: var(--font-mono); font-size: 0.85em; background: #f3f3f3; padding: 0.1em 0.3em; border-radius: 3px; }
.article-content pre { background: #1e1e1e; color: #d4d4d4; padding: 1rem; border-radius: 6px; overflow-x: auto; margin-bottom: 1rem; }
.article-content pre code { background: none; padding: 0; }

/* ── Contact Form ─────────────────────────────── */
.contact-form { max-width: 560px; margin-top: 2rem; }
.form-group { margin-bottom: 1.2rem; }
.form-group label { display: block; font-weight: 500; margin-bottom: 0.4rem; font-size: 0.9rem; }
.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.6rem 0.8rem;
  border: 1px solid var(--color-border);
  border-radius: 4px;
  font-family: var(--font-sans);
  font-size: 1rem;
  background: #fff;
  transition: border-color 0.2s;
}
.form-group input:focus,
.form-group textarea:focus { outline: none; border-color: var(--color-accent); }
.form-group textarea { resize: vertical; }
.form-group input.is-invalid,
.form-group textarea.is-invalid { border-color: #e53e3e; }
.field-error { display: block; color: #e53e3e; font-size: 0.82rem; margin-top: 0.3rem; }
.form-alert { padding: 0.8rem 1rem; border-radius: 4px; margin-bottom: 1.2rem; font-size: 0.9rem; }
.form-alert.error { background: #fff5f5; border: 1px solid #fed7d7; color: #c53030; }
.form-alert.success { background: #f0fff4; border: 1px solid #c6f6d5; color: #276749; }

/* ── Domain helper (change-your-password post) ── */
.domain-helper { background: var(--color-card-bg); border: 1px solid var(--color-border); border-radius: 6px; padding: 1rem 1.2rem; margin: 1.5rem 0; max-width: 420px; }
.domain-helper label { display: block; font-weight: 500; margin-bottom: 0.4rem; font-size: 0.9rem; }
.domain-helper input { width: 100%; padding: 0.6rem 0.8rem; border: 1px solid var(--color-border); border-radius: 4px; font-family: var(--font-sans); font-size: 1rem; background: #fff; transition: border-color 0.2s; }
.domain-helper input:focus { outline: none; border-color: var(--color-accent); }
.domain-helper .domain-hint { font-size: 0.82rem; color: var(--color-muted); margin: 0.5rem 0 0; }
.article-content .domain-note { color: var(--color-muted); font-size: 0.85em; }
.article-content .fine-print { color: var(--color-muted); font-size: 0.85em; }

/* ── Article tables ───────────────────────────── */
.article-content .table-scroll { overflow-x: auto; margin: 1.5rem 0; }
.article-content table { border-collapse: collapse; margin: 1.5rem 0; width: 100%; max-width: 560px; }
.article-content .table-scroll table { margin: 0; }
.article-content th,
.article-content td { border: 1px solid var(--color-border); padding: 0.5rem 0.9rem; text-align: left; }
.article-content th { background: var(--color-card-bg); font-weight: 600; }

/* ── Responsive ───────────────────────────────── */
@media (max-width: 640px) {
  html { font-size: 16px; }
  .site-header { gap: 0.8rem; }
  .hero h1 { font-size: 1.8rem; }
  nav { gap: 0.8rem; }
  .card-grid { grid-template-columns: 1fr; }
}

/* ── Print ────────────────────────────────────── */
@media print {
  header, footer, .lang-switcher, .btn, nav { display: none !important; }
  body { font-size: 12pt; color: #000; }
  a { color: #000; text-decoration: underline; }
  .card-grid { display: block; }
  .card { border: 1px solid #ccc; margin-bottom: 1rem; page-break-inside: avoid; }
  .featured-image { max-height: 300px; object-fit: contain; }
}


/* ── Service Page ────────────────────────────── */
.service-hero p { font-size: 1.1rem; color: var(--color-muted); max-width: 600px; }

.service-illustration { text-align: center; margin: 2.5rem 0; }
.service-illustration svg { max-width: 100%; height: auto; }

.steps-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; margin: 1.5rem 0 2.5rem; }
.step { text-align: center; }
.step-number {
  display: inline-flex; align-items: center; justify-content: center;
  width: 2.4rem; height: 2.4rem; border-radius: 50%;
  background: var(--color-accent); color: #fff;
  font-family: var(--font-heading); font-weight: 700; font-size: 1.1rem;
  margin-bottom: 0.5rem;
}
.step h3 { font-size: 1rem; margin-bottom: 0.3rem; }
.step p { font-size: 0.9rem; color: var(--color-muted); }

.scenario-list { list-style: none; padding: 0; columns: 2; column-gap: 2rem; margin: 1rem 0 2rem; }
.scenario-list li { padding: 0.4rem 0 0.4rem 1.6rem; position: relative; break-inside: avoid; }
.scenario-list li::before { content: "\2713"; position: absolute; left: 0; color: var(--color-accent); font-weight: 700; }

.pricing-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1.5rem; margin: 1.5rem 0; }
.pricing-card {
  border: 1px solid var(--color-border); border-radius: 8px;
  background: var(--color-card-bg); padding: 1.5rem; text-align: center;
}
.pricing-card.featured { border-color: var(--color-accent); border-width: 2px; }
.pricing-card h3 { font-size: 1.1rem; margin-bottom: 0.5rem; }
.pricing-price { font-family: var(--font-heading); font-size: 2rem; font-weight: 700; color: var(--color-accent); margin: 0.5rem 0; }
.pricing-price span { font-size: 0.85rem; font-weight: 400; color: var(--color-muted); }
.pricing-card ul { list-style: none; padding: 0; text-align: left; margin: 1rem 0 0; font-size: 0.9rem; }
.pricing-card li { padding: 0.3rem 0 0.3rem 1.4rem; position: relative; }
.pricing-card li::before { content: "\2713"; position: absolute; left: 0; color: var(--color-accent); font-weight: 700; }
.pricing-note { text-align: center; color: var(--color-muted); font-size: 0.9rem; margin: 0.5rem 0 2rem; }
.pricing-price.pricing-monthly { font-size: 1.2rem; margin-top: 0; }

/* Dark ink on WhatsApp green: white on #25D366 is 1.98:1, far below the 4.5:1
   needed for button-sized text; the site's text colour gives 8.8:1 (5.6:1 on hover). */
.btn-whatsapp { background: #25D366; color: var(--color-text); border-color: #128C7E; }
.btn-whatsapp:hover { background: #1DA851; color: var(--color-text); border-color: #128C7E; }

@media (max-width: 640px) {
  .steps-grid { grid-template-columns: 1fr; gap: 1rem; }
  .scenario-list { columns: 1; }
  .pricing-grid { grid-template-columns: 1fr; }
  .card-grid.services-grid { grid-template-columns: 1fr; }
}

/* ── What's my IP page ──────────────────────────── */
/* The hidden attribute loses to any class that sets display, so restore it. */
.ip-page [hidden] { display: none !important; }
.ip-box {
  margin: 1.5rem 0 1rem; padding: 1.4rem 1.5rem;
  border: 1px solid var(--color-border); border-radius: 8px; background: var(--color-card-bg);
}
.ip-display {
  font-family: var(--font-mono); font-size: clamp(1.6rem, 7vw, 2.4rem); font-weight: 600;
  font-variant-numeric: tabular-nums; letter-spacing: 0.02em; line-height: 1.2;
  user-select: all; overflow-wrap: anywhere;
}
.ip-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.2rem; }
.ip-actions .btn { margin-top: 0; }
.ip-page button.btn { font-family: inherit; line-height: inherit; cursor: pointer; }
.ip-page button.btn:not(.btn-primary) { background: transparent; }
.ip-page button.btn:not(.btn-primary):hover { background: var(--color-accent); color: #fff; }
.ip-error p { margin: 0.8rem 0 0; color: var(--color-muted); }
.ip-error .btn { margin-top: 0.8rem; }
.ip-note { font-size: 0.9rem; color: var(--color-muted); }

/* ── Remote support guide ───────────────────────── */
.help-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin: 1.5rem 0 0.5rem; }
.help-actions .btn { margin-top: 0; }
/* .article-content ol (0-1-1) beats a bare .help-steps, so scope these to .help-page. */
.help-page .help-steps { list-style: none; margin: 2rem 0; padding: 0; counter-reset: help-step; }
.help-page .help-steps > li {
  counter-increment: help-step;
  position: relative; padding-left: 3.4rem; margin-bottom: 1.8rem;
}
/* The .step-number circle, drawn from a counter: an <ol> already conveys the
   position, so a numeral in the DOM would be announced twice. */
.help-page .help-steps > li::before {
  content: counter(help-step);
  position: absolute; left: 0; top: 0;
  display: inline-flex; align-items: center; justify-content: center;
  width: 2.4rem; height: 2.4rem; border-radius: 50%;
  background: var(--color-accent); color: #fff;
  font-family: var(--font-heading); font-weight: 700; font-size: 1.1rem;
}
.help-page .help-steps > li > p { margin-bottom: 0.6rem; }
/* Never upscale a screenshot; the border hugs the image, not the column. */
.help-shot { margin: 0.8rem 0 0; width: fit-content; max-width: 100%; border: 1px solid var(--color-border); border-radius: 6px; overflow: hidden; }
.help-shot img { max-width: 100%; height: auto; display: block; }
/* Screenshot not dropped in yet. Only `hugo server` renders this — see layouts/help/list.html. */
.help-shot-todo {
  margin: 0.8rem 0 0; padding: 2.5rem 1rem; text-align: center;
  border: 2px dashed var(--color-border); border-radius: 6px;
  color: var(--color-muted); font-family: var(--font-mono); font-size: 0.8rem;
}
.help-note { font-size: 0.9rem; color: var(--color-muted); }
@media (max-width: 480px) {
  .help-actions .btn { width: 100%; text-align: center; }
}
