/* The hub. Shared tokens, nav, buttons and footer are in shared/site.css. */

/* Hero */
.hero { display: grid; grid-template-columns: 1.05fr 1fr; gap: 56px; align-items: center; padding-top: 40px; padding-bottom: 88px; }
.hero h1 { font-size: clamp(2.4rem, 5vw, 3.6rem); line-height: 1.05; letter-spacing: -0.035em; margin: 0 0 20px; font-weight: 750; }
.lede { color: var(--muted); font-size: 1.125rem; max-width: 40ch; margin: 0 0 32px; }
.ctas { display: flex; gap: 12px; flex-wrap: wrap; }
.hero figure { margin: 0; }
.hero-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.hero-tile {
    position: relative; display: block; border-radius: var(--radius-md); overflow: hidden;
    border: 1px solid var(--border); background: #111; box-shadow: var(--shadow);
    transition: transform .3s var(--ease);
}
.hero-tile:hover { transform: translateY(-3px); }
.hero-tile img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; }
.hero-tile span {
    position: absolute; left: 8px; bottom: 8px; padding: 3px 10px; border-radius: 999px;
    background: rgba(0, 0, 0, .72); color: #fff; font-size: 13px; font-weight: 600;
}
.hero figcaption { color: var(--muted); font-size: 13px; margin-top: 10px; }

section { padding: 72px 0; border-top: 1px solid var(--border); }
section:focus { outline: none; }
h2 { font-size: clamp(1.6rem, 3vw, 2.1rem); letter-spacing: -0.025em; line-height: 1.15; margin: 0 0 10px; }
.section-lede { color: var(--muted); margin: 0 0 36px; max-width: 60ch; }

/* Featured: Kent large, two smaller stacked; second row mirrored */
.apps { display: grid; grid-template-columns: 1.6fr 1fr; grid-template-rows: auto auto; gap: 16px; }
.app {
    display: flex; flex-direction: column; border-radius: var(--radius-md); background: var(--surface);
    border: 1px solid var(--border); text-decoration: none; overflow: hidden;
    transition: transform .3s var(--ease), box-shadow .3s;
}
.app:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.app-body { padding: 22px 24px 24px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.app h3 { margin: 0; font-size: 1.25rem; letter-spacing: -0.015em; }
.app p { margin: 0; color: var(--muted); font-size: 15px; }
.app .go { margin-top: auto; padding-top: 14px; font-weight: 600; font-size: 15px; color: var(--accent-text); }
.app.kent { grid-row: span 2; }
.app.kent img { aspect-ratio: 1280 / 620; object-fit: cover; border-bottom: 1px solid var(--border); }
.app.soft { background: linear-gradient(160deg, var(--accent-soft), var(--surface) 70%); }
.app.plain { background: linear-gradient(160deg, var(--surface-2), var(--surface) 70%); }
.tag { font-size: 13px; color: var(--muted); }

.apps.second { grid-template-columns: 1fr 1.6fr; grid-template-rows: auto; margin-top: 16px; }
.app img.shot { border-bottom: 1px solid var(--border); object-fit: cover; object-position: top left; width: 100%; height: 300px; }
.app.airport img.shot { background: #16241b; object-position: center; }

/* All projects: one block per group, each project a card with a screenshot */
.groups { display: flex; flex-direction: column; gap: 64px; }
.group { scroll-margin-top: 24px; }
.group-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px 24px; flex-wrap: wrap; margin: 0 0 20px; }
.group-head h3 { font-size: 1.3rem; letter-spacing: -0.02em; margin: 0; }
.group-head p { margin: 0; color: var(--muted); font-size: 15px; max-width: 60ch; }

.cards { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
/* five projects: the first two get the bigger cards, three below */
.cards[data-n="5"] { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.cards[data-n="5"] > li { grid-column: span 2; }
.cards[data-n="5"] > li:nth-child(-n+2) { grid-column: span 3; }
.cards[data-n="6"] { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cards li { display: flex; }
.card {
    display: flex; flex-direction: column; width: 100%;
    border-radius: var(--radius-md); background: var(--surface); border: 1px solid var(--border);
    text-decoration: none; overflow: hidden;
    transition: transform .3s var(--ease), box-shadow .3s, border-color .3s;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--border-strong); }
.card-media { position: relative; display: block; aspect-ratio: 16 / 10; overflow: hidden; background: #111114; border-bottom: 1px solid var(--border); }
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.card:hover .card-media img { transform: scale(1.04); }
.badge {
    position: absolute; left: 12px; top: 12px;
    font-size: 12px; font-weight: 650; letter-spacing: .01em; line-height: 1;
    padding: 6px 9px; border-radius: 999px;
    color: #fff; background: rgb(12 12 16 / .72);
    backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
.badge::before { content: ''; display: inline-block; width: 6px; height: 6px; border-radius: 50%; margin-right: 6px; vertical-align: 1px; background: #a1a1aa; }
.badge-play::before { background: #4ade80; }
.badge-demo::before { background: #f0703a; }
.badge-read::before, .badge-site::before { background: #60a5fa; }
.card-body { display: flex; flex-direction: column; gap: 6px; padding: 16px 18px 18px; flex: 1; }
.card strong { font-size: 16px; letter-spacing: -0.01em; }
.card .what { color: var(--muted); font-size: 14px; line-height: 1.5; }
.card-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: auto; padding-top: 12px; }
.card .lang { font-size: 13px; color: var(--muted); }
.card .go { display: inline-flex; align-items: center; gap: 4px; font-size: 14px; font-weight: 600; color: var(--accent-text); white-space: nowrap; }
.card .go svg { transition: transform .3s var(--ease); }
.card:hover .go svg { transform: translateX(3px); }

/* Contact */
.contact { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: start; }
.contact .section-lede { margin-bottom: 0; }
.cf-label { display: block; font-size: 14px; font-weight: 600; margin: 0 0 6px; }
.cf-label + .cf-input { margin-bottom: 16px; }
.cf-input {
    display: block; width: 100%; font: 15px var(--font-body); color: var(--text);
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm);
    padding: 11px 12px; resize: vertical;
}
.cf-input::placeholder { color: var(--muted); }
.cf-input:focus { outline: 2px solid var(--accent); outline-offset: 0; border-color: transparent; }
.cf-submit:disabled { opacity: .6; cursor: wait; }
.cf-status { font-size: 14px; margin: 12px 0 0; min-height: 1.4em; color: var(--muted); }
.cf-status.err { color: #b91c1c; }
[data-theme="dark"] .cf-status.err { color: #f87171; }

/* Entry motion: content settles in on load, off for reduced motion */
@media (prefers-reduced-motion: no-preference) {
    .rise { animation: rise .7s var(--ease) both; }
    .rise.d1 { animation-delay: .08s; }
    .rise.d2 { animation-delay: .16s; }
}
@media (prefers-reduced-motion: reduce) {
    .app:hover, .card:hover, .hero-tile:hover { transform: none; }
    .card:hover .card-media img, .card:hover .go svg { transform: none; }
}

@media (max-width: 860px) {
    .hero { grid-template-columns: 1fr; gap: 36px; padding-top: 16px; padding-bottom: 64px; }
    .apps, .apps.second { grid-template-columns: 1fr; }
    .app.kent { grid-row: auto; }
    .app img.shot { height: auto; aspect-ratio: 16 / 10; }
    .contact { grid-template-columns: 1fr; gap: 40px; }
    .groups { gap: 48px; }
    section { padding: 56px 0; }
}
@media (max-width: 1000px) {
    .cards, .cards[data-n="5"], .cards[data-n="6"] { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .cards[data-n="5"] > li, .cards[data-n="5"] > li:nth-child(-n+2) { grid-column: auto; }
}
@media (max-width: 560px) {
    .cards, .cards[data-n="5"], .cards[data-n="6"] { grid-template-columns: 1fr; }
}
