/* ==========================================================================
   Mya Atelier — temporary site
   Palette sampled from the artwork itself so the page never fights the work.
   ========================================================================== */

@font-face {
  font-family: 'Fredoka';
  src: url('../fonts/fredoka-latin.woff2') format('woff2');
  font-weight: 400 700;
  font-display: swap;
}
@font-face {
  font-family: 'Nunito';
  src: url('../fonts/nunito-latin.woff2') format('woff2');
  font-weight: 400 700;
  font-display: swap;
}

:root {
  --ink: #17151a;
  --ink-soft: #4d4650;
  --paper: #fff9f0;
  --paper-2: #fdefe2;
  --card: #ffffff;

  --strawberry: #ff5c6e;
  --blush: #ffb6c4;
  --pumpkin: #f0913e;
  --honey: #ffc42e;
  --matcha: #a9be80;
  --grape: #5e5b84;
  --cocoa: #a9603c;

  --line: 3px;
  --radius: 20px;
  --shadow: 6px 6px 0 var(--ink);
  --shadow-sm: 4px 4px 0 var(--ink);

  --display: 'Fredoka', ui-rounded, 'Segoe UI', system-ui, sans-serif;
  --body: 'Nunito', ui-rounded, 'Segoe UI', system-ui, sans-serif;

  --wrap: 1120px;
  --gap: clamp(1rem, 3vw, 2rem);

  /* Faint seed speckle, borrowed from the strawberry. */
  --speckle: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='60' height='60'%3E%3Cg fill='%23e8b9a0' fill-opacity='0.28'%3E%3Cellipse cx='12' cy='16' rx='2' ry='3.2' transform='rotate(-20 12 16)'/%3E%3Cellipse cx='44' cy='40' rx='2' ry='3.2' transform='rotate(25 44 40)'/%3E%3C/g%3E%3C/svg%3E");
}

@media (prefers-color-scheme: dark) {
  :root {
    --ink: #f6ece0;
    --ink-soft: #b9ab9c;
    --paper: #221e1b;
    --paper-2: #2c2723;
    --card: #322c27;
    --shadow: 6px 6px 0 #100e0c;
    --shadow-sm: 4px 4px 0 #100e0c;
    --speckle: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='60' height='60'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cellipse cx='12' cy='16' rx='2' ry='3.2' transform='rotate(-20 12 16)'/%3E%3Cellipse cx='44' cy='40' rx='2' ry='3.2' transform='rotate(25 44 40)'/%3E%3C/g%3E%3C/svg%3E");
  }
}

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

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

body {
  margin: 0;
  font-family: var(--body);
  font-size: clamp(1rem, 0.96rem + 0.2vw, 1.075rem);
  line-height: 1.65;
  color: var(--ink);
  background-color: var(--paper);
  background-image: var(--speckle);
  overflow-x: hidden;
}

h1, h2, h3, h4 {
  font-family: var(--display);
  font-weight: 600;
  line-height: 1.12;
  margin: 0 0 0.5em;
  letter-spacing: -0.01em;
}
h1 { font-size: clamp(2.4rem, 1.6rem + 3.6vw, 4rem); }
h2 { font-size: clamp(1.75rem, 1.3rem + 1.9vw, 2.6rem); }
h3 { font-size: clamp(1.2rem, 1.05rem + 0.6vw, 1.45rem); }
p { margin: 0 0 1rem; }
a { color: inherit; }

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

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

.wrap {
  width: min(100% - 2rem, var(--wrap));
  margin-inline: auto;
}

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--card);
  color: var(--ink);
  padding: 0.7rem 1.1rem;
  border: var(--line) solid var(--ink);
  border-radius: 0 0 var(--radius) 0;
  z-index: 100;
  font-weight: 700;
}
.skip:focus { left: 0; }

/* --------------------------------------------------------------- banner  */

.banner {
  background: var(--honey);
  color: #17151a;
  border-bottom: var(--line) solid var(--ink);
  font-size: 0.9rem;
  font-weight: 600;
}
.banner__inner {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.6rem 0;
}
.banner p { margin: 0; }
.banner__close {
  margin-left: auto;
  flex: none;
  background: transparent;
  border: 2px solid rgba(23, 21, 26, 0.35);
  color: inherit;
  border-radius: 50%;
  width: 26px;
  height: 26px;
  line-height: 1;
  font-size: 1rem;
  cursor: pointer;
  font-family: var(--body);
}
.banner__close:hover { background: rgba(23, 21, 26, 0.12); }

/* ------------------------------------------------------------------ nav  */

.site-head {
  border-bottom: var(--line) solid var(--ink);
  background: var(--paper-2);
  position: sticky;
  top: 0;
  z-index: 40;
}
.site-head__inner {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem 0;
  flex-wrap: wrap;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.3rem;
  letter-spacing: -0.015em;
  margin-right: auto;
}
.brand__dot {
  width: 30px;
  height: 30px;
  flex: none;
  border: var(--line) solid var(--ink);
  border-radius: 50%;
  background: var(--strawberry);
  position: relative;
}
.brand__dot::after {
  content: '';
  position: absolute;
  inset: 5px 9px auto auto;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--paper);
}

.nav { display: flex; gap: 0.35rem; flex-wrap: wrap; }
.nav a {
  text-decoration: none;
  font-weight: 700;
  font-size: 0.95rem;
  padding: 0.4rem 0.8rem;
  border-radius: 999px;
  border: 2px solid transparent;
}
.nav a:hover { background: var(--card); border-color: var(--ink); }
.nav a[aria-current='page'] {
  background: var(--blush);
  border-color: var(--ink);
  color: #17151a;
}

/* --------------------------------------------------------------- buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: var(--display);
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  cursor: pointer;
  padding: 0.7rem 1.35rem;
  color: #17151a;
  background: var(--honey);
  border: var(--line) solid var(--ink);
  border-radius: 999px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.12s ease, box-shadow 0.12s ease;
  /* A pill that wraps onto two lines stops reading as a button. */
  white-space: nowrap;
}
.btn:hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--ink); }
.btn:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--ink); }
.btn--pink { background: var(--blush); }
.btn--ghost { background: var(--card); color: var(--ink); }
.btn--sm { font-size: 0.9rem; padding: 0.5rem 1rem; }

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

.hero { padding: clamp(2.5rem, 6vw, 5rem) 0 clamp(2rem, 5vw, 3.5rem); }
.hero__grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(1.5rem, 5vw, 3.5rem);
  align-items: center;
}
.hero__tag {
  display: inline-block;
  font-family: var(--display);
  font-weight: 600;
  font-size: 0.85rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  background: var(--matcha);
  color: #17151a;
  border: 2px solid var(--ink);
  border-radius: 999px;
  padding: 0.25rem 0.85rem;
  margin-bottom: 1.1rem;
}
.hero h1 { margin-bottom: 0.35em; }
.hero__lede { font-size: 1.15rem; max-width: 46ch; color: var(--ink-soft); }
.hero__actions { display: flex; gap: 0.75rem; flex-wrap: wrap; margin-top: 1.75rem; }

/* A loose fan of stickers rather than a tidy grid. */
.hero__stack { position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.hero__stack .frame:nth-child(1) { transform: rotate(-4deg); }
.hero__stack .frame:nth-child(2) { transform: rotate(3deg) translateY(1.5rem); }
.hero__stack .frame:nth-child(3) { transform: rotate(2.5deg) translateY(-0.75rem); }
.hero__stack .frame:nth-child(4) { transform: rotate(-3deg) translateY(0.75rem); }

/* ---------------------------------------------------------------- frame  */
/* The sticker treatment: thick outline, hard offset shadow, slight tilt.    */

.frame {
  background: var(--card);
  border: var(--line) solid var(--ink);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  position: relative;
  transition: transform 0.16s ease, box-shadow 0.16s ease;
}
.frame img {
  width: 100%;
  background: #fff;
  -webkit-user-drag: none;
  user-select: none;
  -webkit-user-select: none;
}
/* Sits over the artwork so a drag or long-press grabs nothing useful. */
.frame::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
}

/* ---------------------------------------------------------------- cards  */

.section { padding: clamp(2.5rem, 6vw, 4.5rem) 0; }
.section--tint { background: var(--paper-2); border-block: var(--line) solid var(--ink); }
.section__head { margin-bottom: 2rem; max-width: 60ch; }
.section__head p { color: var(--ink-soft); margin-bottom: 0; }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: var(--gap);
}

.card {
  display: flex;
  flex-direction: column;
  background: var(--card);
  border: var(--line) solid var(--ink);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: transform 0.16s ease, box-shadow 0.16s ease;
}
.card--tilt:nth-child(3n + 1) { transform: rotate(-1.1deg); }
.card--tilt:nth-child(3n + 2) { transform: rotate(0.8deg); }
.card--tilt:nth-child(3n + 3) { transform: rotate(-0.4deg); }
.card--tilt:hover,
.card--tilt:focus-within {
  transform: rotate(0deg) translateY(-5px);
  box-shadow: 9px 9px 0 var(--ink);
}

.card__media {
  position: relative;
  display: block;
  border: 0;
  padding: 0;
  width: 100%;
  background: #fff;
  cursor: zoom-in;
  font: inherit;
  color: inherit;
}
.card__media img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: contain;
  padding: 0.75rem;
  background: #fff;
  -webkit-user-drag: none;
  user-select: none;
  -webkit-user-select: none;
}
/* Grows to fill the card so the labels and buttons line up across a row,
   however long the blurb above them runs. */
.card__body {
  padding: 0.9rem 1.1rem 1.2rem;
  border-top: var(--line) solid var(--ink);
  display: flex;
  flex-direction: column;
  flex: 1;
}
.card__body h3 { margin-bottom: 0.25rem; }
.card__body p { color: var(--ink-soft); font-size: 0.95rem; margin-bottom: 0.75rem; }
.card__body > :last-child { margin-top: auto; }
.card__body > .btn { align-self: flex-start; }

.labels { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 0.2rem 0.6rem;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: var(--paper-2);
}
.label--work { background: var(--matcha); color: #17151a; }
.label--soon { background: var(--paper-2); }

/* --------------------------------------------------------------- filters */

.filters {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}
.filters button {
  font-family: var(--display);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  padding: 0.45rem 1.05rem;
  border: var(--line) solid var(--ink);
  border-radius: 999px;
  background: var(--card);
  color: var(--ink);
  transition: transform 0.12s ease;
}
.filters button:hover { transform: translateY(-2px); }
.filters button[aria-pressed='true'] { background: var(--strawberry); color: #fff; }

.empty { color: var(--ink-soft); font-style: italic; }

/* ------------------------------------------------------------- lightbox  */

.lightbox {
  border: none;
  padding: 0;
  background: transparent;
  max-width: min(96vw, 1000px);
  max-height: 94vh;
  overflow: visible;
}
.lightbox::backdrop { background: rgba(23, 21, 26, 0.82); }
.lightbox__panel {
  background: var(--card);
  border: var(--line) solid var(--ink);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.lightbox__img {
  width: 100%;
  max-height: 68vh;
  object-fit: contain;
  background: #fff;
  padding: 0.5rem;
  -webkit-user-drag: none;
  user-select: none;
}
.lightbox__meta {
  padding: 1rem 1.25rem 1.25rem;
  border-top: var(--line) solid var(--ink);
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  flex-wrap: wrap;
}
.lightbox__meta h3 { margin-bottom: 0.15rem; }
.lightbox__meta p { margin: 0; color: var(--ink-soft); font-size: 0.95rem; }
.lightbox__actions { margin-left: auto; display: flex; gap: 0.5rem; flex-wrap: wrap; }
.lightbox__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: var(--line) solid var(--ink);
  background: var(--paper);
  color: var(--ink);
  font-size: 1.3rem;
  line-height: 1;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
}
.lightbox__nav--prev { left: -14px; }
.lightbox__nav--next { right: -14px; }
.lightbox__close {
  position: absolute;
  top: -14px;
  right: -14px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: var(--line) solid var(--ink);
  background: var(--strawberry);
  color: #fff;
  font-size: 1.1rem;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  z-index: 2;
}

/* ------------------------------------------------------------------ form */

.panel {
  background: var(--card);
  border: var(--line) solid var(--ink);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: clamp(1.25rem, 4vw, 2rem);
}

.field { margin-bottom: 1.1rem; }
.field label {
  display: block;
  font-family: var(--display);
  font-weight: 600;
  margin-bottom: 0.3rem;
}
.field .hint { font-size: 0.85rem; color: var(--ink-soft); font-weight: 400; }
.field input,
.field select,
.field textarea {
  width: 100%;
  font: inherit;
  color: var(--ink);
  background: var(--paper);
  border: var(--line) solid var(--ink);
  border-radius: 14px;
  padding: 0.6rem 0.8rem;
}
.field textarea { min-height: 9rem; resize: vertical; }

.two-up {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.split {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: var(--gap);
  align-items: start;
}

.note {
  background: var(--paper-2);
  border: var(--line) solid var(--ink);
  border-radius: var(--radius);
  padding: 1.1rem 1.25rem;
}
.note h3 { margin-bottom: 0.4rem; }
.note p:last-child, .note ul:last-child { margin-bottom: 0; }

.steps { margin: 0; padding-left: 1.15rem; }
.steps li { margin-bottom: 0.5rem; }

.mail-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
  margin-top: 0.75rem;
}
.mail-row code {
  font-family: var(--body);
  font-weight: 700;
  background: var(--paper-2);
  border: 2px solid var(--ink);
  border-radius: 999px;
  padding: 0.3rem 0.8rem;
  user-select: all;
}

/* ---------------------------------------------------------------- footer */

.site-foot {
  border-top: var(--line) solid var(--ink);
  background: var(--paper-2);
  padding: clamp(2rem, 5vw, 3rem) 0 2rem;
  margin-top: clamp(2.5rem, 6vw, 4rem);
}
.site-foot__grid {
  display: flex;
  gap: 1.5rem;
  justify-content: space-between;
  flex-wrap: wrap;
  align-items: flex-start;
}
.site-foot a { font-weight: 700; }
.site-foot ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.35rem; }
.fine {
  margin-top: 2rem;
  padding-top: 1.25rem;
  border-top: 2px dashed rgba(128, 116, 106, 0.5);
  font-size: 0.85rem;
  color: var(--ink-soft);
}
.fine p { margin-bottom: 0.35rem; }

/* ------------------------------------------------------------ responsive */

@media (max-width: 860px) {
  .hero__grid { grid-template-columns: 1fr; }
  .split { grid-template-columns: 1fr; }
  .brand { font-size: 1.15rem; }
}

@media (max-width: 560px) {
  :root { --line: 2.5px; --shadow: 5px 5px 0 var(--ink); }
  .site-head__inner { padding: 0.6rem 0; }
  .brand { margin-right: 0; width: 100%; }
  .nav { width: 100%; }
  .nav a { padding: 0.35rem 0.65rem; font-size: 0.9rem; }
  .two-up { grid-template-columns: 1fr; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); }
  .lightbox__nav--prev { left: 4px; }
  .lightbox__nav--next { right: 4px; }
  .lightbox__close { top: 6px; right: 6px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
  .card--tilt,
  .hero__stack .frame { transform: none !important; }
}
