/* Happy Oklahoma — site styles. Happy brand palette (app theme.ts). */
:root {
  --coral: #E85A45;
  --coral-ink: #B9402C;   /* coral dark enough for text on white (5.5:1) */
  --yellow: #F5D23C;
  --blue: #3DC3E8;
  --ink: #1A1A1A;
  --muted: #5C5C5C;
  --line: #E0E0E0;
  --soft: #F7F7F7;
  --paper: #FFFFFF;
  --coral-tint: #FDEDEA;
  --yellow-tint: #FEF8DC;
  --blue-tint: #E3F6FC;
  --radius: 16px;
  --display: Futura, "Futura PT", "Century Gothic", "Avenir Next", system-ui, sans-serif;
  --body: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --gutter: 20px;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 17px/1.65 var(--body);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--coral-ink); text-underline-offset: 3px; }
a:hover { color: var(--ink); }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; border-radius: 4px; }
h1, h2, h3 { font-family: var(--display); line-height: 1.15; margin: 0 0 .5em; letter-spacing: -.01em; text-wrap: balance; }
h1 { font-size: clamp(2.1rem, 5vw, 3.1rem); font-weight: 700; }
h2 { font-size: clamp(1.6rem, 3.2vw, 2.2rem); font-weight: 700; }
h3 { font-size: 1.2rem; font-weight: 700; }
p { margin: 0 0 1em; }

.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 var(--gutter); }
.narrow { max-width: 760px; }

.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: #fff; padding: 8px 14px; border-radius: 8px; z-index: 10; }
.skip:focus { left: 8px; }

/* tri-colour stripe, as on the Happy SOPs */
.stripe { display: flex; height: 6px; }
.stripe span { flex: 1; }
.stripe span:nth-child(1) { background: var(--coral); }
.stripe span:nth-child(2) { background: var(--blue); }
.stripe span:nth-child(3) { background: var(--yellow); }

/* header */
.site-header { border-bottom: 1px solid var(--line); background: var(--paper); }
.header-row { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 24px; padding-top: 14px; padding-bottom: 14px; }
.brand img { width: 140px; }
.site-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 22px; margin-left: auto; }
.site-nav a { color: var(--ink); text-decoration: none; font-family: var(--display); font-weight: 600; font-size: 1rem; padding: 6px 0; border-bottom: 3px solid transparent; }
.site-nav a:hover, .site-nav a[aria-current="page"] { border-bottom-color: var(--coral); }
.nav-cta { background: var(--ink); color: #fff; padding: 9px 18px; border-radius: 999px; text-decoration: none; font-family: var(--display); font-weight: 600; font-size: 1rem; white-space: nowrap; }
.nav-cta:hover { background: var(--coral-ink); color: #fff; }

/* shared bits */
.eyebrow { font-family: var(--display); font-weight: 600; font-size: .82rem; letter-spacing: .22em; text-transform: uppercase; color: var(--coral-ink); margin: 0 0 14px; }
.lede { font-size: 1.2rem; color: #333; max-width: 40em; }
.muted { color: var(--muted); }
.nowrap { white-space: nowrap; }
.section { padding: 72px 0; }
.section-soft { background: var(--soft); }
.section-head { max-width: 720px; margin-bottom: 32px; }

.btn-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 13px 22px; border-radius: 999px; font-family: var(--display); font-weight: 600; font-size: 1rem; text-decoration: none; border: 2px solid var(--ink); }
.btn-primary { background: var(--ink); color: #fff; }
.btn-primary:hover { background: var(--coral-ink); border-color: var(--coral-ink); color: #fff; }
.btn-ghost { background: transparent; color: var(--ink); }
.btn-ghost:hover { background: var(--ink); color: #fff; }

.icon { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; margin-bottom: 18px; flex: none; }
.icon svg { width: 26px; height: 26px; fill: none; stroke: var(--ink); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.icon-coral { background: var(--coral-tint); }
.icon-blue { background: var(--blue-tint); }
.icon-yellow { background: var(--yellow-tint); }

/* hero */
.hero { padding: 56px 0 40px; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 48px; align-items: center; }

/* hero illustration: a phone showing the app's home screen (pure HTML/CSS) */
.phone { justify-self: center; width: 290px; background: var(--ink); border-radius: 46px; padding: 11px; box-shadow: 0 40px 70px -40px rgba(26,26,26,.65); }
.phone-screen { background: var(--paper); border-radius: 36px; overflow: hidden; min-height: 580px; display: flex; flex-direction: column; font-size: 13px; line-height: 1.35; }
.phone-top { display: flex; align-items: center; justify-content: space-between; padding: 12px 22px 4px; font-size: 12px; font-weight: 600; }
.phone-island { width: 84px; height: 24px; background: var(--ink); border-radius: 999px; }
.phone-head { padding: 12px 18px 12px; }
.phone-head small { display: block; font-family: var(--display); font-size: 10.5px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--coral-ink); }
.phone-head strong { font-family: var(--display); font-size: 20px; }
.phone-card { margin: 0 12px 10px; border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px; }
.phone-card .label { font-weight: 700; font-size: 12.5px; }
.phone-card .sub { color: var(--muted); font-size: 11.5px; margin-top: 2px; }
.bar { height: 6px; background: #EEEEEE; border-radius: 99px; margin-top: 8px; overflow: hidden; }
.bar span { display: block; width: 66%; height: 100%; background: var(--blue); border-radius: inherit; }
.phone-alert { background: var(--coral-tint); border-color: #F5C6BE; }
.phone-alert .label { color: var(--coral-ink); }
.task { display: flex; align-items: center; gap: 9px; padding-top: 8px; font-size: 12.5px; }
.task + .task { border-top: 1px solid #F1F1F1; margin-top: 8px; }
.check { flex: none; width: 17px; height: 17px; border-radius: 50%; border: 2px solid #CFCFCF; }
.task.done .check { border-color: var(--coral); background: var(--coral) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5.5 12.5l4 4 9-9.5'/%3E%3C/svg%3E") center / 10px no-repeat; }
.task.done .t { color: var(--muted); text-decoration: line-through; }
.task .who { margin-left: auto; font-size: 10.5px; color: var(--muted); white-space: nowrap; }
.phone-tabs { margin-top: auto; display: flex; justify-content: space-around; border-top: 1px solid var(--line); padding: 10px 4px 18px; font-family: var(--display); font-size: 10.5px; color: var(--muted); }
.phone-tabs .on { color: var(--coral-ink); font-weight: 700; }

/* quick facts under the hero */
.factstrip-wrap { padding-bottom: 64px; }
.factstrip { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.factstrip div { background: var(--paper); padding: 20px 22px; }
.factstrip strong { display: block; font-family: var(--display); font-size: 1.4rem; line-height: 1.2; margin-bottom: 2px; }
.factstrip span { color: var(--muted); font-size: .92rem; }

/* the app: capability cards */
.app-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.cap { --accent: var(--coral); background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 22px 24px; }
.cap-blue { --accent: var(--blue); }
.cap-yellow { --accent: var(--yellow); }
.cap h3 { display: flex; align-items: center; gap: 12px; font-size: 1.12rem; margin: 0 0 14px; }
.cap .icon, .platform .icon { width: 40px; height: 40px; border-radius: 12px; margin: 0; }
.cap .icon svg, .platform .icon svg { width: 22px; height: 22px; }
.cap ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.cap li { position: relative; padding-left: 20px; font-size: .95rem; line-height: 1.5; color: #333; }
.cap li::before { content: ""; position: absolute; left: 2px; top: .5em; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }

.platform { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; margin-top: 40px; padding-top: 32px; border-top: 1px solid var(--line); }
.platform > div { display: flex; gap: 14px; align-items: flex-start; }
.platform p { margin: 0; font-size: .93rem; color: var(--muted); line-height: 1.5; }
.platform strong { display: block; color: var(--ink); font-family: var(--display); font-size: 1rem; margin-bottom: 2px; }

.demo-cta { margin-top: 40px; display: flex; align-items: center; justify-content: space-between; gap: 16px 24px; flex-wrap: wrap; background: var(--coral-tint); border: 1px solid #F5C6BE; border-radius: var(--radius); padding: 26px 30px; }
.demo-cta h3 { margin: 0 0 4px; font-size: 1.35rem; }
.demo-cta p { margin: 0; color: #3A3A3A; }

/* what we do: the three pillars (also used for "where we operate") */
.pillars { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.pillar { --accent: var(--coral); position: relative; overflow: hidden; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 30px 26px 28px; }
.pillar::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 6px; background: var(--accent); }
.pillar-blue { --accent: var(--blue); }
.pillar-yellow { --accent: var(--yellow); }
.pillar h3 { font-size: 1.45rem; margin-bottom: .3em; }
.pillar .tagline { color: #3A3A3A; margin: 0; }
.pillar ul { list-style: none; margin: 20px 0 0; padding: 18px 0 0; border-top: 1px solid var(--line); display: grid; gap: 11px; }
.pillar li { position: relative; padding-left: 24px; font-size: .97rem; line-height: 1.5; }
.pillar li::before { content: ""; position: absolute; left: 2px; top: .45em; width: 10px; height: 10px; border-radius: 50%; background: var(--accent); }

/* contact */
.contact-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.contact-card { border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; background: var(--paper); }
.contact-card h3 { font-size: 1rem; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.contact-card p { margin: 0; }
.contact-card .big { font-size: 1.1rem; font-weight: 600; overflow-wrap: anywhere; }

/* inner pages */
.page-head { padding: 56px 0 8px; }
.updated { color: var(--muted); font-size: .95rem; }
.prose { padding: 16px 0 72px; }
.prose h2 { font-size: 1.45rem; margin-top: 2em; padding-top: 1.2em; border-top: 1px solid var(--line); }
.prose h2:first-of-type { margin-top: 1.2em; }
.prose h3 { margin-top: 1.4em; }
.prose ul, .prose ol { padding-left: 1.3em; margin: 0 0 1em; }
.prose li { margin-bottom: .45em; }
.summary { background: var(--soft); border: 1px solid var(--line); border-left: 6px solid var(--coral); border-radius: 12px; padding: 20px 24px; margin: 24px 0 8px; }
.summary p:last-child, .summary ul:last-child { margin-bottom: 0; }
.keyfacts { margin: 28px 0 8px; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.keyfacts div { display: grid; grid-template-columns: 10em 1fr; gap: 16px; padding: 14px 22px; border-top: 1px solid var(--line); }
.keyfacts div:first-child { border-top: 0; }
.keyfacts div:nth-child(odd) { background: var(--soft); }
.keyfacts dt { font-weight: 600; }
.keyfacts dd { margin: 0; }
.kw { font-weight: 800; font-family: var(--display); letter-spacing: .04em; }
.steps { counter-reset: step; list-style: none; padding: 0 !important; }
.steps li { counter-increment: step; position: relative; padding-left: 52px; margin-bottom: 18px; min-height: 36px; }
.steps li::before { content: counter(step); position: absolute; left: 0; top: -2px; width: 36px; height: 36px; border-radius: 50%; background: var(--coral); color: var(--ink); font-family: var(--display); font-weight: 700; display: grid; place-items: center; }
.messages { display: grid; gap: 14px; margin: 20px 0 8px; max-width: 520px; }
.bubble { margin: 0; background: #E9E9EB; border-radius: 20px 20px 20px 6px; padding: 12px 16px; font-size: .98rem; line-height: 1.5; }
.bubble-label { display: block; font-size: .78rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-bottom: 4px; font-weight: 600; }
.notice { background: var(--blue-tint); border: 1px solid #BDE9F6; border-radius: 12px; padding: 16px 20px; }

/* footer */
.site-footer { background: var(--soft); }
.footer-grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 32px; padding-top: 44px; padding-bottom: 28px; font-size: .96rem; }
.footer-brand img { width: 96px; margin-bottom: 14px; }
.footer-head { font-family: var(--display); font-size: .82rem; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); margin: 0 0 12px; }
.footer-links { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.footer-base { border-top: 1px solid var(--line); padding-top: 18px; padding-bottom: 28px; font-size: .88rem; color: var(--muted); }
.footer-base p { margin: 0; }

/* 404 */
.notfound { padding: 96px 0 120px; text-align: center; }
.notfound .lede { margin: 0 auto; }
.notfound .btn-row { justify-content: center; }

/* responsive */
@media (max-width: 980px) {
  .pillars { grid-template-columns: 1fr; max-width: 680px; }
  .app-grid, .platform, .factstrip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .hero { padding: 40px 0 36px; }
  .section { padding: 56px 0; }
  .factstrip-wrap { padding-bottom: 48px; }
  .contact-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 560px) {
  :root { --gutter: 16px; }
  body { font-size: 16.5px; }
  .app-grid, .platform { grid-template-columns: 1fr; }
  .factstrip div { padding: 16px; }
  .factstrip strong { font-size: 1.15rem; }
  .pillar { padding: 26px 20px 24px; }
  .phone { width: 264px; border-radius: 42px; }
  .phone-screen { min-height: 0; border-radius: 32px; }
  .phone-head strong { font-size: 18px; }
  h1 { font-size: 1.95rem; }
  .demo-cta { padding: 22px 20px; }
  .brand img { width: 108px; }
  .site-nav { gap: 4px 14px; }
  .site-nav a { font-size: .95rem; }
  .site-nav { order: 3; width: 100%; margin-left: 0; }
  .nav-cta { margin-left: auto; padding: 7px 14px; font-size: .95rem; }
  .keyfacts div { grid-template-columns: 1fr; gap: 2px; padding: 12px 16px; }
  .footer-grid { grid-template-columns: 1fr; }
  .lede { font-size: 1.1rem; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
