/* ============================================================
   DPP Labels — Design System (Avery Europe Brand)
   Core tokens: colors, typography, spacing, grid, reset
   ============================================================ */

/* --- Fonts: Prompt (Headlines) + Montserrat (Body) --- */
@import url('https://fonts.googleapis.com/css2?family=Prompt:wght@900&family=Montserrat:wght@400;700&display=swap');

/* --- CSS Custom Properties — Avery Brand Tokens --- */
:root {
    /* Colors — Primary / Structure */
    --color-primary: #0A4A8F;         /* Avery Blue — Header, buttons, links */
    --color-primary-light: #0A4A8F;   /* Same as primary (no SaaS gradient) */
    --color-primary-hover: #083d77;   /* Slightly darker for hover */

    /* Colors — Dark Blue */
    --color-surface-dark: #0A2540;    /* Dark Blue — Footer, dark sections, headlines */
    --color-surface-dark-2: #0A2540;  /* Same (no gradient) */

    /* Colors — Accent (max ~5% surface area!) */
    --color-accent-warm: #FCC700;     /* Avery Yellow — CTA highlights, icon accents */
    --color-accent-warm-hover: #e5b600;
    --color-accent: #FCC700;          /* Map accent to Yellow */
    --color-accent-light: #FCC700;

    /* Colors — Square-only accents (NOT for general UI) */
    --square-cyan: #00AEEF;
    --square-magenta: #EC008C;
    --square-angle: 8.5deg;

    /* Colors — Surfaces */
    --color-bg: #F7F5EF;             /* Paper — warm off-white background */
    --color-bg-alt: #EFEAE0;         /* Slightly deeper Paper for alt sections */
    --color-surface: #ffffff;         /* Cards, form inputs */

    /* Colors — Text */
    --color-text: #0A4A8F;           /* Avery Blue body text (per brand combo 1) */
    --color-text-muted: #5B6B7B;     /* Slate Gray — secondary text, captions */
    --color-text-light: #8896A6;     /* Lighter slate */
    --color-text-inverse: #F7F5EF;   /* Paper on dark */
    --color-text-inverse-muted: #B8C0CA;

    /* Colors — Semantic */
    --color-success: #10b981;
    --color-warning: #FCC700;
    --color-error: #ef4444;
    --color-info: #00AEEF;

    /* Colors — Borders / Dividers */
    --color-border: #E4E8ED;         /* Mist */
    --color-border-light: #EFEAE0;

    /* Typography */
    --font-family: 'Montserrat', Arial, Helvetica, sans-serif;
    --font-head: 'Prompt', 'Arial Black', sans-serif;
    --font-size-xs: 0.75rem;    /* 12px */
    --font-size-sm: 0.8125rem;  /* 13px */
    --font-size-base: 1.0625rem;/* 17px — Avery body */
    --font-size-lg: 1.125rem;   /* 18px */
    --font-size-xl: 1.25rem;    /* 20px */
    --font-size-2xl: 1.5rem;    /* 24px */
    --font-size-3xl: 1.75rem;   /* 28px */
    --font-size-4xl: 2rem;      /* 32px */
    --font-size-5xl: 2.5rem;    /* 40px */
    --font-size-6xl: 3rem;      /* 48px */
    --font-size-7xl: 4rem;      /* 64px */

    --line-height-tight: 1.05;
    --line-height-snug: 1.2;
    --line-height-normal: 1.6;
    --line-height-relaxed: 1.75;

    --font-weight-normal: 400;
    --font-weight-medium: 700;    /* Montserrat Bold replaces medium */
    --font-weight-semibold: 700;  /* Montserrat Bold */
    --font-weight-bold: 700;
    --font-weight-extrabold: 900; /* Prompt Black */

    /* Spacing (8px base unit) */
    --space-1: 0.25rem;   /* 4px */
    --space-2: 0.5rem;    /* 8px */
    --space-3: 0.75rem;   /* 12px */
    --space-4: 1rem;      /* 16px */
    --space-5: 1.25rem;   /* 20px */
    --space-6: 1.5rem;    /* 24px */
    --space-8: 2rem;      /* 32px */
    --space-10: 2.5rem;   /* 40px */
    --space-12: 3rem;     /* 48px */
    --space-16: 4rem;     /* 64px */
    --space-20: 5rem;     /* 80px */
    --space-24: 6rem;     /* 96px */
    --space-28: 7rem;     /* 112px */
    --space-32: 8rem;     /* 128px */

    /* Layout */
    --max-width: 1280px;
    --max-width-narrow: 800px;
    --max-width-wide: 1440px;

    /* Border Radius — Avery: sharp edges, the Square carries the form */
    --radius-sm: 0;
    --radius-md: 0;
    --radius-lg: 0;
    --radius-xl: 0;
    --radius-full: 0;

    /* Shadows — subtle, no rounded glow */
    --shadow-sm: 0 1px 2px rgba(10, 37, 64, 0.05);
    --shadow-md: 0 2px 8px rgba(10, 37, 64, 0.08);
    --shadow-lg: 0 4px 12px rgba(10, 37, 64, 0.1);
    --shadow-xl: 0 10px 28px rgba(10, 37, 64, 0.12);
    --shadow-2xl: 0 20px 50px rgba(10, 37, 64, 0.15);

    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-base: 200ms ease;
    --transition-slow: 400ms ease;

    /* Z-index layers */
    --z-dropdown: 100;
    --z-sticky: 200;
    --z-overlay: 300;
    --z-modal: 400;
    --z-toast: 500;
}


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

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

body {
    font-family: var(--font-family);
    font-size: var(--font-size-base);
    line-height: var(--line-height-normal);
    color: var(--color-text);
    background-color: var(--color-bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

img, picture, video, canvas, svg {
    display: block;
    max-width: 100%;
    height: auto;
}

a {
    color: var(--color-primary);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--color-primary-hover);
}

/* A11y focus — Avery Yellow outline */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
    outline: 3px solid var(--color-accent-warm);
    outline-offset: 2px;
}

ul, ol {
    list-style: none;
}

input, button, textarea, select {
    font: inherit;
    color: inherit;
}

button {
    cursor: pointer;
    border: none;
    background: none;
}

/* --- Typography — Prompt Headlines + Montserrat Body --- */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-head);
    font-weight: 900;
    text-transform: uppercase;
    line-height: var(--line-height-tight);
    letter-spacing: 0.01em;
    color: var(--color-primary);
}

h1 {
    font-size: clamp(2.5rem, 6vw, 4rem);
}

h2 {
    font-size: clamp(1.875rem, 4vw, 2.5rem);
}

h3 {
    font-size: clamp(1.375rem, 3vw, 1.75rem);
}

h4 {
    font-size: var(--font-size-xl);
    font-family: var(--font-family); /* Montserrat for h4 */
    text-transform: none;
}

/* Subline — Montserrat Bold, normal case, Magenta on Paper */
.subline {
    font-family: var(--font-family);
    font-weight: 700;
    text-transform: none;
    font-size: clamp(1.125rem, 2vw, 1.375rem);
    color: var(--square-magenta);
}

p {
    margin-bottom: var(--space-4);
}

p:last-child {
    margin-bottom: 0;
}

strong {
    font-weight: 700;
}

small {
    font-size: var(--font-size-sm);
}

/* --- Avery Square — Primary brand element (8.5° rotation) --- */
/* Filled: replaces headline full-stop, highlights */
.square {
    display: inline-block;
    width: 0.62em;
    height: 0.62em;
    background: var(--color-accent-warm);
    transform: rotate(var(--square-angle));
    vertical-align: baseline;
    margin-left: 0.12em;
}

.square--blue    { background: var(--color-primary); }
.square--cyan    { background: var(--square-cyan); }
.square--magenta { background: var(--square-magenta); }

/* Stroke: holds imagery, creates diagonal crop */
.square-frame {
    position: relative;
    aspect-ratio: 1 / 1;
    border: 8px solid var(--color-primary);
    transform: rotate(var(--square-angle));
    overflow: hidden;
}

.square-frame > img {
    transform: rotate(calc(var(--square-angle) * -1)) scale(1.35);
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* --- Container --- */
.container {
    width: 100%;
    max-width: var(--max-width);
    margin-left: auto;
    margin-right: auto;
    padding-left: var(--space-6);
    padding-right: var(--space-6);
}

.container--narrow {
    max-width: var(--max-width-narrow);
}

.container--wide {
    max-width: var(--max-width-wide);
}

/* --- Section Spacing --- */
.section {
    padding-top: var(--space-24);
    padding-bottom: var(--space-24);
}

.section--lg {
    padding-top: var(--space-28);
    padding-bottom: var(--space-28);
}

.section--sm {
    padding-top: var(--space-12);
    padding-bottom: var(--space-12);
}

.section--alt {
    background-color: var(--color-border); /* Mist background */
}

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

.section--dark h2,
.section--dark h3 {
    color: var(--color-text-inverse);
}

.section--dark .subline {
    color: var(--square-cyan); /* Approved combo on blue bg */
}

.section--gradient {
    background: var(--color-primary);
    color: var(--color-text-inverse);
}

.section--gradient h1,
.section--gradient h2,
.section--gradient h3 {
    color: var(--color-text-inverse);
}

.section--gradient .subline {
    color: var(--color-accent-warm); /* Yellow subline on Avery Blue */
}

/* --- Grid System --- */
.grid {
    display: grid;
    gap: var(--space-6);
}

.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }

/* --- Section Headers --- */
.section-kicker {
    display: inline-block;
    font-family: var(--font-family);
    font-size: var(--font-size-sm);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--color-primary);
    margin-bottom: var(--space-3);
}

.section--dark .section-kicker,
.section--gradient .section-kicker {
    color: var(--color-accent-warm);
}

.section-title {
    margin-bottom: var(--space-4);
}

.section-subtitle {
    font-size: var(--font-size-lg);
    color: var(--color-text-muted);
    max-width: 680px;
    line-height: var(--line-height-relaxed);
}

.section--dark .section-subtitle,
.section--gradient .section-subtitle {
    color: var(--color-text-inverse-muted);
}

.section-header {
    margin-bottom: var(--space-12);
}

/* --- Utilities --- */
.text-center { text-align: center; }
.text-muted { color: var(--color-text-muted); }
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

/* --- Responsive --- */
@media (max-width: 1280px) {
    .grid--4 { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 1024px) {
    .grid--4 { grid-template-columns: repeat(2, 1fr); }
    .grid--3 { grid-template-columns: repeat(2, 1fr); }

    .section { padding-top: var(--space-16); padding-bottom: var(--space-16); }
    .section--lg { padding-top: var(--space-20); padding-bottom: var(--space-20); }
}

@media (max-width: 768px) {
    .grid--4,
    .grid--3,
    .grid--2 { grid-template-columns: 1fr; }

    .section { padding-top: var(--space-12); padding-bottom: var(--space-12); }
    .container { padding-left: var(--space-4); padding-right: var(--space-4); }
}
