/* Richie Taylor, Hawaii Mortgage Broker
   Palette: Ink #0F2B36 · Lagoon #127C82 · Foam #F2F6F5 · Sun #E3A83A · Reef #3F5A63 */
:root {
  --ink: #0F2B36;
  --lagoon: #127C82;
  --lagoon-deep: #0C5E63;
  --sun: #E3A83A;
  --sun-soft: #F6E2B8;
  --bg: #F2F6F5;
  --surface: #FFFFFF;
  --surface-2: #E6EEEC;
  --text: #13262E;
  --muted: #4A636B;
  --line: #CFDCD9;
  --hero-bg: #0F2B36;
  --hero-text: #EEF5F3;
  --hero-muted: #A9C2C3;
  --focus: #E3A83A;
  --display: "Bricolage Grotesque", "Avenir Next", "Segoe UI", system-ui, sans-serif;
  --body: "Source Sans 3", "Segoe UI", system-ui, -apple-system, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  --radius: 14px;
  --wrap: 1120px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0B1D24; --surface: #11272F; --surface-2: #17323B; --text: #E4EEEC;
    --muted: #9DB5B8; --line: #24414A; --lagoon: #3DB2B2; --lagoon-deep: #2A9696;
    --sun-soft: #3A3120; --hero-bg: #071519; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0B1D24; --surface: #11272F; --surface-2: #17323B; --text: #E4EEEC;
  --muted: #9DB5B8; --line: #24414A; --lagoon: #3DB2B2; --lagoon-deep: #2A9696;
  --sun-soft: #3A3120; --hero-bg: #071519; color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 17px/1.6 var(--body); -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--lagoon); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 6px; }
h1, h2, h3 { font-family: var(--display); line-height: 1.1; text-wrap: balance; margin: 0; letter-spacing: -0.01em; }
h1 { font-size: clamp(2.2rem, 5.2vw, 3.8rem); font-weight: 700; }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.5rem); font-weight: 650; }
h3 { font-size: 1.25rem; font-weight: 650; }
p { margin: 0; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding-inline: 20px; }
.eyebrow { font: 600 0.78rem/1 var(--mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--lagoon); }
.lede { font-size: 1.15rem; color: var(--muted); max-width: 62ch; }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }

/* Header */
.site-header {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 40;
  background: color-mix(in srgb, var(--hero-bg) 94%, transparent);
  backdrop-filter: blur(8px); color: var(--hero-text);
}
.site-header .wrap { display: flex; align-items: center; gap: 20px; min-height: 64px; flex-wrap: wrap; padding-block: 8px; }
.brand { color: inherit; text-decoration: none; display: flex; flex-direction: column; line-height: 1.1; }
.brand strong { font: 700 1.2rem var(--display); }
.brand span { font: 500 0.7rem var(--mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--hero-muted); }
.nav { display: flex; gap: 18px; margin-left: auto; flex-wrap: wrap; align-items: center; }
.nav a { color: var(--hero-text); text-decoration: none; font-weight: 600; font-size: 0.95rem; opacity: 0.88; }
.nav a:hover { opacity: 1; text-decoration: underline; text-underline-offset: 4px; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: 700 1rem var(--body); padding: 13px 20px; border-radius: 999px;
  border: 2px solid transparent; cursor: pointer; text-decoration: none; transition: transform .15s, background .15s;
}
.btn:hover { transform: translateY(-1px); }
.btn-sun { background: var(--sun); color: #1B1405; }
.btn-lagoon { background: var(--lagoon); color: #fff; }
.btn-ghost { background: transparent; border-color: currentColor; color: inherit; }
.btn-sm { padding: 9px 14px; font-size: 0.9rem; }
.btn-row { display: flex; gap: 12px; flex-wrap: wrap; }

/* Hero */
.hero { background: var(--hero-bg); color: var(--hero-text); padding-block: 56px 72px; position: relative; overflow: hidden; }
.hero::after {
  content: ""; position: absolute; inset: auto 0 0 0; height: 80px; pointer-events: none;
  background: repeating-linear-gradient(90deg, transparent 0 38px, rgba(227,168,58,.08) 38px 40px);
  mask: linear-gradient(transparent, #000);
}
.hero-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.hero .eyebrow { color: var(--sun); }
.hero h1 em { font-style: normal; color: var(--sun); }
.hero .lede { color: var(--hero-muted); margin-top: 18px; }
.hero .btn-row { margin-top: 28px; }
.proofline { display: flex; gap: 28px; flex-wrap: wrap; margin-top: 32px; }
.proofline div { display: flex; flex-direction: column; }
.proofline b { font: 700 1.9rem var(--display); color: var(--hero-text); }
.proofline span { font-size: 0.85rem; color: var(--hero-muted); }

/* Two portraits */
.portraits { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.portrait {
  position: relative; aspect-ratio: 4 / 5; max-width: 100%; border-radius: 20px; overflow: hidden;
  background: #17404B; border: 1px solid rgba(255,255,255,.12); color: var(--hero-text);
}
.portrait picture { position: absolute; inset: 0; }
.portrait img, .portrait .ph { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.portrait .ph { display: grid; place-items: center; font: 700 3.2rem var(--display); color: rgba(255,255,255,.35);
  background: radial-gradient(circle at 50% 35%, #2A6670, #122F38 70%); }
.portrait .tag {
  position: absolute; left: 12px; right: 12px; bottom: 12px; padding: 10px 12px; border-radius: 12px;
  background: rgba(7,21,25,.78); backdrop-filter: blur(6px); font-size: 0.85rem; line-height: 1.3;
}
.portrait .tag b { display: block; font-family: var(--display); font-size: 1rem; }
/* Photo: hover or focus reveals call/text */
.portrait-photo .reveal {
  position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: center; gap: 10px; padding: 18px;
  background: rgba(7,21,25,.82); opacity: 0; transition: opacity .2s;
}
.portrait-photo:hover .reveal, .portrait-photo:focus-within .reveal, .portrait-photo.open .reveal { opacity: 1; }
.portrait-photo .reveal .num { font: 600 1.05rem var(--mono); text-align: center; }
/* Avatar: AI assistant launcher */
.portrait-ai { cursor: pointer; text-align: left; padding: 0; font: inherit; }
.portrait-ai .ring { position: absolute; inset: 10px; border-radius: 16px; border: 2px solid var(--sun); opacity: .0; animation: ring 2.8s ease-out infinite; }
.portrait-ai .live-dot { position: absolute; top: 12px; left: 12px; display: flex; gap: 6px; align-items: center;
  font: 600 .7rem var(--mono); letter-spacing: .1em; text-transform: uppercase; background: rgba(7,21,25,.78); padding: 6px 9px; border-radius: 999px; }
.live-dot i { width: 8px; height: 8px; border-radius: 50%; background: #4ADE80; box-shadow: 0 0 0 0 rgba(74,222,128,.6); animation: blip 2s infinite; }
@keyframes ring { 0% { opacity: .7; transform: scale(.96); } 100% { opacity: 0; transform: scale(1.03); } }
@keyframes blip { 70% { box-shadow: 0 0 0 8px rgba(74,222,128,0); } 100% { box-shadow: 0 0 0 0 rgba(74,222,128,0); } }

/* Sections */
section.block { padding-block: 72px; }
.block-head { display: grid; gap: 12px; margin-bottom: 36px; max-width: 760px; }
.alt { background: var(--surface-2); }

/* Lender proof strip */
.proof-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.proof-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; display: grid; gap: 10px; align-content: start; }
.proof-card .k { font: 600 .75rem var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }

/* Loan Estimate compare */
.le { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow-x: auto; }
.le table { width: 100%; border-collapse: collapse; min-width: 560px; }
.le th, .le td { text-align: left; padding: 14px 18px; border-bottom: 1px solid var(--line); vertical-align: top; }
.le th { font: 600 .75rem var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); background: var(--surface-2); }
.le td:first-child { font-family: var(--mono); font-weight: 600; white-space: nowrap; color: var(--lagoon); }
.le tr:last-child td { border-bottom: 0; }

/* Niche cards */
.niche-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.niche { background: var(--ink); color: var(--hero-text); border-radius: 20px; padding: 32px; display: grid; gap: 14px; align-content: start; }
.niche .eyebrow { color: var(--sun); }
.niche p { color: var(--hero-muted); }
.niche ul { margin: 0; padding-left: 1.1em; color: var(--hero-text); display: grid; gap: 4px; }
.niche a.more { color: var(--sun); font-weight: 700; text-decoration: none; }
.niche a.more:hover { text-decoration: underline; }

.program-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.program { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 16px; display: grid; gap: 4px; }
.program b { font-family: var(--display); }
.program span { font-size: .9rem; color: var(--muted); }

/* Steps (real sequence) */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; counter-reset: step; }
.step { display: grid; gap: 8px; align-content: start; }
.step::before { counter-increment: step; content: "Step " counter(step); font: 600 .75rem var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--lagoon); }
.step p { color: var(--muted); }

/* Live cam */
.live { background: #071519; color: var(--hero-text); }
.live-frame { position: relative; aspect-ratio: 16 / 9; max-width: 100%; border-radius: 20px; overflow: hidden; background: linear-gradient(180deg, #1F6E86 0%, #5FB3C2 48%, #E9C98B 50%, #D9B06A 62%, #2B5E52 100%); }
.live-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.live-frame .placeholder { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; padding: 20px; color: #fff; text-shadow: 0 1px 8px rgba(0,0,0,.5); }
.live-overlay { position: absolute; left: 16px; bottom: 16px; right: 16px; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; align-items: end; pointer-events: none; }
.live-overlay > * { pointer-events: auto; background: rgba(7,21,25,.72); backdrop-filter: blur(6px); border-radius: 12px; padding: 10px 14px; }
.live .lede { color: var(--hero-muted); }

/* Agents */
.agent-box { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; align-items: start; }
form.scenario { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; display: grid; gap: 14px; }
label { display: grid; gap: 6px; font-weight: 600; font-size: .95rem; }
input, select, textarea { font: inherit; padding: 11px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg); color: var(--text); width: 100%; }
textarea { min-height: 110px; resize: vertical; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.note { font-size: .85rem; color: var(--muted); }

/* FAQ */
.faq { display: grid; gap: 10px; max-width: 860px; }
.faq details { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 16px 20px; }
.faq summary { cursor: pointer; font-weight: 700; font-family: var(--display); font-size: 1.08rem; }
.faq details p { margin-top: 10px; color: var(--muted); }

/* Article pages */
.page-hero { background: var(--hero-bg); color: var(--hero-text); padding-block: 56px; }
.page-hero .eyebrow { color: var(--sun); }
.page-hero .lede { color: var(--hero-muted); margin-top: 16px; }
.page-hero .btn-row { margin-top: 24px; }
.article { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 48px; padding-block: 56px; }
.prose { max-width: 68ch; display: grid; gap: 18px; }
.prose h2 { font-size: 1.7rem; margin-top: 18px; }
.prose ul { margin: 0; padding-left: 1.2em; display: grid; gap: 6px; }
.prose .cite { font-size: .85rem; color: var(--muted); border-left: 3px solid var(--line); padding-left: 12px; }
.aside { position: sticky; top: 90px; align-self: start; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; display: grid; gap: 12px; }
.aside .btn { width: 100%; }

.upload {
  border: 2px dashed var(--lagoon); border-radius: 16px; padding: 28px; text-align: center; display: grid; gap: 10px;
  background: var(--surface); justify-items: center;
}
.upload.drag { background: var(--sun-soft); }

/* Assistant fallback panel */
.assistant-panel {
  position: fixed; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom, 0px)); z-index: 60;
  width: min(380px, calc(100vw - 32px)); background: var(--surface); color: var(--text);
  border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 24px 60px rgba(7,21,25,.35); padding: 20px; display: grid; gap: 12px;
}
.assistant-panel header { display: flex; justify-content: space-between; align-items: start; gap: 12px; }
.assistant-panel .close { background: none; border: 0; font-size: 1.4rem; line-height: 1; cursor: pointer; color: var(--muted); }
.assistant-panel .btn { width: 100%; }

/* Sticky mobile contact bar */
.mobile-bar { display: none; }

/* Footer */
.site-footer { background: var(--hero-bg); color: var(--hero-muted); padding-block: 48px 90px; font-size: .88rem; }
.site-footer .cols { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 32px; }
.site-footer a { color: var(--hero-text); }
.site-footer h3 { color: var(--hero-text); font-size: 1rem; margin-bottom: 8px; }
.site-footer .legal { margin-top: 32px; padding-top: 20px; border-top: 1px solid rgba(255,255,255,.12); display: grid; gap: 8px; }
.ehl { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; color: var(--hero-text); }

@media (max-width: 900px) {
  .hero-grid, .agent-box, .article { grid-template-columns: 1fr; }
  .proof-grid, .steps { grid-template-columns: 1fr 1fr; }
  .program-grid { grid-template-columns: 1fr 1fr; }
  .niche-grid { grid-template-columns: 1fr; }
  .site-footer .cols { grid-template-columns: 1fr; }
  .aside { position: static; }
  .nav { display: none; }
  .mobile-bar {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
    padding: 10px 12px calc(10px + env(safe-area-inset-bottom, 0px)); background: var(--hero-bg);
  }
  .mobile-bar .btn { padding: 11px 8px; font-size: .9rem; }
}
@media (max-width: 520px) {
  .proof-grid, .steps, .program-grid, .form-row { grid-template-columns: 1fr; }
  .portraits { gap: 10px; }
  section.block { padding-block: 52px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* Funnel */
.funnel-wrap { max-width: 640px; margin: 0 auto; padding-block: 48px 96px; }
#funnel { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 28px; display: grid; gap: 16px; }
.f-bar { height: 6px; background: var(--surface-2); border-radius: 99px; overflow: hidden; }
.f-bar i { display: block; height: 100%; background: var(--lagoon); transition: width .3s; }
.f-q { font-size: clamp(1.4rem, 3.4vw, 1.9rem); outline: none; }
.f-opts { display: grid; gap: 10px; }
.f-opt { font: 600 1.05rem var(--body); text-align: left; padding: 15px 18px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg); color: var(--text); cursor: pointer; }
.f-opt:hover { border-color: var(--lagoon); background: var(--sun-soft); }
.f-out { font: 700 2rem var(--display); color: var(--lagoon); font-variant-numeric: tabular-nums; }
#fs { width: 100%; accent-color: var(--lagoon); }
.f-ends { display: flex; justify-content: space-between; font-size: .85rem; color: var(--muted); }
.f-in { font-size: 1.15rem; padding: 14px; }
.f-consent { display: flex; gap: 10px; font-weight: 400; font-size: .8rem; color: var(--muted); align-items: start; }
.f-consent input { width: auto; margin-top: 3px; }
.f-err { color: #B4452F; font-weight: 600; min-height: 1em; }
.f-back { background: none; border: 0; color: var(--muted); cursor: pointer; font: inherit; justify-self: start; }
.f-foot { border-top: 1px solid var(--line); padding-top: 12px; }

/* Placeholder avatar look until the animated AI avatar is ready */
.portrait-ai .avatar-tint { object-position: center 30%; filter: grayscale(1) contrast(1.1) brightness(.9); }
.portrait-ai picture::after { content: ""; position: absolute; inset: 0; background: linear-gradient(160deg, rgba(18,124,130,.55), rgba(15,43,54,.75)); mix-blend-mode: multiply; }
.portrait-photo img { object-position: center 25%; }
