@import url("https://fonts.googleapis.com/css2?family=Sora:wght@300;400;600;700&display=swap");

:root {
  /* Brand (from the original irithmetic.com) */
  --navy: #05386b;
  --navy-deep: #032a52;
  --blue: #3b7ec2;
  --cyan: #66fcf1;
  --stone: #e3e2df;
  --coral: #d46f6f;

  /* Semantic */
  --bg: #f5f7fa;
  --surface: #ffffff;
  --text: #0b1f33;
  --muted: #4a5b6c;
  --link: #1f5a94; /* --blue fails 4.5:1 on white for body text */
  --border: #dde3ea;
  --radius: 14px;
  --max: 1120px;
  --pattern: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200' viewBox='0 0 800 800'%3E%3Cg fill='none' stroke='%233b7ec2' stroke-opacity='.45'%3E%3Cpath d='M769 229l268 31.9M927 880L731 737l-211-77-211-122-269 61 255 165-168.5 115.5L40 599l-237-106 299-111-133-153L126.5 79.5-69-63'/%3E%3Cpath d='M-31 229l268 32 153 121 213 111-294.5 44.5-207-156M370 905l-75-141'/%3E%3Cpath d='M520 660l58 182 153-105 109-138-237-106-83 167-225 104 14-226 81-156 149-113 230-40L577.5 41.5 370 105 295-36 126.5 79.5 237 261 102 382 40 599-69 737l196 143'/%3E%3Cpath d='M520-140l58.5 182.5L731-63M603 493l-64-224-302-8 133-156m532 277L539 269M390 382H102'/%3E%3Cpath d='M-222 42l348.5 37.5L370 105l169 164 38.5-227.5L927 80 769 229l133 153-299 111 128 244M295-36l282.5 77.5M578 842l-283-78M40-201l87 281m-25 302l-363-113'/%3E%3C/g%3E%3Cg fill='%2366fcf1' fill-opacity='.7'%3E%3Ccircle cx='769' cy='229' r='5'/%3E%3Ccircle cx='539' cy='269' r='5'/%3E%3Ccircle cx='603' cy='493' r='5'/%3E%3Ccircle cx='731' cy='737' r='5'/%3E%3Ccircle cx='520' cy='660' r='5'/%3E%3Ccircle cx='309' cy='538' r='5'/%3E%3Ccircle cx='295' cy='764' r='5'/%3E%3Ccircle cx='40' cy='599' r='5'/%3E%3Ccircle cx='102' cy='382' r='5'/%3E%3Ccircle cx='127' cy='80' r='5'/%3E%3Ccircle cx='370' cy='105' r='5'/%3E%3Ccircle cx='578' cy='42' r='5'/%3E%3Ccircle cx='237' cy='261' r='5'/%3E%3Ccircle cx='390' cy='382' r='5'/%3E%3C/g%3E%3C/svg%3E");
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
  margin: 0;
  font-family: "Sora", system-ui, sans-serif;
  font-size: 1rem;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; letter-spacing: -.01em; }
p { margin: 0 0 1em; }
a { color: var(--link); text-underline-offset: 3px; }
:focus-visible { outline: 3px solid var(--cyan); outline-offset: 3px; border-radius: 4px; }
.light :focus-visible, main :focus-visible { outline-color: var(--blue); }

.container { width: min(100% - 2.5rem, var(--max)); margin-inline: auto; }
.skip { position: absolute; left: -999px; top: 0; }
.skip:focus { left: 1rem; top: 1rem; z-index: 100; background: var(--surface); padding: .5rem 1rem; }
.icon { width: 1.25em; height: 1.25em; flex: none; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--navy) var(--pattern);
  border-bottom: 1px solid rgb(102 252 241 / .15);
}
.site-header .container { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 68px; }
.brand { display: flex; align-items: center; gap: .6rem; color: #fff; text-decoration: none; font-weight: 600; font-size: 1.15rem; }
.brand img { width: 52px; height: auto; }
.nav { display: flex; align-items: center; gap: .25rem; list-style: none; margin: 0; padding: 0; }
.nav a { color: var(--stone); text-decoration: none; padding: .6rem .8rem; border-radius: 8px; font-size: .95rem; transition: color .2s, background-color .2s; }
.nav a:hover { color: var(--cyan); }
.nav .btn { margin-left: .5rem; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: .5rem;
  min-height: 44px; padding: .7rem 1.3rem;
  border-radius: 999px; border: 2px solid transparent;
  font: inherit; font-weight: 600; text-decoration: none; cursor: pointer;
  transition: background-color .2s, color .2s, border-color .2s, transform .2s;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--cyan); color: var(--navy-deep); }
.btn-primary:hover { background: #fff; }
.nav a.btn-primary { color: var(--navy-deep); padding: .45rem 1.1rem; border-radius: 999px; }
.nav a.btn-primary:hover { color: var(--navy-deep); }
.btn-ghost { border-color: rgb(227 226 223 / .5); color: #fff; }
.btn-ghost:hover { border-color: var(--cyan); color: var(--cyan); }
.btn-dark { background: var(--navy); color: #fff; }
.btn-dark:hover { background: var(--navy-deep); }

/* Hero */
.hero {
  background: linear-gradient(180deg, rgb(5 56 107 / .55), var(--navy) 85%), var(--pattern), var(--navy);
  color: #fff;
  padding: clamp(4rem, 10vw, 7.5rem) 0 clamp(4rem, 9vw, 6.5rem);
}
.hero .container { display: grid; gap: 3rem; align-items: center; }
.eyebrow { display: inline-block; font-size: .8rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--cyan); margin-bottom: 1rem; }
.hero h1 { font-size: clamp(2.1rem, 5.2vw, 3.6rem); font-weight: 700; max-width: 16ch; }
.hero h1 span { color: var(--cyan); }
.hero p.lead { font-size: clamp(1.05rem, 1.8vw, 1.2rem); color: var(--stone); max-width: 56ch; margin-bottom: 2rem; }
.actions { display: flex; flex-wrap: wrap; gap: .8rem; }
.hero-mark { display: none; justify-self: center; width: min(100%, 340px); opacity: .95; filter: drop-shadow(0 20px 40px rgb(0 0 0 / .35)); }

/* Sections */
section { padding: clamp(3.5rem, 8vw, 6rem) 0; }
.section-head { max-width: 640px; margin-bottom: 2.5rem; }
.section-head h2 { font-size: clamp(1.6rem, 3.4vw, 2.3rem); }
.section-head p { color: var(--muted); font-size: 1.05rem; }
.section-head .eyebrow { color: var(--link); }

.grid { display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); }
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 1.75rem; transition: border-color .2s, box-shadow .2s, transform .2s;
}
.card:hover { border-color: rgb(59 126 194 / .45); box-shadow: 0 12px 32px -16px rgb(5 56 107 / .35); transform: translateY(-2px); }
.card h3 { font-size: 1.12rem; }
.card p { color: var(--muted); margin: 0; font-size: .97rem; }
.card-icon {
  display: grid; place-items: center; width: 48px; height: 48px; margin-bottom: 1.1rem;
  border-radius: 12px; background: rgb(59 126 194 / .1); color: var(--navy);
}
.card-icon .icon { width: 24px; height: 24px; }

.alt { background: var(--surface); border-block: 1px solid var(--border); }
.steps { list-style: none; padding: 0; margin: 0; counter-reset: step; display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); }
.steps li { counter-increment: step; padding-top: 1.25rem; border-top: 3px solid var(--blue); }
.steps li::before { content: "0" counter(step); display: block; font-weight: 700; color: var(--coral); font-size: .9rem; letter-spacing: .1em; margin-bottom: .4rem; }
.steps h3 { font-size: 1.08rem; }
.steps p { color: var(--muted); margin: 0; font-size: .97rem; }

.about { display: grid; gap: 2.5rem; align-items: start; }
.about-points { list-style: none; padding: 0; margin: 0; display: grid; gap: .9rem; }
.about-points li { display: flex; gap: .75rem; padding: 1rem 1.1rem; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; }
.about-points li::before { content: ""; flex: none; width: 8px; height: 8px; margin-top: .55em; border-radius: 50%; background: var(--coral); }

.cta {
  background: linear-gradient(135deg, rgb(5 56 107 / .9), rgb(3 42 82 / .95)), var(--pattern), var(--navy);
  color: #fff; border-radius: 20px; padding: clamp(2rem, 5vw, 3.5rem); text-align: center;
}
.cta h2 { font-size: clamp(1.5rem, 3.2vw, 2.1rem); }
.cta p { color: var(--stone); max-width: 52ch; margin: 0 auto 1.75rem; }
.cta .actions { justify-content: center; }

/* Footer */
.site-footer { background: var(--navy-deep) var(--pattern); color: var(--stone); padding: 3rem 0 2rem; font-size: .92rem; }
.site-footer .container { display: grid; gap: 2rem; }
.footer-top { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 1.5rem; }
.socials { display: flex; flex-wrap: wrap; gap: .4rem; list-style: none; margin: 0; padding: 0; }
.socials a { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 10px; color: var(--stone); transition: color .2s, background-color .2s; }
.socials a:hover { color: var(--cyan); background: rgb(102 252 241 / .08); }
.socials .icon { width: 22px; height: 22px; }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; padding-top: 1.5rem; border-top: 1px solid rgb(227 226 223 / .15); }
.site-footer a { color: var(--stone); }
.site-footer a:hover { color: var(--cyan); }
.footer-links { display: flex; gap: 1.25rem; list-style: none; margin: 0; padding: 0; }

/* Legal page */
.page-hero { background: var(--navy) var(--pattern); color: #fff; padding: 3.5rem 0 3rem; }
.page-hero h1 { font-size: clamp(1.9rem, 4vw, 2.6rem); }
.page-hero p { color: var(--stone); margin: 0; }
.legal { max-width: 760px; padding: 3rem 0 4rem; }
.legal h2 { font-size: 1.3rem; margin-top: 2.5rem; padding-top: 1rem; border-top: 1px solid var(--border); }
.legal h3 { font-size: 1.05rem; margin-top: 1.5rem; }
.legal ul { padding-left: 1.25rem; }
.legal li { margin-bottom: .4rem; }
.legal .note { background: var(--surface); border: 1px solid var(--border); border-left: 4px solid var(--blue); border-radius: 10px; padding: 1rem 1.25rem; }
.toc { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.25rem 1.5rem; }
.toc ol { margin: .5rem 0 0; padding-left: 1.25rem; columns: 2 220px; }

@media (min-width: 900px) {
  .hero .container { grid-template-columns: 1.4fr 1fr; }
  .hero-mark { display: block; }
  .about { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 720px) {
  .nav li:not(:last-child) { display: none; }
  .brand span { font-size: 1rem; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}
