/* FABULOUS TOOLS — clean black & white */

@font-face {
    font-family: "Geist";
    src: url("../fonts/geist.woff2") format("woff2");
    font-weight: 100 900;
    font-display: swap;
}
@font-face {
    font-family: "Geist Mono";
    src: url("../fonts/geist-mono.woff2") format("woff2");
    font-weight: 100 900;
    font-display: swap;
}

:root {
    --black: #0a0a0a;
    --ink: #171717;
    --muted: #6b6b6b;
    --faint: #a3a3a3;
    --line: #e7e7e7;
    --line-strong: #d4d4d4;
    --soft: #f5f5f5;
    --white: #ffffff;
    --warn: #b45309;
    --radius: 14px;
    --radius-sm: 10px;
    --sans: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    --mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
    --ease: cubic-bezier(.2, .7, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; scroll-padding-top: 80px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition: none !important; animation: none !important; } }
body {
    margin: 0;
    font-family: var(--sans);
    font-size: 16px;
    line-height: 1.6;
    color: var(--ink);
    background: var(--white);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--black); outline-offset: 2px; }
::selection { background: var(--black); color: var(--white); }
[hidden] { display: none !important; }

.wrap { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 720px) { .wrap { padding: 0 32px; } }

.skip { position: absolute; left: -9999px; top: 8px; background: var(--black); color: var(--white); padding: 8px 14px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 8px; }

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    height: 44px; padding: 0 20px;
    border-radius: 999px; border: 1px solid transparent;
    font-size: 15px; font-weight: 500; letter-spacing: -.01em;
    text-decoration: none; white-space: nowrap;
    transition: background .2s var(--ease), color .2s var(--ease), border-color .2s var(--ease), transform .2s var(--ease);
}
.btn:active { transform: scale(.98); }
.btn--sm { height: 36px; padding: 0 16px; font-size: 14px; }
.btn--lg { height: 52px; padding: 0 26px; font-size: 16px; }
.btn--block { width: 100%; }
.btn--dark { background: var(--black); color: var(--white); }
.btn--dark:hover { background: #2a2a2a; }
.btn--ghost { background: var(--white); color: var(--black); border-color: var(--line-strong); }
.btn--ghost:hover { border-color: var(--black); }
.btn.is-done { background: var(--black); color: var(--white); border-color: var(--black); }
.link-btn { background: none; border: 0; padding: 4px 0; color: var(--muted); font-size: 13px; text-decoration: underline; text-underline-offset: 3px; }
.link-btn:hover { color: var(--black); }

/* ---------- Nav ---------- */
.nav {
    position: sticky; top: 0; z-index: 50;
    background: rgba(255, 255, 255, .82);
    backdrop-filter: saturate(180%) blur(14px);
    -webkit-backdrop-filter: saturate(180%) blur(14px);
    border-bottom: 1px solid transparent;
    transition: border-color .2s;
}
.nav.is-scrolled { border-bottom-color: var(--line); }
.nav__inner { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 16px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--black); }
.brand__name { font-weight: 500; letter-spacing: .02em; font-size: 15px; }
.brand__name b { font-weight: 800; }

.nav__tag {
    display: none; align-items: center; gap: 10px; margin: 0; padding: 6px 14px;
    border: 1px solid var(--line-strong); border-radius: 999px;
    font-family: var(--mono); font-size: 12px; color: var(--muted);
}
.nav__tag .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--black); box-shadow: 0 0 0 3px rgba(10,10,10,.12); }
@media (min-width: 720px) { .nav__tag { display: inline-flex; } }

/* ---------- Home ---------- */
@media (max-width: 759px) { .page-home .footer__inner { justify-content: center; } .page-home .footer__inner > span { display: none; } }
body { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }
body > main { flex: 1; }
.page-home main { display: flex; }
.page-home .nav { border-bottom-color: var(--line); }
.home { display: flex; flex-direction: column; gap: clamp(20px, 4vh, 44px); padding-top: clamp(24px, 5vh, 64px); padding-bottom: clamp(20px, 4vh, 48px); }
.home__intro { display: grid; gap: 12px 48px; align-items: end; }
.home__intro h1 { margin: 0; font-size: clamp(38px, min(7.4vw, 11vh), 104px); line-height: .95; font-weight: 700; letter-spacing: -.055em; color: var(--black); text-wrap: balance; }
.home__intro h1 em { font-style: normal; font-weight: 300; }
.home__intro p { margin: 0; max-width: 34ch; color: var(--muted); font-size: clamp(15px, 1.4vw, 18px); line-height: 1.5; }
@media (min-width: 900px) { .home__intro { grid-template-columns: 1fr auto; } .home__intro p { padding-bottom: 8px; } }
.tools { flex: 1; list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); }
.tools > li { display: grid; }
.tools > li:only-child { grid-column: 1 / -1; }
.tcard {
    position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: space-between; gap: 24px;
    min-height: 300px; padding: clamp(22px, 3vw, 40px); border-radius: 28px;
    background: var(--black); color: var(--white); text-decoration: none;
}
.tools > li:only-child .tcard { min-height: 0; }
.tcard:focus-visible { outline-offset: 4px; }
.tcard__path { font-family: var(--mono); font-size: 13px; color: var(--faint); }
.tcard__text { position: relative; max-width: 430px; }
.tcard__text h2 { margin: 0; font-size: clamp(28px, 3.4vw, 46px); line-height: 1.05; font-weight: 650; letter-spacing: -.04em; }
.tcard__text p { margin: 12px 0 22px; color: #b8b8b8; font-size: 16px; line-height: 1.5; }
.tcard__go { display: inline-flex; align-items: center; gap: 10px; height: 46px; padding: 0 22px; border-radius: 999px; background: var(--white); color: var(--black); font-size: 15px; font-weight: 500; }
.tcard__go span { transition: transform .25s var(--ease); }
.tcard:hover .tcard__go span { transform: translateX(5px); }
.tcard__art { display: none; }
.tools > li:only-child .tcard__art { display: block; position: absolute; right: clamp(22px, 4vw, 56px); top: 50%; height: min(78%, 380px); aspect-ratio: 1; transform: translateY(-50%) rotate(-4deg); transition: transform .5s var(--ease); }
.tools > li:only-child .tcard:hover .tcard__art { transform: translateY(-50%) rotate(0); }
.tcard__art svg { width: 100%; height: 100%; border-radius: 22px; }
@media (max-width: 759px) {
    .tcard { padding: 22px; border-radius: 22px; gap: 14px; }
    .tcard__text p { margin: 8px 0 16px; font-size: 15px; }
    .tools > li:only-child .tcard__art { position: static; height: auto; width: min(60%, 24vh); transform: rotate(-4deg); }
    .tools > li:only-child .tcard:hover .tcard__art { transform: none; }
}
@media (max-width: 759px) and (max-height: 700px) { .tools > li:only-child .tcard__art { display: none; } }

/* ---------- Legal ---------- */
.legal { padding: 64px 0 96px; }
.legal__inner { max-width: 760px; }
.legal h1 { margin: 0 0 8px; font-size: clamp(36px, 6vw, 56px); font-weight: 700; letter-spacing: -.04em; line-height: 1.05; color: var(--black); }
.legal__meta { margin: 0 0 48px; font-family: var(--mono); font-size: 12px; color: var(--faint); }
.legal h2 { margin: 48px 0 12px; font-size: 22px; font-weight: 600; letter-spacing: -.02em; color: var(--black); }
.legal h3 { margin: 28px 0 8px; font-size: 16px; font-weight: 600; color: var(--black); }
.legal p, .legal li { color: #404040; }
.legal ul { padding-left: 20px; }
.legal li { margin-bottom: 6px; }
.legal a { text-underline-offset: 3px; }
.legal address { font-style: normal; }
.legal .box { padding: 20px 24px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--soft); }
.legal .box p { margin: 0; }
.legal .box p + p { margin-top: 12px; }
.legal dl { display: grid; grid-template-columns: max-content 1fr; gap: 6px 24px; margin: 0; }
.legal dt { color: var(--muted); }
.legal dd { margin: 0; color: var(--ink); }
@media (max-width: 520px) { .legal dl { grid-template-columns: 1fr; gap: 0; } .legal dd { margin-bottom: 10px; } }
.legal .toc { list-style: none; padding: 0; margin: 0 0 8px; columns: 2; column-gap: 24px; font-size: 14px; }
.legal .toc li { margin-bottom: 4px; break-inside: avoid; }
.legal .toc a { color: var(--muted); text-decoration: none; }
.legal .toc a:hover { color: var(--black); }
@media (max-width: 520px) { .legal .toc { columns: 1; } }

/* ---------- 404 ---------- */
.notfound { padding: 120px 0; text-align: center; }
.notfound h1 { margin: 0; font-size: clamp(80px, 16vw, 180px); font-weight: 800; letter-spacing: -.06em; line-height: 1; color: var(--black); }
.notfound p { color: var(--muted); margin: 12px 0 32px; }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--line); }
.footer__inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 20px; min-height: 48px; padding-top: 8px; padding-bottom: 8px; font-size: 13px; color: var(--faint); }
.footer__links { display: flex; flex-wrap: wrap; gap: 4px 20px; }
.footer__links a { text-decoration: none; color: var(--muted); }
.footer__links a:hover { color: var(--black); }

/* toast */
.toast {
    position: fixed; left: 50%; bottom: 24px; z-index: 90;
    transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
    padding: 10px 18px; border-radius: 999px; background: var(--black); color: var(--white); font-size: 14px;
    box-shadow: 0 12px 32px -8px rgba(0,0,0,.35);
    transition: all .3s var(--ease);
}
.toast.is-show { opacity: 1; transform: translate(-50%, 0); }
