/* Plain Life Insurance - brand home */
:root {
  --bg: #F7F9FA;        /* Frost */
  --surface: #ECF0F2;   /* Mist */
  --ink: #1F3038;       /* Slate */
  --muted: #5D6B72;     /* Pewter */
  --accent: #0D7480;    /* Teal, main button only */
  --accent-hover: #0A5C66;
  --dark: #1F3038;
  --dark-2: #283D47;
  --on-dark: #F7F9FA;
  --on-dark-soft: #B8C4CA;

  --face-head: "Libre Franklin", system-ui, sans-serif;
  --face-text: "Source Serif 4", Georgia, serif;

  /* Five sizes: small, body, lead, head, hero */
  --s-small: 15px;
  --s-body: 18px;
  --s-lead: clamp(20px, 1.6vw, 26px);
  --s-head: clamp(26px, 2.4vw, 36px);
  --s-hero: clamp(40px, 4.4vw, 72px);

  --margin: clamp(20px, 2.8vw, 40px);
  --col: 22vw;
  --wrap: 1600px;
  --gutter: max(var(--margin), calc((100vw - var(--wrap)) / 2 + var(--margin)));
  --edge: min(calc(34vw - var(--margin)), 460px);
  --gap-section: clamp(112px, 11vw, 176px);
  --ease-out: cubic-bezier(.16, 1, .3, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--face-text);
  font-size: var(--s-body);
  line-height: 1.55;
  text-rendering: optimizeLegibility;
}
img { display: block; max-width: 100%; height: auto; }
h1, h2, h3 { font-family: var(--face-head); font-weight: 700; margin: 0; letter-spacing: -0.02em; line-height: 1.05; text-wrap: balance; }
p { margin: 0; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
a:hover { color: var(--muted); }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }
.hero :focus-visible { outline-color: var(--on-dark); }
::selection { background: var(--ink); color: var(--bg); }

.btn {
  display: inline-block;
  font-family: var(--face-head);
  font-weight: 600;
  font-size: var(--s-small);
  text-decoration: none;
  background: var(--accent);
  color: #fff;
  padding: 15px 24px;
  border-radius: 0;
  transition: background-color .2s, transform .2s var(--ease-out);
}
.btn:hover { background: var(--accent-hover); color: #fff; transform: translateY(-2px); }
.btn:active { transform: translateY(0) scale(.98); }
.link-quiet { font-family: var(--face-head); font-size: var(--s-small); font-weight: 500; }
.link-quiet { transition: color .2s; }

/* ---------- Hero ---------- */
.hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: min(100svh, 920px);
  background: var(--dark);
  color: var(--on-dark);
}
.hero-text {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: var(--margin);
  padding-left: var(--gutter);
}
.hero-logo img { width: 132px; height: auto; }
.hero-copy { max-width: 600px; padding-bottom: 8px; }
.hero h1 { font-size: var(--s-hero); color: var(--on-dark); }
.hero h1 .line { display: block; overflow: hidden; padding-bottom: .06em; }
.hero h1 .line > span { display: block; }
.hero-sub { margin-top: 24px; max-width: 44ch; font-size: var(--s-body); color: var(--on-dark-soft); }
.hero-actions { margin-top: 32px; display: flex; gap: 28px; align-items: center; flex-wrap: wrap; }
.hero-actions .link-quiet { color: var(--on-dark); }
.hero-actions .link-quiet:hover { color: var(--on-dark-soft); }
.hero-stage {
  position: relative;
  background: var(--dark-2);
  display: grid;
  place-items: end center;
  padding: var(--margin) var(--gutter) calc(var(--margin) + 8px) var(--margin);
}
.hero-corner { position: absolute; top: var(--margin); right: var(--gutter); color: var(--on-dark); }
.hero-corner:hover { color: var(--on-dark-soft); }

/* The term picker: Plain's own instrument */
.picker {
  width: min(470px, 100%);
  background: var(--bg);
  color: var(--ink);
  border-radius: 0;
  font-family: var(--face-head);
  overflow: hidden;
}
.picker-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 20px 20px 0; }
.picker-tabs button {
  font: 500 var(--s-small)/1.2 var(--face-head);
  color: var(--ink);
  background: var(--surface);
  border: 0;
  border-radius: 0;
  padding: 14px 16px;
  text-align: left;
  cursor: pointer;
  transition: background-color .2s, color .2s, transform .15s;
}
.picker-tabs button:hover { background: #DDE4E8; }
.picker-tabs button:active { transform: scale(.97); }
.picker-tabs button[aria-selected="true"] { background: var(--ink); color: var(--bg); }
.picker-body { padding: 26px 20px 24px; }
.pk-label { font: 500 var(--s-small)/1.3 var(--face-head); color: var(--muted); margin-bottom: 8px; }
.pk-fine { font: 400 var(--s-body)/1.5 var(--face-text); color: var(--muted); font-style: italic; }
.pk-plain { font: 400 var(--s-body)/1.5 var(--face-text); color: var(--ink); margin-top: 0; }
.pk-gap { height: 24px; }
.pk-swap { transition: opacity .25s, transform .35s var(--ease-out); }
.pk-swap.is-out { opacity: 0; transform: translateY(6px); }

/* ---------- Shared column ---------- */
main > section, .photo-band, .site-footer, .doc, .doc-head { max-width: var(--wrap); margin-left: auto; margin-right: auto; }
main > section { padding-left: var(--margin); padding-right: var(--margin); }
.col { margin-left: var(--col); max-width: 560px; }

/* ---------- About ---------- */
.about { padding-top: clamp(96px, 8vw, 128px); }
.about-row {
  display: grid;
  grid-template-columns: var(--edge) 1fr;
}
.facts { display: grid; gap: 20px; align-content: start; max-width: 220px; font-family: var(--face-head); font-size: var(--s-small); }
.facts dt { color: var(--muted); }
.facts dd { margin: 2px 0 0; color: var(--ink); font-weight: 500; }
.about-lead { font-size: var(--s-lead); line-height: 1.4; max-width: 34em; margin-right: 10vw; }
.about-lead + .about-lead { margin-top: 1em; }
.about-row--second { margin-top: 96px; }
.about-word { margin: 0; font-size: var(--s-head); font-weight: 700; letter-spacing: -0.02em; line-height: 1.05; padding-right: 48px; }
.headshot { margin: 0 0 28px; width: 160px; }
.headshot img { width: 160px; height: 160px; object-fit: cover; object-position: 50% 20%; }
.bio-text { font-size: var(--s-lead); line-height: 1.4; max-width: 34em; margin-right: 10vw; }
.lists { grid-column: 2; display: grid; grid-template-columns: repeat(2, minmax(0, 440px)); gap: 4px; }
.lists > div { background: var(--surface); padding: clamp(28px, 2.6vw, 44px); }
.lists > .dont { background: var(--dark); color: var(--on-dark); }
.lists li { text-wrap: pretty; }
.lists h3 { font-size: var(--s-lead); margin-bottom: 20px; }
.lists ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; font-size: var(--s-body); }

.photo-band { margin-top: var(--gap-section); }
.photo-band { padding: 0 var(--margin); }
.photo-band figure { margin: 0 0 0 var(--edge); overflow: hidden; }
.tone { filter: grayscale(1) contrast(.96); }
.photo-band img { width: 100%; aspect-ratio: 16 / 9; max-height: 78vh; object-fit: cover; animation: drift 24s ease-in-out infinite alternate; }
@keyframes drift { from { transform: scale(1.02) translateX(0); } to { transform: scale(1.08) translateX(-1.5%); } }

/* ---------- How it works ---------- */
.how { padding-top: var(--gap-section); display: grid; grid-template-columns: var(--edge) minmax(0, 1fr); }
.how h2 { grid-column: 1; font-size: var(--s-head); padding-right: 48px; align-self: start; position: sticky; top: 14vh; }
.how-grid { grid-column: 2; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: 56px; }
.how-steps { grid-column: 1; }
.step { min-height: 48vh; padding-top: 6vh; }
.step:first-of-type { padding-top: 0; }
.step-title { font-family: var(--face-head); font-weight: 700; font-size: var(--s-head); line-height: 1.12; letter-spacing: -0.015em; color: var(--muted); transition: color .35s; max-width: 16em; }
.step.is-active .step-title { color: var(--ink); }
.step p:not(.step-title) { margin-top: 14px; max-width: 34em; font-size: var(--s-body); }
.how-stage {
  grid-column: 2;
  position: sticky; top: 14vh;
  align-self: start;
  background: var(--surface);
  aspect-ratio: 1 / 1;
  max-height: min(72vh, 560px);
  display: grid; place-items: center;
  padding: 28px;
}
.screen { width: min(440px, 100%); background: #fff; border-radius: 0; padding: 26px; font-family: var(--face-head); color: var(--ink); }
.screen[hidden] { display: none; }
.screen-in { animation: screenIn .45s var(--ease-out); }
@keyframes screenIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.scr-meta { font-size: var(--s-small); color: var(--muted); margin-bottom: 8px; }
.scr-title { font-size: var(--s-lead); font-weight: 700; letter-spacing: -0.01em; line-height: 1.2; }
.scr-text { font-family: var(--face-text); font-size: var(--s-small); line-height: 1.5; margin-top: 12px; }
.scr-more { display: inline-block; margin-top: 16px; font-size: var(--s-small); color: var(--ink); font-weight: 600; text-decoration: underline; text-underline-offset: 0.2em; }
.scr-q { font-size: var(--s-body); font-weight: 600; margin: 6px 0 14px; }
.scr-opt { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border: 1px solid #D5DDE1; border-radius: 0; font-size: var(--s-small); margin-top: 8px; } /* taste-skill-ignore: form option inside data-ui fragment */
.scr-opt.on { border-color: var(--ink); background: var(--surface); }
.scr-dot { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--muted); flex: none; }
.scr-opt.on .scr-dot { border: 4px solid #fff; background: var(--ink); outline: 2px solid var(--ink); outline-offset: -2px; }
.scr-progress { display: flex; gap: 4px; margin-bottom: 18px; }
.scr-progress i { height: 4px; flex: 1; background: #D5DDE1; }
.scr-progress i.on { background: var(--ink); }
.scr-ok { width: 40px; height: 40px; border-radius: 50%; background: var(--surface); display: grid; place-items: center; margin-bottom: 14px; }
.scr-small { font-size: var(--s-small); color: var(--muted); margin-top: 14px; line-height: 1.45; }

/* ---------- FAQ ---------- */
.faq { padding-top: var(--gap-section); }
.faq-grid { display: grid; grid-template-columns: var(--edge) minmax(0, 1fr); }
.faq-side { grid-column: 1; padding-right: 56px; }
.faq h2 { font-size: var(--s-head); }
.faq-list { grid-column: 2; max-width: 860px; margin: -6px -20px 0; display: grid; gap: 4px; }
.faq-list details { padding: 0 20px; transition: background-color .2s; }
.faq-list details[open] { background: var(--surface); }
@media (hover: hover) { .faq-list details:hover { background: var(--surface); } }
.faq-list summary {
  display: flex; justify-content: space-between; align-items: center; gap: 24px;
  padding: 20px 0; cursor: pointer; list-style: none;
  font-family: var(--face-head); font-weight: 600; font-size: var(--s-body); line-height: 1.35;
}
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after {
  content: "+"; flex: none; font-weight: 400; font-size: 26px; line-height: 1; color: var(--muted);
  transition: transform .25s var(--ease-out);
}
.faq-list details[open] summary::after { transform: rotate(45deg); }
.faq-list details p { padding: 0 48px 24px 0; font-size: var(--s-body); line-height: 1.6; max-width: 68ch; }

/* ---------- Contact ---------- */
.contact { padding-top: 160px; padding-bottom: 120px; }
.contact-row { display: grid; grid-template-columns: var(--edge) minmax(0, 1fr); align-items: start; }
.contact-line { grid-column: 1; padding-right: 48px; font-family: var(--face-head); font-weight: 700; font-size: var(--s-head); line-height: 1.15; letter-spacing: -0.015em; }
.contact-links { grid-column: 2; font-family: var(--face-head); }
.contact-links .q { font-size: var(--s-body); font-weight: 600; }
.contact-links ul { list-style: none; margin: 20px 0 0; padding: 0; display: grid; gap: 8px; font-size: var(--s-body); }

/* ---------- Footer ---------- */
.site-footer {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 24px;
  align-items: baseline;
  padding: 96px var(--margin) 30px;
  font-family: var(--face-head);
  font-size: var(--s-small);
  color: var(--muted);
}
.site-footer nav { display: flex; gap: 24px; }
.site-footer nav a { color: var(--ink); }
.site-footer .yr { text-align: right; }

/* ---------- Legal pages ---------- */
.doc-head {
  display: flex; justify-content: space-between; align-items: center;
  padding: var(--margin);
}
.doc-head img { width: 112px; }
.doc-head nav { display: flex; gap: 24px; font-family: var(--face-head); font-size: var(--s-small); font-weight: 500; }
.doc { padding: 10vh var(--margin) 0; display: grid; grid-template-columns: min(calc(var(--col) - var(--margin)), 300px) minmax(0, 680px); justify-content: center; }
.doc-inner { grid-column: 2; grid-row: 1; }
.doc-toc { grid-column: 1; grid-row: 1; align-self: start; position: sticky; top: 32px; padding-right: 32px; font-family: var(--face-head); font-size: var(--s-small); }
.doc-toc p { font-weight: 600; margin-bottom: 14px; }
.doc-toc ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.doc-toc a { text-decoration: none; color: var(--muted); transition: color .2s; }
.doc-toc a:hover { color: var(--ink); }
.doc h2 { scroll-margin-top: 32px; }
.site-footer--doc { padding-top: 120px; }
.doc h1 { font-size: var(--s-hero); }
.doc .meta { margin-top: 20px; font-family: var(--face-head); font-size: var(--s-small); color: var(--muted); }
.doc .intro { margin-top: 40px; font-size: var(--s-lead); line-height: 1.4; }
.doc h2 { font-size: var(--s-lead); margin: 64px 0 16px; letter-spacing: -0.01em; }
.doc p, .doc li { font-size: var(--s-body); }
.doc p + p { margin-top: 1em; }
.doc ul { padding-left: 1.2em; margin: 1em 0 0; display: grid; gap: 8px; }
.doc .doc-toc ul { padding: 0; margin: 0; }
.doc ul + p { margin-top: 1em; }
.doc .review { background: var(--surface); padding: 0 4px; font-family: var(--face-head); font-size: var(--s-small); font-weight: 600; color: var(--ink); }
.doc .callout { background: var(--surface); padding: 24px 28px; margin-top: 24px; }

/* ---------- Motion ---------- */
.js .reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s var(--ease-out), transform .8s var(--ease-out); transition-delay: calc(var(--i, 0) * 80ms); }
.js .reveal.in { opacity: 1; transform: none; }
.js .hero h1 .line > span { transform: translateY(105%); animation: lineUp .9s var(--ease-out) forwards; }
.js .hero h1 .line:nth-child(2) > span { animation-delay: .11s; }
.js .hero-sub, .js .hero-actions { opacity: 0; animation: fadeUp .7s var(--ease-out) .55s forwards; }
.js .picker { opacity: 0; animation: fadeUp .8s var(--ease-out) .3s forwards; }
@keyframes lineUp { to { transform: none; } }
@keyframes fadeUp { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-delay: 0s !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .js .reveal { opacity: 1; transform: none; }
  .photo-band img { animation: none; }
}

/* ---------- Tablet ---------- */
@media (max-width: 1024px) {
  :root { --col: 0px; --edge: 200px; }
  .about-row { column-gap: 32px; }
  .about-lead { margin-right: 0; }
  .hero { min-height: 0; }
  .hero-text { gap: 96px; justify-content: flex-start; }
  .bio-text { margin-right: 0; }
  .photo-band figure { margin-left: calc(var(--edge) + 32px); }
  .faq-grid { display: block; }
  .faq-side { margin-bottom: 40px; padding-right: 0; }
  .how { grid-template-columns: 1fr; }
  .how h2 { position: static; margin-bottom: 32px; }
  .how-grid { grid-column: 1; column-gap: 32px; }
  .contact-row { grid-template-columns: 1fr 1fr; column-gap: 56px; }
  .doc { grid-template-columns: 200px minmax(0, 1fr); }
}

@media (max-width: 900px) {
  .lists { grid-template-columns: minmax(0, 560px); }
}

/* ---------- Phone ---------- */
@media (max-width: 720px) {
  :root { --margin: 20px; --s-body: 17px; --s-lead: 20px; --s-head: 26px; --gap-section: 104px; --edge: 0px; }
  .hero { grid-template-columns: 1fr; }
  .hero { position: relative; min-height: 0; }
  .hero-text { position: static; padding: 20px 20px 40px; justify-content: flex-start; gap: 64px; }
  .hero-stage { position: static; padding: 8px 20px 40px; place-items: center; }
  .hero-logo img { width: 96px; }
  .hero-corner { top: 20px; right: 20px; }
  .hero h1 { font-size: 9vw; }
  .picker-body { min-height: 0; }

  .about-row { grid-template-columns: 1fr; }
  .about-row .facts { order: 2; margin-top: 40px; grid-template-columns: 1fr 1fr; max-width: none; gap: 18px 16px; }
  .about-row--second { margin-top: 64px; }
  .about-word { margin-bottom: 20px; padding-right: 0; }
  .photo-band figure { margin-left: 0; }
  .lists { grid-column: 1; grid-template-columns: 1fr; }
  .bio-text { margin-right: 0; margin-top: 20px; }
  .headshot { width: 96px; margin: 0 0 20px; }
  .headshot img { width: 96px; height: 96px; }

  .how { display: block; }
  .how-grid { display: flex; flex-direction: column; }
  .how-steps, .how-stage { display: contents; }
  .step { min-height: 0; padding-top: 56px; }
  .step:first-of-type { padding-top: 0; }
  .step-title { color: var(--ink); }
  .step[data-step="1"] { order: 1; } .screen[data-screen="1"] { order: 2; }
  .step[data-step="2"] { order: 3; } .screen[data-screen="2"] { order: 4; }
  .step[data-step="3"] { order: 5; } .screen[data-screen="3"] { order: 6; }
  .screen, .screen[hidden] { display: block; width: calc(100% + 40px); margin: 24px -20px 0; padding: 16px; border: 16px solid var(--surface); } /* taste-skill-ignore: phone frame around data-ui fragment */
  .screen-in { animation: none; }

  .faq-list { margin: 0 -14px; }
  .faq-list details { padding: 0 14px; }
  .faq-list summary { padding: 16px 0; }
  .faq-list details p { padding-right: 0; }

  .contact { padding-top: 112px; }
  .contact-row { grid-template-columns: 1fr; row-gap: 28px; }
  .contact-line { padding-right: 0; }
  .contact-links { grid-column: 1; }

  .site-footer { grid-template-columns: 1fr; gap: 8px; padding: 72px 20px 24px; }
  .site-footer nav { flex-wrap: wrap; }
  .site-footer nav a { padding: 10px 0; }
  .site-footer .yr { text-align: left; }

  .doc-head img { width: 92px; }
  .doc { display: block; }
  .doc-toc { display: none; }
  .site-footer--doc { padding-top: 96px; }
  .doc { padding-top: 48px; }
}
