/**
 * RH Creative Co — Global styles & design tokens
 *
 * Light editorial base with dark "signal" bands (hero, testimonials, CTA).
 * Dosis carries display type; Open Sans carries body copy.
 * Gold (#DED1B4) is the single accent — used for the signal line motif,
 * emphasis italics, and interactive hovers. Spend it sparingly.
 */

:root {
    /* Surfaces */
    --bg: #FFFFFF;
    --bg-elevated: #F7F6F3;
    --bg-dark: #111111;
    --bg-dark-elevated: #1A1A1A;

    /* Borders */
    --border-subtle: rgba(17, 17, 17, 0.08);
    --border-medium: rgba(17, 17, 17, 0.16);
    --border-strong: rgba(17, 17, 17, 0.32);
    --border-subtle-inverse: rgba(255, 255, 255, 0.12);
    --border-medium-inverse: rgba(255, 255, 255, 0.24);

    /* Text */
    --text-primary: #111111;
    --text-secondary: #555555;
    --text-muted: #999999;
    --text-inverse: #FAFAFA;
    --text-inverse-secondary: rgba(250, 250, 250, 0.64);

    /* Accent */
    --gold: #DED1B4;
    --gold-deep: #B8A87E;
    --error: #e41919;

    /* Buttons */
    --btn-bg: #111111;
    --btn-text: #FFFFFF;
    --btn-hover-bg: #2A2A2A;
    --btn-inverse-bg: #FFFFFF;
    --btn-inverse-text: #111111;
    --btn-inverse-hover-bg: var(--gold);

    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(17, 17, 17, 0.06);
    --shadow-md: 0 8px 32px rgba(17, 17, 17, 0.10);
    --shadow-lg: 0 24px 80px rgba(17, 17, 17, 0.16);

    /* Type */
    --font-display: 'Dosis', Arial, sans-serif;
    --font-body: 'Open Sans', Arial, Helvetica, sans-serif;

    /* Fluid type scale */
    --fs-hero: clamp(1.75rem, 4.5vw, 3.25rem);
    --fs-statement: clamp(1.0625rem, 1.9vw, 1.5rem);
    --fs-h2: clamp(1.5rem, 2.6vw, 2.125rem);
    --fs-h3: clamp(1.125rem, 1.7vw, 1.375rem);
    --fs-body: 1rem;
    --fs-label: 0.8125rem;

    /* Rhythm */
    --section-pad: clamp(3.25rem, 7vw, 5.5rem);
    --container-max: 1270px;
    --container-narrow: 825px;
    --container-pad: clamp(1.25rem, 5vw, 3.125rem);

    --nav-offset: 118px;

    --selection-bg: #111111;
    --selection-text: #DED1B4;

    color-scheme: light;
}

/* ---------------------------------------------------------------- Reset */

*, *::before, *::after { box-sizing: border-box; }

html {
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: var(--fs-body);
    line-height: 1.75;
}

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

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

button {
    font: inherit;
    color: inherit;
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
}

ul, ol { margin: 0; padding: 0; list-style: none; }

h1, h2, h3, h4, h5, h6 {
    margin: 0;
    font-family: var(--font-display);
    font-weight: 400;
    line-height: 1.25;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

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

hr {
    border: none;
    border-top: 1px solid var(--border-subtle);
    margin: 2rem 0;
}

/* Typography wrapping defaults (Colony standard) */
h1, h2, h3, h4, h5, h6,
.t-label, .hero__word, .statement__text,
.navbar__menu-link-heading, .quick-links__label, .project-card__title,
.colony-work__title, .colony-feed__more-title, .navbar__agency-name,
.about-profile__kicker { text-wrap: balance; }
p, li, dd, blockquote, figcaption { text-wrap: pretty; }

::selection { background: var(--selection-bg); color: var(--selection-text); }

/* ---------------------------------------------------------------- Lenis */

html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto; }
.lenis.lenis-smooth [data-lenis-prevent] { overscroll-behavior: contain; }
.lenis.lenis-stopped { overflow: clip; }

/* ---------------------------------------------------------------- Layout */

.container {
    width: 100%;
    max-width: var(--container-max);
    margin: 0 auto;
    padding-left: var(--container-pad);
    padding-right: var(--container-pad);
}

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

/* ---------------------------------------------------------------- Utilities */

/* The signal-line label: Dosis medium, uppercase, tracked, with a gold
   dash that draws in on scroll (see section anim files). */
.t-label {
    display: inline-flex;
    align-items: center;
    gap: 0.875rem;
    font-family: var(--font-display);
    font-size: var(--fs-label);
    font-weight: 500;
    letter-spacing: 0.32em;
    text-transform: uppercase;
    color: var(--text-secondary);
}

.t-label::before {
    content: '';
    width: 2.25rem;
    height: 1px;
    background: var(--gold-deep);
    transform-origin: left center;
}

.t-label--center::after {
    content: '';
    width: 2.25rem;
    height: 1px;
    background: var(--gold-deep);
    transform-origin: right center;
}

.t-label--inverse { color: var(--text-inverse-secondary); }

/* Emphasis convention: <em> in headings renders as gold italic */
h1 em, h2 em, h3 em, .statement__text em {
    font-style: italic;
    color: var(--gold-deep);
}
p strong { font-weight: 700; color: var(--text-primary); }

/* Buttons — pill, uppercase Dosis */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.625rem;
    padding: 0.9375rem 2.25rem;
    border-radius: 999px;
    background: var(--btn-bg);
    color: var(--btn-text);
    font-family: var(--font-display);
    font-size: 0.875rem;
    font-weight: 600;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    transition: background-color 0.25s ease, color 0.25s ease, transform 0.25s ease;
}

.btn:hover { background: var(--btn-hover-bg); transform: translateY(-1px); }

.btn--inverse { background: var(--btn-inverse-bg); color: var(--btn-inverse-text); }
.btn--inverse:hover { background: var(--btn-inverse-hover-bg); color: #111111; }

.btn--ghost {
    background: transparent;
    color: inherit;
    box-shadow: inset 0 0 0 1px var(--border-strong);
}
.btn--ghost:hover { background: var(--text-primary); color: var(--bg); transform: translateY(-1px); }
.section--dark .btn--ghost { box-shadow: inset 0 0 0 1px var(--border-medium-inverse); }
.section--dark .btn--ghost:hover { background: var(--bg); color: var(--text-primary); }

/* Dark band base */
.section--dark {
    background: var(--bg-dark);
    color: var(--text-inverse);
}

/* Screen-reader only */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Skip link */
.skip-link {
    position: fixed;
    top: -100%;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10001;
    padding: 0.75rem 1.75rem;
    border-radius: 999px;
    background: var(--bg-dark);
    color: var(--text-inverse);
    font-family: var(--font-display);
    font-size: 0.875rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    transition: top 0.2s ease;
}
.skip-link:focus { top: 30px; }

/* Focus visibility */
:focus-visible {
    outline: 2px solid var(--gold-deep);
    outline-offset: 3px;
}
input:focus-visible, textarea:focus-visible, select:focus-visible {
    outline-offset: -2px;
}
section:focus-visible { outline: none; }

/* ---------------------------------------------------------------- Reduced motion */

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

main:focus { outline: none; }
