@import url("https://fonts.googleapis.com/css2?family=DM+Serif+Display:ital@0;1&family=Manrope:wght@400;500;600;700&display=swap");

:root {
    --page: #faf9f5;
    --surface: #ffffff;
    --ink: #172226;
    --muted: #5f6a6e;
    --line: #d8dddc;
    --deep: #09232b;
    --deep-soft: #123640;
    --mist: #dce9e9;
    --accent: #a9c5ca;
    --serif: "DM Serif Display", Georgia, serif;
    --sans: "Manrope", sans-serif;
}

html[data-theme="dark"] {
    --page: #0f1b1f;
    --surface: #15262b;
    --ink: #f4f3ee;
    --muted: #b7c2c3;
    --line: #35484d;
    --mist: #1a3339;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--page); font-family: var(--sans); font-size: 16px; line-height: 1.7; }
a { color: inherit; }
img { display: block; max-width: 100%; }
.wrap { width: min(1160px, calc(100% - 48px)); margin-inline: auto; }
.skip-link { position: fixed; top: 10px; left: 10px; z-index: 100; padding: 10px 15px; color: var(--deep); background: white; transform: translateY(-150%); }
.skip-link:focus { transform: none; }
a:focus-visible, button:focus-visible { outline: 3px solid white; outline-offset: 4px; }

.hero { position: relative; min-height: 88vh; display: flex; flex-direction: column; overflow: hidden; color: white; background: #06181d; }
.hero-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center; }
.hero-shade { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(4,19,23,.82) 0%, rgba(4,19,23,.57) 48%, rgba(4,19,23,.25) 100%), linear-gradient(180deg, rgba(3,17,21,.38) 0%, transparent 55%, var(--page) 100%); }
.hero-nav { position: relative; z-index: 2; min-height: 78px; display: flex; align-items: center; justify-content: space-between; gap: 30px; border-bottom: 1px solid rgba(255,255,255,.28); }
.brand { color: white; font-family: var(--serif); font-size: 1.7rem; text-decoration: none; }
.nav-links { display: flex; align-items: center; gap: 26px; font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; }
.nav-links a { color: white; text-decoration: none; }
.nav-links a:hover { opacity: .72; }
.nav-links button { padding: 7px 0; border: 0; border-bottom: 1px solid rgba(255,255,255,.55); color: white; background: transparent; font: inherit; letter-spacing: inherit; text-transform: inherit; cursor: pointer; }
.hero-content { position: relative; z-index: 2; flex: 1; display: flex; flex-direction: column; justify-content: center; align-items: flex-start; padding: 76px 0 118px; }
.overline, .section-label { margin: 0 0 22px; color: var(--accent); font-size: .7rem; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; }
.hero h1 { max-width: 760px; margin: 0 0 22px; font-family: var(--serif); font-size: clamp(3rem, 4.8vw, 5rem); font-weight: 400; line-height: 1; letter-spacing: -.035em; }
.hero h1 em { color: #d4e5e5; font-weight: 400; }
.hero-intro { max-width: 620px; margin: 0 0 28px; color: #edf3f2; font-size: clamp(1rem, 1.2vw, 1.1rem); line-height: 1.6; }
.hero-links { display: flex; flex-wrap: wrap; gap: 12px; }
.text-button, .solid-button { display: inline-flex; align-items: center; justify-content: center; min-height: 42px; padding: 9px 15px; border: 1px solid white; color: var(--deep); background: white; font-size: .7rem; font-weight: 700; letter-spacing: .07em; text-decoration: none; text-transform: uppercase; transition: background .15s, color .15s; }
.text-button.quiet { color: white; background: rgba(0,0,0,.12); }
.text-button:hover { color: white; background: var(--deep); }

.section { padding-block: clamp(56px, 6vw, 84px); }
.story { background: var(--page); }
.story-grid { display: grid; grid-template-columns: minmax(320px, .78fr) minmax(0, 1.22fr); gap: clamp(48px, 7vw, 90px); align-items: start; }
.portrait { margin: 0; }
.portrait img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: 54% center; }
.portrait figcaption { margin-top: 15px; color: var(--ink); font-family: var(--serif); font-size: 1.15rem; line-height: 1.35; }
.portrait figcaption span { color: var(--muted); font-family: var(--sans); font-size: .7rem; letter-spacing: .08em; text-transform: uppercase; }
.story h2, .christp2p h2, .gracepress h2, .plugins h2 { margin: 0 0 20px; font-family: var(--serif); font-size: clamp(2rem, 3.2vw, 3.35rem); font-weight: 400; line-height: 1.08; letter-spacing: -.025em; }
.lead { font-family: var(--serif); font-size: clamp(1.08rem, 1.6vw, 1.35rem); line-height: 1.5; }
.story-copy > p:not(.section-label) { max-width: 720px; }
.inline-link { display: inline-block; margin-top: 10px; color: var(--ink); font-size: .74rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }

.portrait-column { align-self: start; }
.contact-card { display: grid; gap: 8px; margin-top: 22px; padding-top: 20px; border-top: 1px solid var(--line); }
.contact-card .section-label, .contact-card p { margin: 0; }
.contact-card a { width: fit-content; color: var(--ink); font-weight: 700; text-decoration-color: var(--accent); text-underline-offset: .2em; }
.contact-card p:last-child { max-width: 34ch; color: var(--muted); font-size: .86rem; line-height: 1.55; }

.christp2p { color: #172226; background: #dfe9e7; border-block: 1px solid #b9cbc8; }
.christp2p-grid { display: grid; grid-template-columns: minmax(320px, 1.08fr) minmax(0, .92fr); gap: clamp(38px, 6vw, 72px); align-items: start; }
.christp2p-preview { display: block; padding: 10px; background: white; box-shadow: 0 20px 48px rgba(9,35,43,.16); transform: rotate(-.6deg); }
.christp2p-preview img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; object-position: top; }
.christp2p-copy { max-width: 620px; color: #4b5b5e; }
.christp2p-copy .section-label { color: #456d73; }
.christp2p-copy .lead { color: #172226; }

.gracepress { color: white; background: var(--deep); }
.gracepress-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(300px, .75fr); gap: clamp(45px, 7vw, 85px); align-items: start; }
.gracepress-copy > p:not(.section-label) { max-width: 720px; color: #c9d7d9; }
.gracepress-copy .lead { color: white; }
.solid-button { margin-top: 14px; border-color: white; }
.project-state { padding: 28px; border: 1px solid #53727a; background: var(--deep-soft); }
.project-state > p { margin-bottom: 35px; color: var(--accent); font-size: .68rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; }
.project-state > strong { display: block; margin-bottom: 32px; font-family: var(--serif); font-size: 2rem; font-weight: 400; }
.project-state dl { margin: 0 0 28px; }
.project-state dl div { padding: 13px 0; border-top: 1px solid #47646b; }
.project-state dt { color: #9eb2b7; font-size: .66rem; letter-spacing: .08em; text-transform: uppercase; }
.project-state dd { margin: 3px 0 0; }
.project-state a { color: white; font-size: .72rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; }

.plugins { overflow: hidden; background: var(--mist); }
.plugins-heading { display: grid; grid-template-columns: minmax(0, 1fr) minmax(320px, .72fr); gap: clamp(45px, 7vw, 90px); align-items: end; margin-bottom: 42px; }
.plugins-heading-copy { color: var(--muted); }
.carousel-controls { display: flex; gap: 8px; margin-top: 24px; }
.carousel-controls button { width: 44px; height: 44px; border: 1px solid var(--ink); color: var(--ink); background: transparent; font-size: 1.1rem; cursor: pointer; }
.carousel-controls button:hover:not(:disabled) { color: white; background: var(--deep); }
.carousel-controls button:disabled { opacity: .28; cursor: default; }
.plugin-track { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(330px, 48%); gap: 22px; overflow-x: auto; padding: 4px 4px 38px; scroll-snap-type: x mandatory; scrollbar-color: var(--deep) transparent; }
.plugin-card { min-height: 390px; display: flex; flex-direction: column; padding: 30px; border: 1px solid var(--line); background: var(--surface); scroll-snap-align: start; }
.plugin-card-status { width: max-content; margin-bottom: 55px; padding: 6px 9px; border: 1px solid var(--line); color: var(--muted); font-size: .64rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.plugin-card h3 { margin: 0 0 18px; font-family: var(--serif); font-size: clamp(2rem, 3.5vw, 3.25rem); font-weight: 400; line-height: 1; }
.plugin-card p { color: var(--muted); }
.plugin-card-meta { display: flex; flex-wrap: wrap; gap: 7px; margin: 12px 0 25px; padding: 0; list-style: none; }
.plugin-card-meta li { padding: 5px 8px; border: 1px solid var(--line); color: var(--muted); font-size: .64rem; }
.plugin-card a { margin-top: auto; color: var(--ink); font-size: .71rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.plugin-loading { min-height: 180px; color: var(--muted); }

.site-footer { padding: 75px 0 28px; color: white; background: #06171c; }
.footer-grid { display: grid; grid-template-columns: 1.2fr .8fr .6fr; gap: 60px; }
.footer-brand { color: white; font-family: var(--serif); font-size: 2.2rem; text-decoration: none; }
.footer-grid p { max-width: 430px; color: #aebec1; }
.footer-contact, .footer-links { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; font-size: .75rem; }
.footer-contact span { margin-bottom: 10px; color: #8fa8ad; font-size: .64rem; letter-spacing: .12em; text-transform: uppercase; }
.footer-contact a, .footer-links a { color: #e6eded; }
.copyright { margin-top: 60px; padding-top: 20px; border-top: 1px solid #31474d; color: #758b90; font-size: .62rem; letter-spacing: .08em; text-transform: uppercase; }

@media (prefers-reduced-motion: no-preference) {
    .hero-content > * { animation: rise .65s both; }
    .hero-content > :nth-child(2) { animation-delay: .08s; }
    .hero-content > :nth-child(3) { animation-delay: .16s; }
    .hero-content > :nth-child(4) { animation-delay: .24s; }
    @keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
}

@media (max-width: 850px) {
    .hero-nav { align-items: flex-start; padding-block: 22px; }
    .nav-links { justify-content: flex-end; flex-wrap: wrap; gap: 12px 18px; }
    .story-grid, .christp2p-grid, .gracepress-grid, .plugins-heading { grid-template-columns: 1fr; }
    .portrait { width: min(520px, 88%); }
    .plugin-track { grid-auto-columns: minmax(320px, 78%); }
    .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 580px) {
    body { font-size: 16px; }
    .wrap { width: min(100% - 28px, 1160px); }
    .hero { min-height: 900px; }
    .hero-nav { flex-direction: column; }
    .nav-links { justify-content: flex-start; }
    .hero-content { padding-top: 70px; }
    .hero h1 { font-size: clamp(3.5rem, 16vw, 5.4rem); }
    .hero-shade { background: linear-gradient(90deg, rgba(4,19,23,.82), rgba(4,19,23,.48)), linear-gradient(180deg, rgba(3,17,21,.2), transparent 55%, var(--page)); }
    .portrait { width: 100%; }
    .project-state { padding: 25px; }
    .plugin-track { grid-auto-columns: 92%; }
    .plugin-card { min-height: 350px; padding: 24px; }
    .footer-grid { grid-template-columns: 1fr; gap: 35px; }
}
