/* =============================================
   BASE — CSS custom properties, reset, typography
   ============================================= */

/* Inter variable font — self-hosted, latin + latin-ext subsets */
@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
    src: url('/static/fonts/inter-variable-latin-ext.woff2') format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
                   U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF,
                   U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
    src: url('/static/fonts/inter-variable-latin.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
                   U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122,
                   U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
    /* Brand colours */
    --color-ink:         #04080f;   /* near-black — primary text & dark sections */
    --color-navy:        #1d3764;   /* deep navy — hero, footer */
    --color-navy-mid:    #162036;   /* nav blur bg, elevated dark surfaces */
    --color-accent:      #0052cc;   /* confident blue — Carestream family */
    --color-accent-dark: #003ea3;
    --color-accent-glow: rgba(0, 82, 204, 0.15);

    /* Neutrals */
    --color-white:       #ffffff;
    --color-surface:     #e3f2fd;   /* cooler than warm-grey */
    --color-border:      #dde4ee;
    --color-text:        #0b1526;
    --color-muted:       #5a6a82;

    /* Semantic status colours */
    --color-success:     #16a34a;
    --color-success-bg:  #f0fdf4;
    --color-error:       #b71c1c;
    --color-error-bg:    #fdecea;

    /* Typography */
    --font-sans: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-size-base: 1rem;
    --line-height-base: 1.65;

    /* Spacing scale */
    --space-1:  0.25rem;
    --space-2:  0.5rem;
    --space-3:  0.75rem;
    --space-4:  1rem;
    --space-5:  1.25rem;
    --space-6:  1.5rem;
    --space-8:  2rem;
    --space-10: 2.5rem;
    --space-12: 3rem;
    --space-16: 4rem;
    --space-20: 5rem;
    --space-24: 6rem;
    --space-32: 8rem;

    /* Layout */
    --container-max: 1240px;
    --container-pad: clamp(1.25rem, 5vw, 2.5rem);

    /* Radii — sharper = more enterprise */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 20px;

    /* Shadows — elevation-based, no cheap flat shadows */
    --shadow-xs:  0 1px 2px rgba(4,8,15,.05);
    --shadow-sm:  0 2px 8px rgba(4,8,15,.07);
    --shadow-md:  0 8px 24px rgba(4,8,15,.10);
    --shadow-lg:  0 16px 48px rgba(4,8,15,.14);
    --shadow-xl:  0 32px 80px rgba(4,8,15,.18);

    /* Transitions */
    --transition: 200ms cubic-bezier(0.25, 0.46, 0.45, 0.94);
    --transition-slow: 350ms cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* Reset */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-sans);
    font-size: var(--font-size-base);
    line-height: var(--line-height-base);
    color: var(--color-text);
    background: var(--color-white);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: inherit;
    text-decoration: none;
}

ul, ol {
    list-style: none;
}

/* ── Layout utilities ─────────────────────── */

.container {
    max-width: var(--container-max);
    margin-inline: auto;
    padding-inline: var(--container-pad);
}

.section {
    padding-block: var(--space-32);
}

.section--surface {
    background: var(--color-surface);
}

.section--dark {
    background: var(--color-navy);
    color: var(--color-white);
}

/* ── Typography helpers ───────────────────── */

/* Eyebrow label */
.section-label {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--color-accent);
    margin-bottom: var(--space-4);
}

.section-label::before {
    content: '';
    display: inline-block;
    width: 20px;
    height: 2px;
    background: var(--color-accent);
    border-radius: 2px;
    flex-shrink: 0;
}

/* Dark section variant */
.section--dark .section-label,
.page-header .section-label {
    color: rgba(255,255,255,0.45);
}

.section--dark .section-label::before,
.page-header .section-label::before {
    background: rgba(255,255,255,0.25);
}

.section-title {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 800;
    line-height: 1.08;
    letter-spacing: -0.035em;
    color: var(--color-ink);
    margin-bottom: var(--space-5);
}

.section--dark .section-title {
    color: var(--color-white);
}

.section-lead {
    font-size: 1.05rem;
    color: var(--color-muted);
    max-width: 54ch;
    line-height: 1.7;
}

.section--dark .section-lead {
    color: rgba(255,255,255,0.6);
}

/* ── Buttons ──────────────────────────────── */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    padding: 0.8rem 1.8rem;
    border-radius: var(--radius-sm);
    font-family: var(--font-sans);
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    cursor: pointer;
    border: 1.5px solid transparent;
    transition: background var(--transition), color var(--transition),
                border-color var(--transition), box-shadow var(--transition);
    white-space: nowrap;
    text-align: center;
    position: relative;
}

.btn--primary {
    background: var(--color-accent);
    color: var(--color-white);
    border-color: var(--color-accent);
}

.btn--primary:hover {
    background: var(--color-accent-dark);
    border-color: var(--color-accent-dark);
    box-shadow: 0 4px 20px rgba(0,82,204,0.35);
}

/* Ghost on dark background */
.btn--outline {
    background: transparent;
    color: var(--color-white);
    border-color: rgba(255,255,255,0.35);
}

.btn--outline:hover {
    background: rgba(255,255,255,0.08);
    border-color: rgba(255,255,255,0.7);
}

/* Ghost on light background */
.btn--outline-dark {
    background: transparent;
    color: var(--color-ink);
    border-color: var(--color-border);
}

.btn--outline-dark:hover {
    border-color: var(--color-accent);
    color: var(--color-accent);
    box-shadow: 0 0 0 3px var(--color-accent-glow);
}

/* Success state (add-to-cart confirmation) */
.btn--success { background: var(--color-success) !important; border-color: var(--color-success) !important; }

/* ── Divider line ─────────────────────────── */

.divider {
    border: none;
    border-top: 1px solid var(--color-border);
}

/* ── Phone status badge ───────────────────── */

.phone-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35em;
    padding: 0.15em 0.6em;
    border-radius: 100px;
    font-size: 0.75em;
    font-weight: 600;
    vertical-align: middle;
    margin-left: 0.5em;
    line-height: 1.5;
}

.phone-badge::before {
    content: '';
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    flex-shrink: 0;
}

.phone-badge--open {
    background: #dcfce7;
    color: #15803d;
}
.phone-badge--open::before   { background: #16a34a; }

.phone-badge--closed {
    background: #fee2e2;
    color: #b91c1c;
}
.phone-badge--closed::before { background: #dc2626; }

/* On dark backgrounds (footer, dark sections) */
.footer .phone-badge--open,
.section--dark .phone-badge--open {
    background: rgba(22, 163, 74, 0.18);
    color: #4ade80;
}
.footer .phone-badge--open::before,
.section--dark .phone-badge--open::before   { background: #4ade80; }

.footer .phone-badge--closed,
.section--dark .phone-badge--closed {
    background: rgba(220, 38, 38, 0.18);
    color: #f87171;
}
.footer .phone-badge--closed::before,
.section--dark .phone-badge--closed::before { background: #f87171; }

/* ── Generic data-tip tooltip ─────────────── */

[data-tip] {
    position: relative;
}

[data-tip]::after {
    content: attr(data-tip);
    position: absolute;
    top: calc(100% + 6px);
    left: 50%;
    transform: translateX(-50%);
    background: var(--color-ink);
    color: var(--color-white);
    font-size: 0.72rem;
    font-weight: 500;
    white-space: nowrap;
    padding: 0.3em 0.65em;
    border-radius: var(--radius-sm);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.15s ease;
    z-index: 100;
}

[data-tip]:hover::after {
    opacity: 1;
}
