/* Muday Wallet site. Colours and card finishes match the app (src/theme/index.ts). */
:root {
  --night: #1a1820;
  --night-deep: #0f0e12;
  --ink: #f2eee6;
  --muted: #aba5b0;
  --rule: rgba(242, 238, 230, 0.14);
  --gold: #e2b04a;
  --gold-light: #f3d489;
  --gold-dark: #a9792a;

  --onyx: #1c1c1e;
  --slate: #4a5561;
  --oak: #a47a4e;
  --walnut: #5a3f31;
  --army: #4b5235;
  --cognac: #a35e2c;
  --navy: #26334a;
  --burgundy: #5e2530;
  --copper: #6a3527;
  --teal: #2d6870;
  --platinum: #d4d5d8;

  --display: 'Cormorant Garamond', Georgia, serif;
  --text: 'Lora', Georgia, serif;
  --measure: 34rem;
  --gutter: clamp(1rem, 5vw, 4rem);
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  background: radial-gradient(120% 70% at 75% 0%, #2b2830 0%, var(--night) 55%, var(--night-deep) 100%) fixed;
  background-color: var(--night);
  color: var(--ink);
  font-family: var(--text);
  font-size: 1.0625rem;
  line-height: 1.7;
  overflow-x: hidden;
}

a {
  color: var(--gold-light);
  text-underline-offset: 0.2em;
}

a:focus-visible,
.button:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
  border-radius: 6px;
}

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

h1,
h2,
h3 {
  font-family: var(--display);
  font-weight: 500;
  line-height: 1.05;
  margin: 0;
  letter-spacing: -0.01em;
}

h1 {
  font-size: clamp(2.9rem, 7vw, 5.4rem);
}

h2 {
  font-size: clamp(2.2rem, 4.6vw, 3.4rem);
}

h3 {
  font-size: 1.6rem;
  line-height: 1.2;
}

p {
  margin: 0;
  max-width: var(--measure);
}

.wrap {
  max-width: 72rem;
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* Header */

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 1.5rem;
  padding-bottom: 1.5rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--ink);
  text-decoration: none;
  font-family: var(--display);
  font-size: 1.5rem;
  font-weight: 600;
}

.brand img {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 0.55rem;
}

.site-header nav {
  display: flex;
  gap: 1.5rem;
  font-size: 0.95rem;
}

.site-header nav a {
  color: var(--muted);
  text-decoration: none;
}

.site-header nav a:hover {
  color: var(--ink);
}

/* Hero */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(2rem, 6vw, 5rem);
  align-items: center;
  padding-top: clamp(2rem, 6vw, 5rem);
  padding-bottom: clamp(4rem, 9vw, 8rem);
}

.hero h1 {
  max-width: 11ch;
}

.lede {
  margin-top: 1.5rem;
  font-size: 1.2rem;
  color: var(--muted);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 1.5rem;
  margin-top: 2.25rem;
}

.button {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.9rem 1.5rem;
  border-radius: 999px;
  background: var(--ink);
  color: var(--night);
  font-weight: 600;
  text-decoration: none;
}

.button[aria-disabled='true'] {
  cursor: default;
}

/* The card stack: the wallet's own stack, bands above and the front card at the bottom. */

.stack {
  position: relative;
  aspect-ratio: 1 / 1.08;
  width: min(100%, 30rem);
  justify-self: end;
}

.card {
  --finish: var(--onyx);
  --card-ink: var(--ink);
  position: absolute;
  left: 0;
  right: 0;
  aspect-ratio: 1.586;
  border-radius: 1.25rem;
  padding: 1.1rem 1.25rem;
  color: var(--card-ink);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.02) 50%, rgba(0, 0, 0, 0.22)),
    var(--finish);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.18),
    0 -10px 24px rgba(0, 0, 0, 0.35);
}

.card.wood {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.02) 50%, rgba(0, 0, 0, 0.22)),
    repeating-linear-gradient(176deg, rgba(0, 0, 0, 0) 0 14px, rgba(0, 0, 0, 0.06) 14px 16px, rgba(255, 255, 255, 0.03) 16px 30px),
    var(--finish);
}

.card-top {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.disc {
  flex: none;
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 0.65rem;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.14);
}

.disc svg {
  width: 1.2rem;
  height: 1.2rem;
}

.card-name {
  font-family: var(--display);
  font-size: 1.45rem;
  font-weight: 600;
  line-height: 1.1;
}

.card-kind {
  font-size: 0.78rem;
  opacity: 0.75;
}

.stack .card:nth-child(1) { top: 0; --finish: var(--navy); }
.stack .card:nth-child(2) { top: 10%; --finish: var(--burgundy); }
.stack .card:nth-child(3) { top: 20%; --finish: var(--cognac); }
.stack .card:nth-child(4) { top: 30%; --finish: var(--army); }

.stack .front {
  top: 40%;
  --finish: var(--onyx);
  box-shadow:
    inset 0 0 0 1.5px rgba(226, 176, 74, 0.85),
    0 -10px 24px rgba(0, 0, 0, 0.35),
    0 30px 60px rgba(0, 0, 0, 0.55);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.barcode {
  background: #f2f0ec;
  border-radius: 0.8rem;
  padding: 0.7rem 0.9rem 0.45rem;
  color: #000;
  text-align: center;
}

.barcode svg {
  width: 100%;
  height: 2.6rem;
}

.barcode span {
  display: block;
  font-family: var(--text);
  font-size: 0.85rem;
  letter-spacing: 0.18em;
  margin-top: 0.2rem;
}

/* One entrance: the cards drop into the stack in turn, like the wallet opening. */
@media (prefers-reduced-motion: no-preference) {
  .stack .card {
    animation: settle 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) both;
  }
  .stack .card:nth-child(1) { animation-delay: 0.05s; }
  .stack .card:nth-child(2) { animation-delay: 0.15s; }
  .stack .card:nth-child(3) { animation-delay: 0.25s; }
  .stack .card:nth-child(4) { animation-delay: 0.35s; }
  .stack .card:nth-child(5) { animation-delay: 0.5s; }
}

@keyframes settle {
  from {
    opacity: 0;
    transform: translateY(-2.5rem) scale(0.97);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* Sections */

.section {
  padding-top: clamp(4rem, 9vw, 7rem);
  padding-bottom: clamp(4rem, 9vw, 7rem);
  border-top: 1px solid var(--rule);
}

.section-head {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: 1.5rem clamp(2rem, 6vw, 5rem);
  align-items: end;
}

.section-head p {
  color: var(--muted);
}

/* Everything it holds: one row of real card faces */

.rail {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(13.5rem, 1fr));
  gap: 1.25rem;
  margin-top: 3rem;
  padding: 0;
  list-style: none;
}

.rail .card {
  position: relative;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.18),
    0 18px 36px rgba(0, 0, 0, 0.4);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.rail .card-name {
  font-size: 1.3rem;
}

.card-detail {
  font-size: 0.82rem;
  opacity: 0.85;
}

.card.light {
  --card-ink: #1c1a1f;
}

.card.light .disc {
  background: rgba(0, 0, 0, 0.75);
  color: #fff;
}

/* Private */

.private {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: 3rem clamp(2rem, 6vw, 5rem);
}

.engraved {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(2.6rem, 6vw, 4.6rem);
  line-height: 1;
  color: var(--gold);
  text-shadow:
    0 -2px 0 rgba(0, 0, 0, 0.7),
    0 1px 0 rgba(255, 255, 255, 0.12);
}

.private .engraved + p {
  margin-top: 1.5rem;
  color: var(--muted);
}

.facts {
  margin: 0;
  display: grid;
  gap: 1.75rem;
}

.facts div {
  padding-left: 1.25rem;
  border-left: 1px solid var(--gold-dark);
}

.facts dt {
  font-family: var(--display);
  font-size: 1.5rem;
  font-weight: 600;
}

.facts dd {
  margin: 0.25rem 0 0;
  color: var(--muted);
}

/* Nearby */

.nearby {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 3rem clamp(2rem, 6vw, 5rem);
  align-items: center;
}

.nearby h2 {
  margin-bottom: 1.25rem;
}

.nearby p + p {
  margin-top: 1rem;
}

.nearby .muted {
  color: var(--muted);
}

.place {
  position: relative;
  aspect-ratio: 1.2;
  border-radius: 1.5rem;
  background:
    radial-gradient(circle at 50% 26%, rgba(45, 104, 112, 0.55) 0 9%, rgba(45, 104, 112, 0.18) 9.5% 22%, rgba(45, 104, 112, 0.06) 22.5% 38%, transparent 38.5%),
    linear-gradient(90deg, transparent 0 calc(50% - 1px), rgba(242, 238, 230, 0.06) calc(50% - 1px) calc(50% + 1px), transparent calc(50% + 1px)),
    linear-gradient(0deg, transparent 0 calc(74% - 1px), rgba(242, 238, 230, 0.06) calc(74% - 1px) calc(74% + 1px), transparent calc(74% + 1px)),
    #1f1d25;
  overflow: hidden;
}

.place .card {
  left: 18%;
  right: 18%;
  bottom: 9%;
  --finish: var(--cognac);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.18),
    0 20px 40px rgba(0, 0, 0, 0.5);
}

.pin {
  position: absolute;
  left: 50%;
  top: 26%;
  width: 1rem;
  height: 1rem;
  margin: -0.5rem 0 0 -0.5rem;
  border-radius: 50%;
  background: var(--ink);
  box-shadow: 0 0 0 5px rgba(242, 238, 230, 0.2);
}

/* Screens */

.screens {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(1rem, 3vw, 2.5rem);
  margin-top: 3rem;
}

.screens figure {
  margin: 0;
}

.screens img {
  width: 100%;
  height: auto;
  border-radius: 2rem;
  border: 1px solid var(--rule);
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.45);
}

.screens figcaption {
  margin-top: 1rem;
  color: var(--muted);
  font-size: 0.95rem;
}

/* Footer */

.site-footer {
  border-top: 1px solid var(--rule);
  padding-top: 2.5rem;
  padding-bottom: 3rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem 2rem;
  color: var(--muted);
  font-size: 0.95rem;
}

.site-footer nav {
  display: flex;
  gap: 1.5rem;
}

.site-footer a {
  color: var(--muted);
}

/* Text pages: privacy and support */

.page {
  padding-top: clamp(2rem, 5vw, 4rem);
  padding-bottom: clamp(4rem, 8vw, 6rem);
  max-width: 44rem;
}

.page h1 {
  font-size: clamp(2.6rem, 6vw, 4rem);
}

.page .updated {
  margin-top: 0.75rem;
  color: var(--muted);
}

.page h2 {
  font-size: 1.9rem;
  margin-top: 2.75rem;
  margin-bottom: 0.75rem;
}

.page p + p {
  margin-top: 1rem;
}

.page .summary {
  margin-top: 2rem;
  padding: 1.5rem 1.75rem;
  border-left: 2px solid var(--gold);
  background: rgba(242, 238, 230, 0.04);
  font-size: 1.15rem;
}

/* Small screens */

@media (max-width: 52rem) {
  .hero,
  .section-head,
  .private,
  .nearby {
    grid-template-columns: minmax(0, 1fr);
  }

  .stack {
    justify-self: center;
  }

  .screens {
    grid-template-columns: minmax(0, 1fr);
    max-width: 22rem;
  }

  .site-header nav a.optional {
    display: none;
  }
}

/* On a phone the bands are only a few lines tall, so the cards' headings shrink to fit them. */
@media (max-width: 30rem) {
  .stack .card {
    padding: 0.55rem 0.9rem;
  }

  .stack .disc {
    width: 1.7rem;
    height: 1.7rem;
    border-radius: 0.5rem;
  }

  .stack .disc svg {
    width: 0.95rem;
    height: 0.95rem;
  }

  .stack .card-name {
    font-size: 1.1rem;
  }

  .stack .card:not(.front) .card-kind {
    display: none;
  }

  .stack .front {
    padding: 0.8rem 0.9rem;
  }
}
