/*
 * Minuki landing page.
 *
 * The page is a single art-directed frame over a photograph, so it commits to
 * one dark treatment rather than adapting to the viewer's colour scheme.
 * Palette values are sampled from the design comp, not invented.
 */

:root {
  color-scheme: dark;

  --cream: #ece7da;
  --cream-soft: #d5d0c1;
  --nav: #b4b1a1;
  --muted: #8d8a7c;
  --gold: #c2ab7f;
  --olive: rgba(84, 82, 52, 0.78);
  --olive-hi: rgba(99, 96, 62, 0.86);
  --hairline: rgba(236, 231, 218, 0.26);
  --ink: 8, 11, 7;

  --pad-x: clamp(1.4rem, 4vw, 3.4rem);
  --pad-y: clamp(1.3rem, 2.4vw, 2.1rem);
}

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

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

body {
  display: grid;
  grid-template-rows: auto 1fr auto;
  min-height: 100vh;
  min-height: 100svh;
  background: #0b0e08;
  color: var(--cream);
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-weight: 300;
  -webkit-font-smoothing: antialiased;
}

/* ── Background ── */

.stage {
  position: fixed;
  inset: 0;
  z-index: -1;
}

.stage-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 60% center;
}

/* Keeps the copy legible whatever the crop does at extreme aspect ratios. */
.scrim {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to right,
      rgba(var(--ink), 0.62) 0%,
      rgba(var(--ink), 0.40) 34%,
      rgba(var(--ink), 0.10) 66%,
      rgba(var(--ink), 0) 100%),
    linear-gradient(to bottom,
      rgba(var(--ink), 0.42) 0%,
      rgba(var(--ink), 0) 22%,
      rgba(var(--ink), 0) 74%,
      rgba(var(--ink), 0.46) 100%);
}

/* ── Shared ── */

a { color: inherit; text-decoration: none; }
.sprite { position: absolute; }

:focus-visible {
  outline: 1px solid var(--gold);
  outline-offset: 4px;
  border-radius: 2px;
}

.wordmark-mark, .btn-mark, .pillar-icon, .footnote-mark {
  fill: none;
  stroke: currentColor;
  stroke-width: 1;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ── Top bar ── */

.topbar {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: start;
  gap: 1.5rem;
  padding: var(--pad-y) var(--pad-x);
}

.wordmark {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-self: start;
  gap: 0.28rem;
}

.wordmark-mark {
  width: 20px;
  height: 20px;
  color: var(--cream-soft);
  opacity: 0.85;
}

.wordmark-name {
  font-size: clamp(1.28rem, 2.1vw, 1.62rem);
  letter-spacing: 0.34em;
  text-indent: 0.34em;
  text-transform: uppercase;
  line-height: 1;
}

.wordmark-tag {
  color: var(--cream-soft);
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  text-indent: 0.2em;
  opacity: 0.82;
}

.mainnav {
  display: flex;
  gap: clamp(1rem, 2.2vw, 2.05rem);
  align-items: center;
  padding-top: 0.55rem;
}

.mainnav a {
  color: var(--nav);
  font-size: 0.95rem;
  letter-spacing: 0.03em;
  white-space: nowrap;
  transition: color 220ms ease;
}

.mainnav a:hover { color: var(--cream); }

.account {
  display: flex;
  align-items: center;
  justify-self: end;
  gap: clamp(0.9rem, 1.8vw, 1.7rem);
  padding-top: 0.2rem;
}

.login {
  color: var(--nav);
  font-size: 0.95rem;
  letter-spacing: 0.03em;
  white-space: nowrap;
  transition: color 220ms ease;
}

.login:hover { color: var(--cream); }

.account[hidden] { display: none; }

.account { position: relative; }

.account .login { color: var(--cream); }

.account .btn-pill {
  justify-content: center;
  min-width: 7.5rem;
  background: var(--cream);
  border-color: var(--gold);
  color: #242c20;
  font-family: inherit;
  line-height: inherit;
  cursor: pointer;
}

.account .btn-pill:hover { background: #f6f2e8; }

.account .btn-pill:disabled {
  border-style: dashed;
  cursor: default;
}

.account .btn-mark { color: #535b43; }

.account :focus-visible {
  outline: 2px solid var(--cream);
  outline-offset: 2px;
  box-shadow: 0 0 0 2px #0b0e08;
}

.account-error {
  position: absolute;
  top: calc(100% + 0.6rem);
  right: 0;
  width: max-content;
  max-width: min(20rem, calc(100vw - 2 * var(--pad-x)));
  margin: 0;
  padding: 0.5rem 0.75rem;
  background: #f6f2e8;
  border-left: 3px solid #545234;
  border-radius: 4px;
  color: #242c20;
  font-size: 1rem;
  line-height: 1.3;
}

.account-error:empty { display: none; }

.vh {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* ── Buttons ── */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 0.98rem;
  letter-spacing: 0.035em;
  white-space: nowrap;
  transition: background 240ms ease, border-color 240ms ease, color 240ms ease;
}

.btn-mark {
  width: 15px;
  height: 15px;
  color: var(--gold);
  flex: none;
}

.btn-pill {
  padding: 0.5rem 1.15rem;
  border-color: var(--hairline);
}

.btn-pill:hover { border-color: rgba(236, 231, 218, 0.5); }

.btn-solid {
  padding: 0.78rem 1.5rem;
  background: var(--olive);
  border-color: rgba(236, 231, 218, 0.14);
}

.btn-solid:hover { background: var(--olive-hi); }

.btn-ghost {
  padding: 0.78rem 1.5rem;
  border-color: var(--hairline);
}

.btn-ghost:hover { border-color: rgba(236, 231, 218, 0.5); }

/* ── Hero ── */

.hero {
  align-self: center;
  padding: 1rem var(--pad-x) 2rem;
}

.hero-title {
  max-width: 15ch;
  font-size: clamp(2.5rem, 6.1vw, 4.45rem);
  font-weight: 300;
  line-height: 1.08;
  letter-spacing: 0.004em;
}

.hero-rule {
  width: 58px;
  height: 1px;
  margin: 2.1rem 0 1.5rem;
  background: var(--gold);
  opacity: 0.85;
}

.hero-lede {
  max-width: 42ch;
  color: var(--cream-soft);
  font-size: clamp(1rem, 1.15vw, 1.1rem);
  line-height: 1.62;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-top: 2.15rem;
}

/* ── Pillars ── */

.pillars {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(1.3rem, 2.5vw, 2.5rem);
  margin-top: 3rem;
  list-style: none;
}

.pillars a {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
  width: 4.6rem;
  color: var(--cream-soft);
  text-align: center;
  transition: color 220ms ease;
}

.pillars a:hover { color: var(--cream); }

.pillar-icon {
  width: 26px;
  height: 26px;
  color: var(--gold);
  opacity: 0.9;
}

.pillars span {
  font-size: 0.76rem;
  letter-spacing: 0.055em;
  line-height: 1.3;
}

/* ── Footnote ── */

.footnote {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.9rem;
  padding: var(--pad-y) var(--pad-x);
  color: var(--muted);
  font-size: 0.82rem;
  letter-spacing: 0.045em;
}

.footnote-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin-left: auto;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.footnote-link:hover { color: var(--cream); }

.footnote-mark {
  width: 18px;
  height: 18px;
  opacity: 0.75;
}

.pipe {
  width: 1px;
  height: 13px;
  background: var(--hairline);
}

/* ── Entrance ── */

.topbar, .hero, .footnote { animation: rise 1.1s ease both; }
.hero { animation-delay: 0.12s; }
.footnote { animation-delay: 0.24s; }

@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: none; }
}

/* ── Narrow ── */

@media (max-width: 1040px) {
  .topbar {
    grid-template-columns: 1fr auto;
    row-gap: 1rem;
  }

  .mainnav {
    grid-column: 1 / -1;
    grid-row: 2;
    padding-top: 0;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .mainnav::-webkit-scrollbar { display: none; }
}

@media (max-width: 640px) {
  .stage-img { object-position: 68% center; }

  .scrim {
    background:
      linear-gradient(to right,
        rgba(var(--ink), 0.86) 0%,
        rgba(var(--ink), 0.66) 50%,
        rgba(var(--ink), 0.42) 100%),
      linear-gradient(to bottom,
        rgba(var(--ink), 0.5) 0%,
        rgba(var(--ink), 0.15) 30%,
        rgba(var(--ink), 0.55) 100%);
  }

  .hero-lede br { display: none; }
  .pillars { gap: 1.5rem 1.1rem; }
  .pillars a { width: 4.2rem; }
  .footnote { gap: 0.55rem; font-size: 0.74rem; }

  .mainnav { gap: 1.05rem; }
  .mainnav a { font-size: 0.88rem; }

  .topbar {
    grid-template-columns: 1fr;
    gap: 0.875rem;
  }

  .account {
    grid-column: 1;
    grid-row: 2;
    flex-wrap: wrap;
    justify-self: stretch;
    justify-content: space-between;
    padding-top: 0;
  }

  .mainnav {
    grid-row: 3;
    margin-right: calc(-1 * var(--pad-x));
    padding-bottom: 2px;
  }

  .account .login {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    font-size: 1.15rem;
  }

  .account .btn-pill {
    min-height: 44px;
    padding: 0.6rem 1.35rem;
  }

  .account-error {
    position: static;
    flex-basis: 100%;
    width: auto;
    max-width: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .topbar, .hero, .footnote { animation: none; }
  * { transition-duration: 1ms !important; }
}
