/* =========================================================
   DAVID ESTOLL — posrednik za obrnutu hipoteku
   Visual system
   ========================================================= */

:root {
  /* Palette */
  --ink: #0e2235;
  --ink-soft: #1b3247;
  --paper: #f4eee2;
  --paper-deep: #ece3d1;
  --sand: #e6d7bd;
  --terracotta: #b85c3c;
  --terracotta-deep: #8e4329;
  --olive: #5a6a4f;
  --black: #15140e;
  --body: #4a4438;
  --muted: #7a7263;
  --rule: #1b324722;

  /* Type */
  --serif: "Newsreader", "Iowan Old Style", Georgia, serif;
  --sans:
    "Manrope", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial,
    sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;

  /* Scale */
  --max: 1280px;
  --gutter: clamp(20px, 4vw, 56px);
}

/* Reset-ish */
*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
}
body {
  margin: 0;
  background: var(--paper);
  color: var(--body);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img,
svg {
  display: block;
  max-width: 100%;
}
a {
  color: inherit;
  text-decoration: none;
}
button {
  font: inherit;
  cursor: pointer;
}
h1,
h2,
h3,
h4,
h5 {
  margin: 0;
  color: var(--ink);
  font-weight: 400;
}
p {
  margin: 0 0 1em;
}

/* Type system */
.serif {
  font-family: var(--serif);
  font-weight: 380;
}
.sans {
  font-family: var(--sans);
}
.mono {
  font-family: var(--mono);
}

.eyebrow {
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--terracotta-deep);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.eyebrow::before {
  content: "";
  width: 22px;
  height: 1px;
  background: var(--terracotta-deep);
  display: inline-block;
}

.display {
  font-family: var(--serif);
  font-weight: 360;
  font-size: clamp(48px, 7.2vw, 112px);
  line-height: 0.96;
  letter-spacing: -0.015em;
  color: var(--ink);
}
.display em {
  font-style: italic;
  font-weight: 320;
  color: var(--terracotta-deep);
}
.h2 {
  font-family: var(--serif);
  font-weight: 380;
  font-size: clamp(34px, 4.4vw, 64px);
  line-height: 1.02;
  letter-spacing: -0.012em;
  color: var(--ink);
}
.h2 em {
  font-style: italic;
  color: var(--terracotta-deep);
  font-weight: 320;
}
.h3 {
  font-family: var(--serif);
  font-weight: 420;
  font-size: clamp(24px, 2.4vw, 32px);
  line-height: 1.15;
  color: var(--ink);
}
.kicker {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(20px, 1.8vw, 24px);
  color: var(--ink-soft);
  line-height: 1.4;
}
.lede {
  font-size: clamp(18px, 1.4vw, 22px);
  line-height: 1.55;
  color: var(--ink-soft);
  max-width: 60ch;
}
.smallcaps {
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--ink);
}
.num {
  font-family: var(--serif);
  font-weight: 320;
  font-feature-settings: "tnum", "lnum";
}

/* Layout */
.wrap {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter);
}
.rule {
  height: 1px;
  background: var(--rule);
  border: 0;
  margin: 0;
}

/* Navigation */
.nav {
  position: sticky;
  top: 0;
  z-index: 30;
  background: var(--paper);
  border-bottom: 1px solid var(--rule);
  backdrop-filter: blur(8px);
}
.nav-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  padding: 18px 0;
}
.brand {
  display: flex;
  flex-direction: column;
  line-height: 1;
  color: var(--ink);
  flex-shrink: 0;
}
.brand-name {
  font-family: var(--serif);
  font-weight: 420;
  font-size: 22px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.brand-sub {
  font-family: var(--sans);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 6px;
  font-weight: 500;
}
.nav-links {
  display: flex;
  gap: 28px;
  align-items: center;
  flex-wrap: wrap;
}
.nav-links a {
  font-size: 14px;
  color: var(--ink-soft);
  font-weight: 500;
  position: relative;
  padding: 6px 0;
  transition: color 0.2s;
}
.nav-links a:hover {
  color: var(--terracotta-deep);
}
.nav-links a.active {
  color: var(--ink);
}
.nav-links a.active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: var(--terracotta-deep);
}
.nav-cta {
  background: var(--ink);
  color: var(--paper);
  padding: 12px 22px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
  transition: background 0.2s;
}
.nav-cta:hover {
  background: var(--terracotta-deep);
}

@media (max-width: 1100px) {
  .nav-links {
    display: none;
  }
  .nav-links.mobile-open {
    display: flex;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--paper);
    border-bottom: 1px solid var(--rule);
    flex-direction: column;
    gap: 0;
    padding: 12px 0;
    align-items: stretch;
  }
  .nav-links.mobile-open a {
    padding: 14px var(--gutter);
    border-top: 1px solid var(--rule);
  }
  .nav-links.mobile-open a.nav-cta {
    margin: 8px var(--gutter);
    padding: 14px 22px;
    text-align: center;
    border-top: 0;
  }
  .nav-toggle {
    display: inline-flex;
  }
}
.nav-toggle {
  display: none;
  width: 40px;
  height: 40px;
  border: 1px solid var(--rule);
  background: transparent;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
}
.nav-toggle span {
  width: 18px;
  height: 1px;
  background: var(--ink);
  position: relative;
}
.nav-toggle span::before,
.nav-toggle span::after {
  content: "";
  position: absolute;
  left: 0;
  width: 18px;
  height: 1px;
  background: var(--ink);
}
.nav-toggle span::before {
  top: -6px;
}
.nav-toggle span::after {
  top: 6px;
}

/* Section */
.section {
  padding: clamp(72px, 10vw, 140px) 0;
}
.section-tight {
  padding: clamp(56px, 7vw, 96px) 0;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  padding: 16px 28px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.02em;
  transition: all 0.2s;
  border: 1px solid transparent;
}
.btn-primary {
  background: var(--ink);
  color: var(--paper);
}
.btn-primary:hover {
  background: var(--terracotta-deep);
}
.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--ink);
}
.btn-ghost:hover {
  background: var(--ink);
  color: var(--paper);
}
.btn .arrow {
  width: 16px;
  height: 1px;
  background: currentColor;
  position: relative;
}
.btn .arrow::after {
  content: "";
  position: absolute;
  right: 0;
  top: -3px;
  width: 7px;
  height: 7px;
  border-top: 1px solid currentColor;
  border-right: 1px solid currentColor;
  transform: rotate(45deg);
  transform-origin: right center;
}

/* Hero */
.hero {
  position: relative;
  padding-top: clamp(56px, 8vw, 96px);
  padding-bottom: clamp(72px, 10vw, 120px);
  overflow: hidden;
}
.hero-meta {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--rule);
  margin-bottom: clamp(48px, 7vw, 96px);
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}
.hero-meta span {
  display: inline-flex;
  gap: 10px;
  align-items: center;
}
.hero-meta .dot {
  width: 4px;
  height: 4px;
  background: var(--terracotta);
  border-radius: 50%;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(40px, 6vw, 88px);
  align-items: end;
}
@media (max-width: 880px) {
  .hero-grid {
    grid-template-columns: 1fr;
  }
}

/* Footer */
.footer {
  background: var(--ink);
  color: var(--paper);
  padding: 80px 0 32px;
  margin-top: clamp(80px, 12vw, 160px);
}
.footer .brand-name {
  color: var(--paper);
}
.footer .brand-sub {
  color: #b9c5d2;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 48px;
  padding-bottom: 56px;
  border-bottom: 1px solid #ffffff18;
}
@media (max-width: 880px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}
.footer h5 {
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #b9c5d2;
  font-weight: 600;
  margin-bottom: 20px;
}
.footer ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.footer ul a {
  color: var(--paper);
  opacity: 0.85;
  font-size: 14px;
}
.footer ul a:hover {
  color: var(--terracotta);
  opacity: 1;
}
.footer-tag {
  font-family: var(--serif);
  font-style: italic;
  font-size: 20px;
  line-height: 1.4;
  color: #dcc8ad;
  max-width: 36ch;
  margin-top: 18px;
}
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  padding-top: 28px;
  font-size: 12px;
  color: #b9c5d2;
  letter-spacing: 0.04em;
}

/* Cards / panels */
.panel {
  background: var(--paper-deep);
  border: 1px solid var(--rule);
  padding: clamp(28px, 4vw, 48px);
}
.panel-dark {
  background: var(--ink);
  color: #dcc8ad;
}
.panel-dark h2,
.panel-dark h3,
.panel-dark .h2,
.panel-dark .h3,
.panel-dark .display {
  color: var(--paper);
}

/* Tag chips */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  background: var(--paper-deep);
  border: 1px solid var(--rule);
  border-radius: 999px;
  font-size: 12px;
  color: var(--ink-soft);
  font-weight: 500;
  letter-spacing: 0.02em;
}
.chip-dark {
  background: #ffffff10;
  border-color: #ffffff20;
  color: var(--paper);
}

/* Decorative tile field (Croatian terracotta motif) */
.tiles {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 4px;
  width: 100%;
  aspect-ratio: 1 / 1.2;
}
.tiles .tile {
  background: var(--terracotta);
  opacity: 0.85;
}
.tiles .tile:nth-child(3n) {
  background: var(--terracotta-deep);
}
.tiles .tile:nth-child(5n) {
  background: var(--sand);
}
.tiles .tile:nth-child(7n) {
  background: var(--olive);
}
.tiles .tile:nth-child(11n) {
  background: var(--ink);
}

/* Photo placeholder — quiet, architectural */
.photo {
  position: relative;
  background: linear-gradient(180deg, var(--sand) 0%, var(--paper-deep) 100%);
  overflow: hidden;
  border: 1px solid var(--rule);
}
.photo .photo-tag {
  position: absolute;
  bottom: 14px;
  left: 14px;
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  background: #ffffffb0;
  backdrop-filter: blur(4px);
  padding: 6px 10px;
  color: var(--ink);
  font-weight: 600;
}

/* Stat row */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--rule);
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}
@media (max-width: 880px) {
  .stats {
    grid-template-columns: repeat(2, 1fr);
  }
}
.stat {
  background: var(--paper);
  padding: 36px 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.stat-num {
  font-family: var(--serif);
  font-weight: 320;
  font-size: clamp(48px, 5vw, 72px);
  line-height: 1;
  color: var(--ink);
  letter-spacing: -0.02em;
}
.stat-num sup {
  font-size: 0.5em;
  color: var(--terracotta-deep);
  vertical-align: top;
  margin-left: 2px;
  font-style: italic;
}
.stat-label {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.5;
  max-width: 28ch;
}

/* Process steps */
.process {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  border-top: 1px solid var(--rule);
}
@media (max-width: 880px) {
  .process {
    grid-template-columns: 1fr;
  }
}
.process-step {
  padding: 32px 28px 40px;
  border-right: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-height: 280px;
  position: relative;
  background: var(--paper);
  transition: background 0.3s;
}
.process-step:last-child {
  border-right: none;
}
.process-step:hover {
  background: var(--paper-deep);
}
.process-step .num {
  font-size: 56px;
  color: var(--terracotta);
  line-height: 1;
}
.process-step h4 {
  font-family: var(--serif);
  font-weight: 420;
  font-size: 22px;
  color: var(--ink);
  margin: 0;
}
.process-step p {
  color: var(--ink-soft);
  font-size: 15px;
  line-height: 1.55;
  margin: 0;
}

/* FAQ */
.faq-item {
  border-top: 1px solid var(--rule);
  padding: 28px 0;
  cursor: pointer;
}
.faq-item:last-child {
  border-bottom: 1px solid var(--rule);
}
.faq-q {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 32px;
  font-family: var(--serif);
  font-size: clamp(20px, 2vw, 26px);
  color: var(--ink);
  font-weight: 420;
  line-height: 1.25;
}
.faq-toggle {
  font-family: var(--sans);
  font-size: 24px;
  color: var(--terracotta-deep);
  transition: transform 0.3s;
  flex-shrink: 0;
}
.faq-item.open .faq-toggle {
  transform: rotate(45deg);
}
.faq-a {
  display: none;
  margin-top: 18px;
  color: var(--ink-soft);
  font-size: 16px;
  line-height: 1.65;
  max-width: 65ch;
}
.faq-item.open .faq-a {
  display: block;
}

/* Forms */
.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 22px;
}
.field label {
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
}
.field input,
.field select,
.field textarea {
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--ink);
  padding: 12px 0;
  font: inherit;
  font-size: 17px;
  color: var(--ink);
  font-family: var(--sans);
  outline: none;
}
.field input:focus,
.field select:focus,
.field textarea:focus {
  border-bottom-color: var(--terracotta-deep);
}
.field input[type="range"] {
  border: 0;
  padding: 0;
  -webkit-appearance: none;
  height: 6px;
  background: var(--paper-deep);
  border-radius: 999px;
}
.field input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 22px;
  height: 22px;
  background: var(--terracotta-deep);
  border-radius: 50%;
  cursor: pointer;
}
.field input[type="range"]::-moz-range-thumb {
  width: 22px;
  height: 22px;
  background: var(--terracotta-deep);
  border-radius: 50%;
  border: 0;
  cursor: pointer;
}

/* Pull quote */
.pull {
  font-family: var(--serif);
  font-size: clamp(28px, 3.4vw, 44px);
  line-height: 1.2;
  font-style: italic;
  color: var(--ink);
  font-weight: 360;
  letter-spacing: -0.01em;
}
.pull::before {
  content: "\201C";
  font-size: 1.6em;
  color: var(--terracotta);
  line-height: 0;
  position: relative;
  top: 0.2em;
  margin-right: 0.08em;
}
.attribution {
  margin-top: 28px;
  font-size: 13px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
}

/* Page header (sub-pages) */
.page-head {
  padding: clamp(56px, 8vw, 96px) 0 clamp(48px, 6vw, 80px);
  border-bottom: 1px solid var(--rule);
}
.crumb {
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 28px;
  font-weight: 600;
}
.crumb a:hover {
  color: var(--terracotta-deep);
}
.crumb span {
  margin: 0 12px;
  opacity: 0.5;
}

/* Utility */
.flex-between {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 24px;
  flex-wrap: wrap;
}
.muted {
  color: var(--muted);
}
.serif-em {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 360;
  color: var(--terracotta-deep);
}
.tnum {
  font-variant-numeric: tabular-nums;
}

/* Reverse mortgage tile illustration */
.house-illo {
  width: 100%;
  aspect-ratio: 4/5;
  position: relative;
  background: var(--sand);
  overflow: hidden;
  border: 1px solid var(--rule);
}
