/* Tygesen Beads — public site. Always light: the warm pink is part of the brand.
   System fonts only, no external requests. */

:root {
  /* Colours taken from the TB logo: its brown outline for text, rose, mauve and gold for
     accents, on a lighter, warmer blush than the coming-soon page so the logo's pinks stand out */
  --bg: #FCF3F0;
  --surface: #FFFAF8;
  --ink: #4A2E26;
  --muted: #7E5E57;
  --string: #E8CFC8;
  --rose: #C9787F;
  --mauve: #A9638F;
  --gold: #C79A4A;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  --radius: .9rem;
  --gutter: clamp(1rem, 4vw, 2.5rem);
  --max: 72rem;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--ink);
  font: 1.0625rem/1.65 var(--sans);
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration-color: var(--string); text-decoration-thickness: .08em; text-underline-offset: .2em; }
a:hover { text-decoration-color: currentColor; }
:focus-visible { outline: 2px solid var(--mauve); outline-offset: 3px; border-radius: .2rem; }

h1, h2 {
  font-family: var(--serif);
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: .005em;
  text-wrap: balance;
}
h1 { font-size: clamp(2.1rem, 6vw, 3.2rem); margin: 0 0 .75rem; }

.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: .5rem; background: var(--ink); color: #fff; padding: .5rem .9rem; border-radius: .4rem; z-index: 1; }
.skip:focus { left: .5rem; }

/* Header */
.site-header {
  padding: clamp(1.25rem, 4vw, 2.25rem) var(--gutter) 0;
  text-align: center;
}
.logo { display: inline-flex; flex-direction: column; align-items: center; text-decoration: none; }
.logo-mark { width: clamp(6.5rem, 22vw, 9.5rem); height: auto; }
.logo-name {
  /* Set like the wordmark in the original logo: classic serif capitals, spaced out */
  font-family: var(--serif); text-transform: uppercase; letter-spacing: .16em;
  font-size: clamp(1.05rem, 3.4vw, 1.35rem); line-height: 1.2; margin-top: .6rem; padding-left: .16em;
}
.site-nav ul {
  list-style: none; margin: 1rem 0 0; padding: 0;
  display: flex; flex-wrap: wrap; justify-content: center; gap: .25rem 1.4rem;
}
.site-nav a {
  display: inline-block; padding: .35rem 0;
  color: var(--muted); text-decoration: none; font-size: .98rem; letter-spacing: .02em;
}
.site-nav a:hover { color: var(--ink); }
.site-nav a[aria-current="page"] { color: var(--ink); position: relative; }
.site-nav a[aria-current="page"]::after {
  /* a small bead under the current page */
  content: ""; position: absolute; left: 50%; bottom: -.15rem; width: .4rem; height: .4rem;
  margin-left: -.2rem; border-radius: 50%; background: var(--rose);
}

/* Main column */
main {
  flex: 1;
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(1.75rem, 5vw, 3.5rem) var(--gutter) clamp(2.5rem, 6vw, 4.5rem);
}
.intro { max-width: 40rem; margin: 0 auto clamp(2rem, 5vw, 3rem); text-align: center; }
.prose p { margin: 0 0 1em; }
.prose p:last-child { margin-bottom: 0; }
.intro .prose { color: var(--muted); font-size: 1.08rem; }

/* Grids of cards */
.grid { list-style: none; margin: 0; padding: 0; display: grid; gap: clamp(1rem, 3vw, 2rem); }
.grid-categories { grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr)); }
.grid-products { grid-template-columns: repeat(auto-fill, minmax(min(45%, 13rem), 1fr)); gap: clamp(.9rem, 2.5vw, 1.75rem); }
.card { display: block; text-decoration: none; }
.card-title {
  display: block; margin-top: .65rem; text-align: center;
  font-family: var(--serif); font-size: 1.2rem; line-height: 1.25;
}
.grid-categories .card-title { font-size: 1.4rem; }
.tile {
  display: block; overflow: hidden; border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 1px 0 rgb(61 39 39 / .04), 0 8px 24px -14px rgb(61 39 39 / .35);
}
.tile img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s cubic-bezier(.2, .7, .2, 1); }
.tile-square { aspect-ratio: 1; }
.tile-portrait { aspect-ratio: 4 / 5; }
.card:hover .tile img { transform: scale(1.03); }
.card:hover .card-title { text-decoration: underline; text-decoration-color: var(--string); text-underline-offset: .2em; }
.no-image { display: grid; place-items: center; width: 100%; height: 100%; }
.no-image svg { width: 22%; height: auto; opacity: .7; }

/* Product page */
.crumbs { margin: 0 0 1.25rem; font-size: .95rem; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--ink); }
.product { display: grid; gap: clamp(1.5rem, 4vw, 3.5rem); align-items: start; }
.gallery { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; }
.gallery > :first-child { grid-column: 1 / -1; }
.photo { display: block; border-radius: var(--radius); overflow: hidden; background: var(--surface); }
.photo img { width: 100%; }
.product-text h1 { font-size: clamp(2rem, 5vw, 2.8rem); }
.product-text .prose { max-width: 34rem; }
@media (min-width: 60rem) {
  .product { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
  .product-text { position: sticky; top: 2rem; padding-top: .5rem; }
}

.pager {
  display: flex; justify-content: space-between; gap: 1rem;
  margin-top: clamp(2.5rem, 6vw, 4rem); padding-top: 1.25rem;
  border-top: 1px solid var(--string);
}
.pager a { text-decoration: none; font-family: var(--serif); font-size: 1.1rem; max-width: 48%; }
.pager a span { display: block; font: .8rem/1.4 var(--sans); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.pager-prev span::before { content: "← "; }
.pager-next { text-align: right; margin-left: auto; }
.pager-next span::after { content: " →"; }

/* About, contact, 404 */
.text-page { max-width: 38rem; margin: 0 auto; }
.text-page h1 { text-align: center; margin-bottom: 1.5rem; }
.not-found { text-align: center; }

/* Footer */
.site-footer {
  padding: 1.5rem var(--gutter) 2rem;
  border-top: 1px solid var(--string);
  display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: .25rem 1.5rem;
  color: var(--muted); font-size: .92rem;
}
.site-footer p { margin: 0; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 1.25rem; }
.site-footer a { color: inherit; }

@media (prefers-reduced-motion: reduce) {
  .tile img { transition: none; }
  .card:hover .tile img { transform: none; }
}
