/* 4 Cornerstone Wealth. Palette from the existing logo: teal #009f9c, charcoal #33302b.
   Shape rule: controls (buttons, inputs) 10px, panels 16px. */

@font-face { font-family: "Figtree"; src: url("fonts/figtree-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Figtree"; src: url("fonts/figtree-600.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Figtree"; src: url("fonts/figtree-700.woff2") format("woff2"); font-weight: 700; font-display: swap; }

:root {
  --bg: #f6f8f8;
  --surface: #fcfdfd;
  --text: #1c2423;
  --muted: #4a5756;
  --line: #d9e2e1;
  --accent: #00716e;       /* text-safe teal, 5.6:1 on --bg */
  --accent-hover: #005b58;
  --brand: #009f9c;        /* logo teal, decorative only */
  --tint: #e5f2f1;
  --on-accent: #f6fbfb;
  --shadow: 0 18px 40px -24px rgb(0 70 68 / 0.35);
  --r-control: 10px;
  --r-panel: 16px;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e1514;
    --surface: #142020;
    --text: #e4eceb;
    --muted: #a6b6b4;
    --line: #243331;
    --accent: #45c9c3;
    --accent-hover: #6fd8d3;
    --brand: #2fb3ae;
    --tint: #11302e;
    --on-accent: #062220;
    --shadow: 0 18px 40px -24px rgb(0 0 0 / 0.6);
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 1.125rem/1.65 "Figtree", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; }
a { color: var(--accent); text-underline-offset: 3px; }
a:hover { color: var(--accent-hover); }
:focus-visible { outline: 3px solid var(--brand); outline-offset: 3px; border-radius: 4px; }

h1, h2, h3 { font-weight: 700; line-height: 1.12; letter-spacing: -0.02em; margin: 0; text-wrap: balance; }
h1 { font-size: clamp(2.4rem, 4.6vw, 3.6rem); }
h2 { font-size: clamp(1.9rem, 3.2vw, 2.6rem); }
h3 { font-size: 1.3rem; letter-spacing: -0.01em; }
p { margin: 0; }
.lede { color: var(--muted); max-width: 60ch; }

.wrap { width: min(1180px, 100% - 2.5rem); margin-inline: auto; }
section { padding-block: clamp(4rem, 9vw, 7rem); }
.eyebrow { font-size: 0.85rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent); margin-bottom: 1rem; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 1rem; top: 1rem; background: var(--surface); padding: .6rem 1rem; z-index: 20; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  min-height: 52px; padding: 0 1.5rem; border-radius: var(--r-control);
  font: 600 1.05rem/1 "Figtree", sans-serif; text-decoration: none; white-space: nowrap;
  border: 1.5px solid transparent; cursor: pointer;
  transition: background .2s, color .2s, transform .15s, border-color .2s;
}
.btn:active { transform: translateY(1px) scale(0.99); }
.btn-primary { background: var(--accent); color: var(--on-accent); }
.btn-primary:hover { background: var(--accent-hover); color: var(--on-accent); }
.btn-ghost { border-color: var(--line); color: var(--text); background: transparent; }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }

/* Header (z-index scale: header 10, skip link 20) */
.site-header {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 72px; gap: 1.5rem; }
.logo img { height: 34px; width: auto; }
.nav { display: flex; align-items: center; gap: 2rem; }
.nav a:not(.btn) { color: var(--text); text-decoration: none; font-weight: 600; font-size: 1rem; }
.nav a:not(.btn):hover { color: var(--accent); }
.nav .btn { min-height: 44px; padding: 0 1.15rem; font-size: 1rem; }
@media (max-width: 820px) { .nav a:not(.btn) { display: none; } .logo img { height: auto; width: min(48vw, 210px); } .site-header .wrap { gap: .75rem; } }

/* Hero: asymmetric split */
.hero {
  position: relative; overflow: hidden; isolation: isolate;
  padding-block: clamp(3.5rem, 8vw, 6rem);
  background: #0a3230;
  color: #eef6f5;
}
/* Ken Burns background: three local photos slowly zoom and cross-fade under a teal overlay. */
.hero-bg { position: absolute; inset: 0; z-index: -2; background: #0a3230; }
.hero-bg .slide { position: absolute; inset: 0; background-size: cover; background-position: center; opacity: 0; }
.hero-bg .s1 { background-image: url("assets/photos/hero-pinnacle-panorama.jpg"); opacity: 1; }
.hero-bg .s2 { background-image: url("assets/photos/hero-little-rock.jpg"); }
.hero-bg .s3 { background-image: url("assets/photos/hero-pinnacle-summit.jpg"); }
.hero-bg::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(100deg, rgb(8 44 42 / 0.94) 0%, rgb(10 50 48 / 0.86) 45%, rgb(12 64 61 / 0.62) 100%);
}
@media (prefers-reduced-motion: no-preference) {
  .hero-bg .slide { animation: kb-fade 27s linear infinite, kb-zoom 27s ease-out infinite; }
  .hero-bg .s1 { animation-delay: 0s; }
  .hero-bg .s2 { animation-delay: 9s; }
  .hero-bg .s3 { animation-delay: 18s; }
  @keyframes kb-fade { 0% { opacity: 0; } 5% { opacity: 1; } 33% { opacity: 1; } 40% { opacity: 0; } 100% { opacity: 0; } }
  @keyframes kb-zoom { 0% { transform: scale(1.02) translate3d(0, 0, 0); } 40% { transform: scale(1.14) translate3d(-1.5%, -1%, 0); } 100% { transform: scale(1.14) translate3d(-1.5%, -1%, 0); } }
}
.hero-glow {
  position: absolute; inset: -20% -10% auto auto; width: 70%; aspect-ratio: 1; z-index: -1;
  background: radial-gradient(closest-side, rgb(0 159 156 / 0.35), transparent 70%);
  pointer-events: none;
}
.hero .wrap { display: grid; grid-template-columns: 1.45fr 0.55fr; gap: clamp(2.5rem, 5vw, 4.5rem); align-items: center; }
.hero h1 { font-size: clamp(2.3rem, 4.1vw, 3.5rem); line-height: 1.1; letter-spacing: -0.03em; margin-bottom: 1.4rem; color: #f6fbfb; }
.hero h1 em { font-style: italic; color: #7fe0db; padding-bottom: .08em; }
.hero .lede { font-size: 1.25rem; color: rgb(238 246 245 / 0.82); margin-bottom: 2.25rem; max-width: 34rem; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: .85rem; }
.btn-light { background: #f6fbfb; color: #0a3230; }
.btn-light:hover { background: #ffffff; color: #0a3230; }
.btn-outline-light { border-color: rgb(238 246 245 / 0.45); color: #f6fbfb; background: transparent; }
.btn-outline-light:hover { border-color: #f6fbfb; color: #f6fbfb; background: rgb(255 255 255 / 0.06); }
.hero :focus-visible { outline-color: #7fe0db; }
.hero-portrait { margin: 0; justify-self: end; width: min(100%, 320px); }
.hero-portrait .frame {
  position: relative; aspect-ratio: 363 / 512; border-radius: var(--r-panel); overflow: hidden;
  box-shadow: 0 40px 80px -30px rgb(0 0 0 / 0.55), 0 0 0 1px rgb(255 255 255 / 0.12);
}
.hero-portrait img { width: 100%; height: 100%; object-fit: cover; }
.hero-portrait figcaption { margin-top: 1rem; display: grid; gap: .15rem; text-align: center; }
.hero-portrait figcaption strong { font-size: 1.1rem; color: #f6fbfb; }
.hero-portrait figcaption span { font-size: .95rem; color: rgb(238 246 245 / 0.7); }
@media (prefers-reduced-motion: no-preference) {
  .hero-copy, .hero-portrait { animation: rise .8s cubic-bezier(.16, 1, .3, 1) both; }
  .hero-portrait { animation-delay: .12s; }
  @keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
}
@media (max-width: 860px) {
  .hero .wrap { grid-template-columns: 1fr; }
  .hero-portrait { width: min(62%, 240px); justify-self: center; }
}

/* Credentials strip, directly under the hero */
.creds { padding-block: 0; background: var(--surface); border-bottom: 1px solid var(--line); }
.creds .wrap { display: grid; grid-template-columns: repeat(3, 1fr); }
.creds .wrap > div { padding: 1.6rem 1.5rem; display: grid; gap: .2rem; }
.creds .wrap > div + div { border-left: 1px solid var(--line); }
.creds strong { font-size: 1.05rem; color: var(--accent); }
.creds span { color: var(--muted); font-size: .98rem; }
@media (max-width: 760px) {
  .creds .wrap { grid-template-columns: 1fr; }
  .creds .wrap > div + div { border-left: 0; border-top: 1px solid var(--line); }
}

/* Federal band: statement + definitions */
.federal { background: var(--surface); border-block: 1px solid var(--line); }
.federal .wrap { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 6vw, 5rem); align-items: start; }
.federal h2 { margin-bottom: 1rem; }
.benefit-list { display: grid; gap: 1.75rem; margin: 0; }
.benefit-list dt { font-weight: 700; font-size: 1.15rem; }
.benefit-list dd { margin: .25rem 0 0; color: var(--muted); }
@media (max-width: 820px) { .federal .wrap { grid-template-columns: 1fr; } }

/* Four cornerstones diamond (Farrukh's whiteboard framework) */
.stones-head { max-width: 40rem; margin-bottom: 2.5rem; }
.stones-head h2 { margin-bottom: 1rem; }
.stones-grid { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: clamp(2rem, 6vw, 5rem); align-items: center; }
.diamond { width: 100%; max-width: 440px; justify-self: center; overflow: visible; filter: drop-shadow(0 30px 40px rgb(0 70 68 / 0.18)); }
.diamond polygon { stroke: var(--bg); stroke-width: 5; stroke-linejoin: round; transition: transform .35s cubic-bezier(.16, 1, .3, 1), filter .35s; transform-box: fill-box; transform-origin: center; }
.diamond text { fill: #f6fbfb; font: 700 19px "Figtree", system-ui, sans-serif; text-anchor: middle; pointer-events: none; }
.diamond text.sub { font-weight: 600; font-size: 15px; opacity: .88; }
.q-income polygon { fill: #00716e; } .q-medical polygon { fill: #0f8a86; } .q-ltc polygon { fill: #0a3230; } .q-legacy polygon { fill: #0d4442; }
.diamond .q { cursor: default; }
.diamond .q.on polygon { transform: scale(1.06); filter: brightness(1.12); }
.stone-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 1rem; }
.stone-list li { display: grid; grid-template-columns: auto 1fr; gap: 1rem; align-items: start; padding: 1.1rem 1.25rem; border-radius: var(--r-panel); border: 1px solid var(--line); background: var(--surface); transition: border-color .3s, box-shadow .3s; }
.stone-list li.on { border-color: var(--accent); box-shadow: var(--shadow); }
.stone-list h3 { margin-bottom: .3rem; }
.stone-list p { color: var(--muted); }
.stone-list .dot { width: 14px; height: 14px; margin-top: .45rem; transform: rotate(45deg); border-radius: 3px; }
.stone-list [data-stone="income"] .dot { background: #00716e; } .stone-list [data-stone="medical"] .dot { background: #0f8a86; }
.stone-list [data-stone="ltc"] .dot { background: #0a3230; } .stone-list [data-stone="legacy"] .dot { background: #0d4442; }
@media (prefers-color-scheme: dark) { .stone-list [data-stone="ltc"] .dot, .stone-list [data-stone="legacy"] .dot { outline: 1px solid rgb(255 255 255 / .35); } }
@media (prefers-reduced-motion: no-preference) {
  .js .diamond.reveal .q { opacity: 0; transition: opacity .6s ease; }
  .js .diamond.reveal.in .q { opacity: 1; }
  .js .diamond .q-income { transition-delay: .05s; } .js .diamond .q-medical { transition-delay: .2s; }
  .js .diamond .q-ltc { transition-delay: .35s; } .js .diamond .q-legacy { transition-delay: .5s; }
  .js .diamond.reveal { transform: none; }
}
@media (max-width: 860px) { .stones-grid { grid-template-columns: 1fr; } .diamond { max-width: 320px; } }

/* Process: horizontal timeline */
.process h2 { margin-bottom: 3rem; max-width: 30ch; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; border-top: 2px solid var(--line); }
.steps li { padding-top: 1.75rem; position: relative; }
.steps li::before { content: ""; position: absolute; top: -7px; left: 0; width: 12px; height: 12px; border-radius: 50%; background: var(--brand); }
.steps h3 { margin-bottom: .5rem; }
.steps p { color: var(--muted); }
@media (max-width: 760px) { .steps { grid-template-columns: 1fr; } }

/* Seminars: full-bleed tinted band */
.seminars { background: var(--tint); }
.seminars .wrap { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: clamp(2rem, 6vw, 5rem); align-items: center; }
.seminars h2 { margin-bottom: 1rem; }
.seminars .lede { margin-bottom: 2rem; color: var(--text); opacity: .85; }
.expect { background: var(--surface); border-radius: var(--r-panel); padding: clamp(1.5rem, 3vw, 2.25rem); box-shadow: var(--shadow); }
.expect h3 { margin-bottom: 1rem; }
.expect ul { margin: 0; padding-left: 1.2rem; display: grid; gap: .7rem; color: var(--muted); }
@media (max-width: 820px) { .seminars .wrap { grid-template-columns: 1fr; } }

/* Team */
.team h2 { margin-bottom: 2.5rem; }
.people { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 2rem; }
.person figure { margin: 0 0 1.1rem; aspect-ratio: 4 / 5; border-radius: var(--r-panel); overflow: hidden; position: relative; background: var(--tint); }
.person figure .fallback { position: absolute; width: 60%; left: 20%; top: 26%; opacity: .5; }
.person figure .photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center top; }
.person .role { color: var(--accent); font-weight: 600; font-size: 1rem; margin: .2rem 0 .6rem; }
.person p { color: var(--muted); font-size: 1.05rem; }
.person a.li { display: inline-block; margin-top: .75rem; font-weight: 600; font-size: 1rem; }

/* Contact */
.contact .wrap { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: clamp(2rem, 6vw, 5rem); align-items: start; }
.contact h2 { margin-bottom: 1rem; }
.contact-info { display: grid; gap: 1.25rem; margin-top: 2rem; }
.contact-info strong { display: block; font-size: .95rem; color: var(--muted); font-weight: 600; }
.contact-info a { font-size: 1.3rem; font-weight: 700; text-decoration: none; }
form { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-panel); padding: clamp(1.5rem, 3.5vw, 2.5rem); display: grid; gap: 1.25rem; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; }
.field { display: grid; gap: .45rem; }
label { font-weight: 600; font-size: 1rem; }
.hint { font-size: .9rem; color: var(--muted); }
input[type=text], input[type=email], input[type=tel], select, textarea {
  width: 100%; min-height: 50px; padding: .7rem .9rem; border-radius: var(--r-control);
  border: 1.5px solid var(--line); background: var(--bg); color: var(--text); font: inherit; font-size: 1.05rem;
}
input:focus, select:focus, textarea:focus { border-color: var(--accent); outline: 3px solid color-mix(in srgb, var(--brand) 30%, transparent); outline-offset: 0; }
textarea { min-height: 120px; resize: vertical; }
.error { color: #b3261e; font-size: .92rem; min-height: 0; }
@media (prefers-color-scheme: dark) { .error { color: #ffb4ab; } }
.consent { display: grid; grid-template-columns: auto 1fr; gap: .75rem; align-items: start; font-size: .95rem; color: var(--muted); font-weight: 400; }
.consent input { width: 22px; height: 22px; margin-top: .15rem; accent-color: var(--accent); }
.hp { position: absolute; left: -5000px; }
.form-status { font-weight: 600; }
.form-status.ok { color: var(--accent); }
.form-status.bad { color: #b3261e; }
@media (prefers-color-scheme: dark) { .form-status.bad { color: #ffb4ab; } }
form .btn[disabled] { opacity: .6; cursor: progress; }
@media (max-width: 860px) { .contact .wrap, .row2 { grid-template-columns: 1fr; } }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding-block: 3rem 3.5rem; font-size: .95rem; color: var(--muted); }
.site-footer .top { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1.5rem; align-items: center; margin-bottom: 2rem; }
.site-footer .top img { height: 30px; width: auto; }
.site-footer nav { display: flex; gap: 1.5rem; flex-wrap: wrap; }
.site-footer nav a { color: var(--text); font-weight: 600; text-decoration: none; }
.disclosures { display: grid; gap: .8rem; max-width: 90ch; }

/* Legal pages */
.legal { padding-block: 3.5rem 5rem; }
.legal .wrap { max-width: 760px; }
.legal h1 { font-size: clamp(2rem, 4vw, 2.8rem); margin-bottom: .5rem; }
.legal h2 { font-size: 1.35rem; margin: 2.25rem 0 .6rem; letter-spacing: -0.01em; }
.legal p, .legal li { color: var(--muted); }
.legal p + p { margin-top: .9rem; }
.legal .updated { margin-bottom: 2rem; }
.legal h3 { font-size: 1.1rem; margin: 1.5rem 0 .4rem; }

/* Income diagram */
.income .wrap { max-width: 760px; display: grid; gap: 2.25rem; }
.income-copy { text-align: center; }
.income-copy .lede { margin-inline: auto; }
.income h2 { margin-bottom: 1rem; }
.fineprint { margin-top: 1.25rem; font-size: .9rem; color: var(--muted); }
.stack { display: grid; gap: .6rem; }
.layer { display: grid; gap: .1rem; padding: 1rem 1.25rem; border-radius: 12px; color: #f6fbfb; }
.layer strong { font-size: 1.05rem; }
.layer span { font-size: .92rem; opacity: .85; }
.l1 { background: #0a3230; } .l2 { background: #0d4442; } .l3 { background: #00716e; } .l4 { background: #0f8a86; }
.l5 { background: var(--tint); color: var(--text); border: 1.5px dashed color-mix(in srgb, var(--accent) 45%, transparent); }
.paycheck { margin-top: .35rem; padding: 1.1rem 1.25rem; border-radius: 12px; border: 2px solid var(--accent); text-align: center; color: var(--accent); background: var(--surface); }
.paycheck strong { font-size: 1.15rem; }

/* Scroll reveal (only when JS is on and motion is allowed) */
@media (prefers-reduced-motion: no-preference) {
  .js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s cubic-bezier(.16, 1, .3, 1), transform .7s cubic-bezier(.16, 1, .3, 1); }
  .js .reveal.in { opacity: 1; transform: none; }
  .js .stack .layer.reveal { transform: translateY(24px) scale(.98); }
  .js .stack .layer.reveal.in { transform: none; }
  .js .stack .l1 { transition-delay: 0s; } .js .stack .l2 { transition-delay: .08s; } .js .stack .l3 { transition-delay: .16s; }
  .js .stack .l4 { transition-delay: .24s; } .js .stack .l5 { transition-delay: .32s; } .js .stack .paycheck { transition-delay: .44s; }
}
.credits { font-size: .85rem; }
.credits a { color: inherit; }
