/* Sibraim: site styles.
   Palette and type follow brand/logo/README.md. Gold is reserved for the
   star and one hairline on dark backgrounds. */

@font-face {
  font-family: "Jost";
  src: url("/fonts/Jost-Variable.ttf") format("truetype");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --night: #0F1A2C;
  --ink: #13213A;
  --paper: #F7F5F0;
  --ivory: #EFE9DD;
  --gold: #C6A66B;
  --slate: #5A6375;
  --rule: #DCD6CA;
  --mist: #A9B1C0;        /* secondary text on dark */
  --line-dark: rgba(239, 233, 221, 0.16);
  --error: #9A2F2F;
  --ok: #2F6B4F;

  --font: "Jost", "Futura", "Avenir Next", "Segoe UI", system-ui, sans-serif;
  --wrap: 1200px;
  --gutter: clamp(20px, 5vw, 64px);
  --section: clamp(64px, 8vw, 112px);
  --measure: 66ch;
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: 18px;
  line-height: 1.6;
  font-weight: 400;
  font-feature-settings: "kern", "liga";
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

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

h1, h2, h3, h4 { margin: 0; font-weight: 400; line-height: 1.15; }
p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.22em; }
a:hover { text-decoration-color: currentColor; }

:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
.section :focus-visible, .form :focus-visible, .admin-main :focus-visible { outline-color: var(--ink); }

.skip {
  position: absolute; left: 12px; top: -60px; z-index: 10;
  background: var(--ivory); color: var(--night); padding: 10px 16px; text-decoration: none;
}
.skip:focus { top: 12px; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }

/* ---------- Type scale ---------- */

.display {
  font-size: clamp(40px, 5.6vw, 66px);
  line-height: 1.06;
  letter-spacing: -0.015em;
  font-weight: 400;
  max-width: 17ch;
  text-wrap: balance;
}
.display-sm { font-size: clamp(38px, 4.6vw, 56px); max-width: 20ch; }
.h2 { font-size: clamp(28px, 3vw, 38px); letter-spacing: -0.01em; line-height: 1.15; text-wrap: balance; }
.h2-sm { font-size: 26px; }
.h3 { font-size: 26px; font-weight: 450; letter-spacing: -0.005em; }
.h4 { font-size: 20px; font-weight: 500; line-height: 1.3; }
.lead { font-size: 21px; line-height: 1.55; }
.muted { color: var(--slate); }
.small { font-size: 15px; line-height: 1.5; }
.kicker { font-size: 16px; color: var(--slate); margin-bottom: 10px; }

/* ---------- Buttons and links ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 50px; padding: 12px 28px;
  font: 500 16px/1.2 var(--font); letter-spacing: 0.02em;
  text-decoration: none; border: 1px solid transparent; border-radius: 2px;
  cursor: pointer;
  transition: background-color 160ms ease, color 160ms ease, border-color 160ms ease;
}
.btn-light { background: var(--ivory); color: var(--night); }
.btn-light:hover { background: #fff; }
.btn-outline-light { color: var(--ivory); border-color: rgba(239, 233, 221, 0.45); }
.btn-outline-light:hover { border-color: var(--ivory); }
.btn-dark { background: var(--ink); color: var(--paper); }
.btn-dark:hover { background: var(--night); }
.btn-outline { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn-outline:hover { background: var(--ink); color: var(--paper); }
.btn-small { min-height: 36px; padding: 6px 14px; font-size: 14px; background: var(--ink); color: var(--paper); }

.text-link {
  font-weight: 500; text-decoration: underline;
  text-decoration-color: var(--rule); text-underline-offset: 0.3em;
}
.text-link:hover { text-decoration-color: currentColor; }

.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 28px; margin-top: 36px; }

/* ---------- Masthead ---------- */

.masthead { background: var(--night); color: var(--ivory); position: relative; z-index: 2; }
.masthead-row { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 96px; }
.masthead-logo img { height: 34px; width: auto; }

.nav ul { display: flex; align-items: center; gap: 36px; list-style: none; margin: 0; padding: 0; }
.nav a { font-size: 16px; letter-spacing: 0.02em; text-decoration: none; color: var(--mist); padding: 6px 0; border-bottom: 1px solid transparent; transition: color 160ms ease; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--ivory); }
.nav a[aria-current="page"] { border-bottom-color: var(--gold); }
.nav .nav-cta { color: var(--ivory); border: 1px solid rgba(239, 233, 221, 0.4); padding: 10px 20px; border-radius: 2px; }
.nav .nav-cta:hover { border-color: var(--ivory); }
.nav .nav-cta[aria-current="page"] { border-color: var(--gold); }

.menu { display: none; position: relative; }
.menu summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 10px; padding: 10px 0; color: var(--ivory); font-size: 16px; }
.menu summary::-webkit-details-marker { display: none; }
.menu-bars, .menu-bars::before, .menu-bars::after { display: block; width: 22px; height: 1.5px; background: var(--ivory); position: relative; content: ""; transition: transform 160ms ease; }
.menu-bars::before { position: absolute; top: -7px; }
.menu-bars::after { position: absolute; top: 7px; }
.menu[open] .menu-bars { background: transparent; }
.menu[open] .menu-bars::before { transform: translateY(7px) rotate(45deg); }
.menu[open] .menu-bars::after { transform: translateY(-7px) rotate(-45deg); }
.menu-panel {
  position: absolute; right: calc(-1 * var(--gutter)); top: calc(100% + 18px);
  width: 100vw; max-width: 420px; background: var(--night);
  border-top: 1px solid var(--line-dark); padding: 8px var(--gutter) 24px;
}
.menu-panel ul { list-style: none; margin: 0; padding: 0; }
.menu-panel a { display: block; padding: 14px 0; font-size: 20px; text-decoration: none; color: var(--ivory); border-bottom: 1px solid var(--line-dark); }
.menu-panel a[aria-current="page"] { color: var(--gold); }

@media (max-width: 860px) {
  .nav { display: none; }
  .menu { display: block; }
  .masthead-row { min-height: 76px; }
  .masthead-logo img { height: 28px; }
}

/* ---------- Hero (home) ---------- */

.hero { background: var(--night); color: var(--ivory); overflow: hidden; }
.hero-grid {
  display: grid; grid-template-columns: minmax(0, 8fr) minmax(0, 4fr);
  gap: 48px; align-items: end;
  padding-top: clamp(48px, 8vw, 104px);
}
.hero-copy { padding-bottom: clamp(56px, 8vw, 112px); }
.hero-lede { font-size: clamp(19px, 1.6vw, 22px); line-height: 1.55; color: var(--mist); max-width: 40em; margin-top: 28px; }
.intro .hero-lede { max-width: 36em; }

.hero-mark { align-self: stretch; display: flex; justify-content: center; align-items: flex-end; }
.emblem { width: min(220px, 100%); height: auto; overflow: visible; margin-bottom: -2px; }
.emblem-pillars rect { fill: none; stroke: rgba(239, 233, 221, 0.55); stroke-width: 1; vector-effect: non-scaling-stroke; }
.emblem-star { fill: var(--gold); }

/* The single orchestrated moment: the pillars rise, then the star appears. */
@media (prefers-reduced-motion: no-preference) {
  .emblem-pillars { transform-origin: 50% 100%; transform-box: fill-box; animation: rise 1100ms cubic-bezier(0.2, 0.7, 0.1, 1) both; }
  .emblem-star { transform-origin: 50% 35%; transform-box: fill-box; animation: appear 1400ms cubic-bezier(0.2, 0.7, 0.1, 1) 700ms both; }
}
@keyframes rise { from { transform: scaleY(0); opacity: 0; } to { transform: scaleY(1); opacity: 1; } }
@keyframes appear { from { opacity: 0; transform: scale(0.6); } to { opacity: 1; transform: scale(1); } }

.credential {
  margin: 0; padding: 28px 0 40px;
  border-top: 1px solid var(--line-dark);
  position: relative;
  font-size: 17px; line-height: 1.6; color: var(--mist); max-width: none;
}
.credential::before { content: ""; position: absolute; left: 0; top: -1px; width: 56px; height: 1px; background: var(--gold); }

@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-mark { display: none; }
}

/* ---------- Inner page intro ---------- */

.intro { background: var(--night); color: var(--ivory); padding: clamp(40px, 6vw, 80px) 0 clamp(56px, 7vw, 96px); }
.intro .wrap { position: relative; }

/* ---------- Sections ---------- */

.section { padding: var(--section) 0; }
.section-rule > .wrap { padding-top: var(--section); position: relative; }
.section-rule > .wrap::before { content: ""; position: absolute; top: 0; left: var(--gutter); right: var(--gutter); height: 1px; background: var(--rule); }
.section-rule { padding-top: 0; }
.section-ivory { background: var(--ivory); }
.section-ivory + .section-rule > .wrap::before { display: none; }

.section-head { max-width: 40em; margin-bottom: 56px; }
.section-head .muted { margin-top: 16px; }

.split { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: 32px clamp(40px, 6vw, 96px); }
.split-head .muted { margin-top: 18px; max-width: 26em; }
.sticky { align-self: start; position: sticky; top: 32px; }
@media (max-width: 860px) {
  .split { grid-template-columns: 1fr; }
  .sticky { position: static; }
}

.prose-col { max-width: var(--measure); }
.prose p { max-width: var(--measure); }
.prose a { text-decoration-color: var(--slate); }
.prose a:hover { text-decoration-color: currentColor; }
.prose .lead { margin-bottom: 1.2em; }

/* Practices on the home page: a list divided by hairlines, not cards. */
.practice-list { border-top: 1px solid var(--rule); }
.practice { padding: 32px 0 36px; border-bottom: 1px solid var(--rule); display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 12px 40px; }
.practice h3 a { text-decoration: none; }
.practice h3 a:hover { text-decoration: underline; text-decoration-thickness: 1px; }
.practice p { color: var(--slate); }
@media (max-width: 1000px) { .practice { grid-template-columns: 1fr; } }

/* Engagement steps: a real sequence, so it is numbered. */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 40px; counter-reset: none; }
.step { border-top: 1px solid var(--ink); padding-top: 22px; }
.step-num { display: block; font-size: 15px; font-variant-numeric: tabular-nums; color: var(--slate); margin-bottom: 28px; }
.step h3 { margin-bottom: 10px; }
.step p { color: var(--slate); font-size: 17px; }
@media (max-width: 1000px) { .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .steps { grid-template-columns: 1fr; gap: 32px; } }

.product-teaser .lead { max-width: 34em; }
.product-teaser .muted { margin-top: 8px; }

/* Definition lists (offers, principles, billing) */
.offers { margin: 0; border-top: 1px solid var(--rule); }
.offer { padding: 22px 0 24px; border-bottom: 1px solid var(--rule); display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: 6px 32px; }
.offer dt { font-weight: 500; }
.offer dd { margin: 0; color: var(--slate); }
.offer dd a { color: var(--ink); }
@media (max-width: 700px) { .offer { grid-template-columns: 1fr; } }

.sub { margin: 48px 0 18px; }
.prose-col > .lead + .sub { margin-top: 40px; }

.ticks { list-style: none; margin: 0; padding: 0; }
.ticks li { position: relative; padding-left: 26px; margin-bottom: 10px; }
.ticks li::before { content: ""; position: absolute; left: 2px; top: 0.72em; width: 12px; height: 1px; background: var(--ink); }

.note { margin-top: 40px; padding-left: 20px; border-left: 1px solid var(--ink); color: var(--ink); }

.jump { background: var(--paper); border-bottom: 1px solid var(--rule); }
.jump ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 36px; }
.jump a { display: inline-block; padding: 20px 0; font-size: 16px; text-decoration: none; color: var(--slate); }
.jump a:hover { color: var(--ink); text-decoration: underline; }

/* Products */
.feature-grid { margin: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 48px; }
.feature { border-top: 1px solid var(--rule); padding: 24px 0 40px; }
.feature dt { font-weight: 500; font-size: 19px; margin-bottom: 8px; }
.feature dd { margin: 0; color: var(--slate); font-size: 17px; }
@media (max-width: 1000px) { .feature-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .feature-grid { grid-template-columns: 1fr; } }

.plans { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0; border: 1px solid var(--rule); background: var(--paper); }
.plan { padding: clamp(28px, 4vw, 48px); }
.plan + .plan { border-left: 1px solid var(--rule); }
.plan-featured { background: #fff; box-shadow: inset 0 3px 0 var(--ink); }
.plan-price { font-size: 48px; line-height: 1; letter-spacing: -0.01em; margin: 24px 0 8px; }
.plan-cadence { color: var(--slate); font-size: 16px; margin-bottom: 28px; padding-bottom: 28px; border-bottom: 1px solid var(--rule); }
.plan .ticks li { font-size: 17px; }
.plans-note { margin-top: 28px; max-width: 52em; color: var(--slate); }
@media (max-width: 760px) {
  .plans { grid-template-columns: 1fr; }
  .plan + .plan { border-left: 0; border-top: 1px solid var(--rule); }
}

.faq { border-top: 1px solid var(--rule); max-width: var(--measure); }
.faq details { border-bottom: 1px solid var(--rule); }
.faq summary { cursor: pointer; list-style: none; padding: 22px 40px 22px 0; font-weight: 500; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; position: absolute; right: 6px; top: 50%; width: 10px; height: 10px; border-right: 1.5px solid var(--ink); border-bottom: 1.5px solid var(--ink); transform: translateY(-70%) rotate(45deg); transition: transform 180ms ease; }
.faq details[open] summary::after { transform: translateY(-30%) rotate(-135deg); }
.faq details p { color: var(--slate); padding-bottom: 24px; margin: 0; }
.faq details p a { color: var(--ink); }

/* About */
.facts { margin: 0; border-top: 1px solid var(--rule); max-width: var(--measure); }
.facts > div { display: grid; grid-template-columns: 12em 1fr; gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--rule); }
.facts dt { color: var(--slate); }
.facts dd { margin: 0; }
@media (max-width: 560px) { .facts > div { grid-template-columns: 1fr; gap: 2px; } }

/* Legal */
.legal .prose { max-width: 44em; }
.legal h2 { font-size: 24px; font-weight: 450; margin: 2.2em 0 0.6em; }
.legal h3 { font-size: 19px; font-weight: 500; margin: 1.6em 0 0.4em; }
.legal .lead { font-size: 20px; }

/* ---------- Call to action band ---------- */

.cta { background: var(--night); color: var(--ivory); padding: clamp(72px, 9vw, 120px) 0; }
.cta-grid { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: 32px 80px; align-items: end; }
.cta p { color: var(--mist); max-width: 30em; }
.cta .btn { margin-top: 28px; }
@media (max-width: 860px) { .cta-grid { grid-template-columns: 1fr; } }

/* ---------- Footer ---------- */

.footer { background: var(--night); color: var(--mist); padding: 64px 0 40px; font-size: 16px; }
.cta + .footer { border-top: 1px solid var(--line-dark); }
.footer-grid { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 3fr) minmax(0, 3fr); gap: 40px; padding-bottom: 48px; }
.footer-brand img { height: 28px; width: auto; margin-bottom: 20px; }
.footer-brand p { max-width: 24em; }
.footer h2 { font-size: 15px; font-weight: 500; color: var(--ivory); margin-bottom: 14px; letter-spacing: 0.02em; }
.footer ul { list-style: none; margin: 0; padding: 0; }
.footer li { margin-bottom: 8px; }
.footer a { text-decoration: none; }
.footer a:hover { color: var(--ivory); text-decoration: underline; }
.footer-legal { border-top: 1px solid var(--line-dark); padding-top: 24px; font-size: 14px; margin: 0; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-brand { grid-column: 1 / -1; } }

/* ---------- Forms ---------- */

.form { max-width: 720px; }
.form-narrow { max-width: 420px; }
.form-wide { max-width: 820px; }
.field { margin-bottom: 24px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 24px; }
.field-short { max-width: 140px; }
@media (max-width: 640px) { .field-row { grid-template-columns: 1fr; } }
label { display: block; font-size: 16px; font-weight: 500; margin-bottom: 8px; }
.optional { font-weight: 400; color: var(--slate); }
input[type="text"], input[type="email"], input[type="password"], input:not([type]), select, textarea {
  width: 100%; font: 400 17px/1.45 var(--font); color: var(--ink);
  background: #fff; border: 1px solid #C9C2B4; border-radius: 2px;
  padding: 12px 14px; min-height: 50px;
  transition: border-color 140ms ease;
}
input:hover, select:hover, textarea:hover { border-color: var(--slate); }
input:focus, select:focus, textarea:focus { border-color: var(--ink); outline: 1px solid var(--ink); outline-offset: 0; }
textarea { resize: vertical; min-height: 160px; }
select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--ink) 50%), linear-gradient(135deg, var(--ink) 50%, transparent 50%); background-position: calc(100% - 22px) 50%, calc(100% - 16px) 50%; background-size: 6px 6px; background-repeat: no-repeat; padding-right: 44px; }
.has-error input, .has-error select, .has-error textarea { border-color: var(--error); }
.field-error { color: var(--error); font-size: 15px; margin: 8px 0 0; }
.check { display: flex; gap: 8px; align-items: center; font-weight: 400; font-size: 15px; margin-top: 10px; color: var(--slate); }
fieldset { border: 0; padding: 0; margin: 0 0 24px; }
legend { padding: 0; margin-bottom: 18px; }
.form .btn { margin-top: 8px; }
.form .small { margin-bottom: 20px; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

.alert { padding: 14px 18px; border-left: 3px solid; margin-bottom: 28px; font-size: 16px; }
.alert-error { border-color: var(--error); background: #F6E9E6; color: #5E1E1E; }
.alert-ok { border-color: var(--ok); background: #E8F0EB; color: #1F4434; }

.mini-steps { margin: 24px 0 28px; padding-left: 1.2em; color: var(--slate); }
.mini-steps li { margin-bottom: 12px; padding-left: 4px; }

/* ---------- Admin ---------- */

.admin { background: var(--paper); }
.admin-bar { background: var(--night); color: var(--ivory); }
.admin-bar-row { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 68px; flex-wrap: wrap; }
.admin-brand { display: flex; align-items: center; gap: 14px; text-decoration: none; color: var(--mist); font-size: 15px; }
.admin-brand img { height: 22px; width: auto; }
.admin-nav { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; }
.admin-nav a, .link-button { color: var(--mist); text-decoration: none; font: 400 15px var(--font); background: none; border: 0; padding: 0; cursor: pointer; }
.admin-nav a:hover, .link-button:hover, .admin-nav a[aria-current="page"] { color: var(--ivory); }
.admin-nav form { margin: 0; }
.admin-main { padding: 48px 0 96px; }
.admin-main h1 { margin-bottom: 28px; }
.msg-list { border-top: 1px solid var(--rule); margin-top: 24px; }
.msg { padding: 24px 0; border-bottom: 1px solid var(--rule); }
.msg-head { display: flex; justify-content: space-between; gap: 24px; align-items: flex-start; flex-wrap: wrap; }
.msg-head p { margin: 4px 0 0; }
.msg-status { display: flex; align-items: center; gap: 12px; }
.msg-status form { margin: 0; }
.msg-body { white-space: pre-wrap; margin-top: 14px; max-width: var(--measure); font-size: 17px; }
.badge { font-size: 13px; padding: 4px 10px; border-radius: 2px; border: 1px solid; }
.badge-sent { color: var(--ok); }
.badge-failed { color: var(--error); }
.badge-pending { color: var(--slate); }
