/**
 * Coemans Starter - main stylesheet
 *
 * Tokens below mirror the Design System in /CLAUDE.md.
 * If they drift, CLAUDE.md is the source of truth - re-sync from there.
 */

:root {
    /* Colors */
    --color-primary:    #111111;
    --color-secondary:  #555555;
    --color-accent:     #0066ff;
    --color-bg:         #ffffff;
    --color-bg-alt:     #f5f5f5;
    --color-text:       #111111;
    --color-text-muted: #666666;
    --color-border:     #e5e5e5;
    --color-success:    #1f9d55;
    --color-warning:    #f0ad4e;
    --color-error:      #d9534f;

    /* Typography */
    --font-heading: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    --font-body:    system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

    --fs-h1:    2.5rem;
    --fs-h2:    2rem;
    --fs-h3:    1.5rem;
    --fs-h4:    1.25rem;
    --fs-body:  1rem;
    --fs-small: 0.875rem;

    --lh-tight:   1.2;
    --lh-snug:    1.35;
    --lh-normal:  1.5;

    --fw-regular: 400;
    --fw-medium:  500;
    --fw-semibold:600;
    --fw-bold:    700;

    /* Spacing */
    --space-0:  0;
    --space-1:  0.25rem;
    --space-2:  0.5rem;
    --space-3:  0.75rem;
    --space-4:  1rem;
    --space-5:  1.5rem;
    --space-6:  2rem;
    --space-8:  3rem;
    --space-10: 4rem;
    --space-12: 6rem;

    /* Layout */
    --container-max: 1200px;
    --container-pad: 1rem;

    /* Radius */
    --radius-sm:   2px;
    --radius-md:   6px;
    --radius-lg:   12px;
    --radius-pill: 999px;

    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.12);

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

/* Box-sizing + base resets live in reset.css. */

body {
    font-family: var(--font-body);
    font-size: var(--fs-body);
    line-height: var(--lh-normal);
    color: var(--color-text);
    background: var(--color-bg);
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    color: var(--color-primary);
    margin-bottom: var(--space-4);
}

h1 { font-size: var(--fs-h1); font-weight: var(--fw-bold); }
h2 { font-size: var(--fs-h2); font-weight: var(--fw-bold); }
h3 { font-size: var(--fs-h3); font-weight: var(--fw-semibold); }
h4 { font-size: var(--fs-h4); font-weight: var(--fw-semibold); }

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

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

a:hover {
    text-decoration: underline;
}

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

.container--narrow {
    max-width: 760px;
}

/* ---------------------------------------------------------------------------
   Buttons
   --------------------------------------------------------------------------- */
.btn {
    display: inline-block;
    padding: var(--space-3) var(--space-5);
    border-radius: var(--radius-pill);
    font-weight: var(--fw-semibold);
    border: 1px solid transparent;
    cursor: pointer;
    transition: background var(--transition-fast), color var(--transition-fast), border-color var(--transition-fast);
    text-decoration: none;
}

.btn--primary {
    background: var(--color-accent);
    color: #fff;
}

.btn--primary:hover {
    background: var(--color-primary);
    text-decoration: none;
}

.btn--outline {
    background: transparent;
    color: var(--color-accent);
    border-color: var(--color-accent);
}

.btn--outline:hover {
    background: var(--color-accent);
    color: #fff;
    text-decoration: none;
}

/* ---------------------------------------------------------------------------
   Flexible content blocks
   --------------------------------------------------------------------------- */
.block {
    padding: var(--space-10) 0;
}

.block + .block {
    padding-top: 0;
}

.block__heading {
    color: var(--color-accent);
    margin-bottom: var(--space-5);
}

.block__content {
    color: var(--color-secondary);
    line-height: var(--lh-normal);
}

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

/* FAQ ---------------------------------------------------------------------- */
.faq-list {
    border-top: 1px solid var(--color-border);
}

.faq-item {
    border-bottom: 1px solid var(--color-border);
}

.faq-item__question {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-4);
    padding: var(--space-5) 0;
    cursor: pointer;
    list-style: none;
    color: var(--color-accent);
    font-weight: var(--fw-semibold);
    font-size: var(--fs-h4);
}

.faq-item__question::-webkit-details-marker {
    display: none;
}

.faq-item__icon {
    position: relative;
    width: 20px;
    height: 20px;
    flex: 0 0 20px;
}

.faq-item__icon::before,
.faq-item__icon::after {
    content: "";
    position: absolute;
    background: var(--color-accent);
    top: 50%;
    left: 50%;
    transition: transform var(--transition-base);
}

.faq-item__icon::before {
    width: 14px;
    height: 2px;
    transform: translate(-50%, -50%);
}

.faq-item__icon::after {
    width: 2px;
    height: 14px;
    transform: translate(-50%, -50%);
}

.faq-item[open] .faq-item__icon::after {
    transform: translate(-50%, -50%) scaleY(0);
}

.faq-item__answer {
    padding: 0 0 var(--space-5);
    color: var(--color-secondary);
}

.faq-item__answer p:last-child {
    margin-bottom: 0;
}

/* Image + content ---------------------------------------------------------- */
.image-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-6);
    align-items: center;
}

@media (min-width: 768px) {
    .image-content {
        grid-template-columns: 1fr 1fr;
        gap: var(--space-10);
    }
}

.image-content__media img {
    width: 100%;
    height: auto;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
}

.image-content__text .block__heading {
    margin-bottom: var(--space-4);
}

.image-content__cta {
    margin-top: var(--space-5);
}

/* Image on the LEFT: media takes column 1, text column 2 (default order).
   Image on the RIGHT: flip via grid-column. */
@media (min-width: 768px) {
    .block--image-right .image-content__media  { grid-column: 2; grid-row: 1; }
    .block--image-right .image-content__text   { grid-column: 1; grid-row: 1; }
}
