/* ============================================
   DEVLAUNCH — Corporate theme
   White paper, navy ink, one blue accent
   ============================================ */

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

:root {
    --paper: #ffffff;
    --mist: #f4f6f9;
    --ink: #0f1d33;
    --slate: #4a5871;
    --muted: #7b8798;
    --line: #e2e6ed;
    --accent: #1d4ed8;
    --accent-dark: #1a3fa8;
    --accent-soft: #eaf0fe;

    --font: 'Schibsted Grotesk', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --radius: 6px;
    --header-h: 72px;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: var(--header-h);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font);
    font-size: 1.0625rem;
    line-height: 1.6;
    color: var(--ink);
    background: var(--paper);
    overflow-x: hidden;
}

a { color: inherit; }

:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
}

.container {
    max-width: 1160px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* ── Header ── */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    height: var(--header-h);
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid transparent;
    transition: border-color 0.2s;
}

.header.scrolled {
    border-bottom-color: var(--line);
}

.nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
    max-width: 1160px;
    margin: 0 auto;
    padding: 0 2rem;
}

.logo {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 1.15rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: var(--ink);
    text-decoration: none;
}

.logo-mark {
    width: 26px;
    height: 26px;
    flex: none;
}

.nav-links {
    display: flex;
    align-items: center;
    list-style: none;
    gap: 2rem;
}

.nav-links a {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--slate);
    text-decoration: none;
    transition: color 0.15s;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--ink);
}

.nav-links .nav-cta {
    color: var(--paper);
    background: var(--ink);
    padding: 0.55rem 1.1rem;
    border-radius: var(--radius);
}

.nav-links .nav-cta:hover,
.nav-links .nav-cta.active {
    color: var(--paper);
    background: var(--accent);
}

.mobile-menu {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
}

.mobile-menu span {
    width: 22px;
    height: 2px;
    background: var(--ink);
    transition: transform 0.2s, opacity 0.2s;
}

.mobile-menu.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.mobile-menu.active span:nth-child(2) { opacity: 0; }
.mobile-menu.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── Buttons ── */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font: inherit;
    font-size: 1rem;
    font-weight: 600;
    padding: 0.85rem 1.4rem;
    border-radius: var(--radius);
    border: 1px solid var(--accent);
    background: var(--accent);
    color: var(--paper);
    text-decoration: none;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.btn:hover {
    background: var(--accent-dark);
    border-color: var(--accent-dark);
}

.btn-quiet {
    background: transparent;
    color: var(--ink);
    border-color: var(--line);
}

.btn-quiet:hover {
    background: var(--mist);
    border-color: var(--line);
}

/* ── Sections ── */
section {
    padding: 6.5rem 0;
}

.section-head {
    max-width: 640px;
    margin-bottom: 3.5rem;
}

.section-head h2 {
    font-size: clamp(1.9rem, 3.2vw, 2.6rem);
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -0.025em;
    margin-bottom: 1rem;
}

.section-head p {
    color: var(--slate);
    font-size: 1.125rem;
}

/* ── Hero ── */
.hero {
    padding: calc(var(--header-h) + 6rem) 0 5.5rem;
    border-bottom: 1px solid var(--line);
}

.hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr);
    gap: 5rem;
    align-items: end;
}

.hero-title {
    font-size: clamp(2.6rem, 5.6vw, 4.6rem);
    font-weight: 700;
    line-height: 1.04;
    letter-spacing: -0.035em;
    margin-bottom: 1.75rem;
}

.hero-sub {
    max-width: 34rem;
    font-size: 1.2rem;
    color: var(--slate);
    margin-bottom: 2.5rem;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

/* Hero side: live product index */
.hero-index {
    border-top: 2px solid var(--ink);
}

.hero-index h2 {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--slate);
    padding: 1rem 0 0.5rem;
}

.hero-index ul {
    list-style: none;
}

.hero-index li a {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 1rem;
    padding: 0.85rem 0;
    border-bottom: 1px solid var(--line);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.15s;
}

.hero-index li a span {
    font-weight: 400;
    font-size: 0.9rem;
    color: var(--muted);
}

.hero-index li a:hover {
    color: var(--accent);
}

/* ── Services ── */
.services-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr);
    gap: 5rem;
}

.services-grid .section-head {
    margin-bottom: 0;
    position: sticky;
    top: calc(var(--header-h) + 2rem);
    align-self: start;
}

.services-list {
    list-style: none;
    border-top: 1px solid var(--line);
}

.service {
    display: grid;
    grid-template-columns: minmax(0, 14rem) minmax(0, 1fr);
    gap: 2rem;
    padding: 1.75rem 0;
    border-bottom: 1px solid var(--line);
}

.service h3 {
    font-size: 1.1rem;
    font-weight: 600;
    line-height: 1.4;
}

.service p {
    color: var(--slate);
}

/* ── Projects ── */
.projects {
    background: var(--mist);
}

.project-list {
    list-style: none;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 10px;
    overflow: hidden;
}

.project + .project {
    border-top: 1px solid var(--line);
}

.project a {
    display: grid;
    grid-template-columns: minmax(0, 11rem) minmax(0, 9rem) minmax(0, 1fr) auto;
    gap: 2rem;
    align-items: baseline;
    padding: 1.6rem 2rem;
    text-decoration: none;
    transition: background 0.15s;
}

.project a:hover {
    background: var(--accent-soft);
}

.project h3 {
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: -0.01em;
}

.project-cat {
    font-size: 0.9rem;
    color: var(--muted);
}

.project p {
    color: var(--slate);
}

.project-url {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--accent);
    white-space: nowrap;
}

/* ── About ── */
.about-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
    gap: 5rem;
}

.about-text .section-head {
    margin-bottom: 1.5rem;
}

.about-text p {
    color: var(--slate);
    font-size: 1.125rem;
    max-width: 36rem;
}

.about-text p + p {
    margin-top: 1rem;
}

.facts {
    align-self: start;
    border-top: 2px solid var(--ink);
}

.facts div {
    display: flex;
    justify-content: space-between;
    gap: 1.5rem;
    padding: 1rem 0;
    border-bottom: 1px solid var(--line);
}

.facts dt {
    color: var(--slate);
}

.facts dd {
    font-weight: 600;
    text-align: right;
}

/* ── Contact ── */
.contact {
    background: var(--mist);
}

.contact-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr);
    gap: 5rem;
}

.contact-details {
    list-style: none;
    margin-top: 2rem;
}

.contact-details li {
    display: flex;
    gap: 0.85rem;
    align-items: flex-start;
    padding: 0.6rem 0;
    color: var(--slate);
}

.contact-details svg {
    flex: none;
    margin-top: 0.2rem;
    color: var(--accent);
}

.contact-details a {
    color: var(--ink);
    font-weight: 600;
    text-decoration: none;
}

.contact-details a:hover {
    color: var(--accent);
}

.contact-form {
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 2.25rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 0.4rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    font: inherit;
    font-size: 1rem;
    color: var(--ink);
    background: var(--paper);
    border: 1px solid #cdd3dd;
    border-radius: var(--radius);
    padding: 0.75rem 0.9rem;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.form-group textarea {
    resize: vertical;
    min-height: 140px;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-soft);
}

.form-note {
    margin-top: 1rem;
    font-size: 0.9rem;
    color: var(--muted);
}

/* ── Footer ── */
.footer {
    background: var(--ink);
    color: #b9c2d0;
    padding: 3.5rem 0;
    font-size: 0.95rem;
}

.footer-grid {
    display: flex;
    justify-content: space-between;
    gap: 2rem;
    flex-wrap: wrap;
}

.footer-name {
    color: var(--paper);
    font-weight: 700;
    margin-bottom: 0.4rem;
}

.footer-links {
    display: flex;
    gap: 1.5rem;
    list-style: none;
    align-self: flex-end;
}

.footer a {
    color: #dfe5ee;
    text-decoration: none;
}

.footer a:hover {
    color: var(--paper);
    text-decoration: underline;
}

/* ── Legal pages ── */
.legal {
    padding: calc(var(--header-h) + 4rem) 0 6rem;
}

.legal-content {
    max-width: 760px;
}

.legal-content .back-link {
    display: inline-block;
    margin-bottom: 2rem;
    color: var(--accent);
    font-weight: 600;
    text-decoration: none;
}

.legal-content .back-link:hover {
    text-decoration: underline;
}

.legal-content h1 {
    font-size: clamp(2rem, 4vw, 2.75rem);
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.1;
    margin-bottom: 0.5rem;
}

.legal-content .last-updated {
    color: var(--muted);
    margin-bottom: 2.5rem;
}

.legal-content h2 {
    font-size: 1.3rem;
    font-weight: 700;
    margin: 2.5rem 0 0.75rem;
}

.legal-content p,
.legal-content li {
    color: var(--slate);
    line-height: 1.75;
    margin-bottom: 1rem;
}

.legal-content ul {
    margin: 0 0 1rem 1.5rem;
}

.legal-content a {
    color: var(--accent);
}

.legal-content strong {
    color: var(--ink);
}

.legal-content .disclaimer {
    background: var(--mist);
    border-left: 3px solid var(--ink);
    padding: 1rem 1.25rem;
    margin: 2rem 0;
    color: var(--ink);
    font-weight: 500;
}

/* ── Responsive ── */
@media (max-width: 960px) {
    .hero-grid,
    .services-grid,
    .about-grid,
    .contact-grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 3rem;
    }

    .services-grid .section-head {
        position: static;
    }

    .project a {
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 0.35rem 1.5rem;
    }

    .project-cat { grid-column: 2; grid-row: 1; text-align: right; }
    .project p { grid-column: 1 / -1; }
    .project-url { grid-column: 1 / -1; }
}

@media (max-width: 760px) {
    .container,
    .nav {
        padding: 0 1rem;
    }

    section {
        padding: 4.5rem 0;
    }

    .hero {
        padding: calc(var(--header-h) + 3.5rem) 0 4rem;
    }

    .mobile-menu {
        display: flex;
    }

    .nav-links {
        position: fixed;
        top: var(--header-h);
        left: 0;
        right: 0;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        background: var(--paper);
        border-bottom: 1px solid var(--line);
        padding: 0.5rem 1rem 1.25rem;
        display: none;
    }

    .nav-links.active {
        display: flex;
    }

    .nav-links a {
        display: block;
        padding: 0.85rem 0;
        border-bottom: 1px solid var(--line);
    }

    .nav-links .nav-cta {
        margin-top: 1rem;
        text-align: center;
        padding: 0.85rem 1rem;
        border-bottom: none;
    }

    .service {
        grid-template-columns: minmax(0, 1fr);
        gap: 0.4rem;
    }

    .project a {
        padding: 1.4rem 1.25rem;
    }

    .contact-form {
        padding: 1.5rem;
    }

    .form-row {
        grid-template-columns: minmax(0, 1fr);
        gap: 0;
    }

    .footer-links {
        align-self: flex-start;
    }
}

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

/* Keep legal URLs and long headings inside narrow screens. */
.legal-content {
    overflow-wrap: anywhere;
}

.language-switch {
    font-size: 0.9rem;
}

/* Keep the app navigation and developer links readable on narrow screens. */
.footer-links {
    flex-wrap: wrap;
}

.logo {
    font-size: 1.05rem;
}
