/* site/style.css - castleducation.com, the company's home. White on black, one steel-blue accent (the review's dark-theme
   accent, so the way into the products looks like the products). System fonts only, so a plain copy works offline. */
:root {
  --bg: #121212; --fg: #ffffff; --soft: #a8a8a2; --line: #2e2e2c; --card: #1a1a19;
  --accent: #6db6dc; --accent-fg: #0d1418;
  --serif: Georgia, "Times New Roman", serif;
  --body: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--fg); font: 17px/1.6 var(--body); }
main { max-width: 960px; margin: 0 auto; padding: 0 16px 48px; }
a { color: var(--accent); }
a:focus-visible, .btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
p { margin: 0 0 12px; max-width: 68ch; }
h2 { font: 700 1.35rem/1.25 var(--serif); margin: 40px 0 12px; }
h3 { font: 700 1.1rem/1.3 var(--serif); margin: 22px 0 6px; }

/* the top bar (the inner pages) */
.top { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.top a { display: flex; align-items: center; gap: 10px; color: var(--fg); text-decoration: none; }
.top img { width: 28px; height: 28px; }
.top b { font: 700 1rem var(--serif); letter-spacing: .1em; }

/* the arrival: castle, name, tagline, centred like the logo */
.hero { text-align: center; padding: 64px 0 28px; }
.hero .castle { width: 132px; height: 132px; display: block; margin: 0 auto 18px; }
.hero h1 { font: 700 clamp(1.45rem, 6.2vw, 3.2rem)/1 var(--serif); letter-spacing: .14em; margin: 0 0 10px; padding-left: .14em; }
.hero .tag { font: 1.2rem var(--serif); letter-spacing: .12em; color: var(--soft); margin: 0 auto 26px; }
.hero .lede { font: italic 1.25rem/1.45 var(--serif); margin: 0 auto 10px; }
.hero .sub { color: var(--soft); margin: 0 auto; }

/* first visit: the castle is built in stone courses; later visits: it rises quickly into place */
.castle { clip-path: inset(100% 0 0 0); animation: build 1.1s steps(9, end) .15s forwards; }
@keyframes build { to { clip-path: inset(0 0 0 0); } }
.again .castle { clip-path: none; opacity: 0; transform: translateY(10px) scale(.96); transform-origin: 50% 100%; animation: rise .7s cubic-bezier(.2, .7, .2, 1) .05s forwards; }
@keyframes rise { to { opacity: 1; transform: none; } }
.fade { opacity: 0; animation: up .5s ease-out forwards; animation-delay: 1.2s; }
.fade.f2 { animation-delay: 1.45s; } .fade.f3 { animation-delay: 1.7s; }
.again .fade { animation-delay: .35s; } .again .fade.f2 { animation-delay: .5s; } .again .fade.f3 { animation-delay: .65s; }
@keyframes up { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  .castle, .again .castle, .fade { animation: none; clip-path: none; opacity: 1; transform: none; }
}

/* the three doors */
.doors { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 14px; margin-top: 8px; }
.door { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 18px 18px 20px; display: flex; flex-direction: column; }
.door h3 { margin: 0 0 2px; }
.door .what { color: var(--soft); font-size: .92rem; margin-bottom: 10px; }
.door p { font-size: .97rem; }
.door .go { margin-top: auto; padding-top: 6px; }
.door .go.stack { display: grid; gap: 10px; }
.door .go.stack .btn { text-align: center; }
.pill { display: inline-block; font-size: .72rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; border: 1px solid var(--soft); color: var(--soft); border-radius: 999px; padding: 1px 9px; margin-left: 6px; vertical-align: 2px; }
.pill.live { border-color: var(--accent); color: var(--accent); }
.btn { display: inline-block; font-weight: 600; text-decoration: none; padding: 9px 18px; border-radius: 8px; background: var(--accent); color: var(--accent-fg); }
.btn.ghost { background: transparent; color: var(--soft); border: 1px dashed var(--line); font-weight: 500; cursor: default; }

.callout { border-left: 3px solid var(--accent); background: var(--card); border-radius: 0 8px 8px 0; padding: 12px 16px; margin: 28px 0 0; }
.callout p:last-child { margin-bottom: 0; }

/* the legal pages */
.doc { max-width: 720px; margin: 0 auto; padding: 8px 0 0; }
.doc h1 { font: 700 2rem/1.2 var(--serif); margin: 28px 0 4px; }
.doc .when { color: var(--soft); margin-bottom: 24px; }
.doc li { margin-bottom: 6px; max-width: 66ch; }

footer { border-top: 1px solid var(--line); margin-top: 48px; padding-top: 18px; color: var(--soft); font-size: .86rem; }
footer nav { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-bottom: 12px; }
footer nav a { color: var(--fg); }
