/* ==========================================================================
   GFR Finance — base: tokens, reset, typography, buttons, forms
   ========================================================================== */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Source+Serif+4:opsz,wght@8..60,400;8..60,500;8..60,600&display=swap');

:root {
  /* Palette */
  --navy-900: #071523;
  --navy-800: #0b1f33;
  --navy-700: #12293f;
  --steel-600: #2f4a63;
  --steel-400: #5c7488;
  --ink: #16202c;
  --body: #38495b;
  --muted: #6b7c8d;
  --line: #dde3ea;
  --line-soft: #eaeef3;
  --paper: #f6f4f0;
  --paper-2: #eeebe5;
  --white: #ffffff;
  --gold-600: #96793d;
  --gold-500: #a8873f;
  --gold-400: #bb9d5c;
  --gold-soft: rgba(168, 135, 63, 0.12);
  --ok: #1f6b4a;
  --warn: #8a6a1f;
  --bad: #8b2e2e;

  /* Type */
  --font-display: 'Source Serif 4', 'Georgia', 'Times New Roman', serif;
  --font-body: 'Inter', -apple-system, 'Segoe UI', Roboto, sans-serif;

  /* Space + shape */
  --shell: 1240px;
  --shell-narrow: 900px;
  --radius: 3px;
  --radius-lg: 4px;
  --section-y: clamp(3.5rem, 7vw, 7rem);
  --shadow-sm: 0 1px 2px rgba(11, 31, 51, 0.06), 0 4px 14px rgba(11, 31, 51, 0.06);
  --shadow-md: 0 12px 36px rgba(11, 31, 51, 0.12);
  --shadow-lg: 0 26px 70px rgba(7, 21, 35, 0.22);
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--body);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.7;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img, svg, video { display: block; max-width: 100%; height: auto; }

h1, h2, h3, h4 {
  margin: 0 0 0.6em;
  font-family: var(--font-display);
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -0.01em;
  color: var(--navy-800);
}

h1 { font-size: clamp(2rem, 4vw, 3rem); }
h2 { font-size: clamp(1.55rem, 2.6vw, 2.25rem); }
h3 { font-size: clamp(1.1rem, 1.5vw, 1.3rem); }
h4 { font-size: 1.05rem; }

p { margin: 0 0 1.1em; }
p:last-child { margin-bottom: 0; }

a { color: var(--steel-600); text-decoration: none; transition: color 0.2s var(--ease); }
a:hover { color: var(--navy-800); }

strong { font-weight: 600; color: var(--ink); }
small { font-size: 0.85em; }
code { font-family: ui-monospace, 'SFMono-Regular', Menlo, monospace; font-size: 0.92em; background: var(--paper-2); padding: 0.1em 0.35em; }

ul, ol { margin: 0 0 1.2em; padding-left: 1.2em; }
li { margin-bottom: 0.45em; }

hr { border: 0; border-top: 1px solid var(--line); margin: 2rem 0; }

blockquote {
  margin: 0 0 1.2em;
  padding-left: 1rem;
  border-left: 2px solid var(--gold-400);
  color: var(--muted);
  font-style: italic;
}

::selection { background: var(--navy-800); color: #fff; }

:focus-visible {
  outline: 2px solid var(--gold-500);
  outline-offset: 2px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--navy-800);
  color: #fff;
  padding: 0.7rem 1.1rem;
  z-index: 200;
}
.skip-link:focus { left: 0; color: #fff; }

/* ------------------------------------------------------------- Utilities -- */

.shell {
  width: min(var(--shell), calc(100% - 2.6rem));
  margin-inline: auto;
}

.center { text-align: center; }
.right { text-align: right; }

.lead {
  font-size: 1.08rem;
  color: var(--body);
}

.note {
  font-size: 0.86rem;
  line-height: 1.6;
  color: var(--muted);
  margin-top: 0.8rem;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  margin: 0 0 0.85rem;
  font-family: var(--font-body);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold-600);
}
.eyebrow::before {
  content: "";
  width: 30px;
  height: 1px;
  background: var(--gold-400);
}
.eyebrow--light { color: var(--gold-400); }
.eyebrow--light::before { background: var(--gold-400); }

.tag {
  display: inline-block;
  padding: 0.2rem 0.5rem;
  background: var(--paper-2);
  color: var(--navy-700);
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.empty {
  padding: 2.5rem;
  text-align: center;
  color: var(--muted);
  background: var(--white);
  border: 1px solid var(--line);
}

/* --------------------------------------------------------------- Buttons -- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.95rem 1.6rem;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 0.92rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 1.2;
  text-align: center;
  cursor: pointer;
  transition: background 0.25s var(--ease), color 0.25s var(--ease),
              border-color 0.25s var(--ease), transform 0.25s var(--ease);
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn--primary { background: var(--navy-800); color: #fff; }
.btn--primary:hover { background: var(--steel-600); color: #fff; }

.btn--gold { background: var(--gold-500); color: #fff; }
.btn--gold:hover { background: var(--gold-600); color: #fff; }

.btn--outline { background: transparent; border-color: var(--navy-800); color: var(--navy-800); }
.btn--outline:hover { background: var(--navy-800); color: #fff; }

.btn--outline-light { background: rgba(255,255,255,0.06); border-color: rgba(255,255,255,0.6); color: #fff; }
.btn--outline-light:hover { background: #fff; color: var(--navy-800); border-color: #fff; }

.btn--ghost { background: var(--paper-2); color: var(--navy-800); }
.btn--ghost:hover { background: var(--line); color: var(--navy-800); }

.btn--sm { padding: 0.62rem 1.05rem; font-size: 0.85rem; }
.btn--lg { padding: 1.05rem 2rem; font-size: 1rem; }
.btn--block { width: 100%; }

.btnrow {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  align-items: center;
  margin-top: 1.6rem;
}
.btnrow--center { justify-content: center; }

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--navy-800);
}
.link-arrow::after {
  content: "→";
  transition: transform 0.25s var(--ease);
}
.link-arrow:hover::after { transform: translateX(4px); }
.link-arrow--light { color: #fff; }
.link-arrow--light:hover { color: var(--gold-400); }

.link-plain {
  font-size: 0.88rem;
  color: var(--muted);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.link-plain:hover { color: var(--navy-800); }

/* ----------------------------------------------------------------- Forms -- */

.field { margin-bottom: 1.1rem; }

label {
  display: block;
  margin-bottom: 0.4rem;
  font-size: 0.84rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--navy-800);
}

input[type="text"], input[type="email"], input[type="tel"], input[type="number"],
input[type="date"], input[type="password"], input[type="search"], select, textarea {
  width: 100%;
  padding: 0.82rem 0.95rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  color: var(--ink);
  font-family: inherit;
  font-size: 0.95rem;
  line-height: 1.5;
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
  appearance: none;
}

select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath fill='%236b7c8d' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.95rem center;
  background-size: 11px;
  padding-right: 2.4rem;
}

textarea { resize: vertical; min-height: 120px; }

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--steel-600);
  box-shadow: 0 0 0 3px rgba(47, 74, 99, 0.12);
}

input[type="file"] {
  width: 100%;
  padding: 0.65rem;
  border: 1px dashed var(--line);
  background: var(--white);
  font-size: 0.88rem;
}

input[type="range"].slider {
  width: 100%;
  height: 3px;
  margin-top: 0.9rem;
  padding: 0;
  border: 0;
  background: var(--line);
  border-radius: 2px;
  appearance: none;
  cursor: pointer;
}
input[type="range"].slider::-webkit-slider-thumb {
  appearance: none;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--navy-800);
  border: 3px solid #fff;
  box-shadow: 0 1px 6px rgba(11,31,51,.35);
}
input[type="range"].slider::-moz-range-thumb {
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--navy-800);
  border: 3px solid #fff;
}

.field-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 0 1.1rem;
}

.field__hint {
  display: flex;
  justify-content: space-between;
  margin: 0.4rem 0 0;
  font-size: 0.78rem;
  color: var(--muted);
}

.field__error {
  margin: 0.35rem 0 0;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--bad);
}

.field.has-error input, .field.has-error select, .field.has-error textarea { border-color: var(--bad); }

.checkbox {
  display: flex;
  gap: 0.65rem;
  align-items: flex-start;
  margin-bottom: 0.8rem;
  font-size: 0.87rem;
  font-weight: 400;
  line-height: 1.55;
  color: var(--body);
}
.checkbox input { width: 18px; height: 18px; margin-top: 0.15rem; flex: 0 0 auto; accent-color: var(--navy-800); }

.consents {
  padding: 1.1rem 1.2rem;
  margin: 1.4rem 0;
  background: var(--paper);
  border: 1px solid var(--line);
}
.consents.has-error { border-color: var(--bad); }

fieldset { margin: 0; padding: 0; border: 0; }

legend {
  display: block;
  width: 100%;
  padding: 0 0 1rem;
  margin-bottom: 0.6rem;
  border-bottom: 1px solid var(--line);
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 500;
  color: var(--navy-800);
}
.legend--sub {
  margin-top: 2rem;
  font-size: 1.1rem;
}

/* --------------------------------------------------------------- Alerts --- */

.alert {
  padding: 1rem 1.2rem;
  margin-bottom: 1.4rem;
  background: var(--white);
  border: 1px solid var(--line);
  border-left-width: 3px;
  font-size: 0.92rem;
}
.alert--success { border-left-color: var(--ok); }
.alert--error { border-left-color: var(--bad); }
.alert--info { border-left-color: var(--steel-600); }

.badge {
  display: inline-block;
  padding: 0.22rem 0.55rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  border-radius: 2px;
  background: var(--paper-2);
  color: var(--navy-700);
}
.badge--ok { background: #e6f2ec; color: var(--ok); }
.badge--no { background: #f8e9e9; color: var(--bad); }
.badge--wait { background: #f7f1de; color: var(--warn); }
.badge--info { background: #e7edf4; color: var(--steel-600); }

/* --------------------------------------------------------------- Motion --- */

[data-reveal] {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
[data-reveal].is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
  [data-reveal] { opacity: 1; transform: none; }
}

@media print {
  .topbar, .masthead, .footer, .floaters, .chatbox, .cookiebar, .btn { display: none !important; }
  body { background: #fff; }
}
