/* =========================================================
   FEATURE PAGES
   /features and /features/* (also /apple/siri-shortcuts)

   These pages reuse the shared Apple page system (apple.css)
   and the story/wordmark layouts from apple-intelligence.css.
   This file only adds the few components those files do not
   provide: breadcrumb, "at a glance" facts, steps, FAQ and
   linked related-feature cards. Everything is scoped to
   .feature-page and uses the existing design tokens.
   ========================================================= */


/* =========================================================
   HERO
   ========================================================= */

.feature-page .ai-hero {
    padding: 82px 0 110px;
}

.feature-page .feature-breadcrumb {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;

    margin: 0 0 40px;

    color: var(--apple-tertiary);

    font-size: 13px;
    line-height: 1.4;
    font-weight: 550;
}

.feature-page .feature-breadcrumb a {
    color: var(--apple-secondary);
    text-decoration: none;
}

.feature-page .feature-breadcrumb a:hover {
    color: var(--apple-text);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.feature-page .ai-hero-visual .ai-product-visual {
    max-width: 520px;
    min-height: 380px;
}


/* =========================================================
   SCREENSHOTS (press kit images inside the existing frame)
   ========================================================= */

.feature-page .feature-shot {
    padding: 28px;
}

.feature-page .feature-shot-portrait img {
    width: auto;
    max-width: 100%;
    max-height: 560px;
    border-radius: 18px;
}

.feature-page .feature-shot-landscape {
    min-height: 0;
    padding: 0;
}

.feature-page .feature-shot-landscape img {
    width: 100%;
    max-height: none;
    border-radius: 0;
    object-fit: cover;
}

.feature-page .ai-hero-visual .feature-shot-landscape {
    min-height: 0;
}


/* =========================================================
   AT A GLANCE
   ========================================================= */

.feature-page .feature-glance-section {
    padding: 0 0 110px;
    background: #fff;
}

.feature-page .feature-glance {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0;

    margin: 0;

    border: 1px solid var(--apple-border);
    border-radius: 24px;

    background: var(--apple-surface-soft);

    overflow: hidden;
}

.feature-page .feature-glance > div {
    padding: 26px 26px 28px;
    border-left: 1px solid var(--apple-border);
}

.feature-page .feature-glance > div:first-child {
    border-left: 0;
}

.feature-page .feature-glance dt {
    margin: 0 0 10px;

    color: var(--apple-tertiary);

    font-size: 12px;
    line-height: 1.3;
    font-weight: 650;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.feature-page .feature-glance dd {
    margin: 0;

    color: var(--apple-text);

    font-size: 16px;
    line-height: 1.5;
    font-weight: 560;
    letter-spacing: -0.012em;
}


/* =========================================================
   STEPS
   ========================================================= */

.feature-page .feature-steps-section {
    background: var(--apple-surface-soft);
}

.feature-page .feature-steps {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;

    margin: 0;
    padding: 0;

    list-style: none;
    counter-reset: feature-step;
}

.feature-page .feature-steps li {
    counter-increment: feature-step;

    min-height: 210px;
    padding: 28px;

    border: 1px solid var(--apple-border);
    border-radius: 24px;

    background: #fff;
}

.feature-page .feature-steps li::before {
    content: counter(feature-step, decimal-leading-zero);

    display: block;
    margin-bottom: 38px;

    color: var(--apple-tertiary);

    font-size: 11px;
    line-height: 1;
    font-weight: 650;
    letter-spacing: 0.06em;
}

.feature-page .feature-steps h3 {
    margin: 0;

    color: var(--apple-text);

    font-size: 21px;
    line-height: 1.22;
    font-weight: 650;
    letter-spacing: -0.026em;
}

.feature-page .feature-steps p {
    margin: 12px 0 0;

    color: var(--apple-secondary);

    font-size: 15px;
    line-height: 1.58;
    letter-spacing: -0.008em;
}

.feature-page .feature-steps-note {
    max-width: 780px;
    margin: 28px 0 0;

    color: var(--apple-secondary);

    font-size: 14px;
    line-height: 1.55;
}


/* =========================================================
   FAQ (same treatment as the iPhone Duo FAQ)
   ========================================================= */

.feature-page .feature-faq-section {
    background: #fff;
}

.feature-page .feature-faq-grid {
    display: grid;
    grid-template-columns:
        minmax(270px, 0.72fr)
        minmax(460px, 1.28fr);
    gap: 90px;
}

.feature-page .feature-faq-intro h2 {
    margin: 0;

    color: var(--apple-text);

    font-size: clamp(38px, 5vw, 60px);
    line-height: 1.02;
    font-weight: 700;
    letter-spacing: -0.045em;
}

.feature-page .feature-faq-intro > p:not(.apple-hub-eyebrow) {
    margin: 24px 0 0;

    color: var(--apple-secondary);

    font-size: 17px;
    line-height: 1.62;
}

.feature-page .feature-faq-list {
    border-top: 1px solid var(--apple-border);
}

.feature-page .feature-faq-list details {
    border-bottom: 1px solid var(--apple-border);
}

.feature-page .feature-faq-list summary {
    position: relative;

    display: block;

    padding: 27px 52px 27px 0;

    color: var(--apple-text);

    font-size: 20px;
    line-height: 1.35;
    font-weight: 620;
    letter-spacing: -0.022em;

    cursor: pointer;
    list-style: none;
}

.feature-page .feature-faq-list summary::-webkit-details-marker {
    display: none;
}

.feature-page .feature-faq-list summary::after {
    content: "+";

    position: absolute;
    top: 50%;
    right: 4px;

    width: 32px;
    height: 32px;

    display: grid;
    place-items: center;

    border-radius: 50%;

    background: var(--apple-surface);
    color: var(--apple-secondary);

    font-size: 20px;
    line-height: 1;
    font-weight: 400;

    transform: translateY(-50%);
}

.feature-page .feature-faq-list details[open] summary::after {
    content: "\2212";
}

.feature-page .feature-faq-list details p {
    max-width: 720px;

    margin: -4px 0 28px;

    color: var(--apple-secondary);

    font-size: 16px;
    line-height: 1.65;
    letter-spacing: -0.01em;
}


/* =========================================================
   RELATED FEATURES (linked explore cards)
   ========================================================= */

.feature-page .feature-related-section {
    background: var(--apple-surface-soft);
}

.feature-page a.apple-hub-explore-card {
    display: block;

    color: inherit;
    text-decoration: none;

    background: #fff;

    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease,
        transform 0.2s ease;
}

.feature-page a.apple-hub-explore-card:hover {
    border-color: var(--apple-border-strong);
    box-shadow: var(--apple-shadow-card);
    transform: translateY(-2px);
}

.feature-page .feature-card-more {
    display: inline-block;
    margin-top: 18px;

    color: var(--apple-blue);

    font-size: 15px;
    font-weight: 600;
    letter-spacing: -0.012em;
}

.feature-page .feature-updated {
    margin: 22px 0 0;

    color: var(--apple-tertiary);

    font-size: 13px;
    line-height: 1.4;
}


/* =========================================================
   FOCUS
   ========================================================= */

.feature-page .feature-breadcrumb a:focus-visible,
.feature-page .feature-faq-list summary:focus-visible,
.feature-page a.apple-hub-explore-card:focus-visible {
    outline: 3px solid rgba(0, 113, 227, 0.35);
    outline-offset: 4px;
}


/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (max-width: 1080px) {

    .feature-page .feature-glance,
    .feature-page .feature-steps {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .feature-page .feature-glance > div:nth-child(3) {
        border-left: 0;
    }

    .feature-page .feature-glance > div:nth-child(n + 3) {
        border-top: 1px solid var(--apple-border);
    }

    .feature-page .feature-faq-grid {
        gap: 54px;
    }
}

@media (max-width: 860px) {

    .feature-page .feature-faq-grid {
        grid-template-columns: 1fr;
    }

    .feature-page .ai-hero-visual .ai-product-visual {
        max-width: none;
        min-height: 260px;
    }

    .feature-page .feature-shot-portrait img {
        max-height: 460px;
    }
}

@media (max-width: 600px) {

    .feature-page .ai-hero {
        padding: 56px 0 80px;
    }

    .feature-page .feature-glance-section {
        padding-bottom: 80px;
    }

    .feature-page .feature-glance,
    .feature-page .feature-steps {
        grid-template-columns: 1fr;
    }

    .feature-page .feature-glance > div {
        border-left: 0;
    }

    .feature-page .feature-glance > div:nth-child(n + 2) {
        border-top: 1px solid var(--apple-border);
    }

    .feature-page .feature-steps li {
        min-height: auto;
    }

    .feature-page .feature-faq-list summary {
        padding-right: 46px;
        font-size: 18px;
    }
}

@media (prefers-reduced-motion: reduce) {

    .feature-page a.apple-hub-explore-card {
        transition: none;
    }

    .feature-page a.apple-hub-explore-card:hover {
        transform: none;
    }
}
