@font-face {
    font-family: "San Francisco";
    font-weight: 400;
    src: url("https://applesocial.s3.amazonaws.com/assets/styles/fonts/sanfrancisco/sanfranciscodisplay-regular-webfont.woff");
}

@font-face {
    font-family: "San Francisco";
    font-weight: 800;
    src: url("https://applesocial.s3.amazonaws.com/assets/styles/fonts/sanfrancisco/sanfranciscodisplay-heavy-webfont.woff");
}

@font-face {
    font-family: "San Francisco";
    font-weight: 900;
    src: url("https://applesocial.s3.amazonaws.com/assets/styles/fonts/sanfrancisco/sanfranciscodisplay-heavy-webfont.woff");
}

:root {
    --bg-top: #142027;
    --bg-bottom: #060a0c;
    --panel-border: rgba(255, 255, 255, 0.08);
    --text: #ddf7f5;
    --text-strong: #ffffff;
    --text-soft: rgba(221, 247, 245, 0.72);
    --accent: #5ffdc9;
    --shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
    --radius-lg: 32px;
    --radius-md: 24px;
    --content-width: 1120px;
}

* {
    box-sizing: border-box;
}

html {
    background-color: var(--bg-top);
}

body {
    margin: 0;
    min-height: 100svh;
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, "San Francisco", "Segoe UI", sans-serif;
    background:
        radial-gradient(circle at top center, rgba(95, 253, 201, 0.12), transparent 32%),
        linear-gradient(180deg, var(--bg-top) 10%, var(--bg-bottom) 50%);
}

a {
    color: inherit;
}

.page-shell {
    width: min(calc(100% - 40px), var(--content-width));
    margin: 0 auto;
    padding: calc(env(safe-area-inset-top, 0px) + 24px) 0 calc(env(safe-area-inset-bottom, 0px) + 72px);
}

/* ---------- top bar ---------- */

.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    text-decoration: none;
    color: var(--text-strong);
    font-weight: 800;
    letter-spacing: 0.02em;
}

.brand img {
    width: 42px;
    height: 42px;
}

.top-link {
    text-decoration: none;
    color: var(--text-soft);
    font-size: 15px;
}

.top-link:hover {
    color: var(--accent);
}

/* ---------- panels ---------- */

.project-card,
.get-codea {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.025));
    border: 1px solid var(--panel-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    backdrop-filter: blur(14px);
}

/* ---------- project hero ---------- */

.project-card {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 42px;
    align-items: center;
    padding: 48px;
    position: relative;
    overflow: hidden;
}

.project-card::before {
    content: "";
    position: absolute;
    inset: -40% auto auto -20%;
    width: 420px;
    height: 420px;
    background: radial-gradient(circle, rgba(95, 253, 201, 0.14), transparent 70%);
    pointer-events: none;
}

.project-icon-wrap {
    position: relative;
    flex-shrink: 0;
}

.project-icon {
    display: block;
    width: 208px;
    height: 208px;
    border-radius: 46px;
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.09);
    box-shadow: 0 22px 50px rgba(0, 0, 0, 0.45);
    object-fit: cover;
    opacity: 0.55;
    transition: opacity 0.25s ease;
}

.project-icon.has-project-icon {
    opacity: 1;
}

.project-copy {
    position: relative;
}

.project-copy h1 {
    margin: 0 0 14px;
    color: var(--text-strong);
    font-size: clamp(40px, 6vw, 68px);
    font-weight: 900;
    line-height: 0.98;
    overflow-wrap: anywhere;
}

.byline {
    margin: 0 0 14px;
    color: var(--text-soft);
    font-size: 17px;
}

.byline span {
    color: var(--accent);
    font-weight: 700;
}

.lede,
.get-codea p {
    color: var(--text-soft);
    line-height: 1.65;
    font-size: 18px;
}

.lede {
    margin: 0;
    max-width: 54ch;
}

/* ---------- buttons ---------- */

.cta-row {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    margin-top: 28px;
}

.action-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 62px;
    min-width: 210px;
    padding: 0 26px;
    border-radius: 22px;
    border: 1px solid rgba(95, 253, 201, 0.2);
    background: linear-gradient(180deg, rgba(18, 36, 40, 0.96), rgba(9, 18, 21, 0.96));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
    text-decoration: none;
    color: var(--text-strong);
    font-size: 16px;
    font-weight: 700;
    text-align: center;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.1s ease;
}

.action-pill:hover {
    background: rgba(95, 253, 201, 0.2);
}

.action-pill:active {
    transform: translateY(1px);
}

.action-pill.primary {
    background: linear-gradient(180deg, rgba(95, 253, 201, 0.92), rgba(58, 214, 166, 0.92));
    border-color: rgba(95, 253, 201, 0.5);
    color: #04211c;
}

.action-pill.primary:hover {
    background: linear-gradient(180deg, rgba(120, 255, 214, 0.96), rgba(74, 230, 182, 0.96));
}

/* ---------- get codea ---------- */

.get-codea {
    margin-top: 24px;
    padding: 44px 48px;
}

.get-codea h2 {
    margin: 0 0 12px;
    color: var(--text-strong);
    font-size: clamp(30px, 4vw, 44px);
    font-weight: 900;
    line-height: 1;
}

.get-codea p {
    margin: 0;
    max-width: 60ch;
}

/* ---------- footer ---------- */

.footer {
    margin-top: 48px;
    text-align: center;
}

.footer p {
    color: var(--text-soft);
    font-size: 15px;
    margin: 8px 0;
}

.footer a {
    color: var(--accent);
    text-decoration: none;
}

.footer a:hover {
    text-decoration: underline;
}

.expiry-note {
    opacity: 0.5;
    font-size: 13px !important;
}

.footer .download-link {
    color: inherit;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.footer .download-link:hover {
    color: var(--text-strong);
}

/* ---------- responsive ---------- */

@media screen and (max-width: 900px) {
    .project-card {
        grid-template-columns: minmax(0, 1fr);
        justify-items: center;
        text-align: center;
        gap: 28px;
        padding: 36px 28px;
    }

    .project-copy {
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .lede {
        margin-left: auto;
        margin-right: auto;
    }

    .cta-row {
        justify-content: center;
        width: 100%;
    }

    .get-codea {
        padding: 32px 28px;
        text-align: center;
    }

    .get-codea .cta-row {
        justify-content: center;
    }

    .get-codea p {
        margin-left: auto;
        margin-right: auto;
    }
}

@media screen and (max-width: 480px) {
    .project-icon {
        width: 152px;
        height: 152px;
        border-radius: 34px;
    }

    .action-pill {
        width: 100%;
        min-width: 0;
    }
}
