/* ReWear Lab - styles (colours are CSS variables at the top; dark mode supported) */
:root {
  --g: #0f4a43;
  --gl: #1d6b60;
  --bg: #fbfaf6;
  --card: #fff;
  --ink: #1c2b28;
  --mute: #5d6b67;
  --lav: #e6def6;
  --mint: #e5efe9;
  --line: #e4e8e2;
  --tag: #f1e3c8;
  --ginv: #fff;
  box-sizing: border-box;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px)
}

@media (prefers-color-scheme:dark) {
  :root:not([data-theme="light"]) {
    --g: #6fd0bd;
    --gl: #8fe0cf;
    --bg: #0e1816;
    --card: #16251f;
    --ink: #eef5f2;
    --mute: #a3b5af;
    --lav: #2a2545;
    --mint: #14231f;
    --line: #243630;
    --tag: #4a3f26;
    --ginv: #08201b
  }
}

:root[data-theme="dark"] {
  --g: #6fd0bd;
  --gl: #8fe0cf;
  --bg: #0e1816;
  --card: #16251f;
  --ink: #eef5f2;
  --mute: #a3b5af;
  --lav: #2a2545;
  --mint: #14231f;
  --line: #243630;
  --tag: #4a3f26;
  --ginv: #08201b
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 70px
}

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 16px/1.6 'Nunito Sans', system-ui, sans-serif;
  overflow-x: hidden
}

h1,
h2,
h3 {
  font-family: 'Playfair Display', Georgia, serif;
  margin: 0;
  line-height: 1.15;
  color: var(--ink)
}

a {
  color: inherit
}

.wrap {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 22px
}

.eyebrow {
  font: 700 12px 'Nunito Sans';
  letter-spacing: .16em;
  color: var(--gl);
  text-transform: uppercase;
  display: block;
  margin-bottom: 10px
}

header {
  position: sticky;
  top: env(safe-area-inset-top, 0px);
  z-index: 9;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line)
}

nav {
  display: flex;
  align-items: center;
  gap: 20px;
  max-width: 1100px;
  margin: 0 auto;
  padding: 12px 22px
}

.logo {
  font: 700 22px 'Playfair Display';
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-right: auto;
  color: var(--ink)
}

nav ul {
  display: flex;
  gap: 26px;
  list-style: none;
  margin: 0 auto;
  padding: 0
}

nav li a {
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  padding-bottom: 4px
}

nav li a:hover {
  border-bottom: 2px solid var(--g)
}

.btn {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  background: var(--g);
  color: var(--ginv);
  font: 700 15px 'Nunito Sans';
  padding: 12px 24px;
  border-radius: 999px;
  text-decoration: none;
  border: 2px solid var(--g);
  cursor: pointer
}

.btn.o {
  background: transparent;
  color: var(--ink);
  border-color: var(--line)
}

.btn.s {
  padding: 9px 18px;
  font-size: 14px
}

:is(.btn, a, select, input, textarea, button):focus-visible {
  outline: 3px solid var(--gl);
  outline-offset: 3px
}

.hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
  align-items: center;
  padding: 56px 0 50px
}

.hero h1 {
  font-size: clamp(40px, 6vw, 66px);
  font-weight: 700;
  margin-bottom: 18px
}

.hero p {
  max-width: 44ch;
  color: var(--mute);
  font-size: 17px
}

.cta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin: 26px 0
}

.badges {
  display: flex;
  gap: 22px;
  flex-wrap: wrap;
  font-size: 13px;
  color: var(--mute)
}

.badges span {
  display: flex;
  gap: 9px;
  align-items: center
}

.badges i {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--mint);
  display: grid;
  place-items: center;
  font-style: normal;
  font-size: 17px
}

.pile {
  position: relative;
  height: 340px;
  max-width: 470px;
  margin: 0 auto;
  width: 100%
}

.pile div.f {
  position: absolute;
  left: 5%;
  right: 5%;
  height: 64px;
  border-radius: 14px;
  box-shadow: 0 8px 18px rgba(0, 0, 0, .18);
  border-bottom: 6px solid rgba(0, 0, 0, .14)
}

.pile .f::after {
  content: "";
  position: absolute;
  inset: 8px;
  border: 2px dashed rgba(255, 255, 255, .4);
  border-radius: 9px
}

.tag {
  position: absolute;
  right: 2%;
  top: 12%;
  background: var(--tag);
  color: #4a3a1a;
  font: 600 24px/1.1 Caveat;
  text-align: center;
  padding: 26px 16px 14px;
  border-radius: 6px;
  transform: rotate(12deg);
  box-shadow: 0 6px 14px rgba(0, 0, 0, .2);
  z-index: 3
}

.tag::before {
  content: "";
  position: absolute;
  top: 8px;
  left: 50%;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--bg);
  transform: translateX(-50%)
}

.leaf {
  position: absolute;
  left: -4%;
  bottom: 0;
  font-size: 46px;
  transform: rotate(-30deg)
}

section {
  padding: 36px 0
}

.lab {
  background: var(--mint);
  border-radius: 26px;
  padding: 34px;
  display: grid;
  grid-template-columns: .9fr 1.3fr .8fr;
  gap: 26px;
  align-items: center
}

.lab h2 {
  font-size: 34px
}

.lab p {
  color: var(--mute)
}

.ba {
  display: flex;
  align-items: center;
  gap: 12px;
  justify-content: center
}

.pic {
  width: 140px;
  aspect-ratio: 3/4;
  border-radius: 16px;
  display: grid;
  place-items: center;
  font-size: 68px;
  position: relative;
  box-shadow: 0 10px 22px rgba(0, 0, 0, .14);
  border: 5px solid var(--card)
}

.pic small {
  position: absolute;
  bottom: -12px;
  background: var(--card);
  font: 600 11px 'Nunito Sans';
  padding: 3px 10px;
  border-radius: 8px;
  color: var(--ink);
  white-space: nowrap
}

.arrow {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--card);
  display: grid;
  place-items: center;
  font-size: 20px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, .15);
  color: var(--g);
  flex: none
}

.pick {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin: 14px 0
}

.pick button {
  font: 600 13px 'Nunito Sans';
  padding: 6px 12px;
  border-radius: 999px;
  border: 1.5px solid var(--g);
  background: transparent;
  color: var(--ink);
  cursor: pointer
}

.pick button[aria-pressed=true] {
  background: var(--g);
  color: var(--ginv)
}

.opts {
  background: var(--card);
  border-radius: 18px;
  padding: 8px 16px;
  font-size: 14px
}

.opts div {
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 10px
}

.opts div:last-child {
  border: 0
}

.opts b {
  display: block;
  font-size: 14px
}

.opts span {
  color: var(--mute);
  font-size: 13px
}

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

.head h2 {
  font-size: 30px
}

.pop {
  background: var(--lav);
  color: var(--ink);
  font: 700 11px 'Nunito Sans';
  padding: 3px 10px;
  border-radius: 999px;
  margin-left: 8px;
  vertical-align: middle
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 16px
}

.c {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden
}

.c .t {
  height: 150px;
  display: grid;
  place-items: center;
  font-size: 64px;
  position: relative
}

.c .t em {
  position: absolute;
  left: 8px;
  bottom: 8px;
  background: var(--lav);
  color: #2d2350;
  font: 700 10px 'Nunito Sans';
  font-style: normal;
  padding: 2px 9px;
  border-radius: 6px
}

.c div.b {
  padding: 12px 14px 14px
}

.c h3 {
  font: 700 14px 'Nunito Sans'
}

.c p {
  margin: 4px 0 0;
  color: var(--mute);
  font-size: 13px;
  line-height: 1.45
}

.band {
  background: var(--lav);
  padding: 0;
  overflow: hidden
}

.band .wrap {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 30px;
  align-items: center;
  padding: 44px 22px
}

.band h2 {
  font-size: 32px;
  margin-bottom: 10px
}

.band p {
  color: #3c3560
}

.band h2 {
  color: #1c1840
}

.band .eyebrow {
  color: #4b3d8f
}

@media (prefers-color-scheme:dark) {

  :root:not([data-theme="light"]) .band h2,
  :root:not([data-theme="light"]) .band p,
  :root:not([data-theme="light"]) .band .eyebrow {
    color: #eae6ff
  }
}

.polo {
  display: flex;
  gap: 16px;
  justify-content: center
}

.polo div {
  width: 150px;
  background: #fff;
  padding: 8px 8px 26px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, .18);
  font: 600 22px/1.2 Caveat;
  color: #4a3a1a
}

.polo div:first-child {
  transform: rotate(-5deg)
}

.polo div:last-child {
  transform: rotate(4deg) translateY(14px)
}

.polo span {
  display: grid;
  place-items: center;
  height: 120px;
  font-size: 56px;
  background: var(--mint);
  margin-bottom: 6px
}

.impact {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 30px;
  align-items: center
}

.impact h2 {
  font-size: 32px;
  margin-bottom: 8px
}

.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  text-align: center
}

.stats div {
  padding: 10px;
  border-left: 1px solid var(--line)
}

.stats div:first-child {
  border: 0
}

.stats b {
  display: block;
  font: 700 28px 'Playfair Display';
  color: var(--ink)
}

.stats span {
  font-size: 13px;
  color: var(--mute)
}

.how {
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  gap: 26px;
  align-items: stretch
}

.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-top: 20px;
  list-style: none;
  padding: 0
}

.steps li {
  font-size: 13px;
  color: var(--mute)
}

.steps b {
  display: flex;
  align-items: center;
  gap: 8px;
  font: 700 15px 'Nunito Sans';
  color: var(--ink);
  margin: 6px 0 2px
}

.steps i {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--mint);
  display: grid;
  place-items: center;
  font-style: normal
}

.about {
  background: var(--mint);
  border-radius: 22px;
  padding: 26px
}

.about h3 {
  font-size: 24px;
  margin-bottom: 8px
}

.about p {
  color: var(--mute);
  font-size: 14px;
  margin: 0 0 10px
}

.contact {
  background: var(--mint);
  padding: 50px 0
}

.contact .wrap {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 34px;
  align-items: center
}

.contact h2 {
  font-size: 30px;
  margin-bottom: 10px
}

form {
  display: grid;
  gap: 12px
}

input,
textarea {
  font: inherit;
  padding: 13px 14px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--ink);
  width: 100%
}

.ok {
  display: none;
  font-weight: 700;
  color: var(--g)
}

footer.site {
  background: #0b3a34;
  color: #cfe7e1;
  padding: 26px 0;
  font-size: 13px
}

footer.site .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
  justify-content: space-between
}

footer.site b {
  font: 700 20px 'Playfair Display';
  color: #fff
}

.disc {
  font-size: 12px;
  color: var(--mute);
  text-align: center;
  padding: 12px
}

@media(max-width:860px) {

  .hero,
  .lab,
  .band .wrap,
  .impact,
  .how,
  .contact .wrap {
    grid-template-columns: 1fr
  }

  nav ul {
    display: none
  }

  .stats {
    grid-template-columns: 1fr 1fr
  }

  .stats div:nth-child(3) {
    border-left: 0
  }

  .steps {
    grid-template-columns: 1fr 1fr
  }

  .pile {
    height: 300px
  }
}

@media(prefers-reduced-motion:reduce) {
  * {
    scroll-behavior: auto !important
  }
}

.hp {
  width: 100%;
  max-width: 520px;
  margin: 0 auto;
  display: block;
  border-radius: 6px
}

.ba img {
  width: 41%;
  max-width: 150px;
  height: auto;
  border-radius: 6px;
  box-shadow: 0 10px 22px rgba(0, 0, 0, .16)
}

.c .t {
  height: auto;
  display: block
}

.c .t img {
  width: 100%;
  display: block;
  aspect-ratio: 3/2.2;
  object-fit: cover
}

.band .wrap {
  max-width: none;
  padding: 0;
  grid-template-columns: 1fr 1fr 1.2fr;
  gap: 0;
  align-items: stretch
}

.band .wrap>div {
  padding: 34px 28px;
  align-self: center
}

.band .wrap>img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block
}

.about {
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  padding: 0;
  overflow: hidden;
  align-items: stretch
}

.about .at {
  padding: 26px
}

.about img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block
}

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

  .band .wrap>img {
    height: 180px
  }

  .about {
    grid-template-columns: 1fr
  }

  .about img {
    height: 180px
  }
}

:root {
  --hd: #0c3f38
}

@media (prefers-color-scheme:dark) {
  :root:not([data-theme="light"]) {
    --hd: #eef5f2
  }
}

:root[data-theme="dark"] {
  --hd: #eef5f2
}

h1,
h2 {
  color: var(--hd)
}

.hero h1 {
  font-size: clamp(38px, 5.4vw, 62px);
  line-height: 1.12
}

.hero {
  gap: 18px
}

.hp {
  width: calc(100% + max(22px, (100vw - 1100px)/2));
  max-width: none;
  margin: 0 calc(-1*max(22px, (100vw - 1100px)/2)) 0 0;
  border-radius: 0
}

.c .b {
  position: relative;
  padding-right: 46px
}

.c .b::after {
  content: "→";
  position: absolute;
  right: 10px;
  bottom: 10px;
  width: 26px;
  height: 26px;
  border: 1px solid var(--line);
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 12px;
  color: var(--ink)
}

.si {
  display: block;
  font-style: normal;
  font-size: 22px;
  margin-bottom: 2px
}

.steps .n {
  font: 600 20px 'Playfair Display';
  font-style: normal;
  color: var(--mute)
}

.steps b {
  gap: 6px
}

.soc {
  display: flex;
  gap: 14px;
  align-items: center;
  flex-wrap: wrap;
  font-size: 13px;
  margin-top: 16px
}

.soc i {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
  font: 700 12px 'Nunito Sans';
  background: var(--card)
}

.contact .wrap {
  grid-template-columns: 1fr 1.05fr .7fr
}

.nt {
  position: relative;
  justify-self: center
}

.nt div {
  background: var(--card);
  padding: 26px 24px;
  border-radius: 6px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, .12);
  font: 600 26px/1.25 Caveat;
  color: var(--ink);
  transform: rotate(-4deg)
}

.nt span {
  position: absolute;
  right: -14px;
  top: -18px;
  font-size: 34px
}

@media(max-width:860px) {
  .hp {
    width: 100%;
    margin: 0
  }

  .contact .wrap {
    grid-template-columns: 1fr
  }
}

/* ---------- Interactivity additions ---------- */
button.btn { font-family: 'Nunito Sans', system-ui, sans-serif }
.icon-btn {
  background: transparent;
  border: 0;
  font-size: 18px;
  line-height: 1;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  color: var(--ink)
}
.icon-btn:hover { background: var(--mint) }
.burger { display: none; font-size: 22px }
nav li a.act { border-bottom: 2px solid var(--g) }
.btn { transition: transform .15s ease, box-shadow .15s ease }
.btn:hover { transform: translateY(-2px); box-shadow: 0 6px 14px rgba(0, 0, 0, .15) }
.c { cursor: pointer; transition: transform .2s ease, box-shadow .2s ease }
.c:hover { transform: translateY(-4px); box-shadow: 0 10px 22px rgba(0, 0, 0, .12) }
.c:focus-visible { outline: 3px solid var(--gl); outline-offset: 3px }
.soc a { text-decoration: none }
.soc .ic {
  width: 28px; height: 28px; border-radius: 50%;
  border: 1px solid var(--line);
  display: grid; place-items: center;
  font: 700 12px 'Nunito Sans'; background: var(--card)
}
.fl a { text-decoration: none }
.fl a:hover { text-decoration: underline }
.err { display: none; font-weight: 700; color: #b3261e }
:root[data-theme="dark"] .err { color: #ff9c94 }
@media (prefers-color-scheme:dark) { :root:not([data-theme="light"]) .err { color: #ff9c94 } }

/* dialog */
body:has(dialog[open]) { overflow: hidden }
dialog {
  border: 0;
  border-radius: 22px;
  padding: 26px;
  width: min(720px, 94vw);
  max-height: 88vh;
  overflow: auto;
  background: var(--card);
  color: var(--ink);
  box-shadow: 0 20px 60px rgba(0, 0, 0, .35)
}
dialog::backdrop { background: rgba(10, 25, 22, .55) }
dialog .x {
  position: sticky; top: 0; float: right;
  width: 36px; height: 36px; border-radius: 50%;
  border: 1px solid var(--line); background: var(--card);
  color: var(--ink); font-size: 22px; line-height: 1; cursor: pointer; z-index: 2
}
dialog h2 { font-size: 28px; margin: 0 0 6px; color: var(--hd) }
dialog h3 { font: 700 15px 'Nunito Sans'; margin: 16px 0 6px }
dialog p { color: var(--mute); margin: 6px 0 }
dialog ul, dialog ol { margin: 6px 0; padding-left: 20px; color: var(--ink) }
dialog li { margin: 4px 0 }
.back { background: none; border: 0; color: var(--gl); font: 700 14px 'Nunito Sans'; cursor: pointer; padding: 0; margin-bottom: 10px }
.meta { display: flex; gap: 8px; flex-wrap: wrap; margin: 8px 0 }
.meta span { background: var(--lav); color: #2d2350; font: 700 12px 'Nunito Sans'; padding: 3px 10px; border-radius: 999px }
.dimg { width: 100%; max-height: 260px; object-fit: cover; border-radius: 14px; margin: 10px 0; display: block }
.up { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; margin: 12px 0 }
.up input[type=file] { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none }
.up .prev { width: 90px; height: 90px; border-radius: 12px; object-fit: cover; border: 2px dashed var(--line); background: var(--mint); display: grid; place-items: center; font-size: 30px; overflow: hidden }
.up .prev img { width: 100%; height: 100%; object-fit: cover }
.note { font-size: 12px; color: var(--mute) }
.res { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; margin-top: 14px }
.rc { border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: var(--card); text-align: left; cursor: pointer; padding: 0; font: inherit; color: var(--ink) }
.rc:hover { box-shadow: 0 8px 18px rgba(0, 0, 0, .12) }
.rc img { width: 100%; height: 110px; object-fit: cover; display: block }
.rc div { padding: 10px 12px 12px }
.rc b { display: block; font-size: 14px }
.rc span { font-size: 12px; color: var(--mute) }
.sq { width: 100%; margin: 10px 0 }
.chal { border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; margin: 10px 0; display: flex; gap: 14px; align-items: center; justify-content: space-between; flex-wrap: wrap }
.chal b { display: block }
.chal span { font-size: 13px; color: var(--mute) }
.sres { list-style: none; padding: 0 !important }
.sres button { width: 100%; text-align: left; display: flex; gap: 12px; align-items: center; border: 1px solid var(--line); background: var(--card); color: var(--ink); border-radius: 12px; padding: 8px; cursor: pointer; font: inherit; margin: 6px 0 }
.sres img { width: 54px; height: 54px; border-radius: 8px; object-fit: cover }

@media(max-width:860px) {
  .burger { display: inline-block }
  nav { gap: 6px }
  nav ul {
    display: none;
    position: absolute;
    top: 100%; left: 0; right: 0;
    flex-direction: column;
    gap: 0;
    margin: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    padding: 6px 22px 12px
  }
  nav ul.open { display: flex }
  nav ul li a { display: block; padding: 12px 0; font-size: 16px }
  .logo { font-size: 18px; white-space: nowrap; gap: 4px }
  nav .btn.s { padding: 8px 12px; font-size: 13px; white-space: nowrap }
  .icon-btn { width: 36px; height: 36px }
  dialog { padding: 20px 18px }
}
