/* Colors mirror the mentaratutors.com theme tokens in frontend/src/globals.css */
:root{
  --background:hsl(32 22% 96%);
  --foreground:hsl(20 12% 5%);
  --primary:hsl(345 75% 31%);
  --primary-hover:hsl(345 75% 26%);
  --primary-foreground:#fff;
  --muted:hsl(32 14% 93.5%);
  --muted-foreground:hsl(20 6% 43%);
  --border:hsl(30 11% 88%);
  --ring:hsl(345 75% 31% / .35);
  --brand-text:#881337;
  color-scheme:light;
}
/* Dark tokens: system dark unless the footer switch forced light, or forced dark (theme-init.js sets data-theme). */
@media(prefers-color-scheme:dark){
  :root:not([data-theme="light"]){
    --background:hsl(240 6% 10%);
    --foreground:hsl(240 5% 92%);
    --primary:hsl(345 55% 55%);
    --primary-hover:hsl(345 55% 62%);
    --muted:hsl(240 4% 16%);
    --muted-foreground:hsl(240 4% 58%);
    --border:hsl(240 4% 20%);
    --ring:hsl(345 55% 55% / .45);
    --brand-text:#fda4af;
    color-scheme:dark;
  }
}
:root[data-theme="dark"]{
  --background:hsl(240 6% 10%);
  --foreground:hsl(240 5% 92%);
  --primary:hsl(345 55% 55%);
  --primary-hover:hsl(345 55% 62%);
  --muted:hsl(240 4% 16%);
  --muted-foreground:hsl(240 4% 58%);
  --border:hsl(240 4% 20%);
  --ring:hsl(345 55% 55% / .45);
  --brand-text:#fda4af;
  color-scheme:dark;
}
*{box-sizing:border-box}
body{margin:0;background:var(--background);color:var(--foreground);font:16px/1.65 Inter,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif}
a{color:inherit}
a:focus-visible{outline:3px solid var(--ring);outline-offset:4px}
.top{max-width:1120px;margin:auto;height:88px;padding:0 32px;display:flex;align-items:center;justify-content:space-between}
.brand{display:flex;align-items:center;gap:12px;font-size:16px;line-height:24px;text-decoration:none;font-weight:700;color:var(--brand-text);transition:transform .2s}
.brand:hover{transform:scale(1.05)}
.brand img{display:block;width:40px;height:40px;object-fit:contain}
/* manta.js swaps the PNG for the live manta (idles; click = jump + barrel roll). It may move outside its box. */
.brand-mark{display:flex;align-items:center;justify-content:center;width:40px;height:40px;flex:none}
.brand-mark svg{display:block;overflow:visible}
.top nav{display:flex;align-items:center;gap:22px;font-size:14px}
.top nav a:not(.button){text-decoration:none;color:var(--muted-foreground)}
.top nav a:not(.button):hover{color:var(--foreground)}
main{max-width:1120px;margin:auto;padding:0 32px;min-height:calc(100vh - 88px);min-height:calc(100svh - 88px)}
.hero{padding:88px 0 72px;max-width:760px}
h1{font:500 clamp(40px,6vw,72px)/1.06 Georgia,serif;letter-spacing:-2px;margin:22px 0 24px;color:var(--foreground)}
.lead{max-width:640px;color:var(--muted-foreground);font-size:18px;line-height:1.8;margin:0}
.actions{display:flex;flex-wrap:wrap;gap:14px;margin-top:32px}
.button{display:inline-block;text-decoration:none;background:var(--primary);color:var(--primary-foreground);font-weight:600;font-size:15px;padding:13px 24px;border-radius:8px;border:1px solid var(--primary);transition:background .15s,border-color .15s}
.button:hover{background:var(--primary-hover);border-color:var(--primary-hover)}
.button.small{padding:8px 16px;font-size:14px}
.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
/* Word, slide and dot switch together; landing.js moves .is-active (fallback: first item). */
.rotator{display:inline-grid;justify-items:start;color:var(--primary);font-style:italic}
.rotator span{grid-area:1/1;white-space:nowrap;opacity:0;max-width:0;transform:translateY(.25em);transition:opacity .3s,transform .3s,max-width 0s .3s}
.rotator span.is-leaving{transform:translateY(-.25em)}
.rotator span.is-active{opacity:1;max-width:12em;transform:none;transition:opacity .4s .3s,transform .4s .3s,max-width 0s .3s}
.slides{--dir:1;display:grid;overflow:hidden;margin:0 -8px;padding:0 8px 8px}
.slide{grid-area:1/1;opacity:0;visibility:hidden;transform:translateX(calc(56px * var(--dir)));transition:opacity .3s,transform .3s,visibility 0s .3s}
.slide.is-leaving{transform:translateX(calc(-56px * var(--dir)))}
.slide.is-active{opacity:1;visibility:visible;transform:none;transition:opacity .45s .3s,transform .45s .3s cubic-bezier(.2,.7,.2,1),visibility 0s .3s}
.dots{display:flex;margin:20px 0 0 -10px}
.dots button{appearance:none;border:0;background:none;padding:0;margin:0;cursor:pointer;border-radius:999px;min-width:40px;height:40px;display:flex;align-items:center;justify-content:center}
.dots button::before{content:"";display:block;width:10px;height:10px;border-radius:999px;background:var(--muted-foreground);opacity:.35;transition:width .35s,background-color .35s,opacity .35s}
.dots button:hover::before{opacity:.7}
.dots button[aria-current="true"]::before{width:28px;background:var(--primary);opacity:1}
.dots button:focus-visible{outline:3px solid var(--ring);outline-offset:-3px}
@media(prefers-reduced-motion:reduce){.rotator span,.slide,.dots button::before{transition:none!important}}
/* Floating copy-link button; landing.js toggles .is-copied for 2s after a copy. */
.copy-link{--spring:cubic-bezier(.34,1.56,.64,1);position:fixed;right:24px;bottom:24px;z-index:10;display:grid;grid-template-columns:20px 0fr;align-items:center;column-gap:0;height:48px;padding:0 13px;border-radius:999px;border:1px solid var(--border);background:var(--background);color:var(--foreground);cursor:pointer;font:600 14px/1 Inter,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;box-shadow:0 6px 20px hsl(20 12% 5% / .12),0 1px 3px hsl(20 12% 5% / .08);transition:transform .3s var(--spring),box-shadow .25s,border-color .25s,color .25s,background-color .3s,grid-template-columns .4s var(--spring),column-gap .4s var(--spring),padding .4s var(--spring);animation:copy-link-in .6s var(--spring) .4s backwards}
.copy-link:hover{transform:translateY(-3px);border-color:var(--primary);color:var(--primary);box-shadow:0 12px 28px hsl(20 12% 5% / .18),0 2px 4px hsl(20 12% 5% / .08)}
.copy-link:active{transform:translateY(0) scale(.92);transition-duration:.1s}
.copy-link:focus-visible{outline:3px solid var(--ring);outline-offset:3px}
/* Icons stack in one cell and cross-fade with a little spin; the label slides open beside them. */
.copy-link svg{display:block;grid-area:1/1;transition:opacity .25s,transform .45s var(--spring)}
.copy-link:hover .icon-link{transform:rotate(-12deg)}
.copy-link .icon-check{opacity:0;transform:scale(.3) rotate(-45deg)}
.copy-link .icon-check path{stroke-dasharray:24;stroke-dashoffset:24;transition:stroke-dashoffset .35s ease-out .1s}
.copy-link-label{grid-area:1/2;min-width:0;overflow:hidden;white-space:nowrap;opacity:0;transform:translateX(-6px);transition:opacity .2s,transform .35s var(--spring)}
.copy-link.is-copied{grid-template-columns:20px 1fr;column-gap:8px;padding:0 16px 0 14px;border-color:var(--primary);background:var(--primary);color:var(--primary-foreground)}
.copy-link.is-copied .icon-link{opacity:0;transform:scale(.3) rotate(45deg)}
.copy-link.is-copied .icon-check{opacity:1;transform:none}
.copy-link.is-copied .icon-check path{stroke-dashoffset:0}
.copy-link.is-copied .copy-link-label{opacity:1;transform:none;transition-delay:.1s}
/* Footer grid: theme switch top-left, link top-right, copyright centered on the bottom row. */
.theme-switch{grid-area:switch;justify-self:start}
.footer-link{grid-area:link;justify-self:end}
.footer-copy{grid-area:copy;justify-self:center}
/* Segmented system/light/dark switch; landing.js keeps aria-pressed on the active option. */
.theme-switch{display:inline-flex;gap:2px;padding:3px;border:1px solid var(--border);border-radius:999px;background:var(--muted)}
.theme-switch button{appearance:none;display:flex;align-items:center;justify-content:center;width:28px;height:28px;padding:0;border:0;border-radius:999px;background:none;color:var(--muted-foreground);cursor:pointer;transition:background-color .2s,color .2s,box-shadow .2s,transform .3s cubic-bezier(.34,1.56,.64,1)}
.theme-switch button:hover{color:var(--foreground)}
.theme-switch button:active{transform:scale(.88)}
.theme-switch button:focus-visible{outline:3px solid var(--ring);outline-offset:1px}
.theme-switch button[aria-pressed="true"]{background:var(--background);color:var(--primary);box-shadow:0 1px 3px hsl(20 12% 5% / .15)}
.theme-switch svg{display:block}
body{transition:background-color .3s,color .3s}
@keyframes copy-link-in{from{opacity:0;transform:translateY(16px) scale(.8)}}
@media(prefers-reduced-motion:reduce){.copy-link,.copy-link *{transition:none!important;animation:none!important}.copy-link:hover,.copy-link:active{transform:none}}
footer{max-width:1120px;margin:auto;padding:24px 32px 40px;border-top:1px solid var(--border);display:grid;grid-template-columns:1fr auto;grid-template-areas:"switch link" "copy copy";align-items:center;gap:20px 16px;font-size:13px;color:var(--muted-foreground)}
/* keep the footer clear of the floating copy-link button once they share the right edge */
@media(max-width:1260px){footer{padding-bottom:96px}}
@media(max-width:760px){
  .top{height:68px;padding:0 16px}
  .top nav{gap:14px}
  .top nav a:not(.button){display:none}
  main{padding:0 16px;min-height:calc(100vh - 68px);min-height:calc(100svh - 68px)}
  .hero{padding:48px 0}
  footer{padding:20px 16px 88px}
  .copy-link{right:16px;bottom:16px}
}
