/* The Development Suite: shared stylesheet for index.html and the portfolio page.
   Sections: base · shared components · home page (.home) · portfolio (.portfolio) */

/* ═════════════ Base ═════════════ */
:root {
    --bg: #1d2b3a;
    --bg-2: #1a2736;
    --bg-3: #16222e;
    --ink: #e8e6e1;
    --ink-hi: rgba(232, 230, 225, 0.92);
    --ink-body: rgba(232, 230, 225, 0.72);
    --ink-mid: rgba(232, 230, 225, 0.6);
    --ink-lo: rgba(232, 230, 225, 0.45);
    --line: rgba(232, 230, 225, 0.1);
    --line-hi: rgba(232, 230, 225, 0.25);
    --accent: #8fb3d1;
    --fill: rgba(232, 230, 225, 0.05);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    background: var(--bg);
    font-family: 'Inter', -apple-system, sans-serif;
    color: var(--ink);
}

/* ═════════════ Shared components ═════════════ */

/* Logo: same size and treatment on every page */
.logo {
    width: 320px;
    max-width: 100%;
    height: auto;
    mix-blend-mode: lighten;
    filter: invert(1);
}

.rule {
    width: 60px;
    height: 1px;
    background: rgba(255, 255, 255, 0.2);
    margin: 0 auto 2.5rem;
}

@media (max-width: 600px) {
    .logo {
        width: 280px;
    }
}

/* ═════════════ Home page ═════════════ */

/* ── Hero ── */
.home .hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 2rem;
    position: relative;
}

.home .logo-wrap {
    margin-bottom: 3.5rem;
}

.home .services {
    font-size: 0.75rem;
    font-weight: 200;
    letter-spacing: 0.5em;
    text-transform: uppercase;
    color: rgba(232, 230, 225, 0.6);
}

.home .services span.pipe {
    display: inline-block;
    margin: 0 1.5em;
    opacity: 0.3;
}

/* ── Scroll hint ── */
.home .scroll-hint {
    position: absolute;
    bottom: 2.5rem;
    left: 50%;
    transform: translateX(-50%);
    opacity: 0;
    animation: fadeHint 1s ease 2s forwards;
}

.home .scroll-hint span {
    display: block;
    width: 1px;
    height: 40px;
    background: linear-gradient(to bottom, transparent, rgba(255,255,255,0.25));
    margin: 0 auto;
}

@keyframes fadeHint {
    to { opacity: 1; }
}

/* ── Down arrow (shared) ── */
.home .arrow-down {
    position: absolute;
    bottom: 2rem;
    right: 2.5rem;
    width: 20px;
    height: 20px;
    border-right: 1px solid rgba(232, 230, 225, 0.35);
    border-bottom: 1px solid rgba(232, 230, 225, 0.35);
    transform: rotate(45deg);
    animation: arrowBounce 2s ease-in-out infinite;
}

@keyframes arrowBounce {
    0%, 100% { transform: rotate(45deg) translateY(0); opacity: 0.6; }
    50% { transform: rotate(45deg) translateY(5px); opacity: 1; }
}

/* ── Services grid ── */
.home .services-detail {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 6rem 4rem;
    background: #1a2736;
    position: relative;
}

.home .grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem 6rem;
    max-width: 900px;
}

.home .grid-item {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.home .grid-item.visible {
    opacity: 1;
    transform: translateY(0);
}

.home .grid-item:nth-child(2) { transition-delay: 0.1s; }
.home .grid-item:nth-child(3) { transition-delay: 0.2s; }
.home .grid-item:nth-child(4) { transition-delay: 0.3s; }

.home .grid-item h3 {
    font-size: 0.85rem;
    font-weight: 300;
    letter-spacing: 0.5em;
    text-transform: uppercase;
    color: rgba(232, 230, 225, 0.5);
    margin-bottom: 1.2rem;
}

.home .grid-item p {
    font-size: 0.95rem;
    font-weight: 200;
    line-height: 1.8;
    color: rgba(232, 230, 225, 0.45);
}

/* ── Contact section ── */
.home .contact {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 4rem 2rem;
    background: #16222e;
    position: relative;
}

.home .contact-inner {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.home .contact-inner.visible {
    opacity: 1;
    transform: translateY(0);
}

.home .contact-label {
    font-size: 0.6rem;
    font-weight: 300;
    letter-spacing: 0.5em;
    text-transform: uppercase;
    color: rgba(232, 230, 225, 0.6);
    margin-bottom: 2.5rem;
}

.home .contact-email {
    font-size: 1.4rem;
    font-weight: 200;
    letter-spacing: 0.08em;
    color: rgba(232, 230, 225, 0.7);
    cursor: pointer;
    text-decoration: none;
    border-bottom: 1px solid rgba(232, 230, 225, 0.1);
    padding-bottom: 4px;
    transition: color 0.3s ease, border-color 0.3s ease;
    display: inline-block;
}

.home .contact-email:hover {
    color: rgba(232, 230, 225, 0.95);
    border-bottom-color: rgba(232, 230, 225, 0.3);
}

.home .contact-note {
    margin-top: 2rem;
    font-size: 0.6rem;
    font-weight: 300;
    letter-spacing: 0.15em;
    color: rgba(232, 230, 225, 0.45);
}

.home .copyright {
    position: absolute;
    bottom: 2rem;
    font-size: 0.55rem;
    font-weight: 300;
    letter-spacing: 0.15em;
    color: rgba(232, 230, 225, 0.2);
}

@media (max-width: 600px) {
    .home .services {
        font-size: 0.65rem;
        letter-spacing: 0.35em;
    }
    .home .services .mid-pipe {
        display: none;
    }
    .home .services .line {
        display: block;
        margin: 0.8em 0;
    }
    .home .services span.pipe {
        margin: 0 0.8em;
    }
    .home .contact-email {
        font-size: 1rem;
    }
    .home .services-detail {
        padding: 4rem 2rem;
    }
    .home .grid {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
    .home .arrow-down {
        right: 1.5rem;
        bottom: 1.5rem;
    }
}

/* ═════════════ Portfolio page ═════════════ */

.portfolio {
    font-weight: 300;
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}

html:has(body.portfolio) { scroll-padding-top: 5rem; }

.portfolio a { color: var(--ink-hi); text-decoration: none; border-bottom: 1px solid var(--line-hi); transition: border-color .2s, color .2s; }
.portfolio a:hover { color: #fff; border-bottom-color: var(--ink-mid); }
.portfolio a:focus-visible, .portfolio summary:focus-visible { outline: 1px solid var(--accent); outline-offset: 4px; }

.portfolio .wrap { max-width: 960px; margin: 0 auto; padding-inline: 2rem; }

/* ── Header ── */
.portfolio .site-header {
    position: sticky;
    top: 0;
    z-index: 10;
    background: rgba(29, 43, 58, 0.92);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--line);
}
.portfolio .site-header .wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    padding-block: 1.1rem;
}
.portfolio .brand {
    display: inline-flex;
    align-items: center;
    gap: 0.9rem;
    font-size: 0.7rem;
    font-weight: 300;
    letter-spacing: 0.4em;
    text-transform: uppercase;
    color: var(--ink-mid);
    border: 0;
}
.portfolio .brand-mark { height: 36px; width: auto; flex: none; }
.portfolio .nav { display: flex; gap: 2rem; }
.portfolio .nav a {
    font-size: 0.65rem;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: var(--ink-lo);
    border: 0;
}
.portfolio .nav a:hover { color: var(--ink-hi); }

/* ── Hero ── */
.portfolio .hero { padding: 7rem 0 5rem; max-width: 680px; }
.portfolio .eyebrow {
    font-size: 0.65rem;
    letter-spacing: 0.5em;
    text-transform: uppercase;
    color: var(--ink-lo);
    margin-bottom: 2rem;
}
.portfolio h1 {
    font-size: clamp(2.2rem, 6vw, 3.4rem);
    font-weight: 200;
    letter-spacing: 0.02em;
    line-height: 1.15;
    margin-bottom: 1.8rem;
}
.portfolio .lede { font-size: 1.1rem; font-weight: 200; color: var(--ink-body); margin-bottom: 1.5rem; }
.portfolio .byline { font-size: 0.85rem; color: var(--ink-lo); }

/* ── Sections ── */
.portfolio section[id] { padding-block: 4rem; border-top: 1px solid var(--line); }
.portfolio h2 {
    font-size: 0.75rem;
    font-weight: 300;
    letter-spacing: 0.5em;
    text-transform: uppercase;
    color: var(--ink-mid);
    margin-bottom: 2.5rem;
}

/* ── Cards ── */
.portfolio .cards { display: grid; gap: 1.25rem; }
.portfolio .card {
    background: var(--bg-2);
    border: 1px solid var(--line);
    border-radius: 4px;
    transition: border-color .25s;
}
.portfolio .card:hover, .portfolio .card[open] { border-color: var(--line-hi); }

.portfolio .card summary {
    list-style: none;
    cursor: pointer;
    padding: 2rem 2.25rem;
    display: block;
}
.portfolio .card summary::-webkit-details-marker { display: none; }

.portfolio .card .meta {
    display: block;
    font-size: 0.65rem;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    color: var(--ink-lo);
    margin-bottom: 0.9rem;
}
.portfolio .card h3 {
    font-size: 1.5rem;
    font-weight: 200;
    letter-spacing: 0.02em;
    color: var(--ink-hi);
    margin-bottom: 0.8rem;
}
.portfolio .card summary > p { font-size: 0.95rem; font-weight: 200; color: var(--ink-body); max-width: 680px; }

.portfolio .tags { list-style: none; display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 1.4rem; }
/* Shaded pills: a light fill reads more easily than an outline */
.portfolio .tags li {
    font-size: 0.75rem;
    letter-spacing: 0.04em;
    color: var(--ink-body);
    background: var(--fill);
    border-radius: 999px;
    padding: 0.3rem 0.8rem;
}

.portfolio .more {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    margin-top: 1.6rem;
    font-size: 0.65rem;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: var(--ink-mid);
}
.portfolio .more::before { content: "Read more"; }
.portfolio .more::after {
    content: "";
    width: 7px;
    height: 7px;
    border-right: 1px solid currentColor;
    border-bottom: 1px solid currentColor;
    transform: translateY(-2px) rotate(45deg);
    transition: transform .25s;
}
.portfolio .card[open] .more::before { content: "Close"; }
.portfolio .card[open] .more::after { transform: translateY(2px) rotate(-135deg); }
.portfolio .card summary:hover .more { color: var(--ink-hi); }

.portfolio .detail { padding: 0 2.25rem 2.25rem; border-top: 1px solid var(--line); }
.portfolio .detail h4 {
    font-size: 0.65rem;
    font-weight: 400;
    letter-spacing: 0.4em;
    text-transform: uppercase;
    color: var(--ink-lo);
    margin: 2rem 0 0.8rem;
}
.portfolio .detail p { font-size: 0.95rem; font-weight: 200; color: var(--ink-body); max-width: 680px; }
.portfolio .detail p + p { margin-top: 1rem; }

/* ── Flow diagram ── */
.portfolio .flow-scroll { overflow-x: auto; margin: 0.5rem 0 1.5rem; padding-bottom: 0.25rem; }
.portfolio .flow {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(4, minmax(140px, 1fr));
    gap: 1.75rem;
    min-width: 640px;
    counter-reset: step;
}
.portfolio .flow li {
    position: relative;
    counter-increment: step;
    font-size: 0.8rem;
    font-weight: 200;
    color: var(--ink-body);
    border: 1px solid var(--line);
    border-radius: 3px;
    padding: 1rem;
    background: var(--fill);
}
.portfolio .flow li b {
    display: block;
    font-weight: 400;
    font-size: 0.65rem;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: var(--ink-hi);
    margin-bottom: 0.5rem;
}
.portfolio .flow li b::before { content: counter(step, decimal-leading-zero) "  "; color: var(--ink-lo); white-space: pre; }
.portfolio .flow li:not(:last-child)::after {
    content: "";
    position: absolute;
    right: -1.2rem;
    top: 50%;
    width: 7px;
    height: 7px;
    border-right: 1px solid var(--ink-lo);
    border-top: 1px solid var(--ink-lo);
    transform: translateY(-50%) rotate(45deg);
}
.portfolio .flow li.human { border-color: var(--accent); }
.portfolio .flow li.human b { color: var(--accent); }

/* ── Prose ── */
.portfolio .prose { font-size: 0.95rem; font-weight: 200; color: var(--ink-body); max-width: 680px; margin-top: 3rem; }
.portfolio #contact .prose { margin-top: 0; line-height: 2.2; }
/* Intro paragraph between a section heading and its cards */
.portfolio h2 + .prose { margin-top: 0; margin-bottom: 2.5rem; }
.portfolio .contact-email { font-size: 1.4rem; font-weight: 200; letter-spacing: 0.04em; }

/* ── Testimonials ── */
.portfolio .quotes { display: grid; gap: 3rem; }
.portfolio .quote { border-left: 1px solid var(--line-hi); padding-left: 2rem; max-width: 760px; }
.portfolio .quote blockquote p { font-size: 1rem; font-weight: 200; color: var(--ink-body); }
.portfolio .quote blockquote p + p { margin-top: 0.9rem; }
.portfolio .quote figcaption {
    margin-top: 1.2rem;
    font-size: 0.65rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--ink-lo);
    line-height: 1.8;
}

/* ── Footer ── */
.portfolio .site-footer {
    background: var(--bg-3);
    padding-block: 2.5rem;
    font-size: 0.6rem;
    letter-spacing: 0.15em;
    color: rgba(232, 230, 225, 0.35);
}

@media (max-width: 600px) {
    .portfolio .wrap { padding-inline: 1.25rem; }
    .portfolio .nav { gap: 1.25rem; }
    .portfolio .brand-mark { height: 30px; }
    .portfolio .hero { padding: 4rem 0 3rem; }
    .portfolio .card summary { padding: 1.5rem 1.25rem; }
    .portfolio .detail { padding: 0 1.25rem 1.5rem; }
    .portfolio .quote { padding-left: 1.25rem; }
    .portfolio .contact-email { font-size: 1.05rem; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .portfolio * { transition: none !important; }
}

/* ═════════════ Notice pages (404, expired portfolio link) ═════════════ */

.notice {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 3rem 1.5rem;
}

.notice-inner { max-width: 520px; }

.notice-logo { display: inline-block; margin-bottom: 3rem; }

.notice h1 {
    font-size: 0.85rem;
    font-weight: 300;
    letter-spacing: 0.5em;
    text-transform: uppercase;
    color: var(--ink-mid);
    margin-bottom: 2rem;
}

.notice p {
    font-size: 0.95rem;
    font-weight: 200;
    line-height: 1.8;
    color: var(--ink-body);
}

.notice p + p { margin-top: 0.6rem; }

.notice-email {
    display: inline-block;
    margin-top: 2.5rem;
    font-size: 1.4rem;
    font-weight: 200;
    letter-spacing: 0.08em;
    color: rgba(232, 230, 225, 0.7);
    text-decoration: none;
    border-bottom: 1px solid var(--line);
    padding-bottom: 4px;
    transition: color 0.3s ease, border-color 0.3s ease;
}

.notice-email:hover {
    color: rgba(232, 230, 225, 0.95);
    border-bottom-color: rgba(232, 230, 225, 0.3);
}

.notice-home {
    display: block;
    margin-top: 3rem;
    font-size: 0.6rem;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: var(--ink-lo);
    text-decoration: none;
}

.notice-home:hover { color: var(--ink-hi); }

@media (max-width: 600px) {
    .notice-email { font-size: 1.05rem; }
}
