/* MakerCart homepage + sign-in page. Three colours only: teal, black, white (tints are those at lower opacity). */
:root {
  --teal: #01ABA3;
  --black: #000000;
  --white: #FFFFFF;
  --muted: rgba(0, 0, 0, 0.64);
  --line: rgba(0, 0, 0, 0.16);
  --tint: rgba(1, 171, 163, 0.1);
  --on-black: rgba(255, 255, 255, 0.72);
  --font: "Source Sans 3", system-ui, sans-serif;
  --font-display: "Archivo", "Source Sans 3", system-ui, sans-serif;
  --max: 1200px;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; scroll-padding-top: 84px; }

body.lp {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.5;
  color: var(--black);
  background: var(--white);
  min-height: 100vh;
}

img { max-width: 100%; height: auto; }
a { color: var(--black); text-decoration: underline; text-decoration-color: var(--teal); text-decoration-thickness: 2px; text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--black); }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid var(--teal); outline-offset: 2px; border-radius: 2px; }
h1, h2, h3, p, ul, ol, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip {
  position: absolute; left: 12px; top: -60px; z-index: 80;
  background: var(--teal); color: var(--black); font-weight: 700;
  padding: 10px 14px; border-radius: 4px;
}
.skip:focus { top: 10px; }

.wrap { width: min(var(--max), calc(100% - 48px)); margin-inline: auto; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 46px; padding: 0.6rem 1.3rem; border-radius: 8px;
  border: 1px solid var(--black);
  font-weight: 700; font-size: 1rem; line-height: 1.1; white-space: nowrap;
  text-decoration: none; transition: background 0.12s, border-color 0.12s, color 0.12s;
}
.btn-primary { background: var(--teal); color: var(--black); }
.btn-primary:hover { background: var(--black); color: var(--white); }
.btn-dark { background: var(--black); color: var(--white); }
.btn-dark:hover { background: var(--white); color: var(--black); }
.btn-block { width: 100%; }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }

/* ---------- Header ---------- */
.lp-hdr { position: sticky; top: 0; z-index: 40; background: var(--black); }
.lp-hdr-inner { display: flex; align-items: center; gap: 1.5rem; min-height: 72px; position: relative; }
.lp-logo { display: flex; flex-shrink: 0; text-decoration: none; }
.lp-logo img {
  height: 52px; width: auto; display: block;
  background: var(--white); border-radius: 4px; padding: 2px 4px;
}
.lp-nav { display: flex; align-items: center; gap: 1.6rem; margin-left: auto; }
.lp-nav a:not(.btn) { color: var(--white); font-weight: 600; font-size: 0.97rem; text-decoration: none; }
.lp-nav a:not(.btn):hover, .lp-nav a[aria-current="page"] { color: var(--teal); }
.lp-nav .lp-signin { margin-left: 0.6rem; }
.lp-nav .btn { min-height: 42px; border-color: var(--teal); }
.lp-nav .btn:hover { background: var(--white); color: var(--black); border-color: var(--white); }

.lp-menu {
  display: none; margin-left: auto; width: 44px; height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.4); border-radius: 8px;
  background: transparent; color: var(--white);
}
.lp-menu span { display: block; width: 18px; height: 2px; background: currentColor; margin: 4px auto; }

/* ---------- Hero ---------- */
.hero { padding: 4.5rem 0 4.75rem; }
.hero-grid {
  display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
  gap: 4rem; align-items: center;
}
.hero h1 {
  font-family: var(--font-display);
  font-stretch: 112%; font-weight: 800;
  font-size: clamp(2.35rem, 4.7vw, 4rem);
  line-height: 1.04; letter-spacing: -0.022em;
  text-wrap: balance;
}
.lede { font-size: 1.2rem; color: var(--muted); max-width: 33rem; margin-top: 1.2rem; }

.hero-search {
  display: flex; margin-top: 2rem; max-width: 34rem; height: 58px;
  background: var(--white); border: 2px solid var(--black); border-radius: 10px;
  overflow: hidden;
}
.hero-search:focus-within { box-shadow: 0 0 0 3px var(--teal); }
.hero-search input {
  flex: 1; min-width: 0; border: 0; outline: 0; background: transparent;
  padding: 0 1.1rem; font-size: 1.08rem;
}
.hero-search input::placeholder { color: var(--muted); }
.hero-search button {
  border: 0; border-left: 2px solid var(--black); padding: 0 1.6rem;
  background: var(--teal); color: var(--black); font-weight: 700; font-size: 1.02rem;
}
.hero-search button:hover { background: var(--black); color: var(--white); }

.hero-tries {
  display: flex; flex-wrap: wrap; gap: 0.35rem 1.1rem;
  margin-top: 1rem; font-size: 0.97rem; color: var(--muted);
}
.hero-tries a { font-weight: 600; }

/* The parts cabinet: six drawers, each a way into the store. */
.cabinet {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px;
  padding: 14px; border-radius: 16px; background: var(--black);
}
.drawer {
  display: flex; flex-direction: column; gap: 9px;
  padding: 10px; border-radius: 6px; background: var(--white); color: var(--black);
  text-decoration: none; transition: transform 0.16s ease, box-shadow 0.16s ease;
}
.drawer:hover { transform: translateY(-5px); box-shadow: 0 12px 0 -6px var(--teal); }
.drawer-img { position: relative; display: block; aspect-ratio: 1; border-radius: 3px; background: var(--tint); }
.drawer-img img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: contain; background: var(--white);
  opacity: 0; animation: stock 0.5s ease-out forwards;
}
.drawer-label {
  display: block; text-align: center; padding: 0.42rem 0.3rem;
  border: 1px solid var(--black); border-radius: 3px;
  font-weight: 700; font-size: 0.95rem; line-height: 1.15;
}
.drawer:hover .drawer-label { background: var(--teal); }
@keyframes stock {
  from { opacity: 0; transform: scale(0.9); }
  to { opacity: 1; transform: none; }
}

/* ---------- Facts ---------- */
.facts { border-block: 1px solid var(--line); }
.facts-row { display: grid; grid-template-columns: repeat(4, 1fr); }
.facts-row li { padding: 1.15rem 1.5rem; border-left: 1px solid var(--line); }
.facts-row li:first-child { padding-left: 0; border-left: 0; }
.facts-row strong { display: block; font-size: 1.02rem; line-height: 1.25; }

/* ---------- Blocks ---------- */
.block { padding: 4.5rem 0; }
.block.block-tight { padding-top: 0; }
.block-head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 1rem 2rem; flex-wrap: wrap; margin-bottom: 1.6rem;
}
.block h2, .p2c h2 {
  font-family: var(--font-display); font-stretch: 108%; font-weight: 750;
  font-size: clamp(1.6rem, 2.7vw, 2.2rem); line-height: 1.12; letter-spacing: -0.015em;
}
.more { font-weight: 700; }

.depts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.dept {
  display: grid; grid-template-columns: 76px 1fr; grid-template-rows: auto auto;
  column-gap: 1rem; align-content: center; align-items: center;
  padding: 0.75rem; border-radius: 8px;
  background: var(--white); border: 1px solid var(--line); color: var(--black);
  text-decoration: none; transition: border-color 0.12s;
}
.dept:hover, .item:hover { border-color: var(--black); box-shadow: 4px 4px 0 var(--teal); }
.dept-img { grid-row: 1 / 3; position: relative; aspect-ratio: 1; border-radius: 4px; background: var(--tint); overflow: hidden; }
.dept-img img, .item-img img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: contain; background: var(--white);
}
.dept-name { align-self: end; font-weight: 700; font-size: 1.06rem; line-height: 1.2; }
.dept-count { align-self: start; color: var(--muted); font-size: 0.92rem; min-height: 1.4em; }

.shelf { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.shelf .item:nth-child(n + 9) { display: none; }
.item {
  display: flex; flex-direction: column; padding: 0.75rem; border-radius: 8px;
  background: var(--white); border: 1px solid var(--line); color: var(--black);
  text-decoration: none; transition: border-color 0.12s;
}
.item-img { position: relative; display: block; aspect-ratio: 4 / 3; margin-bottom: 0.7rem; }
.item-name { font-size: 0.98rem; line-height: 1.3; flex: 1; }
.item-price { margin-top: 0.45rem; font-weight: 700; font-size: 1.15rem; }

/* ---------- BuildMyProject band ---------- */
.p2c { background: var(--teal); color: var(--black); padding: 4.5rem 0; }
.p2c-grid {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 0.85fr);
  gap: 4.5rem; align-items: center;
}
.p2c-name { font-weight: 700; font-size: 1.05rem; margin-bottom: 0.9rem; }
.p2c h2 { max-width: 15em; margin-bottom: 1.8rem; }

.kit { background: var(--white); border: 2px solid var(--black); border-radius: 12px; padding: 1.4rem 1.5rem 0.7rem; }
.kit figcaption { font-size: 0.9rem; color: var(--muted); }
.kit-prompt {
  margin: 0.5rem 0 0.6rem; padding: 0.85rem 1rem;
  border-radius: 10px 10px 10px 2px; background: var(--black); color: var(--white);
  font-weight: 600; font-size: 1.08rem; line-height: 1.3;
}
.kit li {
  display: flex; justify-content: space-between; gap: 1rem;
  padding: 0.62rem 0; border-top: 1px solid var(--line);
}
.kit li:first-child { border-top: 0; }
.kit b { white-space: nowrap; }

/* ---------- Ordering steps ---------- */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 2rem; counter-reset: step; }
.steps li { counter-increment: step; padding-top: 1rem; border-top: 3px solid var(--black); }
.steps li::before {
  content: counter(step);
  display: block; margin-bottom: 0.5rem;
  font-family: var(--font-display); font-stretch: 112%; font-weight: 800;
  font-size: 2.1rem; line-height: 1; color: var(--teal);
}
.steps strong { display: block; font-size: 1.1rem; line-height: 1.25; }

/* ---------- Footer ---------- */
.lp-foot { background: var(--black); color: var(--on-black); padding: 3rem 0 1.5rem; font-size: 0.95rem; }
.foot-cols { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 2rem; }
.foot-logo { height: 60px; width: auto; background: var(--white); border-radius: 8px; padding: 6px; margin-bottom: 0.8rem; }
.foot-cols h3 { color: var(--teal); font-size: 1rem; margin-bottom: 0.6rem; }
.foot-cols a { color: var(--on-black); text-decoration: none; }
.foot-cols a:hover { color: var(--teal); }
.foot-cols div > a { display: block; margin: 0.45rem 0; }
.foot-cols p { margin: 0.3rem 0; }
.foot-legal { margin-top: 2.2rem; padding-top: 1.2rem; border-top: 1px solid rgba(255, 255, 255, 0.2); font-size: 0.88rem; }

/* ---------- Sign-in page ---------- */
body.auth-page { display: grid; grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr); min-height: 100vh; }
.auth-side {
  display: flex; flex-direction: column; justify-content: space-between; gap: 2.5rem;
  padding: 2.5rem clamp(1.5rem, 4vw, 4rem);
  background: var(--black); color: var(--white);
}
.auth-side .lp-logo { align-self: flex-start; }
.auth-pitch-head {
  font-family: var(--font-display); font-stretch: 112%; font-weight: 800;
  font-size: clamp(1.9rem, 3vw, 2.9rem); line-height: 1.06; letter-spacing: -0.022em;
  max-width: 12em; text-wrap: balance;
}
.auth-pitch ul { margin-top: 2rem; display: grid; gap: 0.9rem; font-size: 1.12rem; }
.auth-pitch li { display: flex; gap: 0.8rem; align-items: baseline; color: var(--on-black); }
.auth-pitch li::before {
  content: ""; flex: 0 0 0.6rem; height: 0.6rem; background: var(--teal); transform: translateY(-0.05rem);
}
.auth-back { color: var(--white); font-weight: 600; text-decoration-color: var(--teal); align-self: flex-start; }
.auth-back:hover { text-decoration-color: var(--white); }

.auth-main { display: grid; place-items: center; padding: 3rem 1.5rem; }
.auth-card { width: min(26rem, 100%); }
.auth-card h1 {
  font-family: var(--font-display); font-stretch: 110%; font-weight: 800;
  font-size: 2.3rem; line-height: 1.08; letter-spacing: -0.02em;
}
.auth-sub { margin-top: 0.4rem; color: var(--muted); font-size: 1.08rem; }
.auth-tabs {
  display: grid; grid-template-columns: 1fr 1fr; gap: 4px; margin: 1.6rem 0 1.5rem;
  padding: 4px; border: 2px solid var(--black); border-radius: 12px;
}
.auth-tabs button {
  border: 0; border-radius: 7px; background: transparent; padding: 0.65rem 0.5rem; font-weight: 700;
  transition: background 0.12s, color 0.12s;
}
.auth-tabs button:hover { background: var(--tint); }
.auth-tabs button[aria-selected="true"] { background: var(--black); color: var(--white); }

.field { margin-bottom: 1.1rem; }
.field label { display: block; font-weight: 700; margin-bottom: 0.35rem; }
.field input {
  width: 100%; height: 52px; padding: 0 0.95rem; font-size: 1.06rem;
  border: 2px solid var(--black); border-radius: 10px; background: var(--white); outline: 0;
  transition: box-shadow 0.12s;
}
.field input:focus { box-shadow: 0 0 0 3px var(--teal); }
.field input[aria-invalid="true"] { box-shadow: inset 5px 0 0 var(--black); padding-left: 1.2rem; }
.field input[aria-invalid="true"]:focus { box-shadow: inset 5px 0 0 var(--black), 0 0 0 3px var(--teal); }
.pw-wrap { position: relative; }
.pw-wrap input { padding-right: 4.6rem; }
.pw-toggle {
  position: absolute; right: 6px; top: 6px; bottom: 6px; padding: 0 0.8rem;
  border: 0; border-radius: 6px; background: transparent; font-weight: 700; font-size: 0.95rem;
}
.pw-toggle:hover { background: var(--tint); }
.field-hint { display: flex; align-items: center; gap: 0.7rem; margin-top: 0.45rem; color: var(--muted); font-size: 0.92rem; }
.pw-meter { flex: 0 0 5.5rem; height: 6px; border-radius: 3px; background: var(--line); overflow: hidden; }
.pw-meter i { display: block; height: 100%; width: 0; background: var(--teal); transition: width 0.15s; }
.field-msg { margin-top: 0.4rem; font-weight: 600; font-size: 0.95rem; }
.field-msg::before { content: "! "; font-weight: 800; }
.auth-error {
  margin-bottom: 1.2rem; padding: 0.8rem 1rem; border-radius: 10px;
  background: var(--black); color: var(--white); font-weight: 600;
}
.auth-submit { min-height: 52px; font-size: 1.06rem; margin-top: 0.4rem; border-radius: 10px; }
.auth-switch { margin-top: 1.4rem; font-size: 1.02rem; }
.auth-switch button {
  border: 0; background: none; padding: 0; font-weight: 700;
  text-decoration: underline; text-decoration-color: var(--teal);
  text-decoration-thickness: 2px; text-underline-offset: 3px;
}
.auth-switch button:hover { text-decoration-color: var(--black); }
.auth-help { margin-top: 0.5rem; color: var(--muted); }
.auth-fine { margin-top: 1.6rem; padding-top: 1.1rem; border-top: 1px solid var(--line); color: var(--muted); font-size: 0.92rem; }
[hidden] { display: none !important; }

@media (max-width: 860px) {
  body.auth-page { display: block; }
  .auth-side { flex-direction: row; align-items: center; padding: 0.6rem 16px; min-height: 72px; gap: 1rem; }
  .auth-pitch { display: none; }
  .auth-back { align-self: center; font-size: 0.95rem; text-align: right; }
  .auth-main { padding: 2.2rem 16px 3rem; place-items: start center; }
  .auth-card h1 { font-size: 2rem; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1000px) {
  .hero { padding: 3rem 0 3.5rem; }
  .hero-grid, .p2c-grid { grid-template-columns: 1fr; gap: 2.5rem; }
  .cabinet { max-width: 34rem; }
  .facts-row { grid-template-columns: repeat(2, 1fr); }
  .facts-row li { padding-left: 0; border-left: 0; }
  .facts-row li:nth-child(n + 3) { border-top: 1px solid var(--line); }
  .depts { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .foot-cols { grid-template-columns: 1fr 1fr; }
  .block, .p2c { padding-block: 3.5rem; }
  .block.block-tight { padding-top: 0; }
}

@media (max-width: 860px) {
  .lp-menu { display: block; }
  .lp-nav {
    display: none; position: absolute; left: -24px; right: -24px; top: 72px;
    flex-direction: column; align-items: stretch; gap: 0;
    padding: 0.4rem 24px 1.2rem; background: var(--black);
  }
  .lp-nav.is-open { display: flex; }
  .lp-nav a:not(.btn) { padding: 0.8rem 0; border-bottom: 1px solid rgba(255, 255, 255, 0.2); }
  .lp-nav .lp-signin { margin-left: 0; }
  .lp-nav .btn { margin-top: 1rem; }
}

@media (max-width: 600px) {
  body.lp { font-size: 16px; }
  .wrap { width: calc(100% - 32px); }
  .lp-nav { left: -16px; right: -16px; padding-inline: 16px; }
  .lp-logo img { height: 46px; }
  .hero-search { height: 52px; }
  .hero-search button { padding: 0 1.1rem; }
  .cabinet { gap: 7px; padding: 9px; border-radius: 12px; }
  .drawer { padding: 6px; gap: 6px; }
  .drawer-label { font-size: 0.8rem; padding: 0.35rem 0.15rem; }
  .facts-row { grid-template-columns: 1fr; }
  .facts-row li { padding: 0.85rem 0; }
  .facts-row li + li { border-top: 1px solid var(--line); }
  .depts { grid-template-columns: 1fr; gap: 8px; }
  .dept { grid-template-columns: 56px 1fr; }
  .shelf { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .steps { grid-template-columns: 1fr; gap: 1.5rem; }
  .foot-cols { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
