/* =========================================================
   Europe Brokers site styles
   ========================================================= */

:root {
  --ink:        #152019;
  --ink-soft:   #3a463f;
  --paper:      #f3f4f1;
  --paper-2:    #ffffff;
  --tint:       #eceee8;
  --loden:      #2f5d50;
  --loden-deep: #234a3f;
  --stone:      #71766e;
  --line:       #d7dad2;
  --brass:      #a97e3c;

  --font-display: "Spectral", Georgia, "Times New Roman", serif;
  --font-body: "Libre Franklin", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;

  --wrap: 1120px;
  --gutter: clamp(1.25rem, 5vw, 3rem);
  --header-h: 68px;
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
button, input, textarea { font: inherit; color: inherit; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 500; line-height: 1.12; letter-spacing: -0.01em; }

/* ---------- helpers ---------- */
.wrap { width: min(100% - (var(--gutter) * 2), var(--wrap)); margin-inline: auto; }
.measure { max-width: 60ch; }

.u-visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; left: 1rem; top: -3rem; z-index: 100;
  background: var(--ink); color: var(--paper); padding: 0.6rem 1rem;
  font-family: var(--font-mono); font-size: 0.8rem; letter-spacing: 0.06em;
  transition: top 0.2s ease;
}
.skip-link:focus { top: 1rem; }

:focus-visible {
  outline: 2px solid var(--loden);
  outline-offset: 3px;
}

.eyebrow {
  display: flex; align-items: center; gap: 0.75rem;
  font-family: var(--font-mono); font-size: 0.72rem; font-weight: 500;
  text-transform: uppercase; letter-spacing: 0.18em; color: var(--stone);
}
.eyebrow::before {
  content: ""; width: 26px; height: 1px; background: var(--brass); flex: none;
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0.85rem 1.5rem;
  font-family: var(--font-mono); font-size: 0.78rem; font-weight: 500;
  text-transform: uppercase; letter-spacing: 0.12em; text-decoration: none;
  border: 1px solid var(--ink); border-radius: 0;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.btn--solid { background: var(--loden); border-color: var(--loden); color: #fff; }
.btn--solid:hover { background: var(--loden-deep); border-color: var(--loden-deep); }
.btn--ghost { background: transparent; color: var(--ink); }
.btn--ghost:hover { background: var(--ink); color: var(--paper); }

/* ---------- brand ---------- */
.brand, .footer__brand { display: inline-flex; align-items: center; gap: 0.7rem; text-decoration: none; }
.brand__mark {
  display: grid; place-items: center;
  width: 30px; height: 30px; flex: none;
  background: var(--loden); color: var(--paper-2);
  font-family: var(--font-display); font-weight: 600; font-size: 0.95rem;
  letter-spacing: 0.02em;
}
.brand__name {
  font-family: var(--font-body); font-weight: 600; font-size: 0.9rem;
  text-transform: uppercase; letter-spacing: 0.2em;
}

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  transition: box-shadow 0.25s ease;
}
.site-header.is-scrolled { box-shadow: 0 1px 14px rgba(21, 32, 25, 0.08); }
.header__inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: clamp(1.5rem, 4vw, 3.5rem);
  min-height: var(--header-h);
}
.brand { flex: none; }
.nav__menu {
  list-style: none; padding: 0;
  display: flex; align-items: center; flex-wrap: nowrap; gap: 1.15rem;
}
.nav__menu a {
  text-decoration: none; white-space: nowrap;
  font-family: var(--font-mono); font-size: 0.74rem; font-weight: 500;
  text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink-soft);
  padding: 0.35rem 0;
  border-bottom: 1px solid transparent;
  transition: color 0.18s ease, border-color 0.18s ease;
}
.nav__menu a:hover { color: var(--ink); border-bottom-color: var(--brass); }
.nav__menu a.is-active { color: var(--ink); border-bottom-color: var(--loden); }
.nav__cta {
  border: 1px solid var(--loden) !important;
  color: var(--loden) !important;
  padding: 0.5rem 0.95rem !important;
  white-space: nowrap;
}
.nav__cta:hover { background: var(--loden); color: #fff !important; }

.nav__toggle {
  display: none;
  background: none; border: 1px solid var(--line); border-radius: 0;
  width: 42px; height: 38px; cursor: pointer;
  align-items: center; justify-content: center;
}
.nav__bars { display: grid; gap: 4px; width: 18px; }
.nav__bars span { display: block; height: 1.5px; background: var(--ink); transition: transform 0.2s ease, opacity 0.2s ease; }
.nav__toggle[aria-expanded="true"] .nav__bars span:nth-child(1) { transform: translateY(5.5px) rotate(45deg); }
.nav__toggle[aria-expanded="true"] .nav__bars span:nth-child(2) { opacity: 0; }
.nav__toggle[aria-expanded="true"] .nav__bars span:nth-child(3) { transform: translateY(-5.5px) rotate(-45deg); }

/* ---------- hero ---------- */
.hero {
  padding-top: clamp(4rem, 11vw, 8rem);
  padding-bottom: clamp(3rem, 7vw, 5rem);
  border-bottom: 1px solid var(--line);
}
.hero__inner {
  display: grid; gap: clamp(2.5rem, 6vw, 5rem);
  grid-template-columns: 1fr;
  align-items: start;
}
.hero__title {
  font-size: clamp(2.5rem, 6.2vw, 4.4rem);
  line-height: 1.04;
  margin: 1.4rem 0 1.5rem;
  max-width: 16ch;
}
.hero__accent { color: var(--loden); font-style: italic; font-weight: 500; }
.hero__lead {
  font-size: clamp(1.1rem, 1.6vw, 1.28rem);
  color: var(--ink-soft);
  max-width: 46ch;
}
.hero__actions { display: flex; flex-wrap: wrap; gap: 0.9rem; margin-top: 2rem; }

.hero__index { border-top: 1px solid var(--ink); padding-top: 1rem; }
.hero__index-label {
  font-family: var(--font-mono); font-size: 0.72rem; font-weight: 500;
  text-transform: uppercase; letter-spacing: 0.18em; color: var(--stone);
  margin-bottom: 1rem;
}
.codes {
  list-style: none; padding: 0;
  display: grid; grid-template-columns: repeat(6, 1fr); gap: 0.55rem 0.4rem;
  font-family: var(--font-mono); font-size: 0.9rem; letter-spacing: 0.06em;
  color: var(--ink-soft);
}
.codes li { padding: 0.2rem 0; }

.hero__facts {
  display: grid; gap: 1px;
  background: var(--line); border: 1px solid var(--line);
  margin-top: clamp(3rem, 7vw, 5rem);
}
.fact {
  background: var(--paper); padding: 1.4rem 1.5rem;
  display: flex; flex-direction: column; gap: 0.35rem;
}
.fact__k {
  font-family: var(--font-mono); font-size: 0.7rem; font-weight: 500;
  text-transform: uppercase; letter-spacing: 0.16em; color: var(--stone);
}
.fact__v { font-family: var(--font-display); font-size: 1.15rem; }

/* ---------- sections ---------- */
.section {
  padding-block: clamp(3.75rem, 9vw, 6.5rem);
  border-bottom: 1px solid var(--line);
}
.section--tint { background: var(--tint); }
.section__head { margin-bottom: clamp(2rem, 4vw, 3rem); }
.section__head h2 {
  font-size: clamp(1.9rem, 4vw, 2.7rem);
  margin-top: 0.9rem;
}
.section__intro { margin-top: 1rem; color: var(--ink-soft); }

.section__grid {
  display: grid; gap: clamp(2rem, 5vw, 3.5rem);
  grid-template-columns: 1fr;
}
.prose p + p { margin-top: 1.1rem; }
.prose p { color: var(--ink-soft); }

/* ---------- contrast list ---------- */
.contrast {
  display: grid; grid-template-columns: 1fr; gap: 1px;
  background: var(--line); border: 1px solid var(--line);
}
.contrast__col { background: var(--paper); padding: 1.5rem 1.6rem; }
.section--tint .contrast__col { background: var(--tint); }
.contrast__col dt {
  font-family: var(--font-mono); font-size: 0.72rem; font-weight: 500;
  text-transform: uppercase; letter-spacing: 0.16em; color: var(--stone);
  margin-bottom: 0.9rem;
}
.contrast__col dd {
  margin: 0; padding: 0.4rem 0 0.4rem 1.4rem; position: relative;
  font-size: 0.98rem;
}
.contrast__col dd::before {
  content: "+"; position: absolute; left: 0; top: 0.4rem;
  font-family: var(--font-mono); color: var(--loden);
}
.contrast__col--neg dd::before { content: "\2212"; color: var(--stone); }

/* ---------- terms / signature dotted leaders ---------- */
.terms { display: grid; gap: 0; }
.term {
  display: flex; align-items: baseline; gap: 0.5rem;
  padding: 0.95rem 0;
  border-bottom: 1px solid var(--line);
}
.term:first-child { border-top: 1px solid var(--ink); }
.term dt {
  flex: none; width: 11rem;
  font-family: var(--font-mono); font-size: 0.74rem; font-weight: 500;
  text-transform: uppercase; letter-spacing: 0.12em; color: var(--stone);
}
.term__leader {
  flex: 1 1 auto; align-self: center;
  border-bottom: 1px dotted var(--line);
  min-width: 1.5rem;
}
.term dd {
  flex: 0 1 auto; margin: 0; text-align: right;
  font-family: var(--font-display); font-size: 1.08rem;
}

/* ---------- process steps ---------- */
.steps { list-style: none; padding: 0; display: grid; gap: 0; counter-reset: none; }
.step {
  display: grid; grid-template-columns: 3.5rem 1fr; gap: 1.5rem;
  padding: 1.6rem 0;
  border-top: 1px solid var(--line);
}
.step:last-child { border-bottom: 1px solid var(--line); }
.step__n {
  font-family: var(--font-mono); font-size: 0.9rem; color: var(--brass);
  padding-top: 0.3rem;
}
.step__body h3 { font-size: 1.35rem; margin-bottom: 0.4rem; }
.step__body p { color: var(--ink-soft); max-width: 52ch; }

/* ---------- cards ---------- */
.cards {
  display: grid; grid-template-columns: 1fr; gap: 1px;
  background: var(--line); border: 1px solid var(--line);
}
.card { background: var(--tint); padding: 1.7rem 1.6rem; }
.card h3 { font-size: 1.2rem; margin-bottom: 0.5rem; }
.card p { color: var(--ink-soft); font-size: 0.98rem; }

/* ---------- coverage ---------- */
.coverage {
  list-style: none; padding: 0;
  display: grid; grid-template-columns: 1fr; gap: 1px;
  background: var(--line); border: 1px solid var(--line);
}
.coverage li {
  background: var(--paper); padding: 0.9rem 1.1rem;
  font-size: 0.95rem; display: flex; align-items: baseline; gap: 0.7rem;
}
.coverage__code {
  font-family: var(--font-mono); font-size: 0.8rem; letter-spacing: 0.08em;
  color: var(--loden); flex: none; width: 1.9rem;
}

/* ---------- contact ---------- */
.section--contact { background: var(--ink); color: var(--paper); border-bottom: none; }
.section--contact .eyebrow { color: #9aa39c; }
.section--contact .eyebrow::before { background: var(--brass); }
.section--contact h2 { color: var(--paper); }
.section--contact .measure { color: #c3c9c2; }
.contact__inner { display: block; }
.contact__intro h2 { font-size: clamp(1.9rem, 4vw, 2.7rem); margin: 0.9rem 0 1rem; }
.contact__email { margin-top: 2rem; }
.contact__email a {
  font-family: var(--font-display); font-size: clamp(1.5rem, 3.5vw, 2.1rem);
  color: var(--paper); text-decoration: none;
  border-bottom: 1px solid var(--brass);
  padding-bottom: 0.15rem;
  transition: color 0.18s ease, border-color 0.18s ease;
}
.contact__email a:hover { color: #d8b57a; border-bottom-color: #d8b57a; }

/* ---------- footer ---------- */
.site-footer { background: var(--ink); color: #9aa39c; padding-block: 2.5rem; }
.section--contact + .site-footer { border-top: 1px solid #2b352e; }
.footer__inner { display: grid; gap: 1.5rem; }
.site-footer .brand__mark { background: var(--paper-2); color: var(--ink); }
.site-footer .brand__name { color: var(--paper); }
.footer__meta { display: flex; gap: 2rem; font-family: var(--font-mono); font-size: 0.8rem; letter-spacing: 0.04em; }
.footer__meta a { color: var(--paper); }
.footer__legal { font-size: 0.8rem; line-height: 1.7; max-width: 70ch; }

/* ---------- reveal ---------- */
.js [data-reveal] { opacity: 0; transform: translateY(16px); transition: opacity 0.7s ease, transform 0.7s ease; }
.js [data-reveal].is-visible { opacity: 1; transform: none; }

/* =========================================================
   Responsive
   ========================================================= */
@media (min-width: 620px) {
  .contrast { grid-template-columns: 1fr 1fr; }
  .cards { grid-template-columns: 1fr 1fr; }
  .coverage { grid-template-columns: 1fr 1fr; }
  .hero__facts { grid-template-columns: repeat(3, 1fr); }
}

@media (min-width: 900px) {
  .hero__inner { grid-template-columns: 1.65fr 1fr; }
  .section__grid { grid-template-columns: 1.2fr 1fr; align-items: start; }
  .coverage { grid-template-columns: repeat(3, 1fr); }
}

@media (min-width: 1100px) {
  .coverage { grid-template-columns: repeat(4, 1fr); }
}

/* ---------- mobile nav ---------- */
@media (max-width: 1080px) {
  .nav__toggle { display: inline-flex; }
  .nav__menu {
    position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 12px 24px rgba(21, 32, 25, 0.1);
    padding: 0.5rem var(--gutter) 1.25rem;
    max-height: 0; overflow: hidden;
    transition: max-height 0.28s ease;
  }
  .nav { position: static; }
  .site-header { position: sticky; }
  .header__inner { position: relative; }
  .nav__menu.is-open { max-height: 80vh; }
  .nav__menu li { border-bottom: 1px solid var(--line); }
  .nav__menu li:last-child { border-bottom: none; }
  .nav__menu a { display: block; padding: 0.95rem 0; font-size: 0.8rem; border-bottom: none; }
  .nav__menu a:hover { border-bottom: none; }
  .nav__cta {
    display: inline-block !important; margin-top: 0.9rem;
    text-align: center;
  }
}

@media (max-width: 460px) {
  .term { flex-wrap: wrap; gap: 0.25rem; }
  .term dt { width: 100%; }
  .term__leader { display: none; }
  .term dd { text-align: left; width: 100%; }
  .step { grid-template-columns: 1fr; gap: 0.5rem; }
  .step__n { padding-top: 0; }
  .form { grid-template-columns: 1fr; }
  .codes { grid-template-columns: repeat(5, 1fr); }
}

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  .js [data-reveal] { opacity: 1; transform: none; transition: none; }
  * { scroll-behavior: auto !important; }
  .nav__menu { transition: none; }
}

html { scroll-behavior: smooth; }
:where(section, .hero) { scroll-margin-top: calc(var(--header-h) + 16px); }
