/* ===========================
   Examples hub — page-specific styles
   (extends css/styles.css design tokens)
=========================== */

.samples-hero {
    padding: 190px 2rem 80px;
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.samples-hero h1 {
    font-size: clamp(2.25rem, 4.5vw, 3.25rem);
    font-weight: 700;
    letter-spacing: -0.025em;
    line-height: 1.12;
    margin-bottom: 1.25rem;
}

.samples-hero p {
    color: var(--ink-soft);
    font-size: 1.15rem;
    line-height: 1.6;
    max-width: 560px;
    margin: 0 auto;
}

.samples-group-head {
    margin-bottom: 2rem;
}

.samples-group-head h2 {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    margin-bottom: 0.5rem;
}

.samples-group-head p {
    color: var(--ink-soft);
    font-size: 0.98rem;
    max-width: 620px;
}

.samples-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    padding-bottom: 3rem;
}

/* Single-card groups — centered, not a grid. Currently unused now that
   every group (Websites, Desktop, Mobile app) has 4 cards, but left in
   place in case a future group ships with just one demo again. */
.samples-grid-single {
    max-width: 640px;
    margin: 0 auto;
    padding-bottom: 1rem;
}

.samples-grid-single.narrow { max-width: 360px; }

/* Mobile app group — 4 phone-shaped cards, narrower columns than the
   website/desktop grid since each card is tall (422:956) rather than
   wide (16:10). 4-across on desktop like an app-store screenshot row. */
.samples-grid-mobile {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    padding-bottom: 1rem;
}

/* Narrower cards need tighter body copy than the wide website/desktop cards */
.samples-grid-mobile .sample-body { padding: 1.25rem 1.15rem; }
.samples-grid-mobile .sample-body h3 { font-size: 1.05rem; }
.samples-grid-mobile .sample-body p { font-size: 0.85rem; line-height: 1.5; margin-bottom: 1.1rem; }
.samples-grid-mobile .sample-eyebrow { font-size: 0.72rem; }
.samples-grid-mobile .sample-link { font-size: 0.85rem; }

/* Loop is a fixed-size phone mockup, not a fluid page like the others —
   the generic 4x-zoom-out trick above makes a fixed-width phone look tiny
   in a much wider virtual viewport. Instead, size the iframe to the page's
   real natural dimensions (measured: 422 x 956) and scale it directly to
   fit the container width, so the phone fills the card edge-to-edge. */
.sample-preview.tall {
    aspect-ratio: 422 / 956;
    container-type: size;
}

.sample-preview.tall iframe {
    width: 422px;
    height: 956px;
    transform: scale(calc(100cqw / 422px));
    transform-origin: top left;
}

.sample-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    transition: box-shadow 0.25s var(--ease), transform 0.25s var(--ease);
}

.sample-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-4px);
}

/* Live preview — a real, zoomed-out iframe of the actual demo site,
   not a screenshot, so it never goes stale as the sites change */
.sample-preview {
    aspect-ratio: 16 / 10;
    position: relative;
    overflow: hidden;
    container-type: size;
}

.sample-preview iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 400cqw;
    height: 400cqh;
    transform: scale(0.25);
    transform-origin: top left;
    border: 0;
    overflow: hidden;
    pointer-events: none;
}

.sample-body { padding: 1.75rem; }

.sample-eyebrow {
    display: inline-block;
    font-size: 0.78rem;
    color: var(--ink-soft);
    margin-bottom: 0.6rem;
}

.sample-body h3 {
    font-size: 1.25rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    margin-bottom: 0.55rem;
}

.sample-body p {
    color: var(--ink-soft);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 1.4rem;
}

.sample-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: var(--blue);
    font-size: 0.95rem;
    font-weight: 500;
}

.sample-link:hover { text-decoration: underline; }

.samples-cta {
    text-align: center;
    background: var(--off-white);
    border-radius: var(--radius-lg);
    padding: 3.5rem 2rem;
    margin: 2rem 0 5rem;
}

.samples-cta h2 {
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 0.75rem;
}

.samples-cta p {
    color: var(--ink-soft);
    font-size: 1.05rem;
    max-width: 480px;
    margin: 0 auto 1.75rem;
}

@media (max-width: 1024px) {
    .samples-grid-mobile { grid-template-columns: repeat(2, 1fr); max-width: 640px; margin: 0 auto; }
}

@media (max-width: 768px) {
    .samples-hero { padding: 150px 2rem 60px; }
    .samples-grid { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
    .samples-grid-mobile { grid-template-columns: 1fr; max-width: 300px; }
}
