@font-face {
  font-family: "Fraunces";
  src: url("/assets/fonts/fraunces-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Fraunces";
  src: url("/assets/fonts/fraunces-latin-wght-italic.woff2") format("woff2");
  font-weight: 100 900;
  font-style: italic;
  font-display: swap;
}

:root {
  --paper: #f4f0e8;
  --card: #e6dfd0;
  --ink: #1c241e;
  --quiet: #5c665e;
  --moss: #4d6149;
  --moss-dark: #3a4b37;
  --clay: #b5694a;
  --bone: #f3eee1;
  --line: rgba(28, 36, 30, 0.16);
  --serif: "Fraunces", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --gutter: clamp(16px, 4vw, 48px);
  --max: 1200px;
}

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

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.55;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1;
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter) 96px;
}

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

a {
  color: inherit;
  text-underline-offset: 0.2em;
  text-decoration-thickness: 1px;
}
a:hover {
  color: var(--moss);
}

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

h1,
h2,
h3 {
  font-family: var(--serif);
  font-weight: 400;
  line-height: 1.08;
  letter-spacing: -0.015em;
  margin: 0;
  text-wrap: balance;
}
h1 {
  font-size: clamp(2.5rem, 6.4vw, 4.75rem);
}
h2 {
  font-size: clamp(1.6rem, 3vw, 2.25rem);
}
h3 {
  font-size: 1.3rem;
}
h1 em {
  font-style: italic;
  color: var(--moss);
}
p {
  margin: 0 0 1em;
}

.quiet {
  color: var(--quiet);
  font-size: 0.9375rem;
}
.eyebrow {
  font-size: 0.8125rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--quiet);
  margin-bottom: 20px;
}
.lede {
  font-size: clamp(1.125rem, 1.6vw, 1.3125rem);
  max-width: 34em;
  color: #333d35;
}
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.skip {
  position: absolute;
  left: -999px;
  top: 8px;
  background: var(--ink);
  color: var(--paper);
  padding: 8px 14px;
  border-radius: 4px;
  z-index: 10;
}
.skip:focus {
  left: 8px;
  color: var(--paper);
}

/* --- notice, header, footer --- */

.notice {
  margin: 0;
  padding: 8px var(--gutter);
  background: var(--ink);
  color: var(--bone);
  font-size: 0.8125rem;
  letter-spacing: 0.04em;
  text-align: center;
}

.site-header {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 20px var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--ink);
}
.brand:hover {
  color: var(--ink);
}
.brand-name {
  font-family: var(--serif);
  font-size: 1.1875rem;
  letter-spacing: -0.01em;
}

/* The Li mark: a square crop of the logo, used in the header and footer. */
.tile {
  display: block;
  width: 44px;
  height: 44px;
  flex: none;
  border-radius: 6px;
}

.site-header nav {
  display: flex;
  align-items: center;
  gap: clamp(14px, 3vw, 32px);
}
.site-header nav a {
  text-decoration: none;
  padding: 10px 0;
  font-size: 1rem;
}
.site-header nav a[aria-current="page"] {
  text-decoration: underline;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 0.45em;
}
.bag-count {
  display: inline-grid;
  place-items: center;
  min-width: 1.6em;
  height: 1.6em;
  padding: 0 0.4em;
  margin-left: 2px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 0.8125rem;
  font-variant-numeric: tabular-nums;
}
.bag-count.has-items {
  background: var(--moss);
  border-color: var(--moss);
  color: var(--bone);
}

.site-footer {
  border-top: 1px solid var(--line);
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 40px var(--gutter) 48px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px 48px;
  align-items: start;
}
.footer-brand {
  display: flex;
  gap: 14px;
  align-items: center;
}
.footer-brand p {
  margin: 0;
  font-family: var(--serif);
  line-height: 1.3;
}
.footer-brand .quiet {
  font-family: var(--sans);
}
.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
}
.site-footer nav a {
  text-decoration: none;
  padding: 6px 0;
}
.site-footer nav a:hover {
  text-decoration: underline;
}
.small-print {
  grid-column: 1 / -1;
  margin: 0;
  font-size: 0.875rem;
  color: var(--quiet);
}
.tsaru {
  white-space: nowrap;
}

/* --- buttons, links --- */

.button {
  display: inline-block;
  background: var(--ink);
  color: var(--bone);
  border: 0;
  border-radius: 999px;
  padding: 15px 28px;
  font: inherit;
  font-weight: 500;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s;
}
.button:hover {
  background: var(--moss-dark);
  color: var(--bone);
}
.button:disabled {
  background: #9aa19b;
  cursor: not-allowed;
}
.text-link {
  white-space: nowrap;
}
.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 28px;
  margin: 32px 0 0;
}

/* --- home --- */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  gap: clamp(24px, 5vw, 72px);
  align-items: center;
  padding: clamp(32px, 7vw, 88px) 0 clamp(48px, 8vw, 104px);
}
.hero h1 {
  margin-bottom: 28px;
}
.hero-art {
  display: grid;
  place-items: center;
}
/* The Li logo: tilted, with the same ink shadow as the tiles. */
.hero-logo {
  display: block;
  width: min(100%, 380px);
  height: auto;
  border-radius: 6%;
  box-shadow: 14px 14px 0 var(--ink);
  transform: rotate(-3deg);
}

.section {
  padding: clamp(28px, 5vw, 56px) 0;
}
.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px 24px;
  margin-bottom: 28px;
}
.page-head {
  padding-bottom: 8px;
}
.page-head h1 {
  font-size: clamp(2.25rem, 5vw, 3.5rem);
  margin-bottom: 16px;
}

.manifesto {
  border-top: 1px solid var(--line);
  margin-top: 32px;
}
.beliefs {
  list-style: none;
  counter-reset: belief;
  margin: 36px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 32px clamp(24px, 4vw, 56px);
}
.beliefs li {
  counter-increment: belief;
}
.beliefs li::before {
  content: counter(belief);
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1.5px solid var(--ink);
  border-radius: 5px;
  font-size: 0.875rem;
  margin-bottom: 18px;
}
.beliefs h3 {
  margin-bottom: 10px;
}
.beliefs p {
  color: #333d35;
  margin: 0;
}

/* --- product grid --- */

.grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(28px, 4vw, 44px) clamp(14px, 2vw, 24px);
}
.card a {
  display: block;
  text-decoration: none;
  color: var(--ink);
}
.card-image {
  display: block;
  background: var(--card);
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 14px;
}
.card-image img {
  width: 100%;
  transition: transform 0.35s ease;
}
.card a:hover .card-image img {
  transform: scale(1.04);
}
.card-text {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
}
.card-name {
  font-size: 1.1875rem;
}
.card-price {
  font-variant-numeric: tabular-nums;
}
.card-summary {
  display: block;
  color: var(--quiet);
  font-size: 0.9375rem;
  line-height: 1.4;
  margin: 4px 0 10px;
}
.swatches {
  display: flex;
  gap: 6px;
}
.swatch {
  display: inline-block;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 1px solid rgba(28, 36, 30, 0.28);
}
.swatch-bone {
  background: #f3eee1;
}
.swatch-moss {
  background: #4d6149;
}
.swatch-ink {
  background: #1c241e;
}
.swatch-clay {
  background: #b5694a;
}

/* --- product page --- */

.crumbs {
  font-size: 0.9375rem;
  color: var(--quiet);
  margin: 12px 0 20px;
}
.crumbs span {
  margin: 0 6px;
}
.product {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: clamp(24px, 5vw, 72px);
  align-items: start;
}
.product-image {
  background: var(--card);
  border-radius: 14px;
  overflow: hidden;
}
.product-image img {
  width: 100%;
}
.product-info h1 {
  font-size: clamp(2.125rem, 4.4vw, 3.25rem);
  margin: 8px 0 12px;
}
.product-price {
  font-size: 1.3125rem;
  margin-bottom: 20px;
}
.product-description {
  max-width: 32em;
  color: #333d35;
}

.buy {
  margin-top: 28px;
}
.choice {
  border: 0;
  padding: 0;
  margin: 0 0 22px;
}
.choice legend {
  padding: 0;
  margin-bottom: 10px;
  font-size: 0.9375rem;
  font-weight: 500;
}
.choice-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.colour-option,
.size-option {
  position: relative;
  cursor: pointer;
}
.colour-option input,
.size-option input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}
.colour-option .swatch {
  display: block;
  width: 40px;
  height: 40px;
  box-shadow: 0 0 0 3px var(--paper) inset;
}
.colour-option input:checked + .swatch {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}
.colour-option input:focus-visible + .swatch,
.size-option input:focus-visible + span {
  outline: 2px solid var(--moss);
  outline-offset: 4px;
}
.size-option span {
  display: grid;
  place-items: center;
  min-width: 52px;
  height: 46px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 0.9375rem;
}
.size-option:hover span {
  border-color: var(--ink);
}
.size-option input:checked + span {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--bone);
}
.one-size {
  margin-bottom: 22px;
}
.buy-row {
  display: flex;
  gap: 12px;
  align-items: stretch;
}
.buy-row .button {
  flex: 1;
  max-width: 320px;
}
.quantity input {
  width: 76px;
  height: 100%;
  min-height: 50px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: center;
}
.added {
  margin: 16px 0 0;
  padding: 12px 16px;
  border-radius: 8px;
  background: #dfe6d6;
  color: #26331f;
  max-width: 420px;
}
.added.error {
  background: #f0d9cf;
  color: #5b2414;
}
.details {
  margin: 32px 0 0;
  padding: 20px 0 0;
  border-top: 1px solid var(--line);
  list-style: none;
  color: #333d35;
}
.details li {
  padding: 4px 0 4px 20px;
  position: relative;
}
.details li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 0.85em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--moss);
}

/* --- bag --- */

.lines {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--line);
}
.line {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr) auto 88px auto;
  gap: 12px 20px;
  align-items: center;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}
.line-image {
  background: var(--card);
  border-radius: 8px;
  overflow: hidden;
}
.line-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.line-name {
  font-family: var(--serif);
  font-size: 1.1875rem;
  text-decoration: none;
}
.stepper {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
}
.stepper button {
  width: 44px;
  height: 44px;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  font-size: 1.125rem;
  cursor: pointer;
  border-radius: 999px;
}
.stepper button:hover:not(:disabled) {
  background: var(--card);
}
.stepper button:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}
.stepper-qty {
  min-width: 1.75em;
  text-align: center;
  font-variant-numeric: tabular-nums;
}
.line-total {
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.remove {
  border: 0;
  background: none;
  color: var(--quiet);
  font: inherit;
  font-size: 0.9375rem;
  text-decoration: underline;
  text-underline-offset: 0.2em;
  cursor: pointer;
  padding: 10px 0;
}
.remove:hover {
  color: var(--clay);
}
.totals {
  margin: 28px 0 0 auto;
  max-width: 420px;
}
.total-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  font-size: 1.1875rem;
  margin-bottom: 8px;
}
.total-row strong {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.5rem;
  font-variant-numeric: tabular-nums;
}
.totals .actions {
  margin-top: 20px;
}
.empty {
  padding: 24px 0 40px;
}

/* --- checkout --- */

.checkout {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: clamp(28px, 5vw, 72px);
  align-items: start;
}
.checkout h2 {
  font-size: 1.5rem;
  margin-bottom: 20px;
}
.checkout-form label {
  display: block;
  font-size: 0.9375rem;
  font-weight: 500;
  margin-bottom: 16px;
}
.checkout-form input,
.checkout-form textarea {
  display: block;
  width: 100%;
  margin-top: 6px;
  padding: 12px 14px;
  border: 1px solid rgba(28, 36, 30, 0.34);
  border-radius: 8px;
  background: #fbf9f4;
  color: inherit;
  font: inherit;
  font-weight: 400;
}
.checkout-form input:focus,
.checkout-form textarea:focus {
  outline: 2px solid var(--moss);
  outline-offset: 1px;
  border-color: var(--moss);
}
.field-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
  gap: 14px;
}
.checkout-form .button {
  margin: 8px 0 16px;
}
.summary {
  background: var(--card);
  border-radius: 14px;
  padding: 24px;
}
.summary-lines {
  list-style: none;
  margin: 0 0 16px;
  padding: 0;
}
.summary-lines li {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  font-variant-numeric: tabular-nums;
}
.summary-lines .quiet {
  display: block;
}

/* --- text pages --- */

.prose {
  max-width: 40em;
  padding: clamp(24px, 5vw, 64px) 0 0;
}
.prose h1 {
  font-size: clamp(2.25rem, 5vw, 3.5rem);
  margin-bottom: 24px;
}
.prose h2 {
  font-size: 1.625rem;
  margin: 40px 0 12px;
}
.prose .lede {
  margin-bottom: 28px;
}

/* --- smaller screens --- */

@media (max-width: 960px) {
  .grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .beliefs {
    grid-template-columns: 1fr;
    max-width: 34em;
  }
}

@media (max-width: 760px) {
  .hero,
  .product,
  .checkout {
    grid-template-columns: 1fr;
  }
  .hero-art {
    order: -1;
    justify-items: start;
    padding: 8px 0 8px 8px;
  }
  .hero-logo {
    width: 180px;
    box-shadow: 8px 8px 0 var(--ink);
  }
  .summary {
    order: -1;
  }
  .site-footer {
    grid-template-columns: 1fr;
  }
  .line {
    grid-template-columns: 72px minmax(0, 1fr) auto;
  }
  .line-image {
    grid-row: span 2;
  }
  .line-total {
    grid-column: 3;
    grid-row: 1;
  }
  .stepper {
    grid-column: 2;
    justify-self: start;
  }
  .remove {
    grid-column: 3;
    justify-self: end;
  }
}

@media (max-width: 460px) {
  .brand-name {
    display: none;
  }
  .card-text {
    flex-direction: column;
    gap: 2px;
  }
}

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