/* ==========================================================================
   3D Zebra stylesheet
   Plain CSS on purpose: no build step, nothing to install, nothing to break.

   Colors come straight from the brand book (October 2021):
     primary   dark blue #023047, white, greys #D1D1D1 / #A3A3A3
     secondary sky #8ECAE6, teal #219DBC, amber #FFB703, orange #FB8600

   THEMING: every color used below is a semantic token defined in the two
   blocks that follow - light values in :root, dark overrides in the
   prefers-color-scheme media query. The site follows the visitor's OS
   setting automatically; there is no JavaScript involved. Dark mode is the
   brand book's other canonical treatment: white text on the dark blue.
   To restyle anything, change tokens here - never hardcode colors in rules.
   ========================================================================== */

:root {
    /* Brand palette (constant across themes) */
    --ink: #023047; /* primary dark blue */
    --sky: #8ecae6;
    --teal: #219dbc;
    --teal-dark: #1a7e96;
    --amber: #ffb703;
    --orange: #fb8600;
    --grey-light: #d1d1d1;
    --grey-mid: #a3a3a3;

    /* Semantic tokens - LIGHT theme */
    --bg: #ffffff;
    --surface: #f2f6f8; /* illustration placeholders, panels */
    --heading: #111111;
    --text: #333a40;
    --text-muted: #5c666e;
    --border: #eeeeee; /* hairlines (header/footer rules) */
    --border-strong: var(--grey-light); /* cards, inputs */
    --link: var(--teal);
    --brand: var(--ink); /* wordmark: dark blue on light... */
    --price: var(--orange);
    --error: #b3261e;

    /* Layout */
    --container: 72rem;
    --radius: 0.375rem;

    font-family: "Gotham", "Montserrat", "Noto Sans JP", system-ui, sans-serif;
    /* Native widgets (selects, file inputs, scrollbars) follow the theme. */
    color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
    :root {
        /* Semantic tokens - DARK theme (brand dark blue background) */
        --bg: #023047;
        --surface: #0b3e5c; /* the dark blue, one step lighter */
        --heading: #ffffff;
        --text: #d7e3ea;
        --text-muted: #9fb8c5;
        --border: rgba(255, 255, 255, 0.14);
        --border-strong: rgba(255, 255, 255, 0.28);
        --link: var(--sky); /* per brand book: blue/white on dark blue */
        --brand: #ffffff; /* ...and white on dark (brand book rule) */
        --error: #ffb4ab;
    }
}

/* Fontastic */
@font-face {
    font-family: 'Gotham';
    src: url('../fonts/GOTHAM-THIN.woff') format('woff');
    font-weight: 100;
    font-style: normal;
}

@font-face {
    font-family: 'Gotham';
    src: url('../fonts/GOTHAM-XLIGHT.woff') format('woff');
    font-weight: 200;
    font-style: normal;
}

@font-face {
    font-family: 'Gotham';
    src: url('../fonts/GOTHAM-LIGHT.woff') format('woff');
    font-weight: 300;
    font-style: normal;
}

@font-face {
    font-family: 'Gotham';
    src: url('../fonts/GOTHAM-MEDIUM.woff') format('woff');
    font-weight: 500;
    font-style: normal;
}

@font-face {
    font-family: 'Gotham';
    src: url('../fonts/GOTHAM-BOLD.woff') format('woff');
    font-weight: 700;
    font-style: normal;
}

@font-face {
    font-family: 'Gotham';
    src: url('../fonts/GOTHAM-ULTRA.woff') format('woff');
    font-weight: 800;
    font-style: normal;
}

@font-face {
    font-family: 'Gotham';
    src: url('../fonts/GOTHAM-BLACK.woff') format('woff');
    font-weight: 900;
    font-style: normal;
}


/* --- Reset-ish ---------------------------------------------------------- */
*, *::before, *::after {
    box-sizing: border-box;
}

body {
    margin: 0;
    color: var(--text);
    background: var(--bg);
    line-height: 1.6;
}

img {
    max-width: 100%;
    display: block;
}

h1, h2, h3 {
    color: var(--heading);
    line-height: 1.2;
    margin: 0 0 0.5em;
}

h1 {
    font-size: 2.5rem;
    font-weight: 700;
}

h2 {
    font-size: 1.75rem;
    font-weight: 700;
}

h3 {
    font-size: 1rem;
    font-weight: 700;
}

a {
    color: var(--link);
}

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

.container {
    max-width: var(--container);
    margin-inline: auto;
    padding-inline: clamp(1rem, 4vw, 1.5rem);
}

/* --- Buttons ------------------------------------------------------------ */
.btn {
    display: inline-block;
    padding: 0.6rem 1.4rem;
    border: 0;
    border-radius: var(--radius);
    font: inherit;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
}

/* Teal on white text passes contrast on both themes - buttons stay stable. */
.btn--primary {
    background: var(--teal);
    color: #fff;
}

.btn--primary:hover {
    background: var(--teal-dark);
}

.btn--secondary {
    background: var(--grey-light);
    color: var(--ink);
}

.btn--amber {
    background: var(--amber);
    color: var(--ink);
}

.btn--small {
    padding: 0.35rem 1rem;
    font-size: 0.9rem;
}

/* --- Header / footer ------------------------------------------------------ */
.site-header {
    border-bottom: 1px solid var(--border);
}

.site-header__inner {
    display: flex;
    flex-wrap: wrap; /* nav drops below the wordmark when cramped */
    align-items: center;
    justify-content: space-between;
    padding-block: 1rem;
    gap: 0.5rem 1.5rem; /* row-gap for the wrapped state, column-gap otherwise */
}

.wordmark {
    display: inline-flex;
    align-items: center;
    gap: 0.5em;
    font-size: clamp(1.15rem, 3.5vw, 1.6rem);
    letter-spacing: 0.06em;
    text-decoration: none;
    color: var(--brand);
    font-weight: 300;
}

.logo {
    display: block;
    height: 3.4em;
    width: auto;
    flex-shrink: 0;
}

.site-nav {
    display: flex;
    align-items: center;
    flex-wrap: wrap; /* links themselves may wrap too */
    gap: clamp(0.75rem, 2.5vw, 1.5rem); /* breathing room shrinks fluidly */
}

.site-nav a {
    color: var(--text);
    text-decoration: none;
    font-weight: 500;
}

.site-nav a.btn {
    color: #fff;
}

.site-footer {
    border-top: 1px solid var(--border);
    margin-top: 5rem;
    padding-block: 3rem;
}

.site-footer__inner {
    display: flex;
    flex-wrap: wrap;
    gap: 3rem;
}

.site-footer__brand {
    font-weight: 700;
    color: var(--brand);
    flex: 1 1 12rem;
}

.lang-switch {
    margin-top: 0.75rem;
    display: flex;
    gap: 0.5rem;
}

.lang-switch button {
    background: none;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius);
    padding: 0.2rem 0.6rem;
    font: inherit;
    font-size: 0.8rem;
    font-weight: 400;
    color: var(--text-muted);
    cursor: pointer;
}

.lang-switch button[aria-current="true"] {
    border-color: var(--brand);
    color: var(--brand);
    font-weight: 700;
}

.site-footer__col {
    display: grid;
    gap: 0.4rem;
    align-content: start;
}

.site-footer__col h3 {
    font-size: 0.9rem;
    margin: 0 0 0.25rem;
}

.site-footer__col a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
}

.site-footer__col a:hover {
    text-decoration: underline;
}

/* --- Homepage sections ---------------------------------------------------- */
.hero {
    display: grid;
    gap: 2rem;
    align-items: center;
    padding-block: 3rem;
}

@media (min-width: 50rem) {
    .hero {
        grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
    }
}

.hero__figure {
    background: var(--bg);
    aspect-ratio: 4 / 3;
    display: grid;
    place-items: center;
    color: #fff;
    font-weight: 700;
    overflow: hidden;
}

.hero__figure img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero__copy {
    text-align: right;
    display: grid;
    gap: 1rem;
    justify-items: end;
}

.hero__copy p {
    color: var(--text-muted);
    margin: 0;
}

.section {
    padding-block: 2.5rem;
}

.card-grid {
    display: grid;
    gap: 2rem;
}

@media (min-width: 50rem) {
    .card-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.card h3 a {
    color: var(--link);
}

.card p {
    color: var(--text-muted);
    margin: 0.4rem 0 0;
}

.split {
    display: grid;
    gap: 2.5rem;
    align-items: center;
}

@media (min-width: 50rem) {
    .split {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    }
}

.split__figure {
    background: var(--surface);
    border-radius: var(--radius);
    aspect-ratio: 4 / 3;
    display: grid;
    place-items: center;
    color: var(--text-muted);
    overflow: hidden;
}

/* Inline SVGs are not <images>, so the images reset never touches them: size them
   here or they render at their file's fixed width and lock the grid track.
   100%/100% fills the 4:3 figure; the SVG's own preserveAspectRatio
   letterboxes the artwork inside without distortion. */
.split__figure svg {
    display: block;
    width: 100%;
    height: 100%;
}

.split__figure img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.split__body {
    display: grid;
    gap: 1.25rem;
    justify-items: start;
}

.button-row {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.review-card {
    border: 1px solid var(--border-strong);
    border-radius: var(--radius);
    padding: 1.5rem;
    display: grid;
    gap: 2.5rem;
    align-content: space-between;
}

.review-card blockquote {
    margin: 0;
    font-weight: 700;
    color: var(--heading);
}

.review-card figcaption {
    font-size: 0.85rem;
}

.review-card .reviewer-role {
    color: var(--text-muted);
}

/* --- Ordering flow --------------------------------------------------------- */
.flow {
    padding-block: 3rem;
    max-width: 56rem;
    margin-inline: auto;
}

.flow__step {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 0.25rem;
}

.flow__head {
    display: flex;
    justify-content: space-between;
    align-items: start;
    gap: 1rem;
}

.price {
    color: var(--price);
    font-size: 2rem;
    font-weight: 500;
    text-align: right;
}

.price small {
    display: block;
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 400;
}

.dropzone {
    border: 1px solid var(--border-strong);
    border-radius: var(--radius);
    padding: 4rem 2rem;
    margin-block: 2rem;
    display: grid;
    gap: 1rem;
    justify-items: center;
}

.dropzone label strong {
    color: var(--heading);
}

.dropzone input[type="url"] {
    width: min(20rem, 100%);
    padding: 0.5rem 0.75rem;
    border: 2px solid var(--teal);
    border-radius: var(--radius);
    font: inherit;
    background: var(--bg);
    color: var(--text);
}

.dropzone .hint {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.option-group {
    margin-block: 1.5rem;
}

.option-group > legend, .option-group > label {
    font-weight: 700;
    color: var(--heading);
}

.option-group ul {
    list-style: none;
    padding: 0;
    margin: 0.5rem 0 0;
    display: grid;
    gap: 0.5rem;
}

.option-group select {
    font: inherit;
    padding: 0.4rem;
    border-radius: var(--radius);
}

.errorlist {
    color: var(--error);
    list-style: none;
    padding: 0;
}

.flow__actions {
    display: flex;
    justify-content: space-between;
    margin-top: 2rem;
}

.flow__actions:has(> :only-child) {
    justify-content: flex-end;
}

.summary-table {
    border-collapse: collapse;
    width: 100%;
    margin-block: 1.5rem;
}

.summary-table th {
    text-align: left;
    padding: 0.6rem 1rem 0.6rem 0;
    color: var(--heading);
}

.summary-table td {
    padding: 0.6rem 0;
    color: var(--text-muted);
}

.summary-table tr + tr {
    border-top: 1px solid var(--border);
}

/* Respect users who prefer less motion (we have no animations yet, but
   any future ones should live behind this guard). */
@media (prefers-reduced-motion: reduce) {
    * {
        animation: none !important;
        transition: none !important;
    }
}

.flow--split {
    max-width: none;
}

.order-layout {
    display: grid;
    gap: 2.5rem;
    align-items: start;
}

@media (min-width: 60rem) {
    .order-layout {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    }

    /* Keep the model in view while scrolling the options/review column. */
    .order-layout .viewer {
        position: sticky;
        top: 1.5rem;
    }
}

.order-details {
    /*color: red;*/
}

.order-details td:nth-of-type(2n) {
    text-align: right;
}

/* The preview stage: dark in both themes on purpose - matches the
   print-options mockup and keeps model lighting predictable. The canvas
   is styled dark even before the renderer starts, so the empty state is
   just the stage with its prompt underneath. */
.viewer__title {
    font-size: 1rem;
}

.viewer canvas {
    display: block;
    width: 100%;
    aspect-ratio: 4 / 3;
    border-radius: var(--radius);
    background: var(--bg);
    outline: var(--border) 1px solid;
}

/* Guard: sections hidden by the step logic must stay hidden even if a
   display rule targets them. */
[hidden] {
    display: none !important;
}
