:root {
  --paper: #F7F2E6;
  --paper-raised: #FFFFFF;
  --ink: #16304F;
  --ink-soft: #4F6480;
  --line: #E2D9C3;
  --primary: #1E4D8C;
  --primary-soft: #E1EAF5;
  --accent: #7FA9D6;
  --accent-soft: #EAF1FA;
  --gold: #B98A3E;
  --gold-soft: #F3E6C9;
  --danger: #D63A3A;
  --on-primary: #FBFAF6;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #0F1A2B;
    --paper-raised: #16263D;
    --ink: #F2ECDD;
    --ink-soft: #A9B7C9;
    --line: #253750;
    --primary: #6FA0D8;
    --primary-soft: #1C2D45;
    --accent: #9CC2E8;
    --accent-soft: #182640;
    --gold: #D9AF6C;
    --gold-soft: #3A2E17;
    --danger: #E8615C;
    --on-primary: #0C1524;
  }
}
:root[data-theme="dark"] {
  --paper: #0F1A2B;
  --paper-raised: #16263D;
  --ink: #F2ECDD;
  --ink-soft: #A9B7C9;
  --line: #253750;
  --primary: #6FA0D8;
  --primary-soft: #1C2D45;
  --accent: #9CC2E8;
  --accent-soft: #182640;
  --gold: #D9AF6C;
  --gold-soft: #3A2E17;
  --on-primary: #0C1524;
}
:root[data-theme="light"] {
  --paper: #F7F2E6;
  --paper-raised: #FFFFFF;
  --ink: #16304F;
  --ink-soft: #4F6480;
  --line: #E2D9C3;
  --primary: #1E4D8C;
  --primary-soft: #E1EAF5;
  --accent: #7FA9D6;
  --accent-soft: #EAF1FA;
  --gold: #B98A3E;
  --gold-soft: #F3E6C9;
  --danger: #D63A3A;
  --on-primary: #FBFAF6;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: Candara, "Segoe UI", Calibri, Roboto, Arial, sans-serif;
  font-size: 16.5px;
  line-height: 1.6;
}

h1, h2, h3 {
  font-family: Constantia, Cambria, Georgia, "Times New Roman", serif;
  font-weight: 700;
  text-wrap: balance;
  color: var(--ink);
  margin: 0 0 14px;
}

.wrap {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px;
}

.eyebrow {
  font-size: 12.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--primary);
  font-weight: 600;
  margin: 0 0 10px;
}

/* Supratitlul din <h1>: arata ca un .eyebrow, dar face parte din titlu, ca
   termenii cautati ("broker de credite Bucuresti") sa fie in H1. */
.h1-kicker {
  display: block;
  font-family: Candara, "Segoe UI", system-ui, sans-serif;
  font-size: 12.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--primary);
  font-weight: 600;
  margin: 0 0 10px;
  line-height: 1.4;
}

a { color: var(--primary); }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
}
.brand {
  font-family: Constantia, Cambria, Georgia, serif;
  font-weight: 700;
  font-size: 18px;
  color: var(--ink);
  text-decoration: none;
}
.brand span { color: var(--ink-soft); font-weight: 400; font-size: 15px; }
.nav { display: flex; align-items: center; gap: 26px; }
.nav a { color: var(--ink-soft); text-decoration: none; font-size: 15px; transition: color 0.18s ease; }
.nav a:hover { color: var(--gold); }
.nav-cta {
  background: var(--primary);
  color: var(--on-primary) !important;
  padding: 8px 18px;
  border-radius: 3px;
  transition: background 0.18s ease;
}
.nav-cta:hover { background: var(--gold); }

/* Buttons */
.btn {
  display: inline-block;
  padding: 13px 24px;
  border-radius: 3px;
  text-decoration: none;
  font-weight: 600;
  font-size: 15px;
  border: 1px solid transparent;
  transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}
.btn-primary { background: var(--primary); color: var(--on-primary); }
.btn-primary:hover { background: var(--gold); }
.btn-ghost { background: transparent; border-color: var(--ink-soft); color: var(--ink); }
.btn-ghost:hover { border-color: var(--gold); color: var(--gold); }
.btn-full { width: 100%; text-align: center; border: none; cursor: pointer; }

/* Hero */
.hero { padding: 72px 0 56px; position: relative; overflow: hidden; }
.hero-skyline {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  width: 100%;
  height: 110px;
  opacity: 0.12;
  pointer-events: none;
}
.hero-skyline rect { fill: var(--primary); }
@media (max-width: 860px) { .hero-skyline { height: 70px; opacity: 0.1; } }
.hero-inner {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  align-items: center;
  gap: 40px;
}
.hero h1 { font-size: clamp(32px, 4.2vw, 46px); line-height: 1.15; }
.hero .lead { color: var(--ink-soft); font-size: 17px; max-width: 52ch; margin-bottom: 26px; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }

.hero-graphic { display: flex; justify-content: center; }
.hero-graphic svg { width: 220px; height: 220px; }
.hg-ring { stroke: var(--line); stroke-width: 1.5; }
.hg-path {
  stroke: var(--accent);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 200;
  stroke-dashoffset: 200;
  animation: draw 1.4s ease-out 0.2s forwards;
}
.hg-dot { fill: var(--accent); }
.hg-dot-small { fill: var(--primary); }
@keyframes draw { to { stroke-dashoffset: 0; } }
@media (prefers-reduced-motion: reduce) {
  .hg-path { animation: none; stroke-dashoffset: 0; }
}

/* Sections */
.section { padding: 64px 0; }
.section-alt {
  background:
    linear-gradient(var(--paper-raised), var(--paper-raised)),
    repeating-linear-gradient(90deg, color-mix(in srgb, var(--primary) 6%, transparent) 0px, color-mix(in srgb, var(--primary) 6%, transparent) 1px, transparent 1px, transparent 64px);
  background-blend-mode: normal;
}
.section-head { max-width: 640px; }
.section-head-center { max-width: 640px; margin: 0 auto 40px; text-align: center; }
.section-note { color: var(--ink-soft); font-size: 15px; }

.section-grid {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 48px;
  align-items: start;
}
.section-body p { margin: 0 0 14px; }

.check-list { list-style: none; padding: 0; margin: 20px 0 0; }
.check-list li {
  position: relative;
  padding-left: 26px;
  margin-bottom: 10px;
  color: var(--ink-soft);
}
.check-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--accent);
}

/* Credit cards */
.credit-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}
.credit-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 26px 22px;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}
.credit-card:hover {
  transform: translateY(-4px);
  border-color: var(--gold);
  box-shadow: 0 10px 24px -12px color-mix(in srgb, var(--ink) 35%, transparent);
}
.credit-icon {
  width: 34px;
  height: 34px;
  stroke: var(--primary);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  margin-bottom: 14px;
  transition: stroke 0.18s ease;
}
.credit-card:hover .credit-icon { stroke: var(--gold); }
.credit-card h3 { font-size: 18px; margin-bottom: 8px; }
.credit-card p { color: var(--ink-soft); font-size: 14.5px; margin: 0; }

/* Testimonials */
.testimonial-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}
.testimonial-card {
  border: 1px dashed var(--line);
  border-radius: 4px;
  padding: 24px;
  color: var(--ink-soft);
  transition: border-color 0.18s ease, background 0.18s ease;
}
.testimonial-card:hover {
  border-color: var(--gold);
  border-style: solid;
  background: var(--gold-soft);
}
.testimonial-card p { font-style: italic; margin: 0 0 12px; }
.testimonial-author { font-size: 13.5px; }

.hidden-field { position: absolute; left: -9999px; }

/* Întrebări frecvente */
.faq-list {
  max-width: 780px;
  margin: 0 auto;
  border-top: 1px solid var(--line);
}
.faq-item {
  border-bottom: 1px solid var(--line);
}
.faq-item summary {
  list-style: none;
  cursor: pointer;
  padding: 20px 44px 20px 0;
  position: relative;
  transition: color 0.18s ease;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary h3 {
  display: inline;
  font-size: 17px;
  font-weight: 600;
  color: var(--ink);
  margin: 0;
}
.faq-item summary:hover h3 { color: var(--gold); }

/* Semnul + care se roteste in x cand raspunsul e deschis */
.faq-item summary::after {
  content: "";
  position: absolute;
  right: 8px;
  top: 50%;
  width: 13px;
  height: 13px;
  margin-top: -6px;
  background:
    linear-gradient(var(--primary), var(--primary)) center/13px 1.5px no-repeat,
    linear-gradient(var(--primary), var(--primary)) center/1.5px 13px no-repeat;
  transition: transform 0.22s ease;
}
.faq-item[open] summary::after { transform: rotate(135deg); }
.faq-item[open] summary h3 { color: var(--primary); }

.faq-item p {
  margin: 0;
  padding: 0 44px 22px 0;
  color: var(--ink-soft);
  max-width: 66ch;
}

@media (prefers-reduced-motion: reduce) {
  .faq-item summary::after { transition: none; }
}

/* Contact */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
}
.contact-list { list-style: none; padding: 0; margin: 24px 0 0; }
.contact-list li {
  display: flex;
  flex-direction: column;
  padding: 12px 14px;
  margin: 0 -14px;
  border-bottom: 1px solid var(--line);
  border-radius: 3px;
  font-size: 15.5px;
  transition: background 0.18s ease, padding-left 0.18s ease;
}
.contact-list li:hover {
  background: var(--gold-soft);
  padding-left: 20px;
}
.contact-list a { text-decoration: none; color: var(--ink); font-weight: 600; }
.contact-label { font-size: 12px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink-soft); margin-bottom: 3px; }

.contact-form {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 28px;
  display: grid;
  gap: 16px;
}
.contact-form label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13.5px;
  color: var(--ink-soft);
  font-weight: 600;
}
.contact-form input,
.contact-form select,
.contact-form textarea {
  font-family: inherit;
  font-size: 15px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: var(--paper);
  color: var(--ink);
}
.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

.consent-label {
  flex-direction: row !important;
  align-items: flex-start;
  gap: 10px !important;
  font-weight: 400 !important;
  font-size: 13px !important;
  line-height: 1.5;
  color: var(--ink-soft);
}
.consent-label input[type="checkbox"] {
  width: 16px;
  height: 16px;
  margin-top: 2px;
  flex-shrink: 0;
  accent-color: var(--primary);
}
.consent-label a { color: var(--primary); }
.consent-label a:hover { color: var(--gold); }

.consent-error {
  display: none;
  color: var(--danger);
  font-size: 13px;
  font-weight: 600;
  margin: -8px 0 0;
}
.consent-error.show { display: block; }

.consent-label.gdpr-alert {
  animation: gdpr-flash 0.5s ease-in-out 3;
}
.consent-label.gdpr-alert input[type="checkbox"] {
  outline: 2px solid var(--danger);
  outline-offset: 2px;
  animation: gdpr-blink 0.5s ease-in-out 3;
}
@keyframes gdpr-flash {
  0%, 100% { background: transparent; }
  50% { background: color-mix(in srgb, var(--danger) 14%, transparent); }
}
@keyframes gdpr-blink {
  0%, 100% { box-shadow: none; }
  50% { box-shadow: 0 0 0 4px color-mix(in srgb, var(--danger) 35%, transparent); }
}
@media (prefers-reduced-motion: reduce) {
  .consent-label.gdpr-alert { animation: none; background: color-mix(in srgb, var(--danger) 14%, transparent); }
  .consent-label.gdpr-alert input[type="checkbox"] { animation: none; box-shadow: 0 0 0 4px color-mix(in srgb, var(--danger) 35%, transparent); }
}

/* Scroll reveal (Motion) */
.reveal { opacity: 0; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1 !important; transform: none !important; }
}

/* Floating contact CTA */
.floating-cta {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 30;
  background: var(--primary);
  color: var(--on-primary);
  padding: 14px 22px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 600;
  font-size: 14.5px;
  box-shadow: 0 8px 24px -8px rgba(0, 0, 0, 0.35);
  opacity: 0;
  transform: translateY(16px);
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease, background 0.18s ease;
}
.floating-cta.is-visible { opacity: 1; transform: translateY(0); pointer-events: auto; }
.floating-cta:hover { background: var(--gold); }
@media (max-width: 560px) {
  .floating-cta { right: 16px; bottom: 16px; padding: 12px 18px; font-size: 13.5px; }
}

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding: 24px 0; }
.footer-inner {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--ink-soft);
  font-size: 13.5px;
}

/* Responsive */
@media (max-width: 860px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-graphic { order: -1; }
  .hero-graphic svg { width: 140px; height: 140px; }
  .section-grid { grid-template-columns: 1fr; }
  .credit-grid { grid-template-columns: repeat(2, 1fr); }
  .testimonial-grid { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .nav { gap: 14px; }
  .nav a:not(.nav-cta) { display: none; }
}
@media (max-width: 520px) {
  .credit-grid { grid-template-columns: 1fr; }
}
