/* ============================================
   Reliance Mortgage — Design System
   Refined palette: deep navy + antique gold
   (muted, premium tones vs. the brighter original)
   saman khalid
   ============================================ */


:root {
  --teal-deep:    #0a2138;  /* header / footer — deeper, richer navy */
  --teal:         #12314f;  /* section bands — mid navy */
  --teal-light:   #1c4a70;  /* accents / gradients — lighter navy */
  --gold:         #ab8a54;  /* antique gold — muted brass, less yellow */
  --gold-light:   #d6bd8d;  /* champagne highlight for dark backgrounds */
  --cream:        #f7f5f0;  /* warmer, softer paper tone */
  --cream-dark:   #e8e1d0;
  --ink:          #0b1a2a;
  --paper:        #ffffff;
  --grey:         #5a6572;

  /* Sampled straight from the logo artwork, so the header reads as
     one piece with the mark instead of fighting it. */
  --logo-navy:    #0e1b3e;  /* logo's darkest outline / wordmark */
  --logo-blue:    #0f669c;  /* logo's mid roof-line blue */
  --logo-tint:    #f5f3ee;  /* light neutral header background keeps the logo fully visible */
  --logo-tint-dk: #d8d2c5;  /* slightly deeper tint — borders/dividers */

  --font-display: "Fraunces", "Iowan Old Style", Georgia, serif;
  --font-body:    "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --container: 1180px;
  --radius: 4px;
  --ease: cubic-bezier(.22,.61,.36,1);
}

@font-face {
  font-family: "Fraunces";
  src: local("Georgia");
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.1;
  margin: 0 0 0.5em;
  letter-spacing: -0.01em;
}

p { margin: 0 0 1em; max-width: 62ch; }

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

/* Focus visibility */
a:focus-visible, button:focus-visible, input:focus-visible,
textarea:focus-visible, select:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 16px 32px;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: transform .25s var(--ease), background .25s var(--ease), box-shadow .15s var(--ease);
  white-space: nowrap;
}
.btn-dark {
  background: var(--ink);
  color: var(--paper);
}
.btn-dark:hover { background: #000; transform: translateY(-2px); }
.btn-dark:active { background: #000; transform: translateY(0) scale(0.97); box-shadow: inset 0 2px 5px rgba(0,0,0,.35); }
.btn-gold {
  background-image: linear-gradient(90deg, var(--gold) 0%, var(--gold-light) 50%, var(--gold) 100%);
  background-size: 220% 100%;
  background-position: 0% 0;
  color: var(--ink);
  transition: background-position .6s var(--ease), transform .25s var(--ease), box-shadow .15s var(--ease);
}
.btn-gold:hover { background-position: 100% 0; transform: translateY(-2px); }
.btn-gold:active { background-position: 100% 0; transform: translateY(0) scale(0.97); box-shadow: inset 0 2px 5px rgba(0,0,0,.25); }
.btn-outline {
  background: transparent;
  color: var(--paper);
  border: 1px solid rgba(255,255,255,.5);
}
.btn-outline:hover { border-color: var(--gold); color: var(--gold); }
.btn-outline:active { background: rgba(255,255,255,.12); transform: scale(0.97); }
.btn-block { width: 100%; }

/* ---------- Rotating headline ---------- */
.rotate-viewport{
  display:block;
  overflow:hidden;
  -webkit-mask-image:linear-gradient(to bottom, transparent 0, #000 20%, #000 80%, transparent 100%);
          mask-image:linear-gradient(to bottom, transparent 0, #000 20%, #000 80%, transparent 100%);
  transition:height .55s var(--ease);
}
.rotate-track{
  display:flex;
  flex-direction:column;
  transition:transform .6s var(--ease);
}
.rotate-line{
  display:block;
  color:var(--gold-light);
}
/* ---------- Header ---------- */
.site-header {
  background: transparent;
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 0;
  box-shadow: none;
  padding: 8px clamp(12px, 1.4vw, 26px);
  margin-bottom: 0;
}
.site-header .container {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: none;
  min-height: 96px;
  padding: 8px 24px;
  gap: 20px;
  background: rgba(255, 255, 255, .78);
  border: 1px solid rgba(171, 138, 84, .42);
  border-radius: 999px;
  box-shadow: 0 12px 32px rgba(14, 27, 62, .08);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  animation: nav-arrive .65s var(--ease) both,
    nav-border-glow 6s ease-in-out 1s infinite;
}
.site-header .container::after {
  content: "";
  position: absolute;
  inset: -1px;
  padding: 1px;
  border-radius: inherit;
  pointer-events: none;
  background: linear-gradient(100deg, transparent 35%, #ab8a54 46%, #f2dcad 50%, transparent 62%);
  background-size: 300% 100%;
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  animation: nav-gold-trace 4s linear infinite;
}
@keyframes nav-gold-trace {
  from { background-position: 100% 0; }
  to { background-position: -100% 0; }
}
@keyframes nav-border-glow {
  0%, 100% {
    border-color: rgba(171, 138, 84, .42);
    box-shadow: 0 12px 32px rgba(14, 27, 62, .08);
  }
  50% {
    border-color: rgba(214, 189, 141, .82);
    box-shadow: 0 12px 34px rgba(171, 138, 84, .16);
  }
}
@keyframes nav-arrive {
  from { opacity: 0; transform: translateY(-14px); }
  to { opacity: 1; transform: translateY(0); }
}
.brand {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  gap: 8px;
  color: var(--logo-navy);
}
.brand .mark {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
}
img.mark { object-fit: contain; }
.mark.mark--header {
  width: 100px;
  height: 82px;
  color: var(--logo-blue);
}
.mark.mark--footer {
  width: auto;
  height: 96px;
  border-radius: 8px;
  background: var(--paper);
  padding: 8px 14px;
  margin-left: auto;
  display: block;
}
.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
  display: none;
}
.brand--fallback .brand-text { display: flex; }
.brand-text .name {
  font-family: var(--font-body);
  font-size: 1.02rem;
  font-weight: 500;
  color: var(--logo-navy);
}
.brand-text .tag {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--logo-navy);
  font-style: normal;
}
.site-header nav { flex: 1; }
.nav-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(12px, 1.65vw, 28px);
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-links a {
  position: relative;
  display: inline-block;
  color: #292a2d;
  font-size: clamp(.92rem, 1.05vw, 1.05rem);
  font-weight: 600;
  white-space: nowrap;
  padding-bottom: 6px;
  transition: color .2s, transform .2s;
}
.nav-links a::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--gold), var(--gold-light));
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform .28s var(--ease);
}
.nav-links a:hover { transform: translateY(-2px); }
.nav-links a:hover::after,
.nav-links a[aria-current="page"]::after { transform: scaleX(1); }
.nav-links a:hover,
.nav-links a[aria-current="page"] {
  color: var(--logo-blue);
}
.header-actions {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  gap: 12px;
}
.header-cta {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  padding: 12px 20px;
  border: 1px solid rgba(171, 138, 84, .62);
  border-radius: 16px;
  background: linear-gradient(135deg, #fffdf8, #f2eadb);
  color: var(--logo-navy);
  font-size: 1rem;
  font-weight: 650;
  white-space: nowrap;
  box-shadow: 0 4px 12px rgba(14, 27, 62, .08);
  transition: transform .22s var(--ease), border-color .22s var(--ease),
    background-color .22s var(--ease), color .22s var(--ease), box-shadow .22s var(--ease);
}
.header-cta:hover {
  transform: translateY(-3px);
  border-color: var(--logo-navy);
  background: var(--logo-navy);
  color: #fff;
  box-shadow: 0 8px 18px rgba(14, 27, 62, .2);
}
.header-cta:active {
  transform: translateY(1px) scale(.97);
  border-color: var(--logo-navy);
  background: var(--logo-navy);
}
.nav-toggle {
  display: none;
  background: #fff;
  border: 1px solid rgba(14,27,62,.18);
  color: var(--logo-navy);
  padding: 8px 10px;
  border-radius: 12px;
}

@media (max-width: 900px) {
  .nav-links { display: none; }
  .nav-toggle { display: inline-flex; }
  #nav-links.is-open {
    position: absolute;
    top: 100%;
    left: 10px;
    right: 10px;
    z-index: 150;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 12px 24px;
    background: #fff;
    border: 1px solid rgba(14, 27, 62, .08);
    border-radius: 20px;
    box-shadow: 0 12px 24px rgba(14, 27, 62, .14);
  }
  #nav-links.is-open a {
    display: block;
    padding: 12px 0;
    border-bottom: 1px solid rgba(14, 27, 62, .08);
  }
  #nav-links.is-open li:last-child a { border-bottom: 0; }
}

/* ---------- Hero (wave) ---------- */
.hero {
  position: relative;
  background:
    linear-gradient(120deg, rgba(14,27,62,.82), rgba(14,27,62,.55) 55%, rgba(14,27,62,.35)),
    url("https://images.unsplash.com/photo-1604166168285-173fa2afad18?fm=jpg&q=80&w=2400&auto=format&fit=crop")
      center / cover no-repeat;
  color: var(--paper);
  padding: 96px 0 160px;
  overflow: hidden;
}
.hero::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -1px;
  height: 90px;
  background: var(--paper);
  clip-path: path("M0,90 C 320,10 900,10 1900,60 L1900,90 L0,90 Z");
}
.hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  max-width: 640px;
}
.eyebrow-rule {
  width: 64px;
  height: 3px;
  background: var(--gold);
  margin: 20px 0 28px;
  border: none;
}
.hero h1 {
  font-size: clamp(2.4rem, 5vw, 4.2rem);
  max-width: 14ch;
}
.hero .lede {
  background: rgba(12,31,31,.35);
  border: 1px solid rgba(255,255,255,.12);
  padding: 24px 28px;
  border-radius: var(--radius);
  max-width: 46ch;
  font-size: 1.05rem;
  color: var(--cream);
}
.hero-ctas {
  display: flex;
  gap: 16px;
  margin-top: 36px;
  flex-wrap: wrap;
}
.hero-art {
  position: relative;
  aspect-ratio: 4/3;
  border-radius: var(--radius);
  overflow: hidden;
  background: linear-gradient(135deg, var(--teal-light), var(--teal-deep) 70%);
  border: 1px solid rgba(228,211,160,.25);
}
.hero-art svg { width: 100%; height: 100%; }

/* ---------- Sections ---------- */
section { padding: 96px 0; }
.section-cream { background: var(--cream); }
.section-teal { background: var(--teal); color: var(--paper); }
.section-teal p { color: rgba(245,243,238,.85); }
.section-deep { background: var(--teal-deep); color: var(--paper); }

.section-head {
  text-align: center;
  margin-bottom: 56px;
}
.section-head h2 {
  font-size: clamp(1.8rem, 3.4vw, 2.6rem);
}
.section-head .rule,
.rule {
  width: 56px;
  height: 3px;
  background: var(--gold);
  margin: 18px auto 0;
  border: none;
}
.section-head.align-left { text-align: left; }
.section-head.align-left .rule { margin-left: 0; }

/* ---------- Service columns (accordion) ---------- */
.offer-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
}
.offer-col h3 {
  font-size: 1.5rem;
  color: var(--gold);
  margin-bottom: 24px;
}
.accordion-item {
  border: 1px solid rgba(228,211,160,.2);
  background: rgba(245,243,238,.04);
  border-radius: var(--radius);
  margin-bottom: 14px;
  overflow: hidden;
}
.accordion-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: none;
  border: none;
  color: var(--paper);
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 500;
  text-align: left;
  padding: 20px 22px;
  cursor: pointer;
}
.accordion-trigger .plus {
  font-size: 1.3rem;
  color: var(--gold);
  transition: transform .25s var(--ease);
}
.accordion-trigger[aria-expanded="true"] .plus { transform: rotate(45deg); }
.accordion-panel {
  max-height: 0;
  overflow: hidden;
  transition: max-height .3s var(--ease);
  padding: 0 22px;
}
.accordion-panel p {
  color: rgba(245,243,238,.78);
  font-size: 0.94rem;
  padding-bottom: 18px;
  margin: 0;
}
.offer-disclaimer {
  margin-top: 40px;
  font-size: 0.85rem;
  color: rgba(245,243,238,.55);
  text-align: center;
  max-width: 70ch;
  margin-left: auto;
  margin-right: auto;
}

@media (max-width: 800px) {
  .offer-grid { grid-template-columns: 1fr; gap: 40px; }
  .hero-grid { grid-template-columns: 1fr; }
}

/* ---------- Service cards (carousel-style grid) ---------- */
.services-carousel {
  overflow: hidden;
  position: relative;
  -webkit-mask-image: linear-gradient(to right, transparent 0, #000 40px, #000 calc(100% - 40px), transparent 100%);
          mask-image: linear-gradient(to right, transparent 0, #000 40px, #000 calc(100% - 40px), transparent 100%);
}
.services-carousel .card-row {
  display: flex;
  flex-wrap: nowrap;
  gap: 28px;
  width: max-content;
  animation: services-slide 30s linear infinite reverse;
}
.services-carousel:hover .card-row,
.services-carousel:focus-within .card-row {
  animation-play-state: paused;
}
.services-carousel .service-card {
  flex: 0 0 340px;
  width: 340px;
}
@keyframes services-slide {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
@media (prefers-reduced-motion: reduce) {
  .services-carousel .card-row { animation: none; }
}
.card-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 28px;
}
.service-card {
  background: var(--paper);
  border: 1px solid var(--cream-dark);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.service-card .icon-panel {
  aspect-ratio: 4/3;
  background-size: cover;
  background-position: center;
  background-color: var(--teal-deep);
  position: relative;
}
.service-card .icon-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(14,42,68,.6), rgba(14,42,68,.78));
}
.service-card .body { padding: 28px; flex: 1; display: flex; flex-direction: column; }
.service-card h3 { font-size: 1.3rem; margin-bottom: 12px; }
.service-card p { font-size: 0.96rem; color: var(--grey); flex: 1; }
.service-card .btn { margin-top: 16px; align-self: flex-start; padding: 13px 24px; font-size: 0.85rem; }

/* ---------- Process (steps) ---------- */
.process-list { display: grid; gap: 18px; }
.process-item {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 20px;
  border: 1px solid rgba(228,211,160,.2);
  border-radius: var(--radius);
  padding: 24px;
  background: rgba(245,243,238,.03);
  transition: transform .3s var(--ease), border-color .3s var(--ease), background .3s var(--ease) !important;
}
.process-item:hover {
  transform: translateX(6px);
  border-color: rgba(201,169,97,.5);
  background: rgba(245,243,238,.06);
}
.process-list .process-item.reveal:nth-child(1) { transition-delay: 0s; }
.process-list .process-item.reveal:nth-child(2) { transition-delay: .15s; }
.process-list .process-item.reveal:nth-child(3) { transition-delay: .3s; }
.process-list .process-item.reveal:nth-child(4) { transition-delay: .45s; }
.process-item .num {
  font-family: var(--font-display);
  font-size: 1.8rem;
  color: var(--gold);
}
.process-item h3 { font-size: 1.15rem; margin-bottom: 8px; }
.process-item p { color: rgba(245,243,238,.8); margin: 0; font-size: 0.94rem; }

/* ---------- Why Choose Us ---------- */
.why-choose {
  position: relative;
  padding: 96px 0;
  color: var(--paper);
  background:
    linear-gradient(120deg, rgba(30,40,90,.82), rgba(20,30,70,.72)),
    url("https://images.unsplash.com/photo-1612831820363-9b92f70109a4?fm=jpg&q=75&w=2000&auto=format&fit=crop")
      center / cover no-repeat;
}
.why-head {
  margin-bottom: 56px;
}
.why-head .eyebrow-rule {
  display: inline-block;
  width: 48px;
  margin: 0 16px 0 0;
  vertical-align: middle;
}
.why-head h2 {
  display: inline;
  font-size: clamp(1.8rem, 3.2vw, 2.6rem);
  font-weight: 400;
  vertical-align: middle;
}
.why-head h2 strong { font-weight: 700; }
.why-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px 56px;
}
.why-item h3 {
  font-size: 1.25rem;
  margin: 18px 0 10px;
}
.why-item p {
  color: rgba(245,243,238,.85);
  font-size: 0.96rem;
  margin: 0;
}
.why-icon svg { width: 42px; height: 42px; }

@media (max-width: 800px) {
  .why-grid { grid-template-columns: 1fr; gap: 40px; }
}

/* Scroll-reveal animation, used by .why-item and reusable elsewhere via .reveal.
   Safe by default: content is fully visible unless JS confirms it can animate it
   (body gets "reveal-ready" added by main.js). If JS fails to load or errors,
   nothing is ever hidden. */
.reveal { opacity: 1; transform: none; }
body.reveal-ready .reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .7s var(--ease), transform .7s var(--ease);
}
body.reveal-ready .reveal.in-view { opacity: 1; transform: translateY(0); }
.why-grid .why-item:nth-child(1) { transition-delay: 0s; }
.why-grid .why-item:nth-child(2) { transition-delay: .12s; }
.why-grid .why-item:nth-child(3) { transition-delay: .24s; }
.why-grid .why-item:nth-child(4) { transition-delay: .36s; }
@media (prefers-reduced-motion: reduce) {
  body.reveal-ready .reveal { opacity: 1; transform: none; transition: none; }
}

/* ---------- Our Core Values ---------- */
.values-section {
  position: relative;
  padding: 100px 0 120px;
  color: var(--paper);
  background: radial-gradient(circle at 15% 10%, rgba(31,77,120,.55), transparent 55%), var(--teal-deep);
  overflow: hidden;
}
.values-head { text-align: center; margin-bottom: 64px; }
.values-eyebrow {
  color: var(--gold);
  letter-spacing: .08em;
  text-transform: uppercase;
  font-weight: 700;
  font-size: 0.82rem;
  margin: 0 0 10px;
}
.values-head h2 {
  font-size: clamp(2.2rem, 4vw, 3.4rem);
  margin: 0 0 10px;
}
.values-head .sub {
  color: rgba(245,243,238,.65);
  margin: 0;
  font-size: 1rem;
}
.values-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  max-width: 980px;
  margin: 0 auto;
}
.value-card {
  background: var(--paper);
  border-radius: 12px;
  padding: 0 0 28px;
  overflow: hidden;
  box-shadow: 0 24px 48px rgba(0,0,0,.28);
  will-change: transform;
}
.value-photo {
  height: 150px;
  background-size: cover;
  background-position: center;
}
.value-card h3 {
  color: var(--ink);
  font-size: 1.3rem;
  margin: 22px 28px 10px;
}
.value-card p {
  color: var(--grey);
  font-size: 0.94rem;
  margin: 0 28px;
}

@media (max-width: 760px) {
  .values-grid { grid-template-columns: 1fr; max-width: 480px; }
}

/* Slow-motion clockwise shuffle: each card cycles through all four
   grid slots (TL -> TR -> BR -> BL -> back to TL) continuously.
   Disabled on the single-column mobile layout, where slots don't apply. */
@media (min-width: 761px) {
  .value-card:nth-child(1) { animation: shuffle-tl 24s cubic-bezier(.65,0,.35,1) infinite; }
  .value-card:nth-child(2) { animation: shuffle-tr 24s cubic-bezier(.65,0,.35,1) infinite; }
  .value-card:nth-child(3) { animation: shuffle-bl 24s cubic-bezier(.65,0,.35,1) infinite; }
  .value-card:nth-child(4) { animation: shuffle-br 24s cubic-bezier(.65,0,.35,1) infinite; }
}
@keyframes shuffle-tl {
  0%, 6%   { transform: translate(0, 0); z-index: 1; }
  25%, 31% { transform: translate(calc(100% + 32px), 0); z-index: 2; }
  50%, 56% { transform: translate(calc(100% + 32px), calc(100% + 32px)); z-index: 2; }
  75%, 81% { transform: translate(0, calc(100% + 32px)); z-index: 2; }
  100%     { transform: translate(0, 0); z-index: 1; }
}
@keyframes shuffle-tr {
  0%, 6%   { transform: translate(0, 0); z-index: 1; }
  25%, 31% { transform: translate(0, calc(100% + 32px)); z-index: 2; }
  50%, 56% { transform: translate(calc(-100% - 32px), calc(100% + 32px)); z-index: 2; }
  75%, 81% { transform: translate(calc(-100% - 32px), 0); z-index: 2; }
  100%     { transform: translate(0, 0); z-index: 1; }
}
@keyframes shuffle-bl {
  0%, 6%   { transform: translate(0, 0); z-index: 1; }
  25%, 31% { transform: translate(0, calc(-100% - 32px)); z-index: 2; }
  50%, 56% { transform: translate(calc(100% + 32px), calc(-100% - 32px)); z-index: 2; }
  75%, 81% { transform: translate(calc(100% + 32px), 0); z-index: 2; }
  100%     { transform: translate(0, 0); z-index: 1; }
}
@keyframes shuffle-br {
  0%, 6%   { transform: translate(0, 0); z-index: 1; }
  25%, 31% { transform: translate(calc(-100% - 32px), 0); z-index: 2; }
  50%, 56% { transform: translate(calc(-100% - 32px), calc(-100% - 32px)); z-index: 2; }
  75%, 81% { transform: translate(0, calc(-100% - 32px)); z-index: 2; }
  100%     { transform: translate(0, 0); z-index: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .value-card { animation: none !important; }
}

/* ---------- Final CTA (professional gradient, animated button) ---------- */
.section-cta {
  position: relative;
  padding: 100px 0;
  color: var(--paper);
  background: linear-gradient(135deg, var(--teal-deep) 0%, var(--teal) 55%, var(--teal-light) 100%);
  overflow: hidden;
}
.section-cta::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 80% 20%, rgba(201,169,97,.14), transparent 55%);
  pointer-events: none;
}
.section-cta .section-head p:first-child { color: var(--gold); }
.section-cta .section-head p:last-of-type { color: rgba(245,243,238,.82); }

/* Google reviews grid */
.reviews-grid {
  display: grid;
  grid-template-columns: 280px 1fr 1fr;
  gap: 20px;
}
.review-summary {
  background: var(--paper);
  border: 1px solid var(--cream-dark);
  border-radius: var(--radius);
  padding: 28px 22px;
  text-align: center;
}
.review-summary .stars { color: var(--gold); font-size: 1.1rem; margin: 8px 0; }
.review-card {
  background: var(--paper);
  border: 1px solid var(--cream-dark);
  border-radius: var(--radius);
  padding: 20px;
  font-size: 0.9rem;
}
.review-card .who { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.review-card .avatar {
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--teal); color: var(--gold);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 0.85rem;
}
.review-card .stars { color: var(--gold); font-size: 0.85rem; margin-bottom: 6px; }
.review-card p { color: var(--grey); margin: 0; }

@media (max-width: 900px) {
  .reviews-grid { grid-template-columns: 1fr; }
}

/* ---------- Team ---------- */
.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 32px;
}
.team-card { text-align: center; }
.team-card .photo {
  width: 160px; height: 160px;
  border-radius: 50%;
  margin: 0 auto 18px;
  background: var(--teal-light);
  display: flex; align-items: center; justify-content: center;
  color: var(--gold);
  font-family: var(--font-display);
  font-size: 2rem;
  border: 3px solid var(--gold);
}
.team-card h3 { font-size: 1.15rem; margin-bottom: 4px; }
.team-card .role { color: var(--gold); font-size: 0.85rem; font-weight: 600; margin-bottom: 10px; }
.team-card p { color: rgba(245,243,238,.78); font-size: 0.88rem; margin: 0 auto; }

/* ---------- Story / About ---------- */
.story-columns {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 40px;
  align-items: start;
}
.story-photo {
  width: 140px; height: 140px;
  border-radius: 50%;
  background: var(--teal-light);
  border: 3px solid var(--gold);
}
.story-notes { display: grid; gap: 16px; }
.story-note {
  border: 1px solid rgba(228,211,160,.2);
  border-radius: var(--radius);
  padding: 18px 20px;
  font-size: 0.92rem;
  color: rgba(245,243,238,.85);
}
.story-note strong { color: var(--gold-light); }
.pullquote {
  background: var(--gold-light);
  color: var(--teal-deep);
  padding: 36px 40px;
  border-radius: var(--radius);
  font-size: 1.1rem;
}
.pullquote p:last-child { margin-bottom: 0; }

@media (max-width: 700px) {
  .story-columns { grid-template-columns: 1fr; }
}

/* ---------- FAQ ---------- */
.faq-list { max-width: 760px; margin: 0 auto; }

/* ---------- Forms ---------- */
.form-panel {
  background: var(--teal);
  border-radius: var(--radius);
  padding: 40px;
  color: var(--paper);
}
.form-panel.on-cream {
  background: var(--paper);
  border: 1px solid var(--cream-dark);
  color: var(--ink);
}
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.field { margin-bottom: 20px; }
.field label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  margin-bottom: 8px;
  letter-spacing: 0.01em;
}
.field .req { font-weight: 400; opacity: 0.6; font-size: 0.78rem; }
.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid rgba(255,255,255,.25);
  border-radius: var(--radius);
  background: rgba(255,255,255,.92);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 0.95rem;
}
.form-panel.on-cream .field input,
.form-panel.on-cream .field select,
.form-panel.on-cream .field textarea {
  border-color: var(--cream-dark);
  background: var(--cream);
}
.field textarea { resize: vertical; min-height: 110px; }
.field-check { display: flex; align-items: center; gap: 8px; font-size: 0.88rem; margin-bottom: 20px; }
.field-check input { width: auto; }
.form-note {
  font-size: 0.85rem;
  color: rgba(245,243,238,.7);
  margin-bottom: 24px;
}
.form-status { margin-top: 16px; font-size: 0.9rem; display: none; }
.form-status.show { display: block; }
.form-status.ok { color: #7ed9a1; }
.form-status.err { color: #ff9d9d; }

@media (max-width: 640px) {
  .field-row { grid-template-columns: 1fr; }
  .form-panel { padding: 28px 22px; }
}

/* ---------- Calculator ---------- */
.calc-wrap {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 24px;
  align-items: stretch;
}
.calc-card {
  background: var(--paper);
  border: 1px solid var(--cream-dark);
  border-top: 3px solid var(--gold);
  border-radius: var(--radius);
  padding: 32px;
  height: 100%;
  box-shadow: 0 20px 40px rgba(13,27,42,.07);
}
.calc-card h2 {
  font-size: 1.3rem;
  margin-bottom: 0;
  color: var(--teal-deep);
}
.calc-card > h2::after {
  content: "";
  display: block;
  width: 44px;
  height: 3px;
  background: var(--gold);
  margin: 14px 0 24px;
}
/* The base .field input/select/textarea border is tuned for the dark
   .form-panel background and is invisible on the calc-card's white
   background — give it a visible cream-dark border + gold focus state. */
.calc-card .field label { color: var(--teal-deep); }
.calc-card .field input,
.calc-card .field select,
.calc-card .field textarea {
  border-color: var(--cream-dark);
  background: var(--cream);
}
.calc-card .field input:focus-visible,
.calc-card .field select:focus-visible,
.calc-card .field textarea:focus-visible {
  border-color: var(--gold);
  outline-offset: 0;
}
.calc-actions { display: flex; gap: 12px; margin: 8px 0 6px; }
.calc-actions .btn { padding: 13px 24px; font-size: 0.88rem; }
.btn-reset { background: var(--cream-dark); color: var(--ink); }
.btn-reset:hover { background: #ddd6c4; }
.calc-fine { font-size: 0.8rem; color: var(--grey); margin-top: 12px; }
.results-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.result-tile {
  background: var(--cream);
  border: 1px solid var(--cream-dark);
  border-radius: var(--radius);
  padding: 18px;
}
.result-tile .label { font-size: 0.78rem; color: var(--grey); margin-bottom: 6px; }
.result-tile .value { font-family: var(--font-display); font-size: 1.7rem; color: var(--teal-deep); }
.result-tile .sub { font-size: 0.76rem; color: var(--grey); margin-top: 4px; }
/* Give the headline figure (estimated monthly payment) a gold accent
   so the eye lands on it first among the four result tiles. */
.result-tile--primary {
  background: linear-gradient(160deg, rgba(171,138,84,.14), rgba(171,138,84,.04));
  border-color: rgba(171,138,84,.4);
}
.result-tile--primary .label { color: var(--teal-deep); }
.result-tile--primary .value { color: var(--gold); }

@media (max-width: 800px) {
  .calc-wrap { grid-template-columns: 1fr; }
}

/* ---------- Map / find us ---------- */
.find-us {
  text-align: center;
}
.address-pill {
  display: inline-block;
  background: rgba(245,243,238,.08);
  border: 1px solid rgba(228,211,160,.25);
  padding: 16px 28px;
  border-radius: var(--radius);
  margin: 20px 0 40px;
  color: var(--gold-light);
}
.map-frame {
  border: 0;
  width: 100%;
  height: 420px;
  border-radius: var(--radius);
  filter: grayscale(0.15) sepia(0.08);
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--teal-deep);
  color: var(--cream);
  padding: 72px 0 32px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
  align-items: start;
  padding-bottom: 36px;
  border-bottom: 1px solid rgba(255,255,255,.1);
}
.footer-main { text-align: left; }
.footer-main .fline { margin-bottom: 6px; font-size: 0.92rem; }
.footer-main .legal {
  margin-top: 18px;
  font-size: 0.78rem;
  color: rgba(245,243,238,.55);
  max-width: 72ch;
}
.footer-brand { text-align: right; }
.footer-brand .name { color: var(--gold); font-family: var(--font-display); font-size: 1.3rem; }
.footer-brand .tag { color: rgba(228,211,160,.6); font-size: 0.78rem; font-style: italic; }
.footer-links {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 28px;
}
.footer-links a {
  border: 1px solid rgba(228,211,160,.25);
  padding: 12px 20px;
  border-radius: var(--radius);
  font-size: 0.85rem;
}
.footer-links a:hover { border-color: var(--gold); color: var(--gold); }
.footer-bottom {
  margin-top: 24px;
  font-size: 0.78rem;
  color: rgba(245,243,238,.45);
}

@media (max-width: 700px) {
  .footer-grid { grid-template-columns: 1fr; }
  .footer-brand { text-align: left; }
}

/* ---------- Chat bubble ---------- */
.chat-bubble {
  position: fixed;
  right: 24px;
  bottom: 24px;
  display: flex;
  align-items: center;
  gap: 10px;
  z-index: 200;
}
.chat-bubble .pill {
  display: inline-flex;
  align-items: center;
  background: var(--paper);
  color: var(--ink);
  border-radius: 999px;
  padding: 10px 18px;
  font-size: 0.85rem;
  font-weight: 600;
  box-shadow: 0 6px 20px rgba(0,0,0,.15);
  text-decoration: none;
  transition: transform .2s var(--ease), box-shadow .2s var(--ease);
}
.chat-bubble .pill:hover { transform: translateY(-2px); box-shadow: 0 10px 26px rgba(0,0,0,.2); }
.chat-bubble .fab {
  width: 52px; height: 52px;
  border-radius: 50%;
  background: #25D366;
  color: var(--paper);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 6px 20px rgba(0,0,0,.2);
  border: none;
  cursor: pointer;
  font-size: 1.2rem;
  text-decoration: none;
  transition: transform .2s var(--ease), box-shadow .2s var(--ease);
}
.chat-bubble .fab:hover { transform: translateY(-2px) scale(1.05); box-shadow: 0 10px 26px rgba(0,0,0,.28); }

/* ---------- Utility ---------- */
.text-center { text-align: center; }
.mt-lg { margin-top: 48px; }
.stack-gap { display: grid; gap: 20px; }
/* ============================================
   About Page Additions — append to css/style.css
   Extends the existing design system tokens
   (--teal-deep, --gold, --cream, --ease, etc.)
   ============================================ */

/* ---------- Trusted Advisors ---------- */
.trust-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 48px;
  align-items: center;
}
.trust-photo-frame {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 30px 60px rgba(13, 27, 42, .18);
}
.trust-photo-frame img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  transform: scale(1.02);
  transition: transform .6s var(--ease);
}
.trust-photo-frame:hover img { transform: scale(1.08); }
.trust-photo-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  border: 1px solid rgba(201, 169, 97, .4);
  border-radius: 12px;
  pointer-events: none;
}
.trust-badge {
  position: absolute;
  left: -18px;
  bottom: -18px;
  background: var(--paper);
  border-radius: 10px;
  padding: 14px 22px;
  box-shadow: 0 16px 32px rgba(13, 27, 42, .18);
  font-family: var(--font-display);
  color: var(--teal-deep);
  animation: badge-float 4s ease-in-out infinite;
}
.trust-badge strong { display: block; font-size: 1.5rem; line-height: 1; color: var(--gold); }
.trust-badge span { display: block; margin-top: 4px; font-size: 0.68rem; color: var(--grey); font-family: var(--font-body); line-height: 1.3; }
@keyframes badge-float {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-8px); }
}
.trust-copy h3 { color: var(--teal-deep); font-size: 1.5rem; margin-bottom: 14px; }
.trust-copy p { color: var(--grey); }
.trust-copy strong { color: var(--teal-deep); }

@media (max-width: 800px) {
  .trust-grid { grid-template-columns: 1fr; }
  .trust-badge { left: 16px; bottom: 16px; }
}

/* ---------- Transparent fee cards ---------- */
.fee-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px;
  margin-top: 40px;
}
.fee-card {
  background: var(--paper);
  border: 1px solid var(--cream-dark);
  border-radius: var(--radius);
  padding: 32px 28px;
  transition: transform .3s var(--ease), box-shadow .3s var(--ease), border-color .3s var(--ease);
}
.fee-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 40px rgba(13, 27, 42, .1);
  border-color: var(--gold);
}
body.reveal-ready .fee-grid .fee-card:nth-child(1) { transition-delay: 0s; }
body.reveal-ready .fee-grid .fee-card:nth-child(2) { transition-delay: .15s; }
.fee-icon {
  width: 52px; height: 52px;
  border-radius: 50%;
  background: var(--cream);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 18px;
  color: var(--gold);
}
.fee-icon svg { width: 24px; height: 24px; }
.fee-card h3 { font-size: 1.15rem; color: var(--teal-deep); margin-bottom: 10px; }
.fee-card p { color: var(--grey); font-size: 0.94rem; margin: 0; }

@media (max-width: 700px) {
  .fee-grid { grid-template-columns: 1fr; }
}

/* ---------- 3-step process over photo band ---------- */
.process-section {
  position: relative;
  color: var(--paper);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-image:
    linear-gradient(120deg, rgba(14, 42, 68, .9), rgba(14, 42, 68, .74)),
    var(--process-bg-image);
}
.process-section .process-item { background: rgba(245, 243, 238, .06); border-color: rgba(228, 211, 160, .22); }
.process-section .process-item p { color: rgba(245, 243, 238, .82); margin: 0; }
.process-note {
  margin-top: 32px;
  font-size: 0.88rem;
  color: rgba(245, 243, 238, .7);
  max-width: 74ch;
}
.process-note strong { color: var(--gold-light); }

/* ---------- Brokers / contact split ---------- */
.brokers-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: start;
}
.brokers-copy p { color: var(--grey); }
.brokers-art {
  border-radius: 12px;
  overflow: hidden;
  margin-top: 28px;
  box-shadow: 0 24px 48px rgba(13, 27, 42, .14);
}
.brokers-art img {
  width: 100%;
  aspect-ratio: 16/10;
  object-fit: cover;
  transition: transform .6s var(--ease);
}
.brokers-art:hover img { transform: scale(1.05); }

@media (max-width: 900px) {
  .brokers-grid { grid-template-columns: 1fr; }
}

/* ============================================================
   Responsive Rules (merged from mobile-responsive.css)
   ------------------------------------------------------------
   These media-query rules come last so they win the cascade
   against the desktop rules above, at narrower viewport widths.
   ============================================================ */
/* ============================================================
   Reliance Mortgage — Mobile Responsive Layer
   ------------------------------------------------------------
   This file does NOT modify style.css or any HTML/JS.
   Load it AFTER css/style.css (and after any inline <style>
   blocks) on every page so these rules win the cascade:

   <link rel="stylesheet" href="css/style.css">
   <link rel="stylesheet" href="css/mobile-responsive.css">

   Everything below only fires inside the media queries, so
   desktop/tablet layout is completely unaffected.
   ============================================================ */

/* ---------- Tablet / small laptop (≤ 992px) ---------- */
@media (max-width: 992px) {
  .container { padding: 0 24px; }
  section { padding: 72px 0; }
  .hero { padding: 72px 0 120px; }
}

/* ---------- Tablet / large phone (≤ 768px) ---------- */
@media (max-width: 768px) {

  /* Header */
  .site-header .container { padding-top: 12px; padding-bottom: 12px; gap: 12px; }
  .brand-text .name { font-size: 0.92rem; }
  .brand-text .tag { font-size: 0.82rem; }
  .header-actions { gap: 10px; }
  .header-actions a.icon { font-size: 1rem; }

  /* Hero */
  .hero { padding: 56px 0 96px; text-align: left; }
  .hero h1 { font-size: clamp(1.9rem, 8vw, 2.6rem); max-width: 100%; }
  .hero .lede { padding: 18px 20px; font-size: 0.96rem; max-width: 100%; }
  .hero-ctas { flex-direction: column; align-items: stretch; }
  .hero-ctas .btn { width: 100%; }

  /* Generic sections */
  section { padding: 56px 0; }
  .section-head { margin-bottom: 36px; }
  .section-head h2 { font-size: clamp(1.5rem, 6vw, 2rem); }

  /* Two/three-column grids that don't already collapse below 900px */
  .why-grid,
  .offer-grid,
  .trust-grid,
  .fee-grid,
  .brokers-grid,
  .story-columns,
  .calc-wrap,
  .reviews-grid,
  .footer-grid {
    grid-template-columns: 1fr !important;
    gap: 32px;
  }

  /* Story / about page */
  .story-columns { text-align: center; }
  .story-photo { margin: 0 auto; }

  /* Team */
  .team-grid { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 24px; }
  .team-card .photo { width: 120px; height: 120px; font-size: 1.5rem; }

  /* Values */
  .values-section { padding: 64px 0 80px; }
  .values-grid { grid-template-columns: 1fr; max-width: 420px; }
  .value-photo { height: 130px; }

  /* Forms */
  .form-panel { padding: 28px 22px; }
  .field-row { grid-template-columns: 1fr; }

  /* Calculator */
  .calc-card { padding: 24px 20px; }
  .results-grid { grid-template-columns: 1fr 1fr; gap: 12px; }

  /* Reviews */
  .review-summary { padding: 22px 18px; }

  /* Map */
  .map-frame { height: 300px; }

  /* Footer */
  .footer-brand { text-align: left; }
  .footer-brand .footer-links,
  .footer-links { justify-content: flex-start; }
  .mark.mark--footer { margin-left: 0; }

  /* Chat bubble */
  .chat-bubble { right: 16px; bottom: 16px; }
}

/* ---------- Phones (≤ 600px) ---------- */
@media (max-width: 600px) {
  .container { padding: 0 18px; }

  h1 { font-size: clamp(1.7rem, 9vw, 2.2rem); }
  h2 { font-size: clamp(1.35rem, 7vw, 1.8rem); }

  .btn { width: 100%; padding: 14px 20px; }
  .btn-block { width: 100%; }

  /* Service cards */
  .card-row,
  .services-carousel .card-row { grid-template-columns: 1fr; }
  .services-carousel .service-card { flex: 0 0 84vw; width: 84vw; }

  /* Process steps */
  .process-item { grid-template-columns: 44px 1fr; gap: 14px; padding: 18px; }
  .process-item .num { font-size: 1.4rem; }

  /* Values grid single card width */
  .values-grid { max-width: 100%; }

  /* Results grid stacks on very narrow phones */
  .results-grid { grid-template-columns: 1fr; }

  /* Pullquote */
  .pullquote { padding: 24px 22px; font-size: 1rem; }

  /* Fee / trust / brokers cards */
  .fee-card, .trust-copy, .brokers-copy { text-align: left; }
  .trust-badge { position: static; margin-top: -32px; margin-left: 16px; display: inline-block; }

  /* Chat bubble: collapse the text pill, keep just the round button */
  .chat-bubble .pill { display: none; }

  /* Footer links wrap tighter */
  .footer-links a { padding: 10px 16px; font-size: 0.8rem; }
}

/* ---------- Small phones (≤ 380px) ---------- */
@media (max-width: 380px) {
  .container { padding: 0 14px; }
  .hero { padding: 44px 0 80px; }
  .hero h1 { font-size: 1.6rem; }
  .brand-text .tag { display: none; }
  .calc-actions { flex-direction: column; }
  .calc-actions .btn { width: 100%; }
}

/* ---------- Respect reduced motion on mobile too ---------- */
@media (max-width: 768px) and (prefers-reduced-motion: reduce) {
  .value-card { animation: none !important; }
}
/* ---------- Rotating headline (hero) ---------- */
.rotate-viewport {
  display: block;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 20%, #000 80%, transparent 100%);
          mask-image: linear-gradient(to bottom, transparent 0, #000 20%, #000 80%, transparent 100%);
  transition: height .55s var(--ease);
}
.rotate-track {
  display: flex;
  flex-direction: column;
  transition: transform .6s var(--ease);
}
.rotate-line {
  display: block;
  color: var(--gold-light);
}
/* No logo in footer */
.site-footer img, .site-footer .mark, .footer-brand { display: none !important; }
