/* /dscr-loans: MyAgent navy / brass / ivory, editorial layout. */
:root {
  color-scheme: light;
  --mama-navy: hsl(220, 45%, 12%);
  --mama-navy-2: hsl(220, 42%, 18%);
  --mama-brass: hsl(38, 60%, 55%);
  --mama-brass-dark: hsl(38, 62%, 34%);
  --mama-paper: #f7f4ec;
  --mama-ivory: #fbfaf6;
  --mama-ink: #18212b;
  --mama-muted: #55606e;
  --mama-line: #e5dfd1;
  --mama-error: #a4262c;
  --font-serif: "Playfair Display", Georgia, serif;
  --font-sans: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

body {
  margin: 0;
  background: var(--mama-ivory);
  color: var(--mama-ink);
  font: 400 16px/1.65 var(--font-sans);
  -webkit-font-smoothing: antialiased;
  overflow-wrap: break-word;
}

button,
input {
  font: inherit;
  letter-spacing: 0;
}

a {
  color: inherit;
}

img,
video {
  display: block;
  max-width: 100%;
}

:focus-visible {
  outline: 3px solid var(--mama-brass);
  outline-offset: 3px;
}

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

.skip-link {
  position: absolute;
  left: 16px;
  top: -80px;
  z-index: 40;
  padding: 10px 14px;
  background: var(--mama-navy);
  color: #fff;
}

.skip-link:focus {
  top: 12px;
}

.shell {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
}

h1,
h2,
h3,
h4 {
  margin: 0 0 16px;
  font-family: var(--font-serif);
  font-weight: 700;
  line-height: 1.2;
  color: var(--mama-navy);
}

h1 {
  font-size: clamp(2.1rem, 4.6vw, 3.4rem);
  color: #fff;
}

h2 {
  font-size: clamp(1.6rem, 3vw, 2.25rem);
}

h3 {
  font-size: 1.25rem;
}

h4 {
  font-size: 1.1rem;
}

p {
  margin: 0 0 14px;
}

.eyebrow {
  margin: 0 0 10px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--mama-brass-dark);
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(251, 250, 246, 0.97);
  border-bottom: 1px solid var(--mama-line);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 72px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  min-width: 0;
}

.brand img {
  width: 76px;
  height: auto;
}

.brand span {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.brand strong {
  font-family: var(--font-serif);
  color: var(--mama-navy);
}

.brand small {
  color: var(--mama-muted);
  font-size: 0.82rem;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 18px;
}

.header-link {
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  color: var(--mama-navy);
}

.header-link:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}

/* DSCR guide family links, shared by /dscr-loans and /dscr-5-8-unit-loans. */
.guide-nav {
  background: var(--mama-paper);
  border-bottom: 1px solid var(--mama-line);
}

.guide-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 22px;
  margin: 0 auto;
  padding: 8px 0;
  list-style: none;
  font-size: 0.9rem;
}

.guide-nav a {
  display: inline-block;
  padding: 6px 0;
  font-weight: 600;
  color: var(--mama-navy);
  text-underline-offset: 4px;
}

.guide-nav a[aria-current="page"] {
  color: var(--mama-brass-dark);
  text-decoration-thickness: 2px;
}

/* Buttons */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 11px 20px;
  border: 2px solid transparent;
  border-radius: 4px;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  overflow-wrap: anywhere;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.button-primary {
  background: var(--mama-brass);
  color: var(--mama-navy);
}

.button-primary:hover:not(:disabled) {
  background: hsl(38, 70%, 48%);
}

.button-secondary {
  background: transparent;
  border-color: currentColor;
  color: inherit;
}

.button-dark {
  background: var(--mama-navy);
  color: #fff;
}

.button-light {
  background: #fff;
  color: var(--mama-navy);
}

.text-link {
  font-weight: 600;
  color: var(--mama-brass-dark);
  text-underline-offset: 4px;
}

.section-navy .text-link {
  color: var(--mama-brass);
}

/* Hero */
.hero {
  background: var(--mama-navy);
  color: #e9edf3;
  padding: clamp(48px, 7vw, 88px) 0;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
}

.hero .eyebrow {
  color: var(--mama-brass);
}

.hero-lede {
  font-size: 1.12rem;
  max-width: 60ch;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 26px 0 22px;
}

.hero .button-secondary {
  color: #fff;
}

.hero-note {
  max-width: 62ch;
  font-size: 0.9rem;
  color: #c3cad6;
  border-left: 2px solid var(--mama-brass);
  padding-left: 14px;
}

.formula {
  margin: 0;
  padding: 28px 0 0;
  border-top: 1px solid rgba(233, 201, 131, 0.5);
}

.formula-label {
  font-size: 0.8rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--mama-brass);
  font-weight: 700;
}

.formula-fraction {
  display: grid;
  gap: 8px;
  text-align: center;
  font-family: var(--font-serif);
  color: #fff;
  margin: 18px 0 22px;
}

.formula-top {
  font-size: 1.35rem;
}

.formula-line {
  height: 2px;
  background: var(--mama-brass);
}

.formula-bottom {
  font-size: 1.05rem;
}

.formula-big {
  display: block;
  font-family: var(--font-serif);
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  color: var(--mama-brass);
  text-align: center;
}

.formula figcaption {
  font-size: 0.92rem;
  color: #c3cad6;
}

/* Sections */
.section {
  padding: clamp(56px, 8vw, 96px) 0;
}

.section-tint {
  background: var(--mama-paper);
}

.section-navy {
  background: var(--mama-navy-2);
  color: #e9edf3;
}

.section-navy h2 {
  color: #fff;
}

.section-navy .eyebrow {
  color: var(--mama-brass);
}

.section-head {
  max-width: 760px;
  margin-bottom: 36px;
}

.section-intro {
  color: var(--mama-muted);
  font-size: 1.05rem;
}

.editorial {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
  gap: clamp(28px, 5vw, 72px);
  align-items: start;
}

.editorial-side {
  border-top: 2px solid var(--mama-brass);
  padding-top: 18px;
}

.prose {
  max-width: 70ch;
}

.prose h3 {
  margin-top: 8px;
}

.steps {
  margin: 0 0 20px;
  padding-left: 1.3em;
}

.steps li {
  margin-bottom: 12px;
  padding-left: 4px;
}

.steps li::marker {
  font-family: var(--font-serif);
  font-weight: 700;
  color: var(--mama-brass-dark);
}

.callout-line {
  padding: 14px 0 0;
  border-top: 1px solid var(--mama-line);
  color: var(--mama-muted);
}

.two-lists {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 32px;
  max-width: none;
}

.checks,
.cautions,
.credentials {
  list-style: none;
  margin: 0;
  padding: 0;
}

.checks li,
.cautions li {
  position: relative;
  padding: 0 0 12px 26px;
}

.checks li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 0.45em;
  width: 10px;
  height: 6px;
  border-left: 2px solid var(--mama-brass-dark);
  border-bottom: 2px solid var(--mama-brass-dark);
  transform: rotate(-45deg);
}

.cautions li::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 0.6em;
  width: 8px;
  height: 2px;
  background: var(--mama-navy);
}

/* Video: portrait original (720 x 1280), never stretched to fill a desktop column. */
.video-layout {
  display: grid;
  grid-template-columns: minmax(0, 320px) minmax(0, 1fr);
  gap: clamp(28px, 5vw, 64px);
  align-items: start;
}

/* Caps the player at 320px wide and about 72% of the viewport height. */
.video-figure {
  grid-column: 1;
  grid-row: 1;
  margin: 0;
  width: min(100%, calc(72vh * 9 / 16));
  min-width: min(220px, 100%);
}

.video-frame {
  aspect-ratio: 9 / 16;
  background: var(--mama-navy);
}

.video-copy {
  grid-column: 2;
  grid-row: 1;
}

.video-frame video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: var(--mama-navy);
}

.video-figure figcaption {
  margin-top: 10px;
  font-size: 0.86rem;
  color: var(--mama-muted);
}

.video-error {
  margin-top: 10px;
  padding: 10px 12px;
  border-left: 3px solid var(--mama-error);
  background: #fff;
  font-size: 0.9rem;
}

.video-error p {
  margin: 0;
}

/* Mary Ann */
.trust-grid {
  display: grid;
  grid-template-columns: minmax(0, 300px) minmax(0, 1fr);
  gap: clamp(28px, 5vw, 64px);
  align-items: center;
}

.portrait {
  width: 100%;
  max-width: 300px;
  height: auto;
  aspect-ratio: 450 / 800;
  object-fit: cover;
}

.credentials li {
  padding: 4px 0;
  font-size: 0.92rem;
  color: #c3cad6;
}

.contact-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 18px;
  margin: 22px 0 16px;
}

.small-print {
  font-size: 0.86rem;
  color: var(--mama-muted);
}

.section-navy .small-print {
  color: #c3cad6;
}

/* FAQ */
.faq-shell {
  max-width: 860px;
}

.faq-shell details {
  border-bottom: 1px solid var(--mama-line);
}

.faq-shell summary {
  padding: 18px 32px 18px 0;
  font-weight: 600;
  color: var(--mama-navy);
  cursor: pointer;
  list-style: none;
  position: relative;
}

.faq-shell summary::-webkit-details-marker {
  display: none;
}

.faq-shell summary::after {
  content: "+";
  position: absolute;
  right: 4px;
  top: 14px;
  font-size: 1.4rem;
  color: var(--mama-brass-dark);
}

.faq-shell details[open] summary::after {
  content: "\2212";
}

.faq-shell details p {
  padding-bottom: 12px;
  color: var(--mama-ink);
}

/* Sources */
.source-disclaimer {
  padding: 14px 0;
  border-top: 1px solid var(--mama-line);
  border-bottom: 1px solid var(--mama-line);
}

.sources {
  padding-left: 1.3em;
}

.sources li {
  margin-bottom: 12px;
}

.sources a {
  font-weight: 600;
  color: var(--mama-navy);
  text-underline-offset: 3px;
}

/* Footer */
.site-footer {
  padding: 48px 0;
  background: var(--mama-navy);
  color: #c3cad6;
  font-size: 0.88rem;
}

.site-footer strong {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  color: #fff;
}

.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
  gap: 36px;
}

/* Responsive */
@media (max-width: 960px) {
  .hero-grid,
  .calc-layout,
  .editorial {
    grid-template-columns: minmax(0, 1fr);
  }


  .footer-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 760px) {
  .video-copy,
  .video-figure {
    grid-column: auto;
    grid-row: auto;
  }
  .header-link {
    display: none;
  }

  .video-layout,
  .trust-grid,
  .two-lists {
    grid-template-columns: minmax(0, 1fr);
  }

  .video-figure {
    margin: 0 auto;
    min-width: 0;
    width: min(300px, 100%);
  }

  .portrait {
    max-width: 220px;
  }
}

@media (max-width: 480px) {
  .shell {
    width: calc(100% - 28px);
  }

  .brand img {
    width: 56px;
  }

  .brand small {
    display: none;
  }

  .header-actions .button {
    min-height: 40px;
    padding: 8px 12px;
    font-size: 0.85rem;
  }

  .hero-actions .button,
  .calc-actions .button,
  .contact-actions .button {
    width: 100%;
  }

  .money {
    max-width: none;
  }

  .result-row {
    flex-wrap: wrap;
  }

  .result-row dd {
    text-align: left;
  }

  .calc-results {
    padding: 22px 16px;
  }
}

@media (max-width: 340px) {
  .brand span {
    display: none;
  }
}
