:root {
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --secondary: #475569;
  --text: #0f172a;
  --text-light: #64748b;
  --bg: #ffffff;
  --bg-alt: #f8fafc;
  --border: #e2e8f0;
  --radius: 12px;
  --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  --font-system: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  --max-width: 1200px;
}

html.google-fonts-disabled {
  --font-sans: var(--font-system);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-sans);
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

img { max-width: 100%; height: auto; display: block; }
a { text-decoration: none; color: inherit; transition: color 0.2s; }
ul { list-style: none; }

a:focus-visible,
button:focus-visible,
.hamburger:focus-visible,
.btn:focus-visible {
  outline: 3px solid rgba(37, 99, 235, 0.45);
  outline-offset: 3px;
}

/* Typography */
h1, h2, h3 { line-height: 1.2; font-weight: 800; letter-spacing: 0; margin-bottom: 1rem; }
h1 { font-size: clamp(2.5rem, 5vw, 4rem); background: linear-gradient(to right, var(--primary), var(--primary-dark)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
h2 { font-size: clamp(2rem, 4vw, 2.5rem); color: var(--text); }
h3 { font-size: 1.5rem; }
p { margin-bottom: 1.5rem; color: var(--secondary); }

/* Layout Utilities */
.container { width: 100%; max-width: var(--max-width); margin: 0 auto; padding: 0 1.5rem; }
.grid { display: grid; gap: 2rem; }
.section { padding: 5rem 0; }
.bg-alt { background-color: var(--bg-alt); }

/* Header */
header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  padding: 1rem 0;
}

header .container { display: flex; justify-content: space-between; align-items: center; }
.logo { height: 40px; width: auto; }

.nav-links { display: flex; gap: 2rem; }
.nav-links a { font-weight: 600; font-size: 0.95rem; color: var(--secondary); }
.nav-links a:hover { color: var(--primary); }

/* Mobile Menu Toggle */
.hamburger { display: none; cursor: pointer; flex-direction: column; gap: 6px; }
.hamburger div { width: 25px; height: 2px; background: var(--text); transition: 0.3s; }

/* Hero Section */
.hero {
  padding: 8rem 0 6rem;
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
}
.hero .lead { font-size: 1.25rem; color: var(--text-light); margin-bottom: 2.5rem; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0.875rem 2rem;
  border-radius: 50px;
  font-weight: 600;
  transition: transform 0.2s, box-shadow 0.2s;
  cursor: pointer;
  border: none;
}
.btn-primary { background: var(--primary); color: white; box-shadow: 0 4px 14px 0 rgba(37, 99, 235, 0.39); }
.btn-primary:hover { background: var(--primary-dark); transform: translateY(-2px); }
.btn-secondary { background: white; color: var(--text); border: 1px solid var(--border); margin-left: 1rem; }
.btn-secondary:hover { background: var(--bg-alt); transform: translateY(-2px); }

/* Cards (Services & Portfolio) */
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(400px, 1fr)); }

.card {
  background: white;
  padding: 2.5rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  transition: 0.3s;
  display: flex; flex-direction: column;
}
.card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); border-color: var(--primary); }
.card h3 { margin-bottom: 1rem; }
.card-icon { margin-bottom: 1rem; color: var(--primary); display: inline-flex; }
.card-icon svg { width: 48px; height: 48px; stroke-width: 1.5; }

/* About Section */
.about-content { display: flex; gap: 3rem; align-items: center; }
.about-text { flex: 1; }
.about-map { flex: 1; min-height: 350px; overflow: hidden; border-radius: 1.5rem; box-shadow: var(--shadow-lg); border: 6px solid white; background: var(--bg-alt); }
.about-map iframe { display: block; min-height: 350px; }

.map-consent-placeholder {
  min-height: 350px;
  width: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  gap: 1rem;
  padding: 2rem;
  background:
    linear-gradient(rgba(248, 250, 252, 0.92), rgba(248, 250, 252, 0.92)),
    repeating-linear-gradient(135deg, #e2e8f0 0, #e2e8f0 1px, transparent 1px, transparent 18px);
}

.map-consent-placeholder h3 {
  margin-bottom: 0;
  color: var(--text);
}

.map-consent-placeholder p {
  max-width: 34rem;
  margin-bottom: 0;
}

.map-consent-icon {
  position: relative;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: rgba(37, 99, 235, 0.1);
  border: 1px solid rgba(37, 99, 235, 0.22);
}

.map-consent-icon::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 48%;
  width: 17px;
  height: 17px;
  border: 4px solid var(--primary);
  border-radius: 50% 50% 50% 0;
  transform: translate(-50%, -50%) rotate(-45deg);
}

.map-consent-icon::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 43%;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--primary);
  transform: translate(-50%, -50%);
}

.map-consent-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.map-consent-actions a {
  color: var(--primary);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}

/* Contact Form */
.contact-wrapper { max-width: 600px; margin: 0 auto; }
.form-group { margin-bottom: 1.5rem; text-align: left; }
label { display: block; margin-bottom: 0.5rem; font-weight: 600; font-size: 0.9rem; }
input, textarea {
  width: 100%;
  padding: 0.875rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-family: inherit;
  font-size: 1rem;
  transition: 0.2s;
  background: var(--bg-alt);
}
input:focus, textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1); background: white; }

.privacy-form-note {
  margin: 1rem 0 0;
  color: var(--text-light);
  font-size: 0.9rem;
  text-align: center;
}

.privacy-form-note a {
  color: var(--primary);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Footer */
footer {
  margin-top: auto;
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
  padding: 3rem 0;
  text-align: center;
  font-size: 0.9rem;
  color: var(--text-light);
}
footer a,
.footer-consent-link {
  margin: 0 10px;
  text-decoration: underline;
  text-decoration-color: transparent;
  transition: 0.3s;
}

.footer-consent-link {
  appearance: none;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  font: inherit;
  padding: 0;
}

footer a:hover,
.footer-consent-link:hover {
  text-decoration-color: var(--primary);
  color: var(--primary);
}

.consent-modal-open {
  overflow: hidden;
}

.consent-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 1.5rem;
  background: rgba(15, 23, 42, 0.38);
  backdrop-filter: blur(3px);
}

.consent-backdrop[hidden],
.settings-backdrop[hidden] {
  display: none;
}

.consent-dialog {
  width: min(100%, 760px);
  display: grid;
  grid-template-columns: 1fr minmax(260px, 0.55fr);
  gap: 1.5rem;
  padding: 1.5rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.98);
  box-shadow: var(--shadow-lg);
}

.consent-copy h2 {
  margin-bottom: 0.75rem;
  font-size: 1.5rem;
}

.consent-copy p {
  margin-bottom: 0;
}

.consent-eyebrow {
  color: var(--primary);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.consent-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 1rem;
}

.consent-links a {
  color: var(--primary);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.consent-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
  align-content: end;
}

.consent-btn {
  width: 100%;
  min-height: 48px;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: white;
  color: var(--text);
  cursor: pointer;
  font: inherit;
  font-weight: 700;
  transition: border-color 0.2s, color 0.2s, transform 0.2s, box-shadow 0.2s;
}

.consent-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
  box-shadow: var(--shadow);
  transform: translateY(-1px);
}

.settings-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  justify-content: flex-end;
  background: rgba(15, 23, 42, 0.42);
  backdrop-filter: blur(4px);
}

.settings-panel {
  width: min(100%, 560px);
  min-height: 100%;
  overflow-x: hidden;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  padding: 2rem;
  background: white;
  border-left: 1px solid var(--border);
  box-shadow: -24px 0 48px rgb(15 23 42 / 0.16);
}

.settings-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.settings-header > div {
  min-width: 0;
}

.settings-eyebrow {
  margin-bottom: 0.35rem;
  color: var(--primary);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.settings-header h2 {
  margin-bottom: 0;
  font-size: 1.75rem;
  overflow-wrap: anywhere;
}

.settings-close {
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: var(--bg-alt);
  color: var(--text);
  cursor: pointer;
  font: inherit;
  font-size: 1rem;
  font-weight: 800;
  line-height: 1;
}

.settings-close:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.settings-intro {
  margin-bottom: 0;
}

.settings-services {
  display: grid;
  gap: 0.85rem;
}

.settings-service {
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: white;
}

.settings-service.is-required {
  background: var(--bg-alt);
}

.settings-service-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.settings-service h3 {
  margin-bottom: 0.4rem;
  font-size: 1rem;
}

.settings-service p {
  margin-bottom: 0;
  font-size: 0.92rem;
}

.settings-badge,
.settings-service-state {
  flex: 0 0 auto;
  border-radius: 999px;
  padding: 0.25rem 0.65rem;
  background: #eef2ff;
  color: var(--primary-dark);
  font-size: 0.78rem;
  font-weight: 800;
}

.settings-service-state {
  background: #f1f5f9;
  color: var(--text-light);
}

.settings-service-state.is-on {
  background: #dcfce7;
  color: #166534;
}

.settings-switch {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 1rem;
  cursor: pointer;
  font-weight: 700;
}

.settings-switch input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.settings-slider {
  position: relative;
  width: 50px;
  height: 28px;
  flex: 0 0 auto;
  border-radius: 999px;
  background: #cbd5e1;
  transition: background 0.2s, box-shadow 0.2s;
}

.settings-slider::after {
  content: "";
  position: absolute;
  top: 4px;
  left: 4px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: white;
  box-shadow: 0 2px 6px rgb(15 23 42 / 0.2);
  transition: transform 0.2s;
}

.settings-switch input:checked + .settings-slider {
  background: var(--primary);
}

.settings-switch input:checked + .settings-slider::after {
  transform: translateX(22px);
}

.settings-switch input:focus-visible + .settings-slider {
  outline: 3px solid rgba(37, 99, 235, 0.45);
  outline-offset: 3px;
}

.settings-switch-text {
  color: var(--text);
}

.settings-status {
  min-height: 2.8rem;
  margin-bottom: 0;
  padding: 0.85rem 1rem;
  border: 1px solid #bfdbfe;
  border-radius: 10px;
  background: #eff6ff;
  color: var(--primary-dark);
  font-size: 0.92rem;
}

.settings-actions {
  display: grid;
  gap: 0.75rem;
  margin-top: auto;
}

.settings-action {
  min-height: 48px;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: white;
  color: var(--text);
  cursor: pointer;
  font: inherit;
  font-weight: 800;
  transition: border-color 0.2s, color 0.2s, background 0.2s, transform 0.2s;
}

.settings-action:hover {
  transform: translateY(-1px);
}

.settings-action-muted:hover {
  border-color: var(--text-light);
}

.settings-action-primary {
  border-color: var(--primary);
  background: var(--primary);
  color: white;
}

.settings-action-primary:hover {
  background: var(--primary-dark);
}

.settings-action-strong {
  border-color: #0f172a;
  background: #0f172a;
  color: white;
}

.settings-legal {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  padding-top: 0.25rem;
}

.settings-legal a {
  color: var(--primary);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 4px;
}

/* Legal Pages */
.legal-page { padding: 4rem 1.5rem; max-width: 800px; margin: 0 auto; }
.legal-page h1 { margin-bottom: 2rem; }
.legal-page h2 { margin-top: 2rem; font-size: 1.5rem; }
.back-link { display: inline-block; margin-bottom: 2rem; color: var(--primary); font-weight: 600; }

/* Responsive */
@media (max-width: 768px) {
  .hamburger { display: flex; }
  .about-content { flex-direction: column; gap: 2rem; }
  .nav-links {
    position: absolute; top: 100%; left: 0; right: 0;
    background: white;
    flex-direction: column;
    padding: 2rem;
    gap: 1.5rem;
    border-bottom: 1px solid var(--border);
    display: none;
  }
  .nav-links.active { display: flex; }
  .hero { padding: 4rem 0; }
  .hero-btns { margin: 10px;}
  .grid-2 { grid-template-columns: 1fr; }
  .btn { width: 100%; margin: 0.5rem 0; }
  .about-map,
  .about-map iframe,
  .map-consent-placeholder {
    min-height: 320px;
  }
  .map-consent-placeholder {
    padding: 1.5rem;
    align-items: stretch;
  }
  .map-consent-actions {
    align-items: stretch;
    flex-direction: column;
  }
  .map-consent-actions a {
    text-align: center;
  }
  footer a,
  .footer-consent-link {
    display: inline-block;
    margin: 0.35rem 0.5rem;
  }
  .consent-backdrop {
    align-items: flex-end;
    padding: 1rem;
  }
  .consent-dialog {
    grid-template-columns: 1fr;
    padding: 1.25rem;
  }
  .consent-actions {
    grid-template-columns: 1fr;
  }
  .settings-backdrop {
    align-items: flex-end;
    justify-content: center;
    padding: 0;
  }
  .settings-panel {
    width: 100%;
    min-height: auto;
    max-height: 100dvh;
    padding: 1.25rem;
    border-left: 0;
    border-radius: 0;
  }
  .settings-header h2 {
    font-size: 1.45rem;
  }
  .settings-service-top {
    flex-direction: column;
    gap: 0.75rem;
  }
}
