/* ==========================================================================
   Provarro Design System Implementation
   Based on: Professional/Serif aesthetic via designprompts.dev
   ========================================================================== */

/* --------------------------------------------------------------------------
   CSS Custom Properties (Design Tokens)
   -------------------------------------------------------------------------- */
:root {
    /* Colors */
    --color-background: #FAFAF8;
    --color-foreground: #1A1A1A;
    --color-muted: #F5F3F0;
    --color-muted-foreground: #6B6B6B;
    --color-accent: #E85A4F;
    --color-accent-hover: #D4A84B;
    --color-accent-mid: #E8944F;
    --color-brand-indigo: #4A4E8C;
    --color-brand-indigo-light: #5A5E9C;
    --color-border: #E8E4DF;
    --color-card: #FFFFFF;
    --color-focus-ring: #E85A4F;

    /* Typography */
    --font-display: "Playfair Display", Georgia, serif;
    --font-body: "Source Sans 3", system-ui, sans-serif;
    --font-mono: "IBM Plex Mono", monospace;

    /* Spacing */
    --space-xs: 0.5rem;
    --space-sm: 1rem;
    --space-md: 1.5rem;
    --space-lg: 2rem;
    --space-xl: 3rem;
    --space-2xl: 4rem;
    --space-3xl: 6rem;
    --space-4xl: 8rem;

    /* Layout */
    --max-width: 64rem;
    --max-width-text: 48rem;

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

    /* Border radius */
    --radius-sm: 4px;
    --radius-md: 6px;
    --radius-lg: 8px;
}

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

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-body);
    font-size: 1.125rem;
    font-weight: 400;
    line-height: 1.75;
    letter-spacing: 0.01em;
    color: var(--color-foreground);
    background-color: var(--color-background);
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    font-weight: 400;
    line-height: 1.2;
}

h1 {
    font-size: clamp(2.5rem, 5vw, 4.5rem);
    letter-spacing: -0.02em;
}

h2 {
    font-size: clamp(2rem, 4vw, 2.5rem);
    letter-spacing: -0.01em;
}

h3 {
    font-size: 1.25rem;
    font-weight: 600;
}

p {
    margin-bottom: 1em;
}

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

em {
    font-style: italic;
}

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

a:hover {
    color: var(--color-accent-hover);
    text-decoration: underline;
}

a:focus-visible {
    outline: none;
    box-shadow: 0 0 0 2px var(--color-focus-ring);
    border-radius: var(--radius-sm);
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* --------------------------------------------------------------------------
   Layout
   -------------------------------------------------------------------------- */
.container {
    width: 100%;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--space-lg);
}

.section {
    padding: var(--space-3xl) 0;
}

/* Light indigo tint for alternating sections */
.section-tint {
    background-color: rgba(74, 78, 140, 0.04);
}

@media (min-width: 768px) {
    .section {
        padding: var(--space-4xl) 0;
    }
}

/* --------------------------------------------------------------------------
   Header
   -------------------------------------------------------------------------- */
.header {
    padding: var(--space-md) 0;
    background-color: var(--color-background);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.header-link {
    font-family: var(--font-body);
    font-size: 0.875rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: var(--color-brand-indigo);
    text-decoration: none;
    padding: var(--space-xs) var(--space-sm);
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
}

.header-link:hover {
    background-color: rgba(74, 78, 140, 0.08);
    text-decoration: none;
}

.logo {
    display: block;
    line-height: 0;
}

.logo img {
    height: 40px;
    width: auto;
}

@media (min-width: 768px) {
    .logo img {
        height: 48px;
    }
}

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */
.hero {
    padding: var(--space-3xl) 0 var(--space-4xl);
    text-align: center;
    position: relative;
    overflow: hidden;
}

/* Indigo gradient background - subtle but present */
.hero {
    background: linear-gradient(180deg,
        rgba(74, 78, 140, 0.06) 0%,
        rgba(74, 78, 140, 0.02) 50%,
        transparent 100%);
}

/* Indigo anchor bar at top - thicker for weight */
.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 6px;
    background: linear-gradient(90deg, var(--color-brand-indigo) 0%, var(--color-brand-indigo-light) 100%);
}

/* Dot motif - ascending pattern echoing logo */
.hero::after {
    content: '';
    position: absolute;
    top: 50%;
    right: 5%;
    transform: translateY(-50%);
    width: 120px;
    height: 200px;
    background-image: radial-gradient(circle, var(--color-brand-indigo) 4px, transparent 4px);
    background-size: 24px 24px;
    background-position: 0 0, 12px 12px;
    opacity: 0.08;
    mask-image: linear-gradient(135deg, transparent 0%, black 50%, transparent 100%);
    -webkit-mask-image: linear-gradient(135deg, transparent 0%, black 50%, transparent 100%);
    pointer-events: none;
}

.hero h1 {
    max-width: var(--max-width-text);
    margin: 0 auto var(--space-md);
    position: relative;
}

.hero-subhead {
    font-size: 1.25rem;
    color: var(--color-muted-foreground);
    max-width: 36rem;
    margin: 0 auto var(--space-xl);
    position: relative;
}

@media (min-width: 768px) {
    .hero {
        padding: var(--space-4xl) 0;
    }

    .hero-subhead {
        font-size: 1.5rem;
    }

    .hero::after {
        width: 180px;
        height: 300px;
    }
}

@media (max-width: 767px) {
    .hero::after {
        display: none;
    }
}

/* --------------------------------------------------------------------------
   Section Labels
   -------------------------------------------------------------------------- */
.section-label {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    margin-bottom: var(--space-xl);
}

.section-label .rule {
    flex: 1;
    height: 2px;
    background: linear-gradient(90deg, var(--color-accent) 0%, var(--color-accent-mid) 50%, var(--color-accent-hover) 100%);
    opacity: 0.6;
}

.section-label .label {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--color-muted-foreground);
}

/* --------------------------------------------------------------------------
   Value Props Grid
   -------------------------------------------------------------------------- */
.value-grid {
    display: grid;
    gap: var(--space-lg);
}

@media (min-width: 768px) {
    .value-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: var(--space-xl);
    }
}

.value-card {
    background-color: var(--color-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    box-shadow: 0 1px 2px rgba(26, 26, 26, 0.04);
    position: relative;
    overflow: hidden;
}

/* Gradient accent top border */
.value-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--color-accent) 0%, var(--color-accent-mid) 50%, var(--color-accent-hover) 100%);
}

.value-card h3 {
    margin-bottom: var(--space-sm);
    color: var(--color-foreground);
}

.value-card p {
    color: var(--color-muted-foreground);
    font-size: 1rem;
    line-height: 1.7;
}

@media (min-width: 768px) {
    .value-card {
        padding: var(--space-xl);
    }
}

/* --------------------------------------------------------------------------
   Proof Block (Indigo Section)
   -------------------------------------------------------------------------- */
.section-indigo {
    background-color: var(--color-brand-indigo);
    color: #FFFFFF;
}

.proof-block {
    text-align: center;
    max-width: var(--max-width-text);
    margin: 0 auto;
}

.proof-stat {
    font-family: var(--font-display);
    font-size: clamp(4rem, 12vw, 7rem);
    font-weight: 400;
    letter-spacing: -0.02em;
    line-height: 1;
    background: linear-gradient(135deg, var(--color-accent) 0%, var(--color-accent-mid) 50%, var(--color-accent-hover) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.proof-label {
    font-family: var(--font-mono);
    font-size: 0.875rem;
    font-weight: 500;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    margin-top: var(--space-xs);
    margin-bottom: var(--space-lg);
    opacity: 0.9;
}

.proof-supporting {
    font-size: 1.125rem;
    line-height: 1.7;
    opacity: 0.9;
}

/* --------------------------------------------------------------------------
   About Block
   -------------------------------------------------------------------------- */
.about-block {
    max-width: var(--max-width-text);
    margin: 0 auto;
}

.about-block p {
    font-size: 1.125rem;
}

.signature {
    margin-top: var(--space-xl);
    padding-top: var(--space-lg);
    border-top: 2px solid transparent;
    border-image: linear-gradient(90deg, var(--color-accent) 0%, var(--color-accent-mid) 50%, var(--color-accent-hover) 100%) 1;
}

.signature-name {
    display: block;
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 600;
}

.signature-title {
    display: block;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--color-muted-foreground);
    margin-top: var(--space-xs);
}

/* --------------------------------------------------------------------------
   Contact Form
   -------------------------------------------------------------------------- */
.contact-block {
    max-width: 40rem;
    margin: 0 auto;
}

.contact-intro {
    font-family: var(--font-display);
    font-size: 1.5rem;
    text-align: center;
    margin-bottom: var(--space-xl);
}

.contact-form {
    background-color: var(--color-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    box-shadow: 0 1px 2px rgba(26, 26, 26, 0.04);
}

.form-row {
    display: grid;
    gap: var(--space-md);
}

@media (min-width: 768px) {
    .form-row {
        grid-template-columns: 1fr 1fr;
    }
}

.form-group {
    margin-bottom: var(--space-md);
}

.form-group:last-of-type {
    margin-bottom: var(--space-lg);
}

.form-group label {
    display: block;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--color-muted-foreground);
    margin-bottom: var(--space-xs);
}

.form-group input,
.form-group textarea {
    width: 100%;
    font-family: var(--font-body);
    font-size: 1rem;
    color: var(--color-foreground);
    background-color: var(--color-background);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    padding: 0.75rem 1rem;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--color-brand-indigo);
    box-shadow: 0 0 0 3px rgba(74, 78, 140, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.contact-form .btn {
    width: 100%;
}

@media (min-width: 768px) {
    .contact-form {
        padding: var(--space-2xl);
    }

    .contact-form .btn {
        width: auto;
    }
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */
.footer {
    background-color: var(--color-brand-indigo);
    color: #FFFFFF;
    text-align: center;
    padding: var(--space-lg) 0;
}

.footer-text {
    font-size: 0.875rem;
    opacity: 0.8;
    margin: 0;
}

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */
.btn {
    display: inline-block;
    font-family: var(--font-body);
    font-size: 1.125rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-decoration: none;
    padding: 1rem 2rem;
    border-radius: var(--radius-md);
    min-height: 48px;
    cursor: pointer;
    transition: all var(--transition-base);
    touch-action: manipulation;
}

.btn:focus-visible {
    outline: none;
    box-shadow: 0 0 0 2px var(--color-focus-ring);
}

/* Primary button - gradient */
.btn-primary {
    background: linear-gradient(135deg, var(--color-accent) 0%, var(--color-accent-mid) 50%, var(--color-accent-hover) 100%);
    color: #FFFFFF;
    box-shadow: 0 2px 8px rgba(232, 90, 79, 0.25);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(232, 90, 79, 0.35);
    color: #FFFFFF;
    text-decoration: none;
}

.btn-primary:active {
    transform: translateY(0);
}

/* Primary light - for dark backgrounds */
.btn-primary-light {
    background: #FFFFFF;
    color: var(--color-brand-indigo);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.btn-primary-light:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    color: var(--color-brand-indigo);
    text-decoration: none;
}

.btn-primary-light:active {
    transform: translateY(0);
}

.btn-primary-light:focus-visible {
    box-shadow: 0 0 0 2px #FFFFFF;
}

@media (prefers-reduced-motion: reduce) {
    .btn:hover {
        transform: none;
    }
}
