/* Zyzo Technology Services
   Bob Scott  bob@zyzo.com */

:root {
    --brand: #4a55a2;
    --brand-dark: #363f80;
    --accent: #f5f4a0;
    --ink: #1d1d1f;
    --body: #4a4a4a;
    --muted: #8a8a8a;
    --bg: #fbfbfd;
    --tint: #f2f3fa;
    --deep: #14162a;
    --deep-text: #c7c9e6;
    --rule: rgba(74, 85, 162, 0.15);
    --hero: linear-gradient(135deg, #0e1030 0%, #1c1f4d 55%, #2a2f6e 100%);
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    --gutter: 48px;
    --measure: 1240px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    /* Questrial has no Japanese glyphs, so Noto Sans JP picks them up per
       character. Latin text still renders in Questrial on both locales. */
    font-family: "Questrial", "Noto Sans JP", sans-serif;
    background: var(--bg);
    color: var(--ink);
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

a {
    color: var(--brand);
    text-decoration: none;
}

a:hover {
    color: var(--brand-dark);
}

img {
    max-width: 100%;
}

h1,
h2,
h3,
h4 {
    font-weight: 400;
}

/* Skip link ---------------------------------------------------------- */

.skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    z-index: 100;
    padding: 12px 20px;
    background: var(--brand);
    color: #fff;
}

.skip-link:focus {
    left: 0;
    color: #fff;
}

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

/* Layout ------------------------------------------------------------- */

.wrap {
    max-width: var(--measure);
    margin: 0 auto;
    padding-left: var(--gutter);
    padding-right: var(--gutter);
}

.wrap-narrow {
    max-width: 1000px;
}

.section {
    padding: 100px 0;
}

.section-tint {
    background: var(--tint);
}

/* Pulls the first section up into the angled cut of the home hero. */
.section-overlap {
    margin-top: -40px;
    padding-top: 0;
    position: relative;
    z-index: 2;
}

.split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 72px;
    align-items: center;
}

.split img {
    width: 100%;
    height: 360px;
    object-fit: cover;
    border-radius: 12px;
}

.eyebrow {
    color: var(--brand);
    font-size: 14px;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin: 0 0 12px 0;
}

.section h2 {
    font-size: 36px;
    margin: 0 0 20px 0;
}

.section h2.h-sm {
    font-size: 28px;
    margin-bottom: 48px;
}

.lede {
    font-size: 17px;
    line-height: 1.7;
    color: var(--body);
    margin: 0 0 18px 0;
}

.lede:last-child {
    margin-bottom: 0;
}

.note {
    font-size: 15px;
    color: var(--muted);
    margin: 0;
}

.section-intro {
    text-align: center;
    max-width: 640px;
    margin: 0 auto 64px auto;
}

.section-intro h2 {
    margin-bottom: 0;
}

/* Navigation --------------------------------------------------------- */

.nav {
    position: sticky;
    top: 0;
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 16px var(--gutter);
    background: rgba(251, 251, 253, 0.92);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--rule);
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.nav-brand img {
    height: 36px;
    width: auto;
}

.nav-brand span {
    font-size: 18px;
    color: var(--brand);
    letter-spacing: 0.2px;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 24px;
    white-space: nowrap;
}

.nav-links a {
    font-size: 15px;
    color: var(--ink);
}

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

.nav-links a.nav-cta,
.nav-links a.nav-cta.is-active {
    padding: 10px 22px;
    background: var(--brand);
    color: #fff;
    border-radius: 999px;
}

.nav-links a.nav-cta:hover {
    background: var(--brand-dark);
}

.nav-lang {
    font-size: 14px;
    color: var(--muted);
    border-left: 1px solid var(--rule);
    padding-left: 24px;
}

.nav-toggle {
    display: none;
    background: none;
    border: 0;
    padding: 8px;
    cursor: pointer;
    color: var(--brand);
}

/* Hero --------------------------------------------------------------- */

.hero {
    position: relative;
    background: var(--hero);
    overflow: hidden;
}

.hero-mark {
    position: absolute;
    pointer-events: none;
    width: auto;
}

.hero-home {
    clip-path: polygon(0 0, 100% 0, 100% 60%, 0 92%);
    padding: 0 0 140px 0;
    min-height: 640px;
}

.hero-home .hero-mark {
    right: -60px;
    top: 50%;
    transform: translateY(-50%);
    height: 640px;
    opacity: 0.9;
}

.hero-home .wrap {
    position: relative;
    padding-top: 120px;
}

.hero-home-copy {
    max-width: 620px;
}

.hero-page {
    clip-path: polygon(0 0, 100% 0, 100% 78%, 0 100%);
    padding: 140px 0 90px 0;
}

.hero-page .hero-mark {
    right: -40px;
    top: -40px;
    height: 340px;
    opacity: 0.5;
}

.hero-page .wrap {
    position: relative;
}

.hero-eyebrow {
    color: var(--accent);
    font-size: 14px;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin: 0 0 14px 0;
}

.hero h1 {
    color: #fff;
    margin: 0 0 20px 0;
    font-size: 48px;
}

.hero-home h1 {
    font-size: 64px;
    line-height: 1.05;
    margin-bottom: 24px;
}

.hero p.hero-sub {
    font-size: 18px;
    line-height: 1.6;
    color: var(--deep-text);
    max-width: 640px;
    margin: 0;
}

.hero-home p.hero-sub {
    font-size: 19px;
    margin-bottom: 36px;
}

.hero p.hero-sub:empty {
    display: none;
}

.hero-actions {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

/* Buttons ------------------------------------------------------------ */

.btn {
    display: inline-block;
    padding: 14px 30px;
    border-radius: 999px;
    font-size: 16px;
    border: 1px solid transparent;
    font-family: inherit;
    cursor: pointer;
}

.btn-accent {
    background: var(--accent);
    color: #1c1f4d;
}

.btn-accent:hover {
    background: #fff;
    color: #1c1f4d;
}

.btn-ghost {
    border-color: rgba(255, 255, 255, 0.4);
    color: #fff;
}

.btn-ghost:hover {
    border-color: #fff;
    color: #fff;
}

.btn-brand {
    background: var(--brand);
    color: #fff;
}

.btn-brand:hover {
    background: var(--brand-dark);
    color: #fff;
}

/* Bullet list -------------------------------------------------------- */

.bullets {
    display: grid;
    gap: 18px;
    margin-top: 32px;
}

.bullet {
    display: flex;
    gap: 14px;
    align-items: flex-start;
}

.bullet::before {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--brand);
    margin-top: 8px;
    flex-shrink: 0;
}

.bullet p {
    margin: 0;
    font-size: 16px;
}

/* Value / principle rows --------------------------------------------- */

.rows {
    display: grid;
    gap: 48px;
}

.row-item {
    display: flex;
    gap: 28px;
    align-items: flex-start;
}

.row-item svg {
    flex-shrink: 0;
}

.row-item h3 {
    font-size: 20px;
    margin: 0 0 10px 0;
}

.row-item p {
    font-size: 16px;
    line-height: 1.7;
    color: var(--body);
    margin: 0;
}

/* Value trio (home) -------------------------------------------------- */

.trio {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 56px;
}

.trio-item {
    text-align: center;
}

.trio-item svg {
    margin-bottom: 20px;
}

.trio-item h3 {
    font-size: 20px;
    margin: 0 0 10px 0;
}

.trio-item p {
    font-size: 15px;
    color: #666;
    line-height: 1.6;
    margin: 0;
}

/* Cards -------------------------------------------------------------- */

.cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
}

.cards-2 {
    grid-template-columns: repeat(2, 1fr);
    max-width: 840px;
    margin: 40px auto 0 auto;
}

.card {
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
}

.card img {
    width: 100%;
    height: 180px;
    object-fit: cover;
}

.card-body {
    padding: 26px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.card-pad {
    padding: 32px;
}

.card h3 {
    font-size: 19px;
    margin: 0 0 10px 0;
}

.card-pad h3 {
    font-size: 21px;
    margin-bottom: 8px;
}

.card p {
    font-size: 15px;
    line-height: 1.6;
    color: #555;
    margin: 0 0 14px 0;
}

.card-tagline {
    font-size: 14px;
    color: var(--muted);
    margin: 0 0 16px 0;
}

.card-result {
    font-size: 14px;
    color: var(--brand);
    margin: 0;
}

.card-link {
    margin-top: auto;
    font-size: 15px;
}

/* CTA banner --------------------------------------------------------- */

.cta {
    background: var(--brand);
    padding: 80px 0;
}

.cta .wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 24px;
}

.cta h2 {
    font-size: 34px;
    color: #fff;
    margin: 0;
}

.cta .btn {
    padding: 16px 34px;
    flex-shrink: 0;
}

/* Forms -------------------------------------------------------------- */

.form-card {
    background: var(--tint);
    border-radius: 12px;
    padding: 40px;
}

.field {
    margin-bottom: 22px;
}

.field label {
    display: block;
    font-size: 14px;
    color: var(--body);
    margin-bottom: 8px;
}

.field input,
.field select,
.field textarea {
    width: 100%;
    padding: 14px 16px;
    border-radius: 8px;
    border: 1px solid #d8d9ea;
    font-size: 16px;
    background: #fff;
    font-family: inherit;
    color: var(--ink);
}

.field textarea {
    resize: vertical;
}

.field-pair {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 22px;
}

/* City / state / zip. */
.field-trio {
    display: grid;
    grid-template-columns: 2fr 1.2fr 1fr;
    gap: 22px;
}

/* File picker: a button-style label joined to the native "no file chosen"
   text. The browser's own button is hidden so the label drives the input. */
.custom-file-button {
    display: flex;
    align-items: stretch;
    border: 1px solid #d8d9ea;
    border-radius: 8px;
    background: #fff;
    overflow: hidden;
}

.custom-file-button .input-group-text {
    display: flex;
    align-items: center;
    margin: 0;
    padding: 14px 18px;
    background: #eef0f4;
    border-right: 1px solid #d8d9ea;
    color: var(--ink);
    font-size: 15px;
    white-space: nowrap;
    cursor: pointer;
}

.custom-file-button:hover .input-group-text {
    background: #dde0e3;
}

/* Beats the !important margin in the page's own inline <style>. */
.field .custom-file-button input[type="file"] {
    flex: 1;
    min-width: 0;
    margin: 0 !important;
    border: 0;
    border-radius: 0;
    background: transparent;
    cursor: pointer;
}

.custom-file-button input[type="file"]::file-selector-button {
    display: none;
}

.custom-file-button input[type="file"]::-webkit-file-upload-button {
    display: none;
}

/* Modal dialog ------------------------------------------------------- */

/* Native <dialog> centres itself in the viewport when opened with
   showModal(), and gives us Esc-to-close and focus trapping for free. */
.dialog {
    width: 85%;
    border: 0;
    border-radius: 12px;
    padding: 0;
    background: #fff;
    color: var(--ink);
    box-shadow: 0 24px 60px rgba(20, 22, 42, 0.28);
}

.dialog::backdrop {
    background: rgba(20, 22, 42, 0.55);
}

/* Stop the page behind the dialog from scrolling while it is open. */
body:has(dialog[open]) {
    overflow: hidden;
}

.dialog-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    padding: 28px 32px 0 32px;
}

.dialog-head h2 {
    margin: 0;
    font-size: 24px;
    font-weight: 400;
}

.dialog-close {
    flex-shrink: 0;
    border: 0;
    background: transparent;
    color: var(--muted);
    font-size: 30px;
    line-height: 1;
    padding: 0 4px;
    cursor: pointer;
    font-family: inherit;
}

.dialog-close:hover {
    color: var(--ink);
}

.dialog-body {
    padding: 12px 32px;
    max-height: 60vh;
    overflow-y: auto;
}

.dialog-body p,
.dialog-body li {
    font-size: 16px;
    line-height: 1.7;
    color: var(--body);
}

.dialog-foot {
    display: flex;
    justify-content: flex-end;
    padding: 12px 32px 28px 32px;
}

/* A control that reads as a link but behaves as a button. */
.link-button {
    background: none;
    border: 0;
    padding: 0;
    font: inherit;
    color: var(--brand);
    cursor: pointer;
}

.link-button:hover {
    color: var(--brand-dark);
}

.error {
    color: #b3261e;
    font-size: 14px;
    margin-top: 6px;
}

.error:empty {
    display: none;
}

.form-card .btn {
    width: 100%;
    padding: 16px;
}

.captcha {
    margin-bottom: 22px;
}

/* Contact detail column ---------------------------------------------- */

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1.3fr;
    gap: 72px;
}

.contact-label {
    font-size: 15px;
    color: var(--muted);
    margin: 0 0 4px 0;
}

.contact-value {
    font-size: 20px;
    color: var(--ink);
    margin: 0 0 24px 0;
}

.contact-value:last-child {
    margin-bottom: 0;
}

.contact-value span {
    color: var(--muted);
    font-size: 14px;
}

/* Long-form prose (privacy, copyright, careers intro) ----------------- */

.prose {
    max-width: 900px;
    margin: 0 auto;
    padding: 100px var(--gutter);
}

.prose h1 {
    font-size: 36px;
    margin: 0 0 24px 0;
}

.prose h2 {
    font-size: 24px;
    margin: 40px 0 12px 0;
}

.prose h3 {
    font-size: 19px;
    margin: 32px 0 10px 0;
}

.prose p,
.prose li {
    font-size: 16px;
    line-height: 1.7;
    color: var(--body);
}

.prose table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    font-size: 15px;
}

.prose th,
.prose td {
    border: 1px solid var(--rule);
    padding: 10px 12px;
    text-align: left;
    vertical-align: top;
}

/* Footer ------------------------------------------------------------- */

.site-footer {
    background: var(--deep);
    color: var(--deep-text);
    padding: 72px 0 32px 0;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.3fr 1fr 1fr;
    gap: 48px;
    padding-bottom: 48px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    margin-bottom:1rem;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.footer-brand img {
    height: 32px;
    width: auto;
}

.footer-brand span {
    font-size: 17px;
    color: var(--accent);
}

.site-footer p {
    font-size: 15px;
    margin: 0 0 6px 0;
}

.footer-phone {
    font-size: 18px;
    color: #fff;
    margin: 0;
}

.footer-phone span {
    color: #8688b0;
    font-size: 14px;
}

.site-footer h4 {
    font-size: 14px;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: #fff;
    margin: 0 0 16px 0;
}

.footer-links {
    display: grid;
    gap: 10px;
}

.footer-links a {
    color: var(--deep-text);
    font-size: 15px;
}

.footer-links a:hover {
    color: #fff;
}

.footer-legal {
    font-size: 13px;
    color: #7274a0;
    margin: 24px 0 0 0;
}

/* Cookie notice ------------------------------------------------------ */

.privacy-notice {
    position: fixed;
    bottom: 16px;
    left: 16px;
    z-index: 60;
    max-width: 380px;
    background: var(--deep);
    color: var(--deep-text);
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}

.privacy-notice p {
    font-size: 14px;
    line-height: 1.6;
    margin: 0 0 14px 0;
}

.privacy-notice .btn {
    padding: 10px 22px;
    font-size: 15px;
}

/* Responsive --------------------------------------------------------- */

@media (max-width: 960px) {
    :root {
        --gutter: 24px;
    }

    .nav-toggle {
        display: block;
    }

    .nav {
        flex-wrap: wrap;
    }

    .nav-links {
        display: none;
        width: 100%;
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
        padding-top: 12px;
    }

    .nav-links.is-open {
        display: flex;
    }

    .nav-links a {
        padding: 10px 0;
    }

    .nav-lang {
        border-left: 0;
        padding-left: 0;
    }

    .split,
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .split img {
        height: 260px;
    }

    /* Keep the image below the copy on stacked layouts. */
    .split.split-flip img {
        order: 2;
    }

    .cards,
    .cards-2,
    .trio {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .cards-2 {
        margin-top: 32px;
    }

    .section {
        padding: 64px 0;
    }

    .prose {
        padding: 64px var(--gutter);
    }

    .hero-home {
        min-height: 0;
        padding-bottom: 100px;
        clip-path: polygon(0 0, 100% 0, 100% 88%, 0 100%);
    }

    .hero-home .wrap {
        padding-top: 72px;
    }

    .hero-home h1 {
        font-size: 42px;
    }

    .hero-page {
        padding: 72px 0 64px 0;
        clip-path: polygon(0 0, 100% 0, 100% 90%, 0 100%);
    }

    .hero h1 {
        font-size: 34px;
    }

    .hero-mark {
        display: none;
    }

    .section h2 {
        font-size: 28px;
    }

    .cta h2 {
        font-size: 26px;
    }

    .row-item {
        gap: 18px;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .form-card {
        padding: 24px;
    }

    .field-pair,
    .field-trio {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .dialog {
        width: calc(100% - 24px);
    }

    .dialog-head,
    .dialog-body,
    .dialog-foot {
        padding-left: 20px;
        padding-right: 20px;
    }

    .privacy-notice {
        left: 12px;
        right: 12px;
        bottom: 12px;
        max-width: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
}
