/* ultlock.com - shared stylesheet (publication identity + intake-flow offer identity)
   Mobile-first. Breakpoints: 480px, 768px, 1024px. Light theme only. */

:root {
  color-scheme: only light;
  --bg: #F6FAFD;
  --surface: #E6EFF9;
  --ink: #0B1F3A;
  --muted: #4F6378;
  --accent: #0E4C92;
  --accent-ink: #FFFFFF;
  --accent-deep: #0A3A72;
  --white: #FFFFFF;
  --rule: #C9D8E8;
  --rule-strong: #9DB3CC;
  --display: "Cormorant Garamond", "Cormorant", Georgia, "Times New Roman", serif;
  --sans: "Figtree", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --page: 58.75rem;
  --rail: 12.5rem;
  --column: 42.5rem;
  --gutter: 1rem;
}

@media (min-width: 768px) {
  :root { --gutter: 1.5rem; }
}

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

html {
  background-color: var(--bg);
  color: var(--ink);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background-color: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.7;
  overflow-wrap: break-word;
  -webkit-font-smoothing: antialiased;
}

@media (min-width: 768px) {
  body { font-size: 1.125rem; }
}

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

main { display: block; background-color: var(--bg); color: var(--ink); }

a { color: var(--accent); }

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}

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

/* ---------- Masthead (brand only, minimal) ---------- */

.masthead {
  background-color: var(--bg);
  color: var(--ink);
  padding: 1.25rem 0 1.125rem;
}

.masthead-inner {
  max-width: calc(var(--page) + 2 * var(--gutter));
  margin: 0 auto;
  padding: 0 var(--gutter);
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  column-gap: 0.5rem;
}

.brand {
  display: inline-flex;
  align-items: baseline;
  gap: 0.5rem;
  padding: 0.625rem 0;
  color: var(--ink);
  text-decoration: none;
}

.brand-mark { width: 1.75rem; height: 1.75rem; flex: none; align-self: center; }

.brand-name {
  font-family: var(--display);
  font-size: 1.5rem;
  line-height: 1;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: var(--ink);
}

.brand-name em { font-weight: 400; font-style: italic; }

.brand-tld {
  font-family: var(--sans);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  line-height: 1;
  margin-left: -0.125rem;
}

.brand:hover .brand-name,
.brand:focus-visible .brand-name { color: var(--accent); }

.masthead-sep { color: var(--muted); }

.masthead-label {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  white-space: nowrap;
  color: var(--muted);
}

@media (min-width: 480px) {
  .masthead-inner { column-gap: 0.75rem; }
  .brand { gap: 0.625rem; }
  .brand-mark { width: 2rem; height: 2rem; }
  .brand-name { font-size: 1.875rem; }
  .masthead-label { font-size: 0.75rem; letter-spacing: 0.16em; }
}

@media (min-width: 768px) {
  .masthead { padding: 2rem 0 1.75rem; }
  .brand-name { font-size: 2.125rem; }
  .brand-mark { width: 2.25rem; height: 2.25rem; }
}

/* ---------- Opening: full-bleed image, title below ---------- */

.hero-media {
  margin: 0;
  width: 100%;
  background-color: var(--surface);
}

.frame {
  position: relative;
  width: 100%;
  overflow: hidden;
  background-color: var(--surface);
}

.frame img,
.frame video {
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
}

.frame--hero { aspect-ratio: 4 / 3; }
.frame--hero img { object-position: 50% 30%; }

.frame--photo { aspect-ratio: 4 / 3; }
.frame--video { aspect-ratio: 1200 / 630; }

.frame--bills img { object-position: 50% 40%; }
.frame--household img { object-position: 50% 30%; }
.frame--reviewing img { object-position: 50% 45%; }

@media (min-width: 768px) {
  .frame--hero { aspect-ratio: 16 / 8; }
  .frame--photo { aspect-ratio: 16 / 9; }
}

@media (min-width: 1024px) {
  .frame--hero { aspect-ratio: 16 / 7; max-height: 36rem; }
}

.opening {
  background-color: var(--bg);
  color: var(--ink);
  max-width: calc(var(--page) + 2 * var(--gutter));
  margin: 0 auto;
  padding: 2rem var(--gutter) 0.5rem;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
}

.opening-body { min-width: 0; }

h1, h2, h3 { text-wrap: balance; }
p, dd { text-wrap: pretty; }

.meta-line {
  margin: 0 0 1.125rem;
  font-size: 0.875rem;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.meta-tag { font-weight: 700; color: var(--accent); }
.meta-date { color: var(--muted); }

.opening h1 {
  margin: 0;
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(1.875rem, 1.1rem + 3.4vw, 3.75rem);
  line-height: 1.04;
  letter-spacing: -0.012em;
  color: var(--ink);
  text-align: left;
}

.dek {
  margin: 1.5rem 0 1.75rem;
  font-size: clamp(1.125rem, 1rem + 0.5vw, 1.3125rem);
  line-height: 1.55;
  color: var(--ink);
  max-width: 38rem;
}

.opening-body > p:not(.meta-line):not(.dek) {
  margin: 0 0 1.25rem;
  max-width: var(--column);
}

.opening-body > p:last-child { margin-bottom: 0; }

@media (min-width: 768px) {
  .opening {
    grid-template-columns: minmax(9rem, var(--rail)) minmax(0, var(--column));
    column-gap: 2.5rem;
    padding-top: 3.5rem;
    padding-bottom: 1rem;
  }
  .opening-body { grid-column: 2; }
}

@media (min-width: 1024px) {
  .opening { column-gap: 3.75rem; padding-top: 4.5rem; }
}

/* ---------- Chapters (asymmetric left rail) ---------- */

.chapter {
  background-color: var(--bg);
  color: var(--ink);
  padding: 3.5rem 0;
}

.chapter--tint { background-color: var(--surface); }

.chapter-inner {
  max-width: calc(var(--page) + 2 * var(--gutter));
  margin: 0 auto;
  padding: 0 var(--gutter);
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas: "head" "body" "media";
  row-gap: 1.5rem;
}

.chapter-head { grid-area: head; min-width: 0; align-self: start; }
.chapter-body { grid-area: body; min-width: 0; }

.chapter-media {
  grid-area: media;
  margin: 0.5rem calc(var(--gutter) * -1) 0;
  min-width: 0;
}

.kicker {
  margin: 0 0 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  font-family: var(--sans);
}

.kicker-index {
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.kicker-topic {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
}

.chapter h2,
.memo h2 {
  margin: 0;
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(1.75rem, 1.3rem + 1.6vw, 2.25rem);
  line-height: 1.1;
  letter-spacing: -0.005em;
  color: var(--ink);
}

.chapter-body > p {
  margin: 0 0 1.25rem;
  max-width: var(--column);
}

.chapter-body > p:last-child { margin-bottom: 0; }

.chapter-body > .cta-line { margin: 2rem 0 0; }

.chapter-body > .walkthrough + p { margin-top: 2rem; }

/* CTA: bold accent text link, no box, no arrow, underlined on hover */
.cta-link {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  padding: 0.25rem 0;
  font-family: var(--sans);
  font-size: 1.0625rem;
  font-weight: 700;
  line-height: 1.3;
  color: var(--accent);
  text-decoration: none;
  transition: color 0.2s ease;
}

.cta-link:hover,
.cta-link:focus-visible {
  color: var(--accent-deep);
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 6px;
}

/* inline links inside prose */
.chapter-body p a:not(.cta-link),
.memo-body p a {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

/* numbered walkthrough */
.walkthrough {
  list-style: none;
  counter-reset: step;
  margin: 1.75rem 0 0;
  padding: 0;
  display: grid;
  gap: 1.75rem;
  max-width: var(--column);
}

.walkthrough li {
  counter-increment: step;
  display: grid;
  grid-template-columns: 2.5rem minmax(0, 1fr);
  column-gap: 1rem;
  align-items: start;
}

.walkthrough li::before {
  content: counter(step);
  display: grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  background-color: var(--accent);
  color: var(--accent-ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  font-weight: 700;
  line-height: 1;
}

.walkthrough-title {
  margin: 0 0 0.25rem;
  font-weight: 700;
  line-height: 1.35;
  color: var(--ink);
}

.walkthrough-text { margin: 0; color: var(--ink); }

/* question and answer block */
.qa { margin: 0; display: grid; gap: 1.75rem; max-width: var(--column); }

.qa-item { border-top: 1px solid var(--rule-strong); padding-top: 1.25rem; }

.qa dt {
  font-family: var(--display);
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.2;
  color: var(--ink);
}

.qa dd { margin: 0.625rem 0 0; color: var(--ink); }

/* two-column trade-offs */
.tradeoffs {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 2rem;
  margin-top: 2rem;
  max-width: var(--column);
}

.tradeoff { min-width: 0; border-top: 2px solid var(--accent); padding-top: 1rem; }

.tradeoff h3 {
  margin: 0 0 0.75rem;
  font-family: var(--display);
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.15;
  color: var(--ink);
}

.tradeoff p { margin: 0 0 1rem; font-size: 1rem; line-height: 1.65; color: var(--ink); }
.tradeoff p:last-child { margin-bottom: 0; }

@media (min-width: 768px) {
  .chapter { padding: 5.5rem 0; }

  .chapter-inner {
    grid-template-columns: minmax(9rem, var(--rail)) minmax(0, var(--column));
    grid-template-areas: "head body" "media media";
    column-gap: 2.5rem;
    row-gap: 3.5rem;
  }

  .chapter-head { position: sticky; top: 2rem; }

  .chapter h2 { font-size: clamp(1.5rem, 0.6rem + 1.55vw, 1.875rem); }

  .chapter-media { margin: 0; }

  .tradeoffs { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2.5rem; }
  .tradeoff p { font-size: 1.0625rem; }
}

@media (min-width: 1024px) {
  .chapter-inner { column-gap: 3.75rem; }
}

/* ---------- Memo pages (about + legal) ---------- */

.memo {
  background-color: var(--bg);
  color: var(--ink);
  max-width: calc(var(--page) + 2 * var(--gutter));
  margin: 0 auto;
  padding: 2rem var(--gutter) 4.5rem;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  row-gap: 1.5rem;
}

.memo-rail { min-width: 0; }
.memo-body { min-width: 0; }

.back-link {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
}

.back-link:hover,
.back-link:focus-visible { text-decoration: underline; text-underline-offset: 4px; }

.memo h1 {
  margin: 0;
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(2rem, 1.2rem + 3vw, 3.25rem);
  line-height: 1.06;
  letter-spacing: -0.01em;
  color: var(--ink);
}

.revision {
  margin: 0.875rem 0 2.5rem;
  font-size: 0.875rem;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.memo h2 { margin: 2.5rem 0 0.75rem; font-size: clamp(1.5rem, 1.2rem + 1vw, 1.875rem); }

.memo-body > p { margin: 0 0 1.125rem; max-width: var(--column); }

@media (min-width: 768px) {
  .memo {
    grid-template-columns: minmax(9rem, var(--rail)) minmax(0, var(--column));
    column-gap: 2.5rem;
    padding-top: 3.5rem;
  }
  .memo-rail { padding-top: 0.5rem; }
}

@media (min-width: 1024px) {
  .memo { column-gap: 3.75rem; }
}

/* ---------- Footer (three-column editorial grid) ---------- */

.bottom {
  background-color: var(--surface);
  color: var(--ink);
  border-top: 1px solid var(--rule);
  padding: 3rem 0 3.5rem;
  font-size: 0.9375rem;
  line-height: 1.65;
}

.bottom-inner {
  max-width: calc(var(--page) + 2 * var(--gutter));
  margin: 0 auto;
  padding: 0 var(--gutter);
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 2rem;
}

.address, .site-note, .foot-links { min-width: 0; }

.address-line { margin: 0 0 0.875rem; color: var(--ink); overflow-wrap: anywhere; }
.address-line:last-child { margin-bottom: 0; }

.site-note { margin: 0; color: var(--ink); }

.foot-links { display: flex; flex-direction: column; }

.foot-links a {
  display: flex;
  align-items: center;
  min-height: 2.75rem;
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
}

.foot-links a:hover,
.foot-links a:focus-visible { text-decoration: underline; text-underline-offset: 4px; }

@media (min-width: 768px) {
  .bottom { padding: 4rem 0 4.5rem; }
  .bottom-inner {
    grid-template-columns: 1.25fr 1.1fr 0.85fr;
    column-gap: 2.5rem;
  }
}

/* =====================================================================
   Offer page - body.intake-flow (own identity: tinted ground, navy panel,
   white form card, solid button)
   ===================================================================== */

body.intake-flow {
  background-color: var(--surface);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.6;
}

.intake-flow .bottom { background-color: var(--white); }

.flow-top {
  background-color: var(--white);
  color: var(--ink);
  border-bottom: 1px solid var(--rule);
}

.flow-top-inner {
  max-width: 70rem;
  margin: 0 auto;
  padding: 0.5rem var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.flow-step-label {
  margin: 0;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--muted);
  text-align: right;
}

.flow-main { background-color: var(--surface); color: var(--ink); padding-bottom: 3rem; }

.flow-grid {
  max-width: 70rem;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas: "intro" "panel";
}

.flow-intro {
  grid-area: intro;
  background-color: var(--ink);
  color: var(--white);
  padding: 2rem var(--gutter) 3.25rem;
}

.flow-kicker {
  margin: 0 0 0.75rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #BFD4EC;
}

.flow-intro h1 {
  margin: 0;
  font-family: var(--sans);
  font-weight: 800;
  font-size: clamp(1.625rem, 1.1rem + 2.2vw, 2.5rem);
  line-height: 1.12;
  letter-spacing: -0.015em;
  color: var(--white);
}

.flow-lead { margin: 1rem 0 1.75rem; font-size: 1.0625rem; line-height: 1.6; color: #E6EFF9; }

.flow-steps { list-style: none; counter-reset: flow; margin: 0; padding: 0; display: grid; gap: 1.125rem; }

.flow-steps li {
  counter-increment: flow;
  display: grid;
  grid-template-columns: 2.25rem minmax(0, 1fr);
  column-gap: 0.875rem;
  align-items: start;
}

.flow-steps li::before {
  content: counter(flow);
  display: grid;
  place-items: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  background-color: var(--white);
  color: var(--ink);
  font-weight: 800;
  font-size: 1rem;
  line-height: 1;
}

.flow-steps strong { display: block; font-weight: 700; color: var(--white); }
.flow-steps span { display: block; font-size: 0.9375rem; line-height: 1.5; color: #D5E3F4; }

.flow-panel {
  grid-area: panel;
  position: relative;
  margin-top: -1.5rem;
  padding: 0 var(--gutter);
}

.flow-card {
  background-color: var(--white);
  color: var(--ink);
  border-radius: 18px;
  padding: 1.5rem 1.125rem 1.75rem;
  box-shadow: 0 22px 44px -22px rgba(11, 31, 58, 0.45);
}

.flow-card h2 {
  margin: 0 0 0.375rem;
  font-family: var(--sans);
  font-size: 1.375rem;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.01em;
  color: var(--ink);
}

.flow-card-lead { margin: 0 0 1.75rem; color: var(--muted); font-size: 0.9375rem; }

.flow-group { border: 0; padding: 0; margin: 0 0 1.875rem; min-width: 0; }

.flow-legend {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0;
  margin: 0 0 0.875rem;
  font-size: 1.0625rem;
  font-weight: 800;
  color: var(--ink);
}

.flow-legend-num {
  display: grid;
  place-items: center;
  flex: none;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 50%;
  background-color: var(--accent);
  color: var(--accent-ink);
  font-size: 0.875rem;
  font-weight: 800;
}

.flow-chips {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.625rem;
}

.flow-chip {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-height: 3.25rem;
  padding: 0.5rem 0.875rem;
  border: 1.5px solid var(--rule-strong);
  border-radius: 12px;
  background-color: var(--white);
  color: var(--ink);
  font-weight: 500;
  line-height: 1.3;
  cursor: pointer;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}

.flow-chip input { flex: none; width: 1.25rem; height: 1.25rem; margin: 0; accent-color: var(--accent); }
.flow-chip:hover { border-color: var(--accent); }
.flow-chip:has(input:checked) { background-color: var(--surface); border-color: var(--accent); }
.flow-chip:focus-within { outline: 3px solid var(--accent); outline-offset: 2px; }

.flow-field { display: grid; gap: 0.375rem; margin: 0 0 1.125rem; min-width: 0; }

.flow-label { font-size: 0.9375rem; font-weight: 700; color: var(--ink); }
.flow-optional { font-weight: 500; color: var(--muted); }

.flow-input {
  width: 100%;
  min-height: 3rem;
  padding: 0.625rem 0.875rem;
  border: 1.5px solid var(--rule-strong);
  border-radius: 10px;
  background-color: var(--white);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.4;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

textarea.flow-input { min-height: 6.5rem; resize: vertical; }
select.flow-input { appearance: auto; }
.flow-input::placeholder { color: #5E7186; opacity: 1; }
.flow-input:hover { border-color: var(--accent); }
.flow-input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px #CFE0F5; }
.flow-input[aria-invalid="true"] { border-color: var(--ink); border-width: 2px; }

.flow-error {
  margin: 0.125rem 0 0;
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--ink);
}

.flow-error[hidden] { display: none; }

.flow-consent {
  display: grid;
  grid-template-columns: 1.5rem minmax(0, 1fr);
  gap: 0.75rem;
  align-items: start;
  padding: 1rem;
  border-radius: 12px;
  background-color: var(--surface);
  color: var(--ink);
  cursor: pointer;
  font-size: 0.9375rem;
  line-height: 1.55;
}

.flow-consent input { width: 1.375rem; height: 1.375rem; margin: 0.125rem 0 0; accent-color: var(--accent); }
.flow-consent a { color: var(--accent); font-weight: 600; }

.flow-help { margin: 0.75rem 0 1.5rem; font-size: 0.9375rem; color: var(--muted); }

.flow-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 3.5rem;
  padding: 0.75rem 1.5rem;
  border: 0;
  border-radius: 12px;
  background-color: var(--accent);
  color: var(--accent-ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.2s ease;
}

.flow-submit:hover { background-color: var(--accent-deep); }
.flow-submit:active { transform: translateY(1px); }

.flow-success {
  padding: 1.5rem;
  border-radius: 14px;
  background-color: var(--surface);
  color: var(--ink);
}

.flow-success[hidden] { display: none; }
.flow-success h2 { margin: 0 0 0.5rem; font-family: var(--sans); font-size: 1.375rem; font-weight: 800; }
.flow-success p { margin: 0; }

@media (min-width: 480px) {
  .flow-card { padding: 2rem 1.75rem 2.25rem; }
  .flow-chips { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 768px) {
  .flow-grid { max-width: 46rem; padding: 2rem var(--gutter) 0; }
  .flow-intro { border-radius: 20px 20px 0 0; padding: 2.5rem 2rem 3.5rem; }
  .flow-panel { padding: 0; }
  .flow-card { padding: 2.5rem 2.25rem 2.5rem; }
}

@media (min-width: 1024px) {
  .flow-grid {
    max-width: 70rem;
    grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
    grid-template-areas: "intro panel";
    column-gap: 2rem;
    align-items: start;
    padding: 2.5rem var(--gutter) 0;
  }
  .flow-intro { position: sticky; top: 1.5rem; border-radius: 20px; padding: 2.75rem 2.5rem; }
  .flow-panel { margin-top: 0; }
}

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