@import url("theme.css");

/* Approved homepage layout, with shared light and dark appearance. */
* { box-sizing: border-box; }
body { margin: 0; font-family: -apple-system, BlinkMacSystemFont, system-ui, sans-serif; color: var(--text-primary); background: var(--page-bg); -webkit-font-smoothing: antialiased; }
h1, h2, h3, p { margin: 0; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
a:focus-visible { outline: 2px solid var(--text-primary); outline-offset: 6px; }
.page-shell { width: 80%; max-width: 1152px; margin: 0 auto; }
.skip-link { position: absolute; top: 12px; left: 16px; z-index: 1001; padding: 12px 20px; border-radius: 10px; background: var(--cta-bg); color: var(--cta-text); transform: translateY(-150%); }
.skip-link:focus { transform: translateY(0); }
.opening-header { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 56px 0 24px; }
.brand { display: inline-flex; align-items: center; gap: 9px; font-size: 24px; font-weight: 500; letter-spacing: -0.8px; white-space: nowrap; }
.brand-mark { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 7px; color: var(--cta-text); background: var(--brand-bg); font-size: 22px; font-weight: 600; padding-bottom: 3px; }
.hero { padding-bottom: 64px; }
.hero h1 { max-width: 730px; font-size: clamp(38px, 4.1vw, 54px); line-height: 1.1; font-weight: 500; letter-spacing: -2.1px; }
h1 > span { color: var(--text-tertiary); font-size: 0.8em; line-height: 1.2; letter-spacing: -1.1px; }
.collection { scroll-margin-top: 24px; }
.featured-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 48px; margin-bottom: 64px; }
.featured-app .product-copy { font-size: 24px; line-height: 1.3; letter-spacing: -0.5px; }
.featured-app .app-entry-top { margin-bottom: 28px; }
.featured-app .app-entry-top img { border-radius: 20px; }
.featured-app .app-tagline { font-size: 14px; }
.product-copy { font-size: 20px; font-weight: 500; line-height: 1.3; letter-spacing: -0.25px; }
.product-copy h3, .product-copy p { display: block; font: inherit; letter-spacing: inherit; }
.product-copy h3 { margin-bottom: 8px; }
.product-copy p { color: var(--text-tertiary); transition: color 0.18s ease; }
.app-tagline { font-size: 13px; color: var(--text-secondary); margin-top: 12px; }
.app-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 64px 40px; }
.app-entry { display: block; position: relative; isolation: isolate; min-width: 0; }
.app-entry::before { content: ""; position: absolute; inset: -16px; border-radius: 12px; background: transparent; z-index: -1; pointer-events: none; transition: background-color 0.18s ease; }
.app-entry:focus-visible::before { background: var(--card-highlight); }
.app-entry:focus-visible .product-copy p { color: var(--text-secondary); }
@media (hover: hover) and (pointer: fine) {
    .app-entry:hover::before { background: var(--card-highlight); }
    .app-entry:hover .product-copy p { color: var(--text-secondary); }
}
.app-entry-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 24px; }
.app-entry-top img { border-radius: 14px; }
.app-platform { font-size: 12px; line-height: 1.5; color: var(--text-secondary); margin-top: 24px; }
.footer { display: flex; justify-content: space-between; align-items: flex-end; gap: 48px; margin-top: 120px; padding-bottom: 64px; color: var(--text-secondary); font-size: 13px; line-height: 1.5; }
.footer-credit { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.footer-credit .brand { color: var(--text-primary); font-size: 20px; }
.footer-contact { flex-shrink: 0; text-align: right; }
.footer a:hover { color: var(--text-primary); }
.made-for-apple { display: flex; align-items: center; gap: 7px; margin: 12px 0; }
.made-for-apple img { filter: var(--glyph-filter); opacity: 0.5; }
#main { scroll-margin-top: 24px; }

@media (max-width: 1000px) {
    .page-shell { width: 90%; }
}

@media (max-width: 800px) {
    .opening-header { padding-top: 40px; }
    .hero h1 { font-size: 44px; max-width: 630px; }
    .featured-grid { gap: 32px; }
    .app-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 48px 32px; }
    .footer { gap: 32px; }
}

@media (max-width: 600px) {
    .opening-header { padding: 24px 0 24px; gap: 16px; }
    .brand { font-size: 20px; gap: 7px; }
    .brand-mark { width: 25px; height: 25px; font-size: 20px; }
    .hero { padding-bottom: 64px; }
    .hero h1 { font-size: 38px; letter-spacing: -1.5px; }
    .featured-grid { grid-template-columns: 1fr; gap: 40px; margin-bottom: 40px; }
    .app-grid { grid-template-columns: 1fr; gap: 40px; }
    .app-entry::before { inset: -12px; }
    .app-entry-top { margin-bottom: 20px; }
    .app-platform { margin-top: 16px; }
    .footer { gap: 24px; margin-top: 80px; padding-bottom: 48px; }
}

@media (max-width: 380px) {
    .brand { font-size: 18px; }
    .hero h1 { font-size: 34px; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { transition: none !important; }
}
