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

/* ── Variables ────────────────────────────────────────────── */
:root {
  --mct-navy: #0a0f1c;
  --mct-blue: #1a2b4a;
  --mct-accent: #3b82f6;
  --mct-accent-hover: #60a5fa;
  --mct-text: #e2e8f0;
  --mct-muted: #94a3b8;
  --glass-bg: rgba(10, 15, 28, 0.75);
  --glass-border: rgba(255, 255, 255, 0.08);
  --section-border: rgba(59, 130, 246, 0.12);
}

/* ── Base ─────────────────────────────────────────────────── */
html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', system-ui, sans-serif;
  background-color: var(--mct-navy);
  color: var(--mct-text);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* ── Background image (root page) ─────────────────────────── */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url('bg.jpeg');
  background-size: cover;
  background-position: center;
  filter: blur(12px) brightness(0.4);
  -webkit-filter: blur(12px) brightness(0.4);
  transform: scale(1.05);
  z-index: 0;
  pointer-events: none;
}

/* ── Layout ───────────────────────────────────────────────── */
.site-wrapper {
  position: relative;
  z-index: 1;
  max-width: 680px;
  margin: 0 auto;
  padding: 4rem 1.5rem 5rem;
}

/* ── Glass card ───────────────────────────────────────────── */
.glass-card {
  background: var(--glass-bg);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--glass-border);
  border-radius: 24px;
  padding: 3rem 2.5rem;
  box-shadow:
    0 25px 50px -12px rgba(0, 0, 0, 0.6),
    0 0 0 1px rgba(255, 255, 255, 0.04) inset;
}

/* ── Page header ──────────────────────────────────────────── */
.page-header {
  text-align: center;
  margin-bottom: 1rem;
}

.page-header img {
  border-radius: 20px;
  max-height: 160px;
  width: auto;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.page-title {
  font-size: 2rem;
  font-weight: 700;
  color: var(--mct-text);
  margin-top: 1.5rem;
  margin-bottom: 2rem;
  letter-spacing: -0.02em;
}

.page-subtitle {
  font-size: 0.9rem;
  color: var(--mct-muted);
  margin-top: 0.5rem;
  font-weight: 400;
}

/* ── Logo row (root page) ─────────────────────────────────── */
.logo-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.logo-row img.mct-logo {
  max-height: 100px;
  width: auto;
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.4));
}

.logo-row a img.pidoh-logo {
  max-height: 100px;
  width: auto;
  border-radius: 14px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

.logo-row a img.pidoh-logo:hover {
  transform: scale(1.05);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

/* ── Tagline ──────────────────────────────────────────────── */
.tagline {
  font-size: 0.9rem;
  font-weight: 400;
  color: var(--mct-muted);
  letter-spacing: 0.01em;
  margin-bottom: 2rem;
  line-height: 1.5;
}

/* ── Intro (pidoh page) ───────────────────────────────────── */
.intro {
  margin-top: 2rem;
  font-size: 0.95rem;
  color: var(--mct-muted);
  line-height: 1.75;
}

.intro p {
  margin-bottom: 1rem;
}

.intro strong {
  color: var(--mct-text);
  font-weight: 500;
}

/* ── Config sections ──────────────────────────────────────── */
.config-section {
  margin-top: 2.5rem;
  padding-top: 2.5rem;
  border-top: 1px solid var(--section-border);
}

.config-section:first-of-type {
  margin-top: 2rem;
  padding-top: 0;
  border-top: none;
}

h2 {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--mct-text);
  margin-bottom: 1rem;
  letter-spacing: -0.01em;
}

.config-section p {
  font-size: 0.9rem;
  color: var(--mct-muted);
  margin-bottom: 0.75rem;
  line-height: 1.7;
}

.config-section ol,
.config-section ul {
  font-size: 0.9rem;
  color: var(--mct-muted);
  line-height: 1.8;
  padding-left: 1.25rem;
  margin-bottom: 0.75rem;
}

.config-section li strong {
  color: var(--mct-text);
  font-weight: 500;
}

.config-section ul {
  list-style: none;
  padding-left: 0;
  margin-top: 0.25rem;
}

.config-section ul li {
  padding-left: 1rem;
  position: relative;
}

.config-section ul li::before {
  content: '\2013';
  position: absolute;
  left: 0;
  color: var(--mct-accent);
}

/* ── Code ─────────────────────────────────────────────────── */
code {
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.2);
  border-radius: 6px;
  padding: 0.15em 0.5em;
  font-family: 'SF Mono', 'Fira Code', 'Fira Mono', ui-monospace, monospace;
  font-size: 0.85em;
  color: var(--mct-accent-hover);
}

/* ── Apple download button ────────────────────────────────── */
.apple-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  margin-top: 1.25rem;
  padding: 0.75rem 1.5rem;
  background: linear-gradient(135deg, var(--mct-accent), #2563eb);
  color: #fff;
  text-decoration: none;
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  box-shadow: 0 4px 14px rgba(59, 130, 246, 0.35);
  transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
}

.apple-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(59, 130, 246, 0.5);
  filter: brightness(1.08);
}

.apple-btn:active {
  transform: translateY(0);
}

.apple-btn svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
  flex-shrink: 0;
}

.apple-instructions {
  margin-top: 1rem;
  font-size: 0.85rem;
  color: var(--mct-muted);
  line-height: 1.75;
}

.apple-instructions strong {
  color: var(--mct-text);
  font-weight: 500;
}

.apple-instructions br {
  display: block;
  content: '';
  margin-top: 0.35rem;
}

/* ── Tabs ─────────────────────────────────────────────────── */
.tab-bar {
  display: flex;
  gap: 0;
  margin-top: 2rem;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 12px;
  padding: 0.25rem;
}

.tab-btn {
  flex: 1;
  padding: 0.7rem 1rem;
  background: none;
  border: none;
  border-radius: 10px;
  color: var(--mct-muted);
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}

.tab-btn:hover {
  color: var(--mct-text);
}

.tab-btn.active {
  background: var(--mct-blue);
  color: var(--mct-accent-hover);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
}

.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
}

/* ── Form fields ──────────────────────────────────────────── */
.field .label {
  color: var(--mct-text);
  font-weight: 500;
  font-size: 0.85rem;
  margin-bottom: 0.4rem;
  letter-spacing: 0.02em;
}

.input,
.textarea {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--glass-border);
  border-radius: 10px;
  color: var(--mct-text);
  font-family: 'Inter', sans-serif;
  font-size: 0.95rem;
  padding: 0.65rem 1rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
  width: 100%;
}

.input::placeholder,
.textarea::placeholder {
  color: var(--mct-muted);
  opacity: 0.6;
}

.input:focus,
.textarea:focus {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--mct-accent);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
  color: var(--mct-text);
  outline: none;
}

.textarea {
  resize: vertical;
  min-height: 110px;
}

/* ── Turnstile widget ─────────────────────────────────────── */
.cf-turnstile {
  display: flex;
  justify-content: center;
  margin: 0.25rem 0 1.25rem;
}

/* ── Submit button ────────────────────────────────────────── */
.submit-btn {
  width: 100%;
  background: linear-gradient(135deg, var(--mct-accent), #2563eb);
  border: none;
  border-radius: 10px;
  color: #fff;
  font-family: 'Inter', sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  padding: 0.75rem 1.5rem;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
  box-shadow: 0 4px 14px rgba(59, 130, 246, 0.35);
}

.submit-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(59, 130, 246, 0.5);
  filter: brightness(1.08);
}

.submit-btn:active {
  transform: translateY(0);
}

/* ── Contact footer (root page) ───────────────────────────── */
.contact-footer {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--glass-border);
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.contact-info {
  flex: 1;
}

.contact-info p {
  font-size: 0.82rem;
  color: var(--mct-muted);
  line-height: 1.7;
}

.contact-info strong {
  color: var(--mct-text);
  font-weight: 500;
}

.local-badge {
  width: 72px;
  height: auto;
  opacity: 0.85;
  flex-shrink: 0;
}

/* ── Status / action buttons ──────────────────────────────── */
.status-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 1.25rem;
  padding: 0.55rem 1.5rem;
  border-radius: 50px;
  border: 1px solid var(--glass-border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--mct-muted);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-decoration: none;
  transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.status-btn:hover {
  border-color: var(--mct-accent);
  background: rgba(59, 130, 246, 0.08);
  color: var(--mct-accent-hover);
}

/* ── Checker / tester (pidoh page) ────────────────────────── */
.checker-section {
  padding: 1.5rem 0;
}

.checker-section + .checker-section {
  border-top: 1px solid var(--section-border);
  margin-top: 0;
  padding-top: 1.5rem;
}

.checker-section h3 {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--mct-muted);
  margin-bottom: 1rem;
  font-weight: 600;
}

.result-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.7rem 0;
}

.result-row + .result-row {
  border-top: 1px solid var(--section-border);
}

.result-label {
  font-size: 0.9rem;
  color: var(--mct-muted);
}

.result-value {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--mct-text);
}

.protocol-do53 { background: #334155; color: #94a3b8; padding: 0.25rem 0.75rem; border-radius: 20px; }
.protocol-dot  { background: #1e40af; color: #bfdbfe; padding: 0.25rem 0.75rem; border-radius: 20px; }
.protocol-doh  { background: #2563eb; color: #dbeafe; padding: 0.25rem 0.75rem; border-radius: 20px; }
.protocol-doh3 { background: #7c3aed; color: #ede9fe; padding: 0.25rem 0.75rem; border-radius: 20px; }
.protocol-unknown { background: #334155; color: #64748b; padding: 0.25rem 0.75rem; border-radius: 20px; }

.message {
  padding: 0.8rem 1rem;
  border-radius: 10px;
  font-size: 0.85rem;
  margin-top: 0.75rem;
  display: none;
  line-height: 1.5;
}

.message.info  { background: rgba(59, 130, 246, 0.1); color: #93c5fd; display: block; border: 1px solid rgba(59, 130, 246, 0.2); }
.message.error { background: rgba(239, 68, 68, 0.1); color: #fca5a5; display: block; border: 1px solid rgba(239, 68, 68, 0.2); }
.message.ok    { background: rgba(34, 197, 94, 0.1); color: #86efac; display: block; border: 1px solid rgba(34, 197, 94, 0.2); }

.check-btn {
  display: block;
  width: 100%;
  padding: 0.85rem;
  background: linear-gradient(135deg, var(--mct-accent), #2563eb);
  color: white;
  border: none;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 600;
  font-family: 'Inter', system-ui, sans-serif;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
  box-shadow: 0 4px 14px rgba(59, 130, 246, 0.35);
}

.check-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(59, 130, 246, 0.5);
  filter: brightness(1.08);
}

.check-btn:active {
  transform: translateY(0);
}

.check-btn:disabled {
  background: #1e293b;
  color: #64748b;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* ── Code copy (pidoh page) ───────────────────────────────── */
.code-copy {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.code-copy code {
  cursor: pointer;
}

.copy-btn {
  background: none;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 6px;
  padding: 2px 6px;
  cursor: pointer;
  color: var(--mct-muted);
  font-size: 0.75rem;
  font-family: 'Inter', system-ui, sans-serif;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.copy-btn:hover {
  border-color: rgba(255, 255, 255, 0.3);
  color: #fff;
  background: rgba(255, 255, 255, 0.05);
}

.copy-btn.copied {
  border-color: rgba(34, 197, 94, 0.5);
  color: #86efac;
}

.copy-btn svg {
  width: 14px;
  height: 14px;
  fill: currentColor;
}

/* ── Site footer ──────────────────────────────────────────── */
.site-footer {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--section-border);
  font-size: 0.82rem;
  color: var(--mct-muted);
  line-height: 1.8;
  text-align: center;
}

.site-footer a {
  color: var(--mct-accent-hover);
  text-decoration: none;
  font-weight: 500;
}

.site-footer a:hover {
  text-decoration: underline;
}

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 480px) {
  .site-wrapper {
    padding: 2rem 1rem 3rem;
  }
  .glass-card {
    padding: 2rem 1.5rem;
    border-radius: 18px;
  }
  .page-title {
    font-size: 1.6rem;
  }
  .page-header img {
    max-height: 120px;
  }
  .logo-row img.mct-logo {
    max-height: 56px;
  }
}
