/* OTHERLIT — palette and type from the approved design (see TECHNICAL_DOCUMENTATION.md). */

@font-face {
  font-family: "Jost";
  src: url("../fonts/jost-latin.woff2") format("woff2");
  font-weight: 300 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "EB Garamond";
  src: url("../fonts/eb-garamond-latin.woff2") format("woff2");
  font-weight: 400 500;
  font-style: normal;
  font-display: swap;
}

:root {
  --paper: #f2ede5;
  --studio: #e6ddd3;
  --stone: #cabaad;
  --ink: #3e322a;
  --soft-black: #292729;
  --muted: #6f655d;
  --sans: "Jost", "Futura", "Helvetica Neue", Arial, sans-serif;
  --serif: "EB Garamond", Garamond, "Times New Roman", serif;
  --gutter: clamp(16px, 1.6vw, 24px);
  --gap: clamp(10px, 1vw, 16px);
}

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--soft-black);
  font-family: var(--sans);
  font-weight: 400;
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
button, input, select { font: inherit; color: inherit; }

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

/* Header */
.site-header {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 26px var(--gutter) 0;
}
.wordmark {
  grid-column: 2;
  line-height: 0;
}
.wordmark:hover { text-decoration: none; }
.wordmark img {
  display: block;
  height: 24px;
  width: auto;
  max-width: none;
}
.site-nav {
  grid-column: 3;
  justify-self: end;
  display: flex;
  gap: 18px;
  font-size: 13px;
}
.bag-count { color: var(--muted); }

.site-main { flex: 1; padding: clamp(40px, 6vw, 88px) var(--gutter) 0; }

/* Front page */
.shop {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: var(--gap);
  align-items: stretch;
}
.tile { display: flex; flex-direction: column; font-size: 13px; line-height: 1.35; }
.tile:hover { text-decoration: none; }
.tile:hover .tile-name { text-decoration: underline; text-underline-offset: 3px; }
.tile-media { display: block; background: var(--studio); overflow: hidden; margin-bottom: 9px; }
.tile-media img { width: 100%; height: 100%; object-fit: cover; transition: opacity .2s; }
.tile-media--square { aspect-ratio: 1 / 1; }
.tile--hero .tile-media { flex: 1; min-height: 0; position: relative; }
.tile--hero .tile-media img { position: absolute; inset: 0; }
.tile-price { color: var(--soft-black); }
.grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(26px, 3vw, 40px) var(--gap);
  align-content: start;
}

/* Product page */
.product {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  gap: clamp(32px, 5vw, 80px);
  align-items: center;
  max-width: 1240px;
  margin: 0 auto;
}
.product-media { background: var(--studio); aspect-ratio: 1 / 1; overflow: hidden; }
.product-media img { width: 100%; height: 100%; object-fit: cover; }
.product-info { text-align: center; max-width: 420px; justify-self: center; width: 100%; }
.product-name { font-weight: 400; font-size: clamp(28px, 3vw, 34px); line-height: 1.2; margin: 0 0 6px; }
.product-price { font-size: 22px; margin: 0 0 30px; }
.product-form { display: flex; flex-direction: column; align-items: center; gap: 30px; }
.sizes { border: 0; margin: 0; padding: 0; display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; }
.sizes-color { width: 100%; text-align: center; font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.size input { position: absolute; opacity: 0; pointer-events: none; }
.size span {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 44px; height: 44px; padding: 0 8px;
  font-size: 18px; color: var(--muted);
  border: 1px solid transparent; cursor: pointer;
}
.size input:checked + span { color: var(--soft-black); border-color: var(--soft-black); }
.size input:focus-visible + span { outline: 2px solid var(--ink); outline-offset: 2px; }
.size input:disabled + span { text-decoration: line-through; opacity: .4; cursor: not-allowed; }
.product-description { margin: 28px 0 0; }
.product-line { margin: 34px 0 0; font-size: 16px; }

/* Buttons */
.button {
  display: inline-flex; align-items: center; justify-content: center;
  width: 100%; min-height: 52px; padding: 0 24px;
  background: transparent; border: 1px solid var(--soft-black); border-radius: 0;
  font-size: 18px; cursor: pointer;
}
.button:hover { background: var(--soft-black); color: var(--paper); text-decoration: none; }
.button:disabled { opacity: .45; cursor: not-allowed; background: transparent; color: inherit; }
.button--solid { background: var(--soft-black); color: var(--paper); }
.button--solid:hover { background: var(--ink); }
.button--inline { width: auto; font-size: 15px; min-height: 46px; }
.link { background: none; border: 0; padding: 0; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; font-size: 13px; color: var(--muted); }

/* Bag */
.bag, .prose { max-width: 720px; margin: 0 auto; }
.page-title { font-weight: 400; font-size: 28px; margin: 0 0 28px; }
.bag-lines { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--stone); }
.bag-line {
  display: grid; grid-template-columns: 96px 1fr auto auto; gap: 18px; align-items: center;
  padding: 16px 0; border-bottom: 1px solid var(--stone);
}
.bag-thumb { background: var(--studio); }
.bag-desc { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; }
.bag-qty select, .bag-country select {
  background: transparent; border: 1px solid var(--stone); border-radius: 0; padding: 6px 8px;
}
.bag-total { min-width: 80px; text-align: right; }
.bag-summary { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 24px; padding: 24px 0; }
.bag-country { display: flex; align-items: center; gap: 10px; font-size: 14px; }
.totals { display: grid; grid-template-columns: auto auto; gap: 6px 32px; margin: 0; min-width: 220px; }
.totals dt { color: var(--muted); }
.totals dd { margin: 0; text-align: right; }
.totals .totals-sum { color: var(--soft-black); font-size: 17px; padding-top: 6px; border-top: 1px solid var(--stone); }
.checkout-form { max-width: 340px; margin-left: auto; text-align: right; }
.checkout-form .small { margin-top: 12px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.notice { padding: 14px 16px; background: var(--studio); font-size: 14px; }

/* Text pages */
.prose { font-size: 17px; }
.prose--center { text-align: center; }
.statement { font-family: var(--serif); font-size: clamp(26px, 3vw, 34px); line-height: 1.25; margin: 0 0 10px; color: var(--ink); }
.statement + p:not(.statement) { margin-top: 32px; }

/* Footer */
.site-footer { text-align: center; font-size: 13px; padding: clamp(64px, 8vw, 110px) var(--gutter) 36px; }
.site-footer p { margin: 0 0 2px; }
.site-footer .wordmark--small { margin: 0 0 10px; }
.site-footer .wordmark--small img { height: 16px; margin: 0 auto; }
.footer-links { display: flex; justify-content: center; gap: 18px; margin-top: 18px !important; color: var(--muted); }

/* Tablet */
@media (max-width: 900px) {
  .shop { grid-template-columns: 1fr; }
  .tile--hero .tile-media { aspect-ratio: 4 / 3; flex: none; }
  .product { grid-template-columns: 1fr; gap: 34px; }
}

/* Phone */
@media (max-width: 600px) {
  body { font-size: 14px; }
  .site-header { grid-template-columns: 1fr; justify-items: center; gap: 14px; padding-top: 30px; }
  .wordmark { grid-column: 1; }
  .wordmark img { height: 26px; }
  .site-nav { grid-column: 1; justify-self: center; }
  .site-main { padding-top: 32px; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 26px 12px; }
  .bag-line { grid-template-columns: 72px 1fr auto; }
  .bag-total { grid-column: 2 / 4; text-align: left; }
  .checkout-form { max-width: none; text-align: left; }
}


/* Password gate (preview). Removed with the gate itself when gate.enabled is false. */
.gate {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 28px;
  padding: 48px var(--gutter) 64px;
}
.gate-form {
  width: 100%;
  max-width: 280px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 14px;
}
.gate-form input[type="password"] {
  width: 100%;
  min-height: 52px;
  padding: 0 14px;
  background: transparent;
  border: 1px solid var(--stone);
  border-radius: 0;
  text-align: center;
}
.gate-form input[type="password"]:focus {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}
.gate-error { margin: 0; font-size: 13px; color: var(--muted); text-align: center; }
