﻿@import url('open-iconic/font/css/open-iconic-bootstrap.min.css');

/* ---------- Design tokens ---------- */
:root {
    --paper: #ffffff;
    --ink: #0f172a;
    --muted: #475569;
    --brand: #0ea5e9;
    --brand-dark: #0284c7;
    --brand-soft: rgba(14,165,233,.10);
    --ring: rgba(14,165,233,.35);
    --card: #f8fafc;
    --card-border: #e6ebf2;

    /* Radii */
    --radius: 14px;
    --radius-sm: 10px;
    --radius-lg: 20px;

    /* Layered, softer shadows */
    --shadow-sm: 0 1px 2px rgba(2,8,23,.06), 0 1px 1px rgba(2,8,23,.04);
    --shadow: 0 6px 16px rgba(2,8,23,.06), 0 2px 6px rgba(2,8,23,.05);
    --shadow-lg: 0 18px 40px rgba(2,8,23,.12), 0 6px 14px rgba(2,8,23,.06);

    /* Spacing scale */
    --space-1: 6px;
    --space-2: 10px;
    --space-3: 16px;
    --space-4: 24px;
    --space-5: 36px;

    /* App surface gradient */
    --surface: radial-gradient(1200px 600px at 100% -10%, #eef6fd 0%, rgba(238,246,253,0) 60%), #f4f6f9;
}

/* ---------- Base ---------- */
html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font: 16px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
    color: var(--ink);
    background: var(--surface);
    background-attachment: fixed;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

.container {
    width: min(1100px, 92vw);
    margin-inline: auto;
}

/* ---------- Typography scale ---------- */
h1, h2, h3, h4 {
    line-height: 1.2;
    letter-spacing: -0.015em;
    text-wrap: balance;
    color: var(--ink);
}

h2 {
    font-size: clamp(22px, 3vw, 30px);
    margin: 0 0 var(--space-3);
}

h3 {
    font-size: clamp(18px, 2.4vw, 22px);
    margin: var(--space-4) 0 var(--space-2);
}

h4 {
    font-size: clamp(16px, 2vw, 18px);
    margin: var(--space-3) 0 var(--space-2);
    color: var(--muted);
}

/* ---------- Links ---------- */
a {
    color: var(--brand-dark);
    text-decoration: none;
    background-image: linear-gradient(var(--brand), var(--brand));
    background-size: 0% 2px;
    background-position: 0 100%;
    background-repeat: no-repeat;
    transition: background-size .25s ease, color .2s ease;
}

    a:hover {
        color: var(--brand);
        background-size: 100% 2px;
    }

/* ---------- Lists ---------- */
.form-card ul {
    padding-left: 1.15rem;
    margin: var(--space-2) 0 0;
}

.form-card li {
    margin: 0 0 var(--space-1);
}

.form-card li::marker {
    color: var(--brand);
}

/* ---------- Accessibility & motion ---------- */
:focus-visible {
    outline: 3px solid var(--ring);
    outline-offset: 2px;
    border-radius: 6px;
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    * {
        transition: none !important;
        animation: none !important;
    }
}





/* ---------- Intro (Copy + Video) ---------- */
/* Always allow flexible widths; do not force equal height by default */
.intro .intro-grid {
    display: flex;
    gap: 1.5rem;
}

    .intro .intro-grid > .form-card {
        display: flex;
        flex-direction: column;
        width: 100%;
    }

/* Pin the button row to the lower-left inside the left card */
.intro-actions {
    margin-top: var(--space-4); /* pushes to the bottom of the column */
    align-self: flex-start; /* ensure left alignment */
}

/* Intro widths and heights when side-by-side */
@media (min-width: 901px) {
    /* Equalize column heights when side-by-side */
    .intro .intro-grid {
        align-items: stretch; /* both columns match tallest */
    }

        .intro .intro-grid > .form-card {
            flex: 1 1 auto;
            min-height: 0; /* allow flex child to stretch correctly */
            display: flex;
            flex-direction: column;
        }
}

/* When stacked (not side-by-side), do NOT enforce equal heights */
@media (max-width: 900px) {
    .intro .intro-grid {
        flex-direction: column;
        align-items: initial; /* don't try to equalize heights */
    }

    .intro .intro-grid > .form-card {
        width: 100%;
    }
}

.intro-subheading {
    margin: 0 0 8px;
    font-size: clamp(18px, 2.6vw, 24px);
}

.intro-tagline {
    margin: 0;
    color: var(--muted);
    font-size: clamp(15px, 2.2vw, 17px);
}

.intro-video-wrapper {
    margin-top: var(--space-3);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--card-border);
    background: #000;
}

.intro-video {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    border-radius: var(--radius);
    display: block;
    background: #000;
}

.info {
    padding: var(--space-5) 0 var(--space-3);
}


/* ---------- CTA ---------- */
.cta {
    padding: var(--space-5) 0 44px;
    text-align: center;
}


/* Responsive tweaks */
@media (max-width: 1020px) {
    .controls-under {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }
}

[hidden] {
    display: none !important;
}

/* ---------- Free books page EVERYTHING BELOW IS FOR THE BOOKS PAGE---------- */
.books {
    padding: 28px 0 40px;
}

.books-grid {
    display: grid;
    grid-template-columns: 1.1fr .9fr; /* form | gallery */
    gap: 24px;
    align-items: start;
}

/* Form card */
.form-card {
    background: var(--paper);
    border: 1px solid var(--card-border);
    border-radius: var(--radius);
    padding: var(--space-4);
    box-shadow: var(--shadow);
}

.form-title {
    margin: 0 0 12px;
}

label {
    font-size: 14px;
    color: var(--muted);
}

.form-actions {
    margin-top: 14px;
    display: flex;
    align-items: center;
    gap: 12px;
}
.small-muted {
    margin: 0;
    font-size: 13px;
    color: var(--muted);
}

/* Right column: book images */
.books-gallery {
    display: grid;
    gap: 14px;
}

.book-card {
    background: var(--paper);
    border: 1px solid var(--card-border);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}

    .book-card img {
        width: 100%;
        height: auto;
        display: block;
    }

/* Mobile */
@media (max-width: 900px) {
    .books-grid {
        grid-template-columns: 1fr;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }
}

/* ---------- About page helpers ALL BELOW THIS IS FOR THE ABOUT-PAGE---------- */
.about {
    padding: 22px 0;
}

.about-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
}

.card {
    background-color: var(--DS-color-surface-neutral-default-rest);
    border: 1px solid var(--card-border);
    border-radius: var(--radius);
    padding: var(--space-4);
    box-shadow: var(--shadow);
}

/* Hover retained only on the "What we build" product cards */
.product-card {
    transition: box-shadow .25s ease, transform .25s ease;
}

    .product-card:hover {
        box-shadow: var(--shadow-lg);
        transform: translateY(-2px);
    }

@media (max-width: 900px) {
    .about-grid {
        grid-template-columns: 1fr;
    }
}

/* --- Books intro (author photo + text) --- */
.books-intro {
    padding: 18px 0 10px;
}

.bio {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 16px;
    align-items: start;
}

.bio-photo {
    width: 137px;
    height: 186px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid var(--card-border);
    box-shadow: var(--shadow);
}

.bio-text p {
    margin: 0 0 10px 0;
}

/* --- Books page layout: narrow right column (~210px) --- */
.books .books-grid {
    grid-template-columns: 1fr 210px; /* form | gallery */
}

@media (max-width: 1200px) {
    .books .books-grid {
        grid-template-columns: 1fr 210px;
    }
}

@media (max-width: 900px) {
    .books .books-grid {
        grid-template-columns: 1fr;
    }
}

/* Book cards ~210px wide; images fill card */
.books-gallery {
    display: grid;
    gap: 14px;
}

    .books-gallery .book-card {
        width: 210px;
        max-width: 100%;
    }

        .books-gallery .book-card img {
            width: 100%;
            height: auto;
            display: block;
        }

h1 {
    margin-block-start: 0.5em;
    margin-block-end: 0.5em;
}