/* =====================================================================
   ReduceMyFileSize — design system (public surfaces)
   Warm off-white canvas · crisp white surfaces · deep ink · teal accent.
   Motif: a document being compressed (see .mark / stacked bars).
   ===================================================================== */

/* ---------- Tokens ---------- */
:root {
    /* canvas & surfaces — sky blue / white */
    --canvas:       #f4fafe;   /* very pale sky-blue page */
    --canvas-2:     #e3f2fc;   /* slightly deeper sky (bands) */
    --surface:      #ffffff;   /* work surfaces */
    --surface-2:    #eaf6fd;   /* soft sky-blue inset / secondary surfaces */

    /* ink */
    --ink:          #0f172a;   /* main text (slate-900) */
    --ink-2:        #475569;   /* secondary text */
    --muted:        #64748b;   /* tertiary / captions */

    /* lines */
    --line:         #d5e6ef;   /* sky hairline */
    --line-2:       #bfdcec;   /* stronger */

    /* brand: primary action = darker sky blue (readable on white).
       Token names kept (--teal*) so every component re-themes at once. */
    --teal:         #0369a1;   /* primary action / links / active */
    --teal-600:     #0284c7;   /* mid */
    --teal-700:     #075985;   /* primary hover / selected text */
    --teal-tint:    #e0f2fe;   /* active-nav / selected background */
    --teal-tint-2:  #bae6fd;   /* focus ring / drag state */

    /* bright sky accent — decorative highlights only (never small white text) */
    --sky:          #38bdf8;
    --sky-tint:     #e0f2fe;

    /* category accents — cohesive cool set + one green (no red/amber: those are
       reserved for warnings/errors) */
    --c-image:  #0369a1;  --c-image-tint:  #e0f2fe;
    --c-pdf:    #0e7490;  --c-pdf-tint:    #d4f1fa;
    --c-doc:    #1d4ed8;  --c-doc-tint:    #e2e8ff;
    --c-video:  #7c3aed;  --c-video-tint:  #ede9fe;
    --c-audio:  #15803d;  --c-audio-tint:  #f0fdf4;
    --c-base64: #0284c7;  --c-base64-tint: #e0f2fe;

    /* status — green for success; amber/red kept semantic */
    --good:     #15803d;  --good-tint: #f0fdf4;
    --good-700: #166534;  /* green hover */
    --warn:     #9a6212;  --warn-tint: #f7eed9;
    --bad:      #b4231f;  --bad-tint:  #f7e5e4;

    /* radii */
    --r-sm: 7px;
    --r:    10px;
    --r-lg: 14px;
    --r-xl: 20px;

    /* elevation (restrained) */
    --sh-1: 0 1px 2px rgba(15,23,42,.06), 0 1px 1px rgba(15,23,42,.04);
    --sh-2: 0 4px 14px rgba(15,23,42,.08), 0 2px 5px rgba(15,23,42,.05);
    --sh-focus: 0 0 0 3px var(--teal-tint-2);

    /* type */
    --font: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --mono: ui-monospace, "SF Mono", "Cascadia Mono", "Roboto Mono", Menlo, Consolas, monospace;

    /* spacing scale */
    --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px; --s7: 48px; --s8: 64px;

    /* layout */
    --wrap: 1080px;
    --wrap-narrow: 760px;

    /* motion */
    --ease: cubic-bezier(.2, .6, .2, 1);
    --dur: 150ms;
}

/* ---------- Reset / base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    font-family: var(--font);
    font-size: 16px;
    line-height: 1.6;
    color: var(--ink);
    background: var(--canvas);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; }

/* icons: sensible default size; most components override as needed */
.ico { width: 18px; height: 18px; flex: 0 0 auto; display: inline-block; vertical-align: middle; color: currentColor; }
.crumbs .ico.sep { width: 15px; height: 15px; }
a { color: var(--teal); text-decoration: none; }
a:hover { color: var(--teal-700); text-decoration: underline; }
hr { border: 0; border-top: 1px solid var(--line); margin: var(--s5) 0; }
::selection { background: var(--teal-tint-2); }

/* ---------- Typography ---------- */
h1, h2, h3, h4 { margin: 0 0 .4em; line-height: 1.2; letter-spacing: -0.015em; color: var(--ink); font-weight: 700; }
h1 { font-size: clamp(1.7rem, 1.3rem + 1.6vw, 2.3rem); }
h2 { font-size: 1.4rem; }
h3 { font-size: 1.05rem; }
p { margin: 0 0 1em; }
.lead { font-size: 1.12rem; color: var(--ink-2); max-width: 54ch; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.mono { font-family: var(--mono); }
.eyebrow { font-size: .74rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--teal); }

/* ---------- Layout ---------- */
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--s5); }
.wrap-narrow { max-width: var(--wrap-narrow); }
.stack > * + * { margin-top: var(--s4); }
.page { padding: var(--s6) 0 var(--s8); }
.skip-link {
    position: absolute; left: -999px; top: 8px; z-index: 100;
    background: var(--ink); color: #fff; padding: 8px 14px; border-radius: var(--r-sm);
}
.skip-link:focus { left: 8px; }

/* ---------- Brand mark (compression motif) ---------- */
.mark { display: inline-flex; align-items: center; gap: 9px; font-weight: 800; color: var(--ink); letter-spacing: -0.02em; }
.mark:hover { text-decoration: none; color: var(--ink); }
.mark__glyph { width: 28px; height: 28px; flex: 0 0 auto; }
.mark__name b { color: var(--teal); }

/* ---------- Header / nav ---------- */
.site-header {
    position: sticky; top: 0; z-index: 40;
    background: color-mix(in srgb, var(--surface) 88%, transparent);
    backdrop-filter: saturate(1.1) blur(8px);
    border-bottom: 1px solid var(--line);
}
.site-header__bar { display: flex; align-items: center; gap: var(--s5); height: 60px; }
.site-nav { display: flex; align-items: center; gap: 2px; margin-left: auto; }
.site-nav a {
    color: var(--ink-2); font-size: .92rem; font-weight: 550;
    padding: 7px 11px; border-radius: var(--r-sm); display: inline-flex; align-items: center; gap: 7px;
    transition: background var(--dur) var(--ease), color var(--dur) var(--ease);
}
.site-nav a:hover { background: var(--surface-2); color: var(--ink); text-decoration: none; }
.site-nav a[aria-current="page"] { color: var(--teal-700); background: var(--teal-tint); }
.site-nav a .ico { width: 17px; height: 17px; color: var(--muted); }
.site-nav a:hover .ico, .site-nav a[aria-current="page"] .ico { color: currentColor; }

.nav-toggle {
    display: none; margin-left: auto; width: 42px; height: 42px; align-items: center; justify-content: center;
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-sm); color: var(--ink); cursor: pointer;
}
.nav-toggle .ico { width: 20px; height: 20px; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); background: var(--surface); margin-top: var(--s8); }
.site-footer__in { padding: var(--s6) 0; display: grid; gap: var(--s5); grid-template-columns: 1.4fr 1fr 1fr; }
.site-footer h4 { font-size: .78rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: var(--s3); }
.site-footer a { color: var(--ink-2); font-size: .92rem; display: block; padding: 3px 0; }
.site-footer a:hover { color: var(--teal); }
.site-footer .assurances { display: flex; flex-wrap: wrap; gap: var(--s2) var(--s4); margin-top: var(--s3); color: var(--muted); font-size: .85rem; }
.site-footer .assurances span { display: inline-flex; align-items: center; gap: 6px; }
.site-footer .assurances .ico { width: 15px; height: 15px; color: var(--good); }
.site-footer__legal { border-top: 1px solid var(--line); padding: var(--s4) 0; color: var(--muted); font-size: .82rem; }

/* ---------- Buttons ---------- */
.btn {
    --bg: var(--teal); --fg: #fff; --bd: var(--teal);
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    font: inherit; font-weight: 600; font-size: .95rem; line-height: 1;
    padding: 11px 18px; border-radius: var(--r-sm); cursor: pointer;
    background: var(--bg); color: var(--fg); border: 1px solid var(--bd);
    transition: background var(--dur) var(--ease), border-color var(--dur) var(--ease), transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.btn:hover { background: var(--teal-700); border-color: var(--teal-700); color: #fff; text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn .ico { width: 18px; height: 18px; }
.btn[disabled], .btn:disabled { opacity: .5; cursor: not-allowed; }
.btn--lg { padding: 14px 24px; font-size: 1rem; }
.btn--block { width: 100%; }
.btn--ghost { --bg: var(--surface); --fg: var(--ink); --bd: var(--line-2); }
.btn--ghost:hover { --bg: var(--surface-2); background: var(--surface-2); color: var(--ink); border-color: var(--line-2); }
.btn--good { --bg: var(--good); --bd: var(--good); }
.btn--good:hover { background: var(--good-700); border-color: var(--good-700); }
.btn--danger { --bg: var(--bad); --bd: var(--bad); }
.btn--danger:hover { background: #8f1b18; border-color: #8f1b18; }
.btn--sm { padding: 7px 12px; font-size: .85rem; }

/* ---------- Inputs ---------- */
.field { display: block; }
.field > label, .label { display: block; font-size: .82rem; font-weight: 600; color: var(--ink-2); margin-bottom: 6px; }
.input, .select, select, input[type="text"], input[type="email"], input[type="password"], input[type="number"] {
    width: 100%; font: inherit; font-size: .95rem; color: var(--ink);
    background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--r-sm);
    padding: 10px 12px; transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.input:focus, .select:focus, select:focus, input:focus, textarea:focus {
    outline: none; border-color: var(--teal); box-shadow: var(--sh-focus);
}
.select, select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; padding-right: 34px; }
.hint { font-size: .8rem; color: var(--muted); margin-top: 5px; }

/* visible keyboard focus everywhere */
:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; }

/* ---------- Badges / pills ---------- */
.badge {
    display: inline-flex; align-items: center; gap: 5px; font-size: .74rem; font-weight: 650;
    padding: 3px 9px; border-radius: 999px; line-height: 1.5; border: 1px solid transparent;
}
.badge .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge--good { background: var(--good-tint); color: var(--good); }
.badge--warn { background: var(--warn-tint); color: var(--warn); }
.badge--bad  { background: var(--bad-tint);  color: var(--bad); }
.badge--muted{ background: var(--canvas-2);  color: var(--ink-2); }
.badge--teal { background: var(--teal-tint); color: var(--teal-700); }

/* ---------- Alerts ---------- */
.alert { display: flex; gap: 11px; padding: 13px 15px; border-radius: var(--r); border: 1px solid var(--line); background: var(--surface-2); color: var(--ink-2); }
.alert .ico { width: 20px; height: 20px; flex: 0 0 auto; margin-top: 1px; }
.alert strong { color: var(--ink); }
.alert--good { background: var(--good-tint); border-color: color-mix(in srgb, var(--good) 25%, transparent); color: #124f31; }
.alert--good .ico { color: var(--good); }
.alert--warn { background: var(--warn-tint); border-color: color-mix(in srgb, var(--warn) 25%, transparent); color: #6e470d; }
.alert--warn .ico { color: var(--warn); }
.alert--bad  { background: var(--bad-tint);  border-color: color-mix(in srgb, var(--bad) 25%, transparent);  color: #7f1916; }
.alert--bad .ico { color: var(--bad); }

/* ---------- Cards / surfaces ---------- */
.surface { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: var(--s5); box-shadow: var(--sh-1); }

/* ---------- Breadcrumbs ---------- */
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: .85rem; color: var(--muted); margin-bottom: var(--s4); }
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--teal); }
.crumbs .sep { color: var(--line-2); }
.crumbs [aria-current="page"] { color: var(--ink-2); font-weight: 550; }

/* ---------- Empty state ---------- */
.empty { text-align: center; padding: var(--s7) var(--s5); color: var(--muted); }
.empty .ico { width: 40px; height: 40px; margin: 0 auto var(--s3); color: var(--line-2); }

/* ---------- Motion ---------- */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
}

/* ---------- Responsive ---------- */
@media (max-width: 760px) {
    .wrap { padding: 0 var(--s4); }
    .site-nav { display: none; }
    .nav-toggle { display: inline-flex; }
    .site-header[data-open="true"] .site-nav {
        display: flex; flex-direction: column; align-items: stretch; gap: 2px;
        position: absolute; left: 0; right: 0; top: 60px; margin: 0;
        background: var(--surface); border-bottom: 1px solid var(--line); padding: var(--s3) var(--s4); box-shadow: var(--sh-2);
    }
    .site-header[data-open="true"] .site-nav a { padding: 11px; }
    .site-footer__in { grid-template-columns: 1fr; gap: var(--s5); }
}
