/* Eighty Eight Accessories
   Colours are sampled from the logo. Teal leads, lime and orange appear only
   in the ring motif, and ink carries the text and the main buttons. */
:root {
  --ink: #1f2a29;
  --charcoal: #3c4848;
  --muted: #667473;
  --teal: #08bfbd;
  --teal-deep: #067f7e;
  --lime: #b3d620;
  --orange: #f39112;
  --paper: #ffffff;
  --mist: #f1f6f5;
  --line: #dbe4e3;
  --danger: #b3261e;
  --display: "Josefin Sans", "Century Gothic", "Avenir Next", sans-serif;
  --body: "Karla", "Helvetica Neue", Arial, sans-serif;
  --wrap: 1180px;
  --gutter: clamp(18px, 4vw, 40px);
}

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

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

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

main {
  flex: 1;
}

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

a {
  color: inherit;
}

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

h1 {
  font-size: clamp(2.5rem, 6.4vw, 4.6rem);
}

h2 {
  font-size: clamp(1.7rem, 3.2vw, 2.3rem);
}

h3 {
  font-size: 1.25rem;
}

p {
  margin: 0;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

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

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
  min-height: 68px;
}

.site-header .wrap {
  display: flex;
  align-items: center;
  gap: 20px;
  min-height: 68px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  margin-right: auto;
}

.brand .mark {
  width: 42px;
  height: auto;
}

.brand .word {
  height: 30px;
  width: auto;
}

.nav-link {
  font-family: var(--display);
  font-size: 1.08rem;
  text-decoration: none;
  padding: 8px 4px;
  border-bottom: 2px solid transparent;
}

.nav-link:hover,
.nav-link[aria-current="page"] {
  border-bottom-color: var(--teal);
}

.bag-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--display);
  font-size: 1.08rem;
  text-decoration: none;
  padding: 8px 14px;
  border: 1.5px solid var(--ink);
  border-radius: 999px;
}

.bag-link:hover {
  background: var(--ink);
  color: var(--paper);
}

.bag-count {
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--teal);
  color: var(--ink);
  font-family: var(--body);
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 22px;
  text-align: center;
}

@media (max-width: 480px) {
  .brand .word {
    height: 19px;
  }
  .brand .mark {
    width: 36px;
  }
  .site-header .wrap {
    gap: 12px;
  }
}

@media (max-width: 380px) {
  .brand .word {
    display: none;
  }
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 52px;
  padding: 0 28px;
  border: 1.5px solid var(--ink);
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--display);
  font-size: 1.12rem;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.btn:hover {
  background: var(--teal);
  border-color: var(--teal);
  color: var(--ink);
}

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

.btn.quiet:hover {
  background: var(--mist);
  border-color: var(--ink);
}

.btn.small {
  min-height: 40px;
  padding: 0 18px;
  font-size: 1rem;
}

.btn[disabled] {
  background: var(--line);
  border-color: var(--line);
  color: var(--muted);
  cursor: not-allowed;
}

.text-link {
  text-decoration: underline;
  text-decoration-color: var(--teal);
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}

.text-link:hover {
  color: var(--teal-deep);
}

/* ---------- Home hero ---------- */

.hero {
  padding: clamp(36px, 7vw, 88px) 0 clamp(40px, 7vw, 84px);
  overflow: hidden;
}

.hero .wrap {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: clamp(24px, 5vw, 72px);
  align-items: center;
}

.hero p.lede {
  max-width: 34ch;
  margin: 22px 0 30px;
  font-size: 1.18rem;
  color: var(--charcoal);
}

/* The figure eight: two product photos stacked like the rings in the logo. */
.eight {
  position: relative;
  width: min(100%, 400px);
  margin: 0 auto;
  aspect-ratio: 1 / 1.5;
}

.eight a {
  position: absolute;
  left: 50%;
  width: 78%;
  aspect-ratio: 1;
  border-radius: 50%;
  padding: 3.4%;
  background: var(--teal);
  text-decoration: none;
  transform: translateX(-50%);
}

.eight a:nth-child(1) {
  top: 0;
  margin-left: -7%;
  z-index: 1;
}

.eight a:nth-child(2) {
  bottom: 0;
  margin-left: 7%;
}

.eight .band {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  padding: 4.5%;
  background: var(--lime);
}

.eight a:nth-child(2) .band {
  background: var(--orange);
}

.eight img,
.eight .blank {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  background: var(--mist);
  border: 5px solid var(--paper);
}

.eight .tag {
  position: absolute;
  left: 50%;
  bottom: -4px;
  transform: translateX(-50%);
  white-space: nowrap;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--paper);
  border: 1.5px solid var(--ink);
  font-family: var(--display);
  font-size: 0.98rem;
  line-height: 1.2;
}

.eight a:hover .tag,
.eight a:focus-visible .tag {
  background: var(--ink);
  color: var(--paper);
}

@media (prefers-reduced-motion: no-preference) {
  .eight a {
    animation: ring-in 0.7s cubic-bezier(0.2, 0.8, 0.2, 1) both;
  }
  .eight a:nth-child(2) {
    animation-delay: 0.12s;
  }
  @keyframes ring-in {
    from {
      opacity: 0;
      transform: translateX(-50%) scale(0.86);
    }
  }
}

@media (max-width: 760px) {
  .hero .wrap {
    grid-template-columns: 1fr;
  }
  .eight {
    width: min(74%, 300px);
    margin-top: 8px;
  }
}

/* ---------- Sections and product grid ---------- */

.section {
  padding: clamp(32px, 5vw, 60px) 0;
}

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

.page-head {
  padding: clamp(28px, 5vw, 52px) 0 8px;
}

.page-head h1 {
  font-size: clamp(2.2rem, 5vw, 3.4rem);
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 20px 0 4px;
}

.chip {
  padding: 8px 18px;
  border: 1.5px solid var(--line);
  border-radius: 999px;
  background: var(--paper);
  font-family: var(--display);
  font-size: 1.02rem;
  line-height: 1.3;
  text-decoration: none;
  cursor: pointer;
}

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

.chip[aria-pressed="true"],
.chip[aria-current="true"] {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper);
}

.grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(14px, 2.4vw, 28px) clamp(12px, 2vw, 24px);
  list-style: none;
  margin: 0;
  padding: 0;
}

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

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

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

.card .photo {
  position: relative;
  aspect-ratio: 1;
  background: var(--mist);
  border-radius: 6px;
  overflow: hidden;
}

.card .photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.card:hover .photo img {
  transform: scale(1.04);
}

.card .name {
  margin-top: 12px;
  font-family: var(--display);
  font-size: 1.16rem;
  line-height: 1.25;
}

.card:hover .name {
  text-decoration: underline;
  text-decoration-color: var(--teal);
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}

.card .price {
  color: var(--muted);
}

.flag {
  position: absolute;
  top: 10px;
  left: 10px;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--paper);
  font-size: 0.85rem;
  font-weight: 700;
}

/* Stand-in for products that have no photo yet: the logo's rings, quietly. */
.no-photo {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
}

.no-photo span {
  width: 46%;
  aspect-ratio: 1;
  border-radius: 50%;
  border: 10px solid var(--paper);
  box-shadow: 0 0 0 10px var(--line), inset 0 0 0 10px var(--line);
}

.empty {
  padding: 48px 0;
  max-width: 46ch;
}

.empty p {
  margin: 10px 0 22px;
  color: var(--charcoal);
}

/* ---------- Product page ---------- */

.product {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: clamp(24px, 5vw, 64px);
  padding: clamp(20px, 4vw, 48px) 0;
  align-items: start;
}

.product .photo {
  aspect-ratio: 1;
  background: var(--mist);
  border-radius: 8px;
  overflow: hidden;
}

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

.product h1 {
  font-size: clamp(2.2rem, 4.6vw, 3.4rem);
}

.product .price {
  margin-top: 10px;
  font-family: var(--display);
  font-size: 1.7rem;
}

.stock {
  margin: 18px 0 22px;
  font-weight: 700;
  color: var(--teal-deep);
}

.stock.low {
  color: #a35a00;
}

.stock.out {
  color: var(--danger);
}

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

.buy-row .btn {
  flex: 1;
  min-width: 190px;
}

.stepper {
  display: inline-flex;
  align-items: center;
  border: 1.5px solid var(--ink);
  border-radius: 999px;
  height: 52px;
}

.stepper button {
  width: 46px;
  height: 100%;
  border: 0;
  background: none;
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
  border-radius: 999px;
}

.stepper button:hover {
  background: var(--mist);
}

.stepper output {
  min-width: 26px;
  text-align: center;
  font-weight: 700;
}

.stepper.small {
  height: 40px;
}

.stepper.small button {
  width: 38px;
}

.product .about {
  margin-top: 28px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
  max-width: 48ch;
  color: var(--charcoal);
}

.product .about p + p {
  margin-top: 12px;
}

.crumb {
  padding-top: 22px;
  color: var(--muted);
}

.added {
  margin-top: 14px;
  min-height: 1.6em;
}

@media (max-width: 760px) {
  .product {
    grid-template-columns: 1fr;
  }
}

/* ---------- Bag and checkout ---------- */

.split {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 0.85fr);
  gap: clamp(24px, 5vw, 64px);
  padding: 24px 0 64px;
  align-items: start;
}

@media (max-width: 860px) {
  .split {
    grid-template-columns: 1fr;
  }
}

.lines {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--line);
}

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

.line .thumb {
  width: 84px;
  aspect-ratio: 1;
  background: var(--mist);
  border-radius: 6px;
  overflow: hidden;
}

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

.line .name {
  font-family: var(--display);
  font-size: 1.16rem;
  text-decoration: none;
}

.line .name:hover {
  text-decoration: underline;
}

.line .meta {
  color: var(--muted);
}

.line .controls {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 8px;
  flex-wrap: wrap;
}

.line .amount {
  font-weight: 700;
  white-space: nowrap;
}

.link-btn {
  border: 0;
  background: none;
  padding: 4px 0;
  cursor: pointer;
  color: var(--muted);
  text-decoration: underline;
  text-underline-offset: 3px;
}

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

.summary {
  background: var(--mist);
  border-radius: 10px;
  padding: 24px;
  position: sticky;
  top: 92px;
}

.summary h2 {
  font-size: 1.5rem;
  margin-bottom: 14px;
}

.summary dl {
  margin: 0;
}

.summary .row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 7px 0;
}

.summary .row dt {
  color: var(--charcoal);
}

.summary .row dd {
  margin: 0;
  font-weight: 700;
  white-space: nowrap;
}

.summary .row.total {
  margin-top: 8px;
  padding-top: 14px;
  border-top: 1.5px solid var(--ink);
  font-family: var(--display);
  font-size: 1.35rem;
}

.summary .btn {
  width: 100%;
  margin-top: 18px;
}

.summary .fine {
  margin-top: 12px;
  font-size: 0.93rem;
  color: var(--muted);
}

.summary .mini {
  list-style: none;
  margin: 0 0 10px;
  padding: 0 0 10px;
  border-bottom: 1px solid var(--line);
}

.summary .mini li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 4px 0;
}

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

.form h2 {
  font-size: 1.5rem;
  margin: 30px 0 14px;
}

.form h2:first-child {
  margin-top: 0;
}

.fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px 16px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

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

.field label,
.field .label {
  font-weight: 700;
  font-size: 0.97rem;
}

.field .hint {
  font-size: 0.9rem;
  color: var(--muted);
}

.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 50px;
  padding: 10px 14px;
  border: 1.5px solid #b9c6c5;
  border-radius: 8px;
  background: var(--paper);
}

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

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: 3px solid var(--teal);
  outline-offset: 1px;
  border-color: var(--ink);
}

@media (max-width: 560px) {
  .fields {
    grid-template-columns: 1fr;
  }
}

.options {
  display: grid;
  gap: 10px;
}

.option {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border: 1.5px solid #b9c6c5;
  border-radius: 8px;
  cursor: pointer;
}

.option:has(input:checked) {
  border-color: var(--ink);
  box-shadow: inset 0 0 0 1px var(--ink);
  background: var(--mist);
}

.option input {
  width: 20px;
  height: 20px;
  accent-color: var(--teal-deep);
}

.option .fee {
  margin-left: auto;
  font-weight: 700;
}

.notice {
  padding: 14px 16px;
  border-radius: 8px;
  background: var(--mist);
  border-left: 4px solid var(--teal);
}

.notice.error {
  background: #fdecea;
  border-left-color: var(--danger);
}

.notice[hidden] {
  display: none;
}

/* ---------- Order confirmation ---------- */

.receipt {
  max-width: 620px;
  padding: clamp(32px, 6vw, 72px) 0;
}

.receipt h1 {
  font-size: clamp(2.2rem, 5vw, 3.2rem);
}

.receipt .lede {
  margin: 16px 0 26px;
  font-size: 1.12rem;
  color: var(--charcoal);
}

.receipt .summary {
  position: static;
  margin-bottom: 26px;
}

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

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

.site-footer {
  margin-top: 40px;
  border-top: 1px solid var(--line);
  padding: 34px 0 40px;
  color: var(--charcoal);
}

.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 20px 48px;
  align-items: flex-start;
  justify-content: space-between;
}

.site-footer img {
  width: 150px;
}

.site-footer ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 6px;
}

.site-footer .small {
  width: 100%;
  font-size: 0.92rem;
  color: var(--muted);
}

.loading {
  padding: 60px 0;
  color: var(--muted);
}

/* ---------- Minimalist homepage ----------
   Home only: a quiet, centred text hero, more white space and lighter type.
   The figure-eight photos are hidden here; delete this block to bring the
   original homepage back. */

body[data-page="home"] .site-header {
  border-bottom-color: transparent;
}

body[data-page="home"] .hero {
  padding: clamp(72px, 14vw, 168px) 0 clamp(64px, 12vw, 140px);
  text-align: center;
}

body[data-page="home"] .hero .wrap {
  display: block;
  max-width: 760px;
}

body[data-page="home"] .hero h1 {
  font-weight: 300;
  font-size: clamp(2.2rem, 5.2vw, 3.8rem);
  letter-spacing: -0.015em;
}

body[data-page="home"] .hero p.lede {
  max-width: 40ch;
  margin: 24px auto 36px;
  font-size: 1.08rem;
  color: var(--muted);
}

body[data-page="home"] .hero .btn {
  min-height: 48px;
  padding: 0 32px;
  border-width: 1px;
  background: transparent;
  color: var(--ink);
  font-size: 0.95rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

body[data-page="home"] .hero .btn:hover {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper);
}

body[data-page="home"] .eight {
  display: none;
}

body[data-page="home"] .section {
  padding: clamp(40px, 7vw, 88px) 0;
}

body[data-page="home"] .section-head {
  margin-bottom: 36px;
}

body[data-page="home"] .section-head h2 {
  font-size: 0.95rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

body[data-page="home"] .text-link {
  font-size: 0.95rem;
  text-decoration-thickness: 1px;
}

body[data-page="home"] .grid {
  gap: clamp(28px, 4vw, 56px) clamp(14px, 2.6vw, 36px);
}

body[data-page="home"] .card .photo {
  border-radius: 0;
}

body[data-page="home"] .card .name {
  margin-top: 14px;
  font-size: 1.02rem;
}

body[data-page="home"] .card .price {
  font-size: 0.95rem;
}

body[data-page="home"] .site-footer {
  margin-top: clamp(40px, 8vw, 96px);
}

/* ---------- Blog ---------- */

.page-head .lede {
  margin-top: 10px;
  max-width: 52ch;
  color: var(--muted);
}

.post-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(28px, 4vw, 48px) clamp(16px, 2.6vw, 32px);
  list-style: none;
  margin: 0;
  padding: 0;
}

@media (max-width: 860px) {
  .post-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .post-grid {
    grid-template-columns: 1fr;
  }
}

.post-card {
  display: block;
  text-decoration: none;
}

.post-card .cover {
  aspect-ratio: 3 / 2;
  background: var(--mist);
  overflow: hidden;
}

.post-card .cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.post-card:hover .cover img {
  transform: scale(1.03);
}

.post-card .date,
.post-head .date {
  font-size: 0.82rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.post-card .date {
  margin-top: 14px;
}

.post-card h3 {
  margin-top: 6px;
  font-size: 1.3rem;
  line-height: 1.25;
}

.post-card:hover h3 {
  text-decoration: underline;
  text-decoration-color: var(--teal);
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}

.post-card .excerpt {
  margin-top: 8px;
  font-size: 0.98rem;
  color: var(--charcoal);
}

.post {
  max-width: 720px;
  margin: 0 auto;
  padding-bottom: 24px;
}

.post-head {
  padding: clamp(18px, 4vw, 36px) 0 24px;
}

.post-head h1 {
  margin-top: 10px;
  font-weight: 300;
  font-size: clamp(2.1rem, 5vw, 3.2rem);
}

.post-cover {
  aspect-ratio: 3 / 2;
  margin-bottom: 32px;
  background: var(--mist);
  overflow: hidden;
}

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

.post-body {
  font-size: 1.1rem;
  line-height: 1.75;
  color: var(--charcoal);
}

.post-body > * + * {
  margin-top: 1.2em;
}

.post-body > h2 {
  margin-top: 1.8em;
  font-size: 1.6rem;
  color: var(--ink);
}

.post-body > figure {
  margin: 1.8em 0 0;
}

.post-body figure img {
  width: 100%;
  height: auto;
}

.post-body figcaption {
  margin-top: 8px;
  font-size: 0.92rem;
  color: var(--muted);
}
