/* ==========================================================================
   Base reset & defaults
   --------------------------------------------------------------------------
   Purpose: a floor for the whole site to stand on while you strip out the
   old template's CSS page by page. Every rule here targets bare HTML
   elements (low specificity) so:
     - old template classes can still override it where old markup remains
     - new Tailwind utility classes always win (utilities load after this
       and/or are equal-or-higher specificity)

   Load order in your layout <head>:
     1. this file (base-reset.css)
     2. Tailwind's compiled output (or CDN script)
     3. any remaining old template CSS you haven't removed yet
     4. page-specific overrides, if any

   This is plain CSS on purpose — it works whether or not a given page is
   running through the Tailwind build yet, so it's safe to ship before the
   Tailwind migration is finished.

   If your project runs Preflight (Tailwind's own reset) on every page
   already, this file is mostly redundant with it and harmless to run
   alongside it. If you'd rather not double up, set
   `corePlugins: { preflight: false }` in tailwind.config.js and let this
   file be the single reset instead.
   ========================================================================== */

/* ---- Design tokens -------------------------------------------------------
   Same palette as the header: slate ink, emerald accent, stone neutrals,
   Inter for body text, Fraunces for display/heading moments. Keeping these
   as variables means both old leftover pages and new Tailwind pages can
   reference the same source of truth via var(--color-...). */

:root {
    --color-ink: #0f172a;        /* slate-900 */
    --color-ink-soft: #64748b;   /* slate-500 */
    --color-accent: #047857;     /* emerald-700 */
    --color-accent-soft: #ecfdf5;/* emerald-50 */
    --color-surface: #ffffff;
    --color-muted: #fafaf9;      /* stone-50 */
    --color-line: #e7e5e4;       /* stone-200 */

    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-display: 'Fraunces', Georgia, serif;

    --radius: 10px;
}

/* ---- Box model ------------------------------------------------------- */

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
    scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* ---- Base document ----------------------------------------------------- */

body {
    margin: 0;
    min-height: 100vh;
    background: var(--color-surface);
    color: var(--color-ink);
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

/* ---- Headings & text ---------------------------------------------------- */

h1, h2, h3, h4, h5, h6 {
    margin: 0;
    font-family: var(--font-display);
    font-weight: 600;
    line-height: 1.2;
    color: var(--color-ink);
}

p {
    margin: 0;
}

small {
    color: var(--color-ink-soft);
}

/* ---- Lists ---------------------------------------------------------------
   Bare <ul>/<ol> reset to no bullets/margin (this is what was making raw
   old-template lists "look wired" once their CSS is pulled). Content areas
   that actually need bullets (blog posts, rich text from a CMS) opt back in
   via .rich-text so real content doesn't lose its markers. */

ul, ol {
    margin: 0;
    padding: 0;
    list-style: none;
}

.rich-text ul {
    list-style: disc;
    padding-left: 1.25em;
}

.rich-text ol {
    list-style: decimal;
    padding-left: 1.25em;
}

.rich-text li + li {
    margin-top: 0.35em;
}

/* ---- Links ---------------------------------------------------------------
   Reset to inherit color/no underline by default (so a stray old <a> in a
   card doesn't turn bright blue and underlined once old CSS is gone).
   Explicit text links use .link to opt back into a recognizable link style. */

a {
    color: inherit;
    text-decoration: none;
    cursor: pointer;
}

a:hover {
    color: var(--color-accent);
}

.link {
    color: var(--color-accent);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.link:hover {
    color: var(--color-ink);
}

/* ---- Buttons & form controls ----------------------------------------------
   Reset native button/input chrome so nothing renders as an unstyled OS
   control once old template CSS disappears. */

button {
    font: inherit;
    color: inherit;
    background: none;
    padding: 0;
    margin: 0;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
}

button:disabled {
    cursor: not-allowed;
    opacity: 0.6;
}

input,
select,
textarea {
    font: inherit;
    color: inherit;
    background: var(--color-surface);
    border: 1px solid var(--color-line);
    border-radius: var(--radius);
    padding: 10px 12px;
}

input::placeholder,
textarea::placeholder {
    color: var(--color-ink-soft);
}

fieldset {
    border: none;
    margin: 0;
    padding: 0;
}

label {
    display: inline-block;
}

/* A basic filled-button look for any plain <button> that hasn't been given
   Tailwind classes yet — keeps stray buttons from looking like bare text
   mid-migration. Tailwind-classed buttons will simply override this. */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 18px;
    border-radius: 999px;
    background: var(--color-accent);
    color: var(--color-surface);
    font-weight: 600;
    font-size: 14px;
    border: none;
    cursor: pointer;
    transition: background 0.15s ease, transform 0.1s ease;
}

.btn:hover {
    background: var(--color-ink);
}

.btn--outline {
    background: transparent;
    color: var(--color-ink);
    border: 1px solid var(--color-line);
}

.btn--outline:hover {
    border-color: var(--color-accent);
    color: var(--color-accent);
    background: var(--color-accent-soft);
}

/* ---- Media -------------------------------------------------------------- */

img,
svg,
video,
canvas {
    display: block;
    max-width: 100%;
    height: auto;
}

/* ---- Tables --------------------------------------------------------------
   Old templates often rely on table-based layout remnants for pricing
   grids, comparison tables, etc. — keep these usable, not stripped bare. */

table {
    width: 100%;
    border-collapse: collapse;
}

th {
    text-align: left;
    font-weight: 600;
}

th,
td {
    padding: 10px 12px;
    border-bottom: 1px solid var(--color-line);
}

/* ---- Focus & selection ---------------------------------------------------
   Old templates frequently strip the browser's default focus ring without
   replacing it. Put a visible one back for keyboard users. */

:focus-visible {
    outline: 2px solid var(--color-accent);
    outline-offset: 2px;
}

::selection {
    background: var(--color-accent-soft);
    color: var(--color-ink);
}

/* ---- Misc ----------------------------------------------------------------- */

hr {
    border: none;
    border-top: 1px solid var(--color-line);
    margin: 24px 0;
}

::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-thumb {
    background: var(--color-line);
    border-radius: 999px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--color-ink-soft);
}