/* component layer: hero, grids, cards, shop, forms, legal */

/* offset frame in accent around rectangular photos (no radius anywhere up the tree) */
.frame-photo {
    isolation: isolate;
    margin: 0 var(--zq-shift) var(--zq-shift) 0;
    position: relative;
}

.frame-photo::before {
    border: 3px solid var(--zq-zircon-line);
    content: '';
    inset: 0;
    position: absolute;
    transform: translate(var(--zq-shift), var(--zq-shift));
    z-index: -1;
}

.frame-photo img {
    border: var(--zq-line) solid var(--zq-seam);
    width: 100%;
}

.panel {
    background: var(--zq-field);
    border: var(--zq-line) solid var(--zq-seam);
    box-shadow: var(--zq-shift) var(--zq-shift) 0 var(--zq-seam);
    color: var(--zq-loam);
    margin-bottom: var(--zq-gap-note);
    padding: 26px;
}

.chip {
    border: var(--zq-line) solid var(--zq-seam);
    border-radius: 4px;
    display: inline-block;
    font-family: var(--zq-mono);
    font-size: 0.82rem;
    letter-spacing: 0.08em;
    padding: 6px 10px;
    text-transform: uppercase;
}

.fact-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    list-style: none;
    margin: 28px 0 0;
    padding: 0;
}

.sec-head {
    border-bottom: var(--zq-line) solid currentColor;
    margin-bottom: 36px;
    padding-bottom: 14px;
}

.sec-head h2 {
    margin: 0;
}

.sec-head p {
    margin: 12px 0 0;
    max-width: 720px;
}

.more-link {
    font-family: var(--zq-grotesk);
    font-weight: 700;
    margin: 28px 0 0;
}

.more-link a {
    display: inline-block;
    padding: 10px 0;
}

/* hero: giant watermark behind, photo left, text right */
.hero {
    overflow: hidden;
    padding-bottom: 64px;
    padding-top: 48px;
    position: relative;
}

.hero-mark {
    color: var(--zq-zircon-mist);
    font-family: var(--zq-grotesk);
    font-size: clamp(4.5rem, 17vw, 15rem);
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 0.8;
    margin: 0;
    pointer-events: none;
    position: absolute;
    right: 16px;
    top: 4px;
    user-select: none;
    white-space: nowrap;
    z-index: 0;
}

.hero-grid {
    align-items: center;
    display: grid;
    gap: 56px;
    grid-template-columns: 5fr 7fr;
    position: relative;
    z-index: 1;
}

.hero-photo {
    margin-top: 40px;
}

.hero-title {
    font-size: clamp(2.6rem, 5.2vw, 6.5rem);
    letter-spacing: -0.015em;
    line-height: 0.98;
    margin-bottom: 26px;
}

.hero-lead {
    font-size: 1.2rem;
    margin-bottom: 30px;
    max-width: 620px;
}

/* category tiles: visible cell borders, sharp hover */
.tile-grid {
    border-left: var(--zq-line) solid var(--zq-seam);
    border-top: var(--zq-line) solid var(--zq-seam);
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    list-style: none;
    margin: 0;
    padding: 0;
}

.tile {
    background: var(--zq-field);
    border-bottom: var(--zq-line) solid var(--zq-seam);
    border-right: var(--zq-line) solid var(--zq-seam);
    color: var(--zq-loam);
    display: grid;
    gap: 6px;
    min-height: 168px;
    padding: 22px 24px;
    text-decoration: none;
}

.tile:hover {
    background: var(--zq-night);
    color: var(--zq-field);
}

.tile-num {
    color: var(--zq-zircon);
    font-family: var(--zq-mono);
    font-size: 0.9rem;
    letter-spacing: 0.14em;
}

.tile:hover .tile-num {
    color: var(--zq-zircon-glow);
}

.tile-name {
    align-self: end;
    font-family: var(--zq-grotesk);
    font-size: 1.6rem;
    font-weight: 700;
    line-height: 1.1;
}

.tile-price {
    font-family: var(--zq-mono);
    font-size: 0.95rem;
}

.tile-alt {
    background: var(--zq-zircon);
    color: #fff;
}

.tile-alt .tile-num {
    color: #fff;
}

/* inverted block: numbered fact cells */
.fact-grid {
    border-left: var(--zq-line) solid #4a5263;
    border-top: var(--zq-line) solid #4a5263;
    counter-reset: none;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    list-style: none;
    margin: 0;
    padding: 0;
}

.fact-cell {
    border-bottom: var(--zq-line) solid #4a5263;
    border-right: var(--zq-line) solid #4a5263;
    padding: 26px 22px 30px;
}

.fact-cell p {
    color: #d5d8df;
    margin: 0;
}

.fact-num {
    color: var(--zq-zircon-glow);
    display: block;
    font-family: var(--zq-grotesk);
    font-size: 3.6rem;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 18px;
}

/* product cards: offset frame shifted on hover */
.card-list {
    display: grid;
    gap: 34px 30px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    list-style: none;
    margin: 0;
    padding: 0;
}

.product-card {
    isolation: isolate;
    margin: 0 var(--zq-shift) var(--zq-shift) 0;
    position: relative;
}

.product-card::before {
    border: var(--zq-line) solid var(--zq-seam);
    content: '';
    inset: 0;
    position: absolute;
    transform: translate(var(--zq-shift), var(--zq-shift));
    transition: transform 0.12s;
    z-index: -1;
}

.product-card:hover::before {
    border-color: var(--zq-zircon);
    transform: translate(3px, 3px);
}

.card-link {
    background: var(--zq-field);
    border: var(--zq-line) solid var(--zq-seam);
    color: var(--zq-loam);
    display: grid;
    gap: 4px;
    height: 100%;
    padding: 0 0 16px;
    text-decoration: none;
}

.card-link img {
    border-bottom: var(--zq-line) solid var(--zq-seam);
    margin-bottom: 10px;
    width: 100%;
}

.card-cat,
.card-meta,
.card-name,
.card-price {
    padding: 0 16px;
}

.card-cat {
    color: var(--zq-thread);
    font-family: var(--zq-mono);
    font-size: 0.78rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.card-name {
    font-family: var(--zq-grotesk);
    font-size: 1.12rem;
    font-weight: 700;
    line-height: 1.2;
}

.card-meta {
    color: var(--zq-thread);
    font-size: 0.95rem;
}

.card-price {
    align-self: end;
    color: var(--zq-zircon);
    font-family: var(--zq-mono);
    font-size: 1.05rem;
    font-weight: 700;
}

.card-link:hover .card-name {
    text-decoration: underline;
}

/* svg path: order route */
.route {
    position: relative;
}

.route-line {
    display: block;
    height: 120px;
    margin-bottom: -60px;
    width: 100%;
}

.route-line path {
    fill: none;
    stroke: var(--zq-zircon);
    stroke-dasharray: 14 10;
    stroke-width: 4;
}

.route-steps {
    display: grid;
    gap: 24px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    list-style: none;
    margin: 0;
    padding: 26px 0 0; /* room for the dots that sit on the top border */
    position: relative;
}

.route-step {
    background: var(--zq-field);
    border: var(--zq-line) solid var(--zq-seam);
    padding: 0 20px 22px;
}

.step-dot {
    background: var(--zq-zircon);
    border: var(--zq-line) solid var(--zq-seam);
    border-radius: 999px;
    color: #fff;
    display: grid;
    font-family: var(--zq-grotesk);
    font-size: 1.3rem;
    font-weight: 700;
    height: 52px;
    margin: -27px 0 14px;
    place-items: center;
    width: 52px;
}

.step-time {
    color: var(--zq-zircon);
    font-family: var(--zq-mono);
    font-size: 0.85rem;
    letter-spacing: 0.1em;
    margin: 0 0 6px;
    text-transform: uppercase;
}

.route-step p {
    margin: 0;
}

.route-foot {
    margin: 40px 0 0;
}

/* interactive garment plan */
.plan {
    align-items: start;
    display: grid;
    gap: 56px;
    grid-template-columns: 6fr 5fr;
}

.plan-figure {
    margin-left: auto;
    max-width: min(480px, 46vh); /* 3:4 photo stays under ~62vh tall */
}

.plan-pin {
    background: var(--zq-zircon);
    border: var(--zq-line) solid var(--zq-seam);
    border-radius: 999px;
    color: #fff;
    cursor: pointer;
    font-family: var(--zq-grotesk);
    font-weight: 700;
    height: 44px;
    position: absolute;
    transform: translate(-50%, -50%);
    width: 44px;
}

.plan-pin:hover,
.plan-pin.visible-now {
    background: var(--zq-night);
    outline: 3px solid var(--zq-zircon-glow);
}

.plan-notes {
    border-top: var(--zq-line) solid var(--zq-seam);
    list-style: none;
    margin: 24px 0 0;
    padding: 0;
}

.plan-note {
    border-bottom: var(--zq-line) solid var(--zq-seam);
    display: grid;
    gap: 14px;
    grid-template-columns: 40px 1fr;
    padding: 14px 10px;
}

.plan-note.visible-now {
    background: var(--zq-night);
    color: var(--zq-field);
}

.plan-note p {
    margin: 0;
}

.plan-num {
    color: var(--zq-zircon);
    font-family: var(--zq-grotesk);
    font-size: 1.6rem;
    font-weight: 700;
    line-height: 1;
}

.plan-note.visible-now .plan-num {
    color: var(--zq-zircon-glow);
}

/* people */
.people-grid {
    display: grid;
    gap: 48px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.person figure {
    margin: 0 var(--zq-shift) calc(var(--zq-gap-note) + 8px) 0;
}

.person p {
    margin: 0;
}

.cta-inner {
    display: grid;
    gap: 32px;
    grid-template-columns: 2fr 1fr;
}

.cta-inner p {
    font-size: 1.15rem;
    margin: 0;
}

.cta-inner .btn {
    align-self: center;
    justify-self: end;
}

/* inner page head: same structure everywhere so the h1 sits at the same height */
.page-head {
    border-bottom: var(--zq-line) solid var(--zq-seam);
    padding-bottom: 40px;
    padding-top: 56px;
}

.page-title {
    font-size: clamp(2.4rem, 4.6vw, 4.2rem);
    letter-spacing: -0.01em;
    margin-bottom: 14px;
}

.page-lead {
    font-size: 1.15rem;
    margin: 0;
    max-width: 760px;
}

.head-chips {
    margin-top: 22px;
}

.head-chips a {
    align-items: center;
    display: inline-flex;
    min-height: 44px;
}

/* legal and info pages */
.legal-layout {
    display: grid;
    gap: 36px;
    grid-template-columns: minmax(0, 1fr);
}

/* toc as one bordered row of numbered cells */
.legal-toc {
    background: var(--zq-furrow);
    border: var(--zq-line) solid var(--zq-seam);
    padding: 10px 14px;
}

.legal-toc ol {
    display: flex;
    flex-wrap: wrap;
    gap: 0 34px;
    margin: 0;
    padding-left: 20px;
}

.legal-toc a {
    display: inline-block;
    padding: 10px 0;
}

.legal-body h2 {
    border-top: var(--zq-line) solid var(--zq-seam);
    font-size: clamp(1.5rem, 2.4vw, 2rem);
    padding-top: 20px;
    scroll-margin-top: 16px;
}

.legal-body > * + h2 {
    margin-top: 44px;
}

.table-scroll {
    margin-bottom: var(--zq-gap-note);
    overflow-x: auto;
}

.data-table {
    background: var(--zq-field);
    border: var(--zq-line) solid var(--zq-seam);
}

.data-table caption {
    font-family: var(--zq-grotesk);
    font-weight: 700;
    padding: 0 0 10px;
    text-align: left;
}

.data-table th,
.data-table td {
    border: 1px solid var(--zq-seam);
    padding: 10px 14px;
    text-align: left;
    vertical-align: top;
}

.data-table thead th {
    background: var(--zq-night);
    color: var(--zq-field);
    font-family: var(--zq-grotesk);
}

.data-table tbody th {
    background: var(--zq-furrow);
    font-family: var(--zq-grotesk);
    width: 32%;
}

.size-table {
    min-width: 560px;
}

.size-table tbody th {
    width: auto;
}

/* two-column fact table only: long tokens may break */
.facts-table td {
    overflow-wrap: anywhere;
}

.term-grid {
    display: grid;
    gap: 30px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    list-style: none;
    margin: 0 0 var(--zq-gap-note);
    padding: 0;
}

.term-card {
    background: var(--zq-field);
    border: var(--zq-line) solid var(--zq-seam);
    border-top: 6px solid var(--zq-zircon);
    box-shadow: var(--zq-shift) var(--zq-shift) 0 var(--zq-seam);
    color: var(--zq-loam);
    padding: 22px 22px 18px;
}

/* light cards inside dark bands get the light-band link colour back */
.term-card a,
.panel a:not(.btn) {
    color: var(--zq-zircon);
}

.term-card h3 {
    margin-bottom: 8px;
}

.term-card p:last-child {
    margin-bottom: 0;
}

.term-tag {
    color: var(--zq-thread);
    font-family: var(--zq-mono);
    font-size: 0.78rem;
    letter-spacing: 0.14em;
    margin: 0 0 8px;
    text-transform: uppercase;
}

.model-box {
    background: var(--zq-furrow);
    border: var(--zq-line) dashed var(--zq-seam);
    margin-bottom: var(--zq-gap-note);
    padding: 24px;
}

.model-box p:last-child {
    margin-bottom: 0;
}

/* contact */
.contact-grid {
    align-items: start;
    display: grid;
    gap: 48px;
    grid-template-columns: 5fr 6fr;
}

.contact-info {
    order: -1; /* info left on desktop, form first in the dom for phones */
}

.info-list {
    display: grid;
    gap: 0;
    list-style: none;
    margin: 0 0 var(--zq-gap-note);
    padding: 0;
}

.info-card {
    border: var(--zq-line) solid var(--zq-seam);
    border-bottom-width: 0;
    padding: 16px 18px;
}

.info-card:last-child {
    border-bottom-width: var(--zq-line);
}

.info-card p {
    margin: 0;
}

.info-card a {
    display: inline-block;
    padding: 6px 0;
}

/* forms */
.form-card {
    background: var(--zq-field);
    border: var(--zq-line) solid var(--zq-seam);
    box-shadow: var(--zq-shift) var(--zq-shift) 0 var(--zq-seam);
    margin-bottom: var(--zq-gap-note);
    padding: 28px;
}

.form-card h2 {
    font-size: 1.6rem;
}

.form-grid {
    display: grid;
    gap: 0 20px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.field {
    display: grid;
    gap: 6px;
    margin-bottom: 18px;
}

.field-wide {
    grid-column: 1 / -1;
}

.field label {
    font-family: var(--zq-grotesk);
    font-weight: 700;
}

.field input,
.field select,
.field textarea {
    background: #fff;
    border: var(--zq-line) solid var(--zq-seam);
    border-radius: 0;
    color: var(--zq-loam);
    min-height: 48px;
    padding: 10px 12px;
    width: 100%;
}

.field textarea {
    min-height: 120px;
    resize: vertical;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
    border-color: var(--zq-zircon);
    outline: 3px solid var(--zq-zircon-mist);
}

.field-hint {
    color: var(--zq-thread);
    font-size: 0.9rem;
    margin: 0;
}

.field-error {
    color: var(--zq-zircon-deep);
    font-family: var(--zq-grotesk);
    font-size: 0.95rem;
    font-weight: 700;
    margin: 0;
}

.check-row {
    align-items: flex-start;
    display: flex;
    gap: 12px;
    margin-bottom: 8px;
    min-height: 44px;
}

.check-row input {
    accent-color: var(--zq-zircon);
    flex: none;
    height: 22px;
    margin: 3px 0 0;
    width: 22px;
}

/* honeypot: parked off-screen, not display:none */
.hp-field {
    height: 1px;
    left: -9999px;
    overflow: hidden;
    position: absolute;
    width: 1px;
}

.form-alert {
    background: var(--zq-night);
    border-left: 6px solid var(--zq-zircon-glow);
    color: var(--zq-field);
    margin: 0 0 18px;
    padding: 14px 16px;
}

.form-alert a {
    color: var(--zq-zircon-glow);
}

.form-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 18px;
}

/* product page */
.product-grid {
    align-items: start;
    display: grid;
    gap: 0 56px;
    grid-template-areas: 'photo head' 'photo buy' 'photo desc';
    grid-template-columns: 5fr 6fr;
}

.product-head {
    grid-area: head;
}

.product-photo {
    grid-area: photo;
    max-width: min(520px, 46vh); /* 3:4 photo stays under ~62vh tall */
}

.buy-form {
    grid-area: buy;
    margin-bottom: 32px;
}

.product-desc {
    grid-area: desc;
    min-width: 0;
}

.product-desc h2 {
    font-size: 1.6rem;
}

.product-title {
    font-size: clamp(2rem, 3vw, 2.6rem);
    margin-bottom: 10px;
}

.product-color {
    color: var(--zq-thread);
    margin: 0 0 8px;
}

.product-price {
    color: var(--zq-zircon);
    font-family: var(--zq-grotesk);
    font-size: 2rem;
    font-weight: 700;
    margin: 0 0 20px;
}

.price-tax {
    color: var(--zq-thread);
    font-family: var(--zq-mono);
    font-size: 0.85rem;
    font-weight: 400;
    letter-spacing: 0.08em;
}

.size-set {
    border: 0;
    margin: 0 0 16px;
    padding: 0;
}

.size-set legend {
    font-family: var(--zq-grotesk);
    font-weight: 700;
    margin-bottom: 10px;
    padding: 0;
}

.size-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.size-opt {
    cursor: pointer;
    position: relative;
}

.size-opt input {
    clip: rect(0 0 0 0); /* visually replaced by the span; still focusable */
    height: 1px;
    position: absolute;
    width: 1px;
}

.size-opt input + span {
    align-items: center;
    border: var(--zq-line) solid var(--zq-seam);
    border-radius: 4px;
    display: inline-flex;
    flex-direction: column;
    font-family: var(--zq-grotesk);
    font-weight: 700;
    justify-content: center;
    min-height: 48px;
    min-width: 58px;
    padding: 4px 12px;
}

.size-opt input:checked + span {
    background: var(--zq-night);
    color: var(--zq-field);
}

.size-opt input:focus-visible + span {
    outline: 3px solid var(--zq-zircon);
    outline-offset: 2px;
}

.size-opt input:disabled + span {
    background: var(--zq-furrow);
    border-style: dashed;
    color: var(--zq-thread);
    cursor: not-allowed;
}

.size-out {
    font-family: var(--zq-mono);
    font-size: 0.68rem;
    font-weight: 400;
    letter-spacing: 0.04em;
}

.qty-row {
    align-items: end;
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}

.qty-row .field {
    margin: 0;
    width: 110px;
}

.buy-msg {
    font-family: var(--zq-grotesk);
    font-weight: 700;
    margin: 14px 0 0;
    min-height: 1.6em;
}

.buy-links {
    margin: 10px 0 0;
}

.buy-links a {
    display: inline-block;
    padding: 8px 0;
}

/* shop catalogue */
.filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 36px;
}

.filter-btn {
    background: var(--zq-field);
    border: var(--zq-line) solid var(--zq-seam);
    border-radius: 999px;
    color: var(--zq-loam);
    cursor: pointer;
    font-family: var(--zq-grotesk);
    font-weight: 700;
    min-height: 46px;
    padding: 8px 18px;
}

.filter-btn:hover,
.filter-btn[aria-pressed='true'] {
    background: var(--zq-night);
    color: var(--zq-field);
}

/* bag + checkout */
.bag-grid,
.checkout-grid {
    align-items: start;
    display: grid;
    gap: 48px;
    grid-template-columns: minmax(0, 7fr) minmax(0, 4fr);
}

.bag-lines {
    border-top: var(--zq-line) solid var(--zq-seam);
    list-style: none;
    margin: 0 0 var(--zq-gap-note);
    padding: 0;
}

.bag-line {
    align-items: center;
    border-bottom: var(--zq-line) solid var(--zq-seam);
    display: grid;
    gap: 16px;
    grid-template-columns: 88px minmax(0, 1fr) auto;
    padding: 16px 0;
}

.bag-line img {
    border: var(--zq-line) solid var(--zq-seam);
    width: 88px;
}

.line-name {
    font-family: var(--zq-grotesk);
    font-weight: 700;
}

.line-meta {
    color: var(--zq-thread);
    margin: 2px 0 8px;
}

.line-tools {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.line-tools select {
    background: #fff;
    border: var(--zq-line) solid var(--zq-seam);
    min-height: 44px;
    padding: 6px 10px;
}

.line-remove {
    background: none;
    border: 0;
    color: var(--zq-zircon);
    cursor: pointer;
    min-height: 44px;
    padding: 0 6px;
    text-decoration: underline;
}

.line-total {
    font-family: var(--zq-mono);
    font-weight: 700;
    text-align: right;
}

.sum-list {
    margin: 0 0 16px;
}

.sum-row {
    border-bottom: 1px solid var(--zq-seam);
    display: flex;
    gap: 12px;
    justify-content: space-between;
    padding: 9px 0;
}

.sum-row dt,
.sum-row dd {
    margin: 0;
}

.sum-row dd {
    font-family: var(--zq-mono);
    text-align: right;
}

.sum-total {
    border-bottom: 0;
    font-family: var(--zq-grotesk);
    font-size: 1.25rem;
    font-weight: 700;
}

.sum-note {
    color: var(--zq-thread);
    font-size: 0.95rem;
}

.sum-lines {
    border-bottom: var(--zq-line) solid var(--zq-seam);
    list-style: none;
    margin: 0 0 8px;
    padding: 0 0 8px;
}

.sum-lines li {
    display: flex;
    gap: 10px;
    justify-content: space-between;
    padding: 4px 0;
}

.steps-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    list-style: none;
    margin: 0 0 32px;
    padding: 0;
}

.step-pill {
    border: var(--zq-line) solid var(--zq-seam);
    border-radius: 999px;
    font-family: var(--zq-grotesk);
    font-weight: 700;
    padding: 10px 18px;
}

.step-pill[aria-current='step'] {
    background: var(--zq-night);
    color: var(--zq-field);
}

.review-list {
    border: var(--zq-line) solid var(--zq-seam);
    margin: 0 0 20px;
    padding: 0;
}

.review-list div {
    border-bottom: 1px solid var(--zq-seam);
    display: grid;
    gap: 12px;
    grid-template-columns: 150px minmax(0, 1fr);
    padding: 10px 14px;
}

.review-list div:last-child {
    border-bottom: 0;
}

.review-list dt {
    font-family: var(--zq-grotesk);
    font-weight: 700;
}

.review-list dd {
    margin: 0;
    overflow-wrap: anywhere;
}

.pay-box {
    background: var(--zq-furrow);
    border: var(--zq-line) solid var(--zq-seam);
    margin: 0 0 20px;
    padding: 16px 18px;
}

.pay-box p {
    margin: 6px 0 0;
}

.order-num {
    color: var(--zq-zircon);
    font-family: var(--zq-mono);
    font-size: clamp(1.6rem, 3vw, 2.4rem);
    font-weight: 700;
    letter-spacing: 0.06em;
    margin: 0 0 12px;
}

.status-label {
    background: var(--zq-night);
    border-radius: 999px;
    color: var(--zq-field);
    display: inline-block;
    font-family: var(--zq-grotesk);
    font-weight: 700;
    margin: 0 0 12px;
    padding: 8px 18px;
}

@media (max-width: 1100px) {
    .card-list {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .fact-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 900px) {
    .hero-grid,
    .plan,
    .people-grid,
    .contact-grid,
    .bag-grid,
    .checkout-grid,
    .cta-inner {
        grid-template-columns: minmax(0, 1fr);
    }

    .hero-text {
        order: -1;
    }

    .contact-info {
        order: 0;
    }

    /* phones: link cards go after the plain ones, clear of the consent strip */
    .info-late {
        order: 1;
    }

    .hero-photo {
        margin-top: 0;
        max-width: 640px;
    }

    .plan-figure {
        margin-left: 0;
    }

    .cta-inner .btn {
        justify-self: start;
    }

    .route-line {
        display: none;
    }

    .route-steps {
        gap: 40px 24px;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .tile-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .card-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 700px) {
    /* phone: title, price and button come before the photo */
    .product-grid {
        grid-template-areas: 'head' 'buy' 'photo' 'desc';
        grid-template-columns: minmax(0, 1fr);
    }

    .product-photo {
        margin-bottom: 40px;
    }

    .product-photo img {
        max-height: 60vh;
        object-fit: cover;
    }

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

@media (max-width: 640px) {
    .hero {
        padding-top: 28px;
    }

    .field textarea {
        min-height: 96px;
    }

    .hero-grid {
        gap: 36px;
    }

    .hero-lead {
        font-size: 1.08rem;
    }

    .fact-grid,
    .route-steps {
        grid-template-columns: minmax(0, 1fr);
    }

    .tile {
        min-height: 128px;
        padding: 16px;
    }

    .tile-name {
        font-size: 1.25rem;
    }

    .card-list {
        gap: 28px 18px;
    }

    .card-cat,
    .card-meta,
    .card-name,
    .card-price {
        padding: 0 10px;
    }

    .page-head {
        padding-top: 36px;
    }

    .panel,
    .form-card {
        padding: 18px;
    }

    .bag-line {
        grid-template-columns: 64px minmax(0, 1fr);
    }

    .bag-line img {
        width: 64px;
    }

    .line-total {
        grid-column: 2;
        text-align: left;
    }

    .review-list div {
        grid-template-columns: minmax(0, 1fr);
    }
}
