/*
 * Puppy.Fashion design system.
 * Designed screen sizes: phone 360-390, tablet 768, laptop 1024, desktop 1440.
 * Each size has its own block below; the content column has a fixed width from 768 up.
 */

@font-face {
    font-family: 'Bodoni Moda';
    src: url('../fonts/bodoni-moda.woff2') format('woff2');
    font-weight: 400 900;
    font-display: swap;
}

@font-face {
    font-family: 'Hanken Grotesk';
    src: url('../fonts/hanken-grotesk.woff2') format('woff2');
    font-weight: 100 900;
    font-display: swap;
}

:root {
    /* Colour: taken from the garments in the portfolio */
    --ivory: #fbf8f3;
    --white: #ffffff;
    --graphite: #26242a;
    --stone: #6b666e;
    --line: #e2dbd1;
    --blush: #f3e1dd;
    --rose: #d49999;
    --garnet: #7a1f2b;
    --garnet-deep: #5e1620;

    /* Type */
    --display: 'Bodoni Moda', 'Didot', 'Bodoni MT', Georgia, serif;
    --text: 'Hanken Grotesk', 'Helvetica Neue', Arial, sans-serif;
    --h1: 40px;
    --h2: 32px;
    --h3: 22px;

    /* Space */
    --gutter: 20px;
    --section: 56px;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: var(--ivory);
    color: var(--graphite);
    font: 400 16px/1.55 var(--text);
    -webkit-text-size-adjust: 100%;
}

h1,
h2,
h3 {
    margin: 0;
    font-family: var(--display);
    font-weight: 500;
    line-height: 1.08;
    letter-spacing: -0.01em;
}

h1 { font-size: var(--h1); }
h2 { font-size: var(--h2); margin-bottom: 24px; }
h3 { font-size: var(--h3); }

p {
    margin: 0 0 16px;
}

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

a {
    color: inherit;
}

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

.wrap {
    margin: 0 auto;
    padding: 0 var(--gutter);
}

.skip {
    position: absolute;
    left: -9999px;
}

.skip:focus {
    left: 8px;
    top: 8px;
    z-index: 10;
    padding: 12px 16px;
    background: var(--white);
}

.draft-bar {
    margin: 0;
    padding: 8px var(--gutter);
    background: var(--graphite);
    color: var(--ivory);
    font-size: 13px;
    text-align: center;
}

/* Buttons and links */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0 28px;
    border: 1.5px solid var(--garnet);
    border-radius: 999px;
    background: var(--garnet);
    color: var(--ivory);
    font: 600 16px/1.2 var(--text);
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.15s, color 0.15s;
}

.btn:hover {
    border-color: var(--garnet-deep);
    background: var(--garnet-deep);
}

.btn--small {
    min-height: 44px;
    padding: 0 18px;
    font-size: 15px;
}

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

.btn--line:hover {
    border-color: var(--graphite);
    background: var(--graphite);
    color: var(--ivory);
}

.btn--light {
    border-color: var(--ivory);
    background: var(--ivory);
    color: var(--garnet);
}

.btn--light:hover {
    border-color: var(--white);
    background: var(--white);
}

.btn--line-light {
    border-color: var(--ivory);
    background: transparent;
    color: var(--ivory);
}

.btn--line-light:hover {
    border-color: var(--ivory);
    background: var(--ivory);
    color: var(--garnet);
}

.link {
    padding: 0;
    border: 0;
    background: none;
    color: inherit;
    font: inherit;
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 4px;
    cursor: pointer;
}

.link:hover {
    color: var(--garnet);
}

/* Links that stand on their own get a full-size tap area */
.section__head .link,
.pager .link,
.pager__link {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
}

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

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

.site-header__in {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    row-gap: 4px;
    padding-top: 12px;
    padding-bottom: 4px;
}

.wordmark {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    font: 500 24px/1 var(--display);
    letter-spacing: -0.01em;
    text-decoration: none;
}

.site-header .btn {
    grid-row: 1;
    grid-column: 2;
    padding: 0 14px;
}

.site-nav {
    grid-column: 1 / -1;
}

.site-nav ul,
.site-footer__links {
    display: flex;
    margin: 0;
    padding: 0;
    list-style: none;
}

.site-nav ul {
    gap: 24px;
}

.site-nav a,
.site-footer__links a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    text-decoration: none;
}

.site-nav a:hover,
.site-footer__links a:hover {
    color: var(--garnet);
}

.site-nav a[aria-current] {
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 6px;
}

/* Footer */
.site-footer {
    border-top: 1px solid var(--line);
    padding: 40px 0;
    color: var(--stone);
    font-size: 15px;
}

.site-footer__in {
    display: grid;
    gap: 24px;
}

.site-footer .wordmark {
    color: var(--graphite);
}

.site-footer p {
    max-width: 300px;
    margin: 0;
}

.site-footer__links {
    flex-direction: column;
    color: var(--graphite);
}

/* Inner pages end with space before the footer; the home page ends with its colour band */
.page {
    padding-bottom: var(--section);
}

/* Sections */
.section {
    padding: var(--section) 0;
}

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

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

.section--garnet {
    background: var(--garnet);
    color: var(--ivory);
}

.section--garnet :focus-visible {
    outline-color: var(--ivory);
}

.section--flush {
    margin-bottom: var(--section);
}

.section--blush + .section--flush {
    margin-top: var(--section);
}

.section__head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px 24px;
    margin-bottom: 24px;
}

.section__head h2 {
    margin: 0;
}

.split {
    display: grid;
    gap: 8px;
}

.prose p {
    font-size: 18px;
}

.prose p:last-child,
.split > div > :last-child {
    margin-bottom: 0;
}

.page-head {
    padding: 40px 0 32px;
}

.page-head p,
.lead {
    max-width: 560px;
    margin: 16px 0 0;
    color: var(--stone);
    font-size: 18px;
}

.list {
    margin: 0 0 24px;
    padding-left: 20px;
}

.list li {
    margin-bottom: 8px;
}

.list--plain {
    padding: 0;
    list-style: none;
}

.empty {
    padding: 32px 0;
    color: var(--stone);
    font-size: 18px;
}

/* Home: hero. The field colour matches the photo backdrop, so the photo melts into it */
.hero {
    position: relative;
    overflow: hidden;
    background: var(--rose);
}

.hero__in {
    padding-top: 40px;
    padding-bottom: 8px;
}

.hero h1 {
    font-size: 40px;
    line-height: 1;
    letter-spacing: -0.02em;
}

.hero p {
    max-width: 420px;
    margin: 16px 0 24px;
    font-size: 17px;
}

.hero > img {
    width: 100%;
    -webkit-mask-image: linear-gradient(to bottom, transparent, #000 16%);
    mask-image: linear-gradient(to bottom, transparent, #000 16%);
}

/* Home: collections */
.collections {
    display: grid;
    gap: 40px;
}

.collection {
    display: block;
    text-decoration: none;
}

.collection img {
    width: 100%;
    margin-bottom: 16px;
}

.collection h3 {
    font-size: 28px;
}

.collection p {
    margin: 8px 0;
    color: var(--stone);
}

.collection:hover .link {
    color: var(--garnet);
}

/* Home: rows of photos with equal heights (two per row on phones) */
.photo-rows {
    --gap: 12px;
    display: flex;
    flex-wrap: wrap;
    gap: 24px var(--gap);
}

.photo-rows__item {
    width: calc((100% - var(--gap)) * var(--narrow));
    text-decoration: none;
}

.photo-rows__item img {
    width: 100%;
    aspect-ratio: var(--ratio);
}

.photo-rows__item span {
    display: block;
    padding-top: 8px;
    font-size: 15px;
}

.photo-rows__item:hover span {
    color: var(--garnet);
}

/* Home: steps */
.steps {
    display: grid;
    gap: 32px;
    margin: 0;
    padding: 0;
    list-style: none;
    counter-reset: step;
}

.step {
    counter-increment: step;
}

.step img {
    width: 100%;
    margin-bottom: 16px;
    border: 1px solid var(--line);
}

.step h3::before {
    content: counter(step) '. ';
    color: var(--garnet);
}

.step p {
    margin: 8px 0 0;
    color: var(--stone);
}

.section--garnet h2 {
    max-width: 640px;
    font-size: 36px;
}

.reviews {
    display: grid;
    gap: 32px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.reviews blockquote {
    margin: 0 0 12px;
    font: 500 22px/1.3 var(--display);
}

.reviews p {
    margin: 0;
    color: var(--stone);
}

/* Portfolio */
.filters {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px 32px;
    margin-bottom: 32px;
}

.filter {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.filter__label {
    width: 100%;
    color: var(--stone);
    font-size: 14px;
}

.chip {
    min-height: 44px;
    padding: 0 18px;
    border: 1px solid var(--stone);
    border-radius: 999px;
    background: transparent;
    color: var(--graphite);
    font: 500 15px/1 var(--text);
    cursor: pointer;
}

.chip:hover {
    border-color: var(--graphite);
}

.chip[aria-pressed='true'] {
    border-color: var(--graphite);
    background: var(--graphite);
    color: var(--ivory);
}

.filters__count {
    width: 100%;
    margin: 0;
    color: var(--stone);
    font-size: 14px;
}

.cards {
    columns: 2;
    column-gap: 12px;
}

.card {
    margin-bottom: 28px;
    break-inside: avoid;
}

.card[hidden] {
    display: none;
}

.card__photo {
    display: block;
    background: var(--line);
}

.card__photo img {
    width: 100%;
}

.card h2 {
    margin: 12px 0 2px;
    font-size: 20px;
}

.card h2 a {
    text-decoration: none;
}

.card h2 a:hover {
    color: var(--garnet);
}

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

.card .link {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    font-size: 14px;
}

/* Look page */
.look {
    display: grid;
    gap: 24px;
    padding-top: 20px;
}

.look__photo {
    background: var(--line);
}

.look__photo img {
    width: 100%;
}

.look__meta {
    margin-bottom: 8px;
    color: var(--stone);
    font-size: 15px;
}

.look .lead {
    margin-bottom: 32px;
}

.look h2 {
    margin-bottom: 12px;
    font-size: 24px;
}

/* On phones the main actions stay within reach while the page scrolls */
.look__actions {
    position: sticky;
    bottom: 0;
    margin: 24px calc(var(--gutter) * -1) 0;
    padding: 12px var(--gutter);
    border-top: 1px solid var(--line);
    background: var(--ivory);
}

.look__actions .btn {
    flex: 1 1 0;
    padding: 0 10px;
    font-size: 14px;
}

.pager {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 16px;
    margin-top: var(--section);
    padding-top: 24px;
    padding-bottom: 8px;
    border-top: 1px solid var(--line);
}

.pager__link {
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    font: 500 18px/1.2 var(--display);
    text-decoration: none;
}

.pager__link:hover {
    color: var(--garnet);
}

.pager__link:last-child {
    align-items: flex-end;
    text-align: right;
}

.pager__link span {
    display: block;
    margin-bottom: 4px;
    color: var(--stone);
    font: 400 13px/1.2 var(--text);
}

/* Fit guide */
.numbered {
    margin: 0 0 32px;
    padding: 0;
    list-style: none;
    counter-reset: step;
}

.numbered li {
    position: relative;
    margin-bottom: 24px;
    padding-left: 44px;
    counter-increment: step;
}

.numbered li::before {
    content: counter(step);
    position: absolute;
    left: 0;
    top: -4px;
    color: var(--garnet);
    font: 500 32px/1 var(--display);
}

.numbered p {
    margin: 4px 0 0;
    color: var(--stone);
}

.measure {
    display: grid;
    gap: 24px;
}

.measure__figure {
    width: 100%;
    height: auto;
}

.measure__dog {
    fill: var(--ivory);
    stroke: var(--graphite);
    stroke-width: 2.5;
    stroke-linejoin: round;
}

.measure__dog circle {
    fill: var(--graphite);
    stroke: none;
}

.measure__lines {
    fill: none;
    stroke: var(--garnet);
    stroke-width: 3;
    stroke-linecap: round;
    stroke-dasharray: 2 7;
}

.measure__tags circle {
    fill: var(--garnet);
}

.measure__tags text {
    fill: var(--ivory);
    font: 600 15px var(--text);
    text-anchor: middle;
}

.measure__list {
    margin: 0;
}

.measure__list div {
    margin-bottom: 20px;
}

.measure__list dt {
    display: flex;
    align-items: center;
    gap: 12px;
    font: 500 22px/1.2 var(--display);
}

.measure__list dt span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--garnet);
    color: var(--ivory);
    font: 600 15px/1 var(--text);
}

.measure__list dd {
    margin: 6px 0 0 42px;
}

/* Contact form */
.form {
    display: grid;
    gap: 20px;
    margin-top: 24px;
}

.field label,
.form legend {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    font-size: 15px;
}

.field input,
.field select,
.field textarea {
    display: block;
    width: 100%;
    min-height: 48px;
    padding: 11px 14px;
    border: 1px solid var(--stone);
    border-radius: 6px;
    background: var(--white);
    color: var(--graphite);
    font: inherit;
}

.field [aria-invalid='true'] {
    border: 2px solid var(--garnet);
}

.field__hint,
.field__error,
.form__note {
    margin: 6px 0 0;
    font-size: 14px;
}

.field__hint,
.form__note {
    color: var(--stone);
}

.field__error {
    color: var(--garnet);
    font-weight: 600;
}

.form__measures {
    display: grid;
    gap: 12px;
    margin: 0;
    padding: 0;
    border: 0;
}

.form .btn {
    justify-self: start;
}

.form__status {
    margin: 0;
    font-weight: 600;
}

.form__status:empty {
    display: none;
}

@media (prefers-reduced-motion: reduce) {
    * {
        transition: none !important;
        animation: none !important;
    }
}

/* ---------- Tablet, 768 ---------- */
@media (min-width: 768px) {
    :root {
        --h1: 48px;
        --h2: 36px;
        --h3: 22px;
        --gutter: 0px;
        --section: 72px;
    }

    .wrap {
        width: 704px;
    }

    .draft-bar {
        padding: 8px 32px;
    }

    .site-header .btn {
        padding: 0 18px;
    }

    .site-header__in {
        display: flex;
        gap: 24px;
        height: 72px;
        padding-top: 0;
        padding-bottom: 0;
    }

    .site-nav {
        margin-left: auto;
    }

    .site-footer__in {
        grid-template-columns: 2fr 1fr 1fr;
    }

    .split {
        grid-template-columns: 1fr 1fr;
        gap: 24px;
    }

    .page-head {
        padding: 56px 0 40px;
    }

    .hero__in {
        display: flex;
        align-items: center;
        min-height: 520px;
        padding-top: 0;
        padding-bottom: 0;
    }

    .hero__text {
        width: 344px;
    }

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

    .hero p {
        margin-bottom: 28px;
    }

    .hero .actions {
        flex-direction: column;
        align-items: flex-start;
    }

    .hero > img {
        position: absolute;
        right: 0;
        bottom: 0;
        width: auto;
        height: 100%;
        -webkit-mask-image: linear-gradient(to right, transparent, #000 24%);
        mask-image: linear-gradient(to right, transparent, #000 24%);
    }

    .collections {
        grid-template-columns: 280px 340px;
        justify-content: space-between;
        gap: 0;
    }

    .collection:nth-child(2) {
        margin-top: 72px;
    }

    .photo-rows {
        --gap: 16px;
        row-gap: 32px;
    }

    .photo-rows__item {
        width: calc((100% - var(--gap) * 2) * var(--wide));
    }

    .steps {
        grid-template-columns: repeat(3, 1fr);
        gap: 16px;
    }

    .section--garnet h2 {
        font-size: 44px;
    }

    .reviews {
        grid-template-columns: 1fr 1fr;
    }

    .filter__label,
    .filters__count {
        width: auto;
    }

    .filters__count {
        margin-left: auto;
    }

    .cards {
        columns: 3;
        column-gap: 16px;
    }

    .card {
        margin-bottom: 32px;
    }

    .look {
        grid-template-columns: 340px 340px;
        padding-top: 40px;
    }

    .look__actions {
        position: static;
        margin: 24px 0 0;
        padding: 0;
        border: 0;
    }

    .look__actions .btn {
        flex: 0 1 auto;
        padding: 0 24px;
        font-size: 16px;
    }

    .measure {
        grid-template-columns: 1fr 1fr;
        align-items: center;
    }

    .form {
        margin-top: 0;
    }

    .form__measures {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* ---------- Laptop, 1024 ---------- */
@media (min-width: 1024px) {
    :root {
        --h1: 56px;
        --h2: 44px;
        --h3: 24px;
        --section: 96px;
    }

    body {
        font-size: 17px;
    }

    .wrap {
        width: 944px;
    }

    .site-header__in {
        gap: 32px;
    }

    .site-nav ul {
        gap: 32px;
    }

    .split {
        grid-template-columns: 380px 1fr;
        gap: 80px;
    }

    .hero__in {
        min-height: 620px;
    }

    .hero__text {
        width: 480px;
    }

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

    .hero p {
        font-size: 19px;
    }

    .hero .actions {
        flex-direction: row;
    }

    .collections {
        grid-template-columns: 380px 460px;
    }

    .collection:nth-child(2) {
        margin-top: 96px;
    }

    .collection h3 {
        font-size: 34px;
    }

    .steps {
        gap: 24px;
    }

    .section--garnet h2 {
        max-width: none;
        font-size: 56px;
    }

    .cards {
        column-gap: 24px;
    }

    .look {
        grid-template-columns: 460px 400px;
        justify-content: space-between;
    }

    .measure {
        grid-template-columns: 520px 1fr;
        gap: 48px;
    }
}

/* ---------- Desktop, 1440 ---------- */
@media (min-width: 1440px) {
    :root {
        --h1: 64px;
        --h2: 52px;
        --h3: 26px;
        --section: 112px;
    }

    .wrap {
        width: 1320px;
    }

    .split {
        grid-template-columns: 536px 648px;
        justify-content: space-between;
        gap: 0;
    }

    .hero__in {
        min-height: 736px;
    }

    .hero__text {
        width: 720px;
    }

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

    .hero p {
        max-width: 480px;
        margin: 24px 0 36px;
        font-size: 21px;
    }

    .collections {
        grid-template-columns: 536px 648px;
    }

    .collection:nth-child(2) {
        margin-top: 120px;
    }

    .section--garnet h2 {
        font-size: 72px;
    }

    .cards {
        columns: 4;
    }

    .look {
        grid-template-columns: 648px 536px;
        padding-top: 56px;
    }

    .measure {
        grid-template-columns: 648px 536px;
        justify-content: space-between;
        gap: 0;
    }
}
