/* ==========================================================================
   Reputly — Design System
   ========================================================================== */

:root {
  --color-bg: #ffffff;
  --color-bg-alt: #f8fafc;
  --color-bg-dark: #0b1220;
  --color-text: #0f172a;
  --color-text-muted: #51607a;
  --color-text-on-dark: #e2e8f0;
  --color-text-on-dark-muted: #94a3b8;
  --color-primary: #0f172a;
  --color-accent: #0d9488;
  --color-accent-dark: #0f766e;
  --color-accent-light: #ccfbf1;
  --color-border: #e2e8f0;
  --color-border-dark: #1e293b;
  --color-warning-bg: #fffbeb;
  --color-warning-border: #fde68a;
  --color-warning-text: #92400e;

  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 20px;

  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.06);
  --shadow: 0 4px 16px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 12px 32px rgba(15, 23, 42, 0.12);

  --container-w: 1180px;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--color-accent-dark); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { line-height: 1.2; font-weight: 700; margin: 0 0 0.5em; color: var(--color-text); }
h1 { font-size: clamp(2rem, 1.5rem + 2.2vw, 3.25rem); letter-spacing: -0.02em; }
h2 { font-size: clamp(1.5rem, 1.25rem + 1.1vw, 2.25rem); letter-spacing: -0.01em; }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1em; color: var(--color-text-muted); }
ul, ol { color: var(--color-text-muted); }

.skip-link {
  position: absolute; left: -9999px; top: 0; background: var(--color-accent);
  color: #fff; padding: 12px 18px; z-index: 999; border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

.container {
  max-width: var(--container-w);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------------------------------- Header ---------------------------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--color-border);
}
.site-header .container {
  display: flex; align-items: center; justify-content: space-between;
  height: 72px; gap: 16px;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.25rem; color: var(--color-text); }
.brand:hover { text-decoration: none; }
.brand svg { flex-shrink: 0; }

.main-nav { display: flex; align-items: center; gap: 28px; }
.main-nav ul { list-style: none; display: flex; gap: 24px; margin: 0; padding: 0; }
.main-nav a {
  color: var(--color-text); font-weight: 600; font-size: 0.95rem;
}
.main-nav a:hover { color: var(--color-accent-dark); text-decoration: none; }

.nav-actions { display: flex; align-items: center; gap: 14px; }

.lang-switcher { position: relative; }
.lang-switcher summary {
  list-style: none; cursor: pointer; display: flex; align-items: center; gap: 6px;
  font-weight: 600; font-size: 0.9rem; padding: 8px 12px; border: 1px solid var(--color-border);
  border-radius: var(--radius-sm); color: var(--color-text);
}
.lang-switcher summary::-webkit-details-marker { display: none; }
.lang-switcher[open] summary { border-color: var(--color-accent); }
.lang-menu {
  position: absolute; right: 0; top: calc(100% + 6px); background: #fff; border: 1px solid var(--color-border);
  border-radius: var(--radius-sm); box-shadow: var(--shadow); min-width: 160px; padding: 6px; z-index: 50;
}
.lang-menu a { display: block; padding: 8px 10px; border-radius: 6px; color: var(--color-text); font-size: 0.9rem; font-weight: 500; }
.lang-menu a:hover { background: var(--color-bg-alt); text-decoration: none; }
.lang-menu a.is-current { color: var(--color-accent-dark); font-weight: 700; }

.nav-toggle {
  display: none; background: none; border: 1px solid var(--color-border); border-radius: var(--radius-sm);
  padding: 8px 10px; cursor: pointer;
}
.nav-toggle svg { display: block; }

/* ------------------------------------- Buttons ------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 22px; border-radius: 999px; font-weight: 700; font-size: 0.95rem;
  border: 2px solid transparent; cursor: pointer; transition: transform .12s ease, box-shadow .12s ease;
  white-space: nowrap;
}
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--color-accent); color: #fff; }
.btn-primary:hover { background: var(--color-accent-dark); box-shadow: var(--shadow); }
.btn-secondary { background: transparent; color: var(--color-text); border-color: var(--color-border); }
.btn-secondary:hover { border-color: var(--color-accent); color: var(--color-accent-dark); }
.btn-on-dark { background: #fff; color: var(--color-primary); }
.btn-on-dark:hover { background: var(--color-accent-light); }
.btn-block { width: 100%; }
.btn-sm { padding: 9px 16px; font-size: 0.85rem; }

/* ------------------------------------- Hero ----------------------------- */
.hero {
  background:
    radial-gradient(1100px 480px at 85% -10%, rgba(13,148,136,0.14), transparent 60%),
    linear-gradient(180deg, var(--color-bg-alt) 0%, var(--color-bg) 100%);
  padding: 72px 0 56px;
  border-bottom: 1px solid var(--color-border);
}
.hero .container { display: grid; gap: 20px; max-width: 880px; }
.hero .eyebrow {
  display: inline-flex; align-items: center; gap: 8px; font-weight: 700; font-size: 0.8rem;
  letter-spacing: 0.04em; text-transform: uppercase; color: var(--color-accent-dark);
  background: var(--color-accent-light); padding: 6px 12px; border-radius: 999px; width: fit-content;
}
.hero h1 { max-width: 20ch; }
.hero .subtitle { font-size: 1.15rem; max-width: 60ch; color: var(--color-text-muted); }
.hero .cta-row { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 8px; }
/* Compact variant: just eyebrow + h1 + subtitle, no button row — used on the
   homepage so the "what do you need help with?" picker right below it is
   the first substantial thing a visitor reaches, not buried under a full
   hero with its own CTAs (the top nav bar already carries the main CTA). */
.hero-compact { padding: 56px 0 40px; }

.quick-help-cta { display: flex; justify-content: center; margin-top: 36px; }

.breadcrumbs { font-size: 0.85rem; color: var(--color-text-muted); margin-bottom: 14px; }
.breadcrumbs a { color: var(--color-text-muted); font-weight: 600; }
.breadcrumbs .sep { margin: 0 6px; }
.breadcrumbs .current { color: var(--color-text); font-weight: 700; }

/* ------------------------------------- Sections -------------------------- */
.section { padding: 64px 0; }
.section-alt { background: var(--color-bg-alt); }
.section-head { max-width: 700px; margin: 0 auto 40px; text-align: center; }
.section-head.left { text-align: left; margin: 0 0 32px; }

/* ------------------------------------- Grids / Cards ---------------------- */
.grid { display: grid; gap: 24px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 900px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

.card {
  background: #fff; border: 1px solid var(--color-border); border-radius: var(--radius);
  padding: 28px; box-shadow: var(--shadow-sm); transition: box-shadow .15s ease, transform .15s ease;
}
.card:hover { box-shadow: var(--shadow); }
/* Cards are often <a> elements (service links, scan-tool search links); once
   a visitor has actually opened that URL, the browser's default visited-link
   color would otherwise bleed into the card text. Keep the branded colors
   regardless of visited state. */
a.card:visited, a.card:visited h3, a.card:visited .card-link { color: inherit; }

.service-card { display: flex; flex-direction: column; gap: 10px; }
.service-card .icon {
  width: 44px; height: 44px; border-radius: 12px; background: var(--color-accent-light);
  display: flex; align-items: center; justify-content: center; color: var(--color-accent-dark); margin-bottom: 6px;
}
.service-card h3 { margin-bottom: 4px; }
.service-card p { font-size: 0.95rem; margin-bottom: 12px; }
.service-card .card-link { font-weight: 700; font-size: 0.9rem; margin-top: auto; }

/* Quick-help picker: the first thing visitors choose from at the top of the
   homepage, so it gets a slightly stronger visual accent than the plain
   service-group cards further down the page (a colored top border + a
   bigger icon badge) to read as "start here". */
.quick-help-card { border-top: 3px solid var(--color-accent-dark); }
.quick-help-card .icon {
  width: 52px; height: 52px; background: var(--color-primary); color: #fff;
}

.help-card { display: flex; gap: 16px; align-items: flex-start; }
.help-card .num {
  flex-shrink: 0; width: 34px; height: 34px; border-radius: 999px; background: var(--color-primary); color: #fff;
  display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 0.85rem;
}
.help-card h3 { font-size: 1.05rem; margin-bottom: 4px; }
.help-card p { font-size: 0.92rem; margin: 0; }

.step-card { position: relative; padding-top: 12px; }
.step-card h3 { color: var(--color-accent-dark); }

/* ------------------------------------- FAQ ------------------------------- */
.faq-list { max-width: 820px; margin: 0 auto; display: flex; flex-direction: column; gap: 12px; }
.faq-item {
  border: 1px solid var(--color-border); border-radius: var(--radius); background: #fff; overflow: hidden;
}
.faq-item summary {
  cursor: pointer; list-style: none; padding: 18px 22px; font-weight: 700; font-size: 1rem;
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+"; font-size: 1.3rem; font-weight: 400; color: var(--color-accent-dark); flex-shrink: 0;
}
.faq-item[open] summary::after { content: "\2212"; }
.faq-item .faq-a { padding: 0 22px 20px; margin: 0; color: var(--color-text-muted); }

/* ------------------------------------- Values / Why-us ------------------- */
.value-card { text-align: left; }

/* ------------------------------------- Service groups --------------------- */
.service-group { margin-bottom: 48px; }
.service-group:last-child { margin-bottom: 0; }
.service-group-head { margin-bottom: 20px; }
.service-group-head h3 { font-size: 1.1rem; color: var(--color-accent-dark); text-transform: uppercase; letter-spacing: 0.03em; margin-bottom: 4px; }
.service-group-head p { font-size: 0.95rem; max-width: 60ch; margin: 0; }

/* ------------------------------------- Scan tool --------------------------- */
.scan-teaser {
  background: linear-gradient(135deg, var(--color-accent-light), #fff);
  border: 1px solid var(--color-border); border-radius: var(--radius-lg);
  padding: 40px; display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap;
}
.scan-teaser-text { max-width: 60ch; }
.scan-teaser-text h2 { margin-bottom: 8px; }
.scan-teaser-text p { margin: 0; }

.scan-tool { max-width: 900px; margin: 0 auto; }
.scan-form { background: #fff; border: 1px solid var(--color-border); border-radius: var(--radius-lg); padding: 28px; box-shadow: var(--shadow-sm); }
.scan-form label { display: block; font-weight: 700; font-size: 0.9rem; margin-bottom: 10px; }
.scan-form-row { display: flex; gap: 12px; flex-wrap: wrap; }
.scan-form-row input {
  flex: 1 1 280px; padding: 14px 16px; border: 1px solid var(--color-border); border-radius: var(--radius-sm);
  font-family: inherit; font-size: 1rem; color: var(--color-text);
}
.scan-form-row input:focus { outline: none; border-color: var(--color-accent); box-shadow: 0 0 0 3px var(--color-accent-light); }
.scan-form-row .btn { flex: 0 0 auto; }
.scan-empty-note { text-align: center; color: var(--color-text-muted); font-size: 0.9rem; margin-top: 20px; }
.scan-results { margin-top: 40px; }
.scan-results h2 { font-size: 1.3rem; }
.scan-result-card { cursor: pointer; }

.scan-result-card.is-live { cursor: default; align-items: stretch; text-align: left; }
.scan-result-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.scan-result-head h3 { margin: 0; flex: 1 1 auto; }
.live-badge {
  font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.03em;
  color: var(--color-accent); background: var(--color-accent-light); border-radius: 999px;
  padding: 3px 9px; white-space: nowrap;
}
.scan-result-body { margin-top: 12px; }
.scan-loading, .scan-no-results { font-size: 0.88rem; color: var(--color-text-muted); margin: 0; }
.scan-live-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.scan-live-list li { border-top: 1px solid var(--color-border); padding-top: 8px; }
.scan-live-list li:first-child { border-top: none; padding-top: 0; }
.scan-live-list a, .scan-live-list a:visited { font-size: 0.88rem; font-weight: 600; color: var(--color-accent-dark); text-decoration: none; display: block; }
.scan-live-list a:hover { text-decoration: underline; }

.scan-why-limited {
  margin-top: 28px; padding: 18px 20px; border: 1px solid var(--color-border); border-radius: var(--radius);
  background: #f8fafc;
}
.scan-why-limited strong { display: block; margin-bottom: 6px; }
.scan-why-limited p { margin: 0; color: var(--color-text-muted); font-size: 0.9rem; }

.notice-info { background: var(--color-accent-light); border-color: #99e6da; color: #0f3d38; }
.notice-info strong { color: #0f3d38; }

.scan-report {
  background: var(--color-primary); color: var(--color-text-on-dark);
  border-radius: var(--radius-lg); padding: 32px; margin-bottom: 32px;
}
.scan-report h2 { color: #fff; margin-bottom: 10px; }
.scan-report h3 { color: #fff; font-size: 1.05rem; margin: 20px 0 10px; }
.scan-report-loading { color: var(--color-text-on-dark-muted); margin: 0; }
.scan-report-summary { font-size: 1.1rem; color: #fff; margin-bottom: 4px; }
.scan-report-good { color: #6ee7c8; font-weight: 600; }
.scan-report-negative-list { list-style: none; margin: 0 0 20px; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.scan-report-negative-list li {
  background: rgba(255,255,255,0.06); border-radius: var(--radius-sm); padding: 12px 14px;
}
.scan-report-negative-list a { color: #fff; font-weight: 600; text-decoration: underline; }
.scan-report-negative-list a:visited { color: #fff; }
.scan-report-reason { color: var(--color-text-on-dark-muted); font-size: 0.88rem; }
.scan-report-disclaimer { font-size: 0.8rem; color: var(--color-text-on-dark-muted); margin: 16px 0 0; }
.scan-report .btn-primary { margin-top: 4px; }

@media (max-width: 620px) {
  .scan-teaser { padding: 28px; flex-direction: column; align-items: flex-start; }
  .scan-form { padding: 20px; }
  .scan-form-row .btn { width: 100%; }
}

/* ------------------------------------- CTA band --------------------------- */
.cta-band {
  background: var(--color-primary); color: #fff; border-radius: var(--radius-lg);
  padding: 48px; display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap;
}
.cta-band h2 { color: #fff; margin-bottom: 6px; }
.cta-band p { color: var(--color-text-on-dark-muted); margin: 0; max-width: 46ch; }

/* ------------------------------------- Forms ------------------------------ */
.form-card { background: #fff; border: 1px solid var(--color-border); border-radius: var(--radius-lg); padding: 32px; box-shadow: var(--shadow-sm); }
.form-row { margin-bottom: 18px; }
.form-row label { display: block; font-weight: 700; font-size: 0.9rem; margin-bottom: 6px; }
.form-row input, .form-row select, .form-row textarea {
  width: 100%; padding: 12px 14px; border: 1px solid var(--color-border); border-radius: var(--radius-sm);
  font-family: inherit; font-size: 0.95rem; color: var(--color-text); background: #fff;
}
.form-row input:focus, .form-row select:focus, .form-row textarea:focus {
  outline: none; border-color: var(--color-accent); box-shadow: 0 0 0 3px var(--color-accent-light);
}
.form-note { font-size: 0.82rem; color: var(--color-text-muted); margin-top: 10px; }
.form-honeypot { position: absolute; left: -9999px; top: -9999px; }

/* ------------------------------------- Legal / prose ----------------------- */
.prose { max-width: 780px; margin: 0 auto; }
.prose h2 { margin-top: 2em; font-size: 1.3rem; }
.prose p { color: var(--color-text-muted); }
.updated-note { color: var(--color-text-muted); font-size: 0.9rem; margin-bottom: 32px; }

.notice-box {
  background: var(--color-warning-bg); border: 1px solid var(--color-warning-border); color: var(--color-warning-text);
  border-radius: var(--radius); padding: 18px 20px; font-size: 0.92rem; margin: 24px 0;
}
.notice-box strong { display: block; margin-bottom: 4px; }

/* ------------------------------------- Footer ------------------------------ */
.site-footer { background: var(--color-bg-dark); color: var(--color-text-on-dark-muted); padding: 64px 0 32px; margin-top: 80px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 32px; padding-bottom: 40px; border-bottom: 1px solid var(--color-border-dark); }
@media (max-width: 800px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-brand .brand { color: #fff; }
.footer-brand p { color: var(--color-text-on-dark-muted); font-size: 0.9rem; max-width: 32ch; margin-top: 10px; }
.footer-col h4 { color: #fff; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 14px; }
.footer-col ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.footer-col a { color: var(--color-text-on-dark-muted); font-size: 0.92rem; }
.footer-col a:hover { color: #fff; text-decoration: none; }
.footer-legal { padding-top: 24px; font-size: 0.82rem; line-height: 1.7; color: #7c8aa5; }
.footer-legal p { color: #7c8aa5; font-size: 0.82rem; }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; margin-top: 24px; font-size: 0.82rem; color: #7c8aa5; }
.footer-bottom ul { list-style: none; display: flex; gap: 18px; margin: 0; padding: 0; }
.footer-bottom a { color: #7c8aa5; }
.footer-bottom a:hover { color: #fff; }

/* ------------------------------------- Utility ------------------------------ */
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.badge {
  display: inline-flex; align-items: center; gap: 6px; background: var(--color-accent-light); color: var(--color-accent-dark);
  font-weight: 700; font-size: 0.78rem; padding: 5px 11px; border-radius: 999px; margin-bottom: 14px;
}
.related-list { display: flex; flex-wrap: wrap; gap: 10px; }
.related-list a {
  border: 1px solid var(--color-border); border-radius: 999px; padding: 8px 16px; font-size: 0.88rem; font-weight: 600; color: var(--color-text);
}
.related-list a:hover { border-color: var(--color-accent); color: var(--color-accent-dark); text-decoration: none; }

/* ------------------------------------- Mobile nav ------------------------------ */
@media (max-width: 860px) {
  .nav-toggle { display: inline-flex; align-items: center; justify-content: center; }
  .main-nav {
    position: fixed; top: 72px; left: 0; right: 0; height: calc(100vh - 72px); z-index: 90;
    background: #fff; flex-direction: column; align-items: stretch;
    padding: 24px; transform: translateY(-8px); opacity: 0; pointer-events: none; transition: opacity .15s ease, transform .15s ease;
    overflow-y: auto;
  }
  .main-nav.is-open { opacity: 1; transform: translateY(0); pointer-events: auto; }
  .main-nav ul { flex-direction: column; gap: 4px; }
  .main-nav ul a { display: block; padding: 12px 4px; border-bottom: 1px solid var(--color-border); }
  .nav-actions { flex-direction: column; align-items: stretch; gap: 12px; margin-top: 18px; }
  .lang-switcher { width: 100%; }
  .lang-switcher summary { justify-content: space-between; }
  .cta-band { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 620px) {
  .hero { padding: 48px 0 40px; }
  .section { padding: 48px 0; }
  .form-card { padding: 22px; }
}

.whatsapp-float {
  position: fixed; right: 20px; bottom: 20px; z-index: 200;
  width: 56px; height: 56px; border-radius: 50%;
  background: #25D366; color: #fff;
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-lg);
  transition: transform .15s ease;
}
.whatsapp-float:hover { transform: scale(1.08); color: #fff; }
@media (max-width: 620px) {
  .whatsapp-float { right: 16px; bottom: 16px; width: 50px; height: 50px; }
}

.whatsapp-contact-cta {
  display: flex; align-items: center; gap: 14px; background: #25D366; color: #fff;
  border-radius: var(--radius); padding: 18px 22px; margin-bottom: 24px;
}
.whatsapp-contact-cta:hover { color: #fff; opacity: .92; }
.whatsapp-contact-cta svg { flex: 0 0 auto; }
.whatsapp-contact-cta span { font-weight: 700; font-size: 1.05rem; }
