:root {
  color-scheme: light;
  --ink: #292520;
  --muted-ink: #655d54;
  --ivory: #f5eee5;
  --focus: #785b40;
  --serif: Didot, "Bodoni 72", "Bodoni MT", "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial,
    sans-serif;
}

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

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
}

body {
  position: relative;
  min-width: 320px;
  background: #e9ddcf;
  color: var(--ink);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body::before,
body::after {
  position: fixed;
  z-index: -2;
  content: "";
  pointer-events: none;
}

body::before {
  inset: -2rem;
  background-image: url("assets/soft-edit-background.webp");
  background-position: center;
  background-size: cover;
}

body::after {
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(
      circle at 50% 50%,
      rgba(255, 251, 246, 0.44) 0%,
      rgba(250, 244, 236, 0.25) 34%,
      rgba(237, 225, 211, 0.14) 72%,
      rgba(215, 197, 178, 0.18) 100%
    ),
    linear-gradient(rgba(255, 252, 248, 0.08), rgba(235, 222, 207, 0.12));
}

.hero {
  position: relative;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  width: 100%;
  height: 100vh;
  height: 100svh;
  padding:
    max(clamp(0.875rem, 3svh, 2.5rem), env(safe-area-inset-top))
    max(clamp(1rem, 5vw, 4rem), env(safe-area-inset-right))
    max(clamp(0.875rem, 3svh, 2.5rem), env(safe-area-inset-bottom))
    max(clamp(1rem, 5vw, 4rem), env(safe-area-inset-left));
  text-align: center;
}

.hero__copy {
  align-self: end;
  width: min(100%, 48rem);
  margin: 0 auto clamp(0.875rem, 2.6svh, 1.75rem);
}

h1 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(2rem, 1.35rem + 2.3vw, 4rem);
  font-weight: 400;
  line-height: 0.98;
  letter-spacing: -0.035em;
  text-wrap: balance;
}

.hero__copy p {
  max-width: 36rem;
  margin: clamp(0.65rem, 1.5svh, 1rem) auto 0;
  color: var(--muted-ink);
  font-size: clamp(0.9375rem, 0.86rem + 0.3vw, 1.125rem);
  font-weight: 400;
  line-height: 1.5;
  letter-spacing: -0.006em;
  text-wrap: balance;
}

.hero__mark {
  display: grid;
  justify-self: center;
  width: clamp(9.25rem, min(30vw, 31svh), 18rem);
  aspect-ratio: 1;
  place-items: center;
}

.hero__mark img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 1.25rem 1.6rem rgba(58, 43, 29, 0.13));
}

.hero__actions {
  display: flex;
  align-self: start;
  flex-direction: column;
  align-items: center;
  margin-top: clamp(0.875rem, 2.6svh, 1.75rem);
}

.store-button {
  display: inline-flex;
  min-height: 3.25rem;
  align-items: center;
  justify-content: center;
  gap: 0.7rem;
  padding: 0.875rem 1.35rem 0.9rem 1.55rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  background: var(--ink);
  box-shadow: 0 0.6rem 1.5rem rgba(42, 34, 27, 0.16);
  color: var(--ivory);
  font-size: 0.9375rem;
  font-weight: 550;
  line-height: 1;
  text-decoration: none;
  transition:
    transform 180ms ease,
    box-shadow 180ms ease,
    background-color 180ms ease;
}

.store-button svg {
  flex: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.45;
  transition: transform 180ms ease;
}

.store-button:hover {
  background: #3a342e;
  box-shadow: 0 0.85rem 1.8rem rgba(42, 34, 27, 0.2);
  transform: translateY(-2px);
}

.store-button:hover svg {
  transform: translateX(2px);
}

.store-button:active {
  box-shadow: 0 0.35rem 0.9rem rgba(42, 34, 27, 0.15);
  transform: translateY(0);
}

.store-button--disabled {
  border-color: rgba(41, 37, 32, 0.12);
  background: rgba(41, 37, 32, 0.82);
  box-shadow: none;
  cursor: default;
}

.store-button--disabled:hover,
.store-button--disabled:active {
  background: rgba(41, 37, 32, 0.82);
  box-shadow: none;
  transform: none;
}

.support-link {
  margin-top: clamp(0.75rem, 1.8svh, 1rem);
  color: var(--muted-ink);
  font-size: 0.8125rem;
  line-height: 1.4;
  text-decoration: none;
}

.support-link span {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: rgba(41, 37, 32, 0.35);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.22em;
  transition: text-decoration-color 160ms ease;
}

.support-link:hover span {
  text-decoration-color: currentColor;
}

.hero__footer {
  position: absolute;
  right: max(1rem, env(safe-area-inset-right));
  bottom: max(0.875rem, env(safe-area-inset-bottom));
  left: max(1rem, env(safe-area-inset-left));
  line-height: 1;
  text-align: center;
}

.privacy-link {
  color: rgba(61, 54, 47, 0.72);
  font-size: 0.75rem;
  letter-spacing: 0.01em;
  text-decoration-color: rgba(61, 54, 47, 0.3);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.22em;
  transition:
    color 160ms ease,
    text-decoration-color 160ms ease;
}

.privacy-link:hover {
  color: var(--ink);
  text-decoration-color: currentColor;
}

.store-button:focus-visible,
.support-link:focus-visible,
.privacy-link:focus-visible {
  border-radius: 999px;
  outline: 3px solid var(--focus);
  outline-offset: 4px;
}

@media (max-width: 26rem) {
  h1 {
    font-size: clamp(1.9rem, 9.6vw, 2.35rem);
  }

  .hero__copy p {
    max-width: 19rem;
  }
}

@media (max-height: 40rem) and (orientation: portrait) {
  .hero {
    padding-top: max(0.75rem, env(safe-area-inset-top));
    padding-bottom: max(0.75rem, env(safe-area-inset-bottom));
  }

  .hero__copy {
    margin-bottom: 0.75rem;
  }

  .hero__mark {
    width: clamp(8.75rem, 26svh, 10rem);
  }

  .hero__actions {
    margin-top: 0.75rem;
  }

  .store-button {
    min-height: 3rem;
    padding-top: 0.75rem;
    padding-bottom: 0.8rem;
  }

  .support-link {
    margin-top: 0.6rem;
  }
}

@media (max-height: 31rem) and (orientation: landscape) {
  .hero {
    grid-template: 1fr / minmax(0, 1fr) auto minmax(0, 1fr);
    gap: clamp(1rem, 3vw, 2.5rem);
    padding-top: max(0.75rem, env(safe-area-inset-top));
    padding-bottom: max(0.75rem, env(safe-area-inset-bottom));
  }

  .hero__copy {
    align-self: center;
    margin: 0;
    text-align: right;
  }

  h1 {
    font-size: clamp(1.65rem, 4.7vw, 2.75rem);
  }

  .hero__copy p {
    margin-right: 0;
    font-size: 0.875rem;
  }

  .hero__mark {
    width: clamp(7rem, 42svh, 11rem);
  }

  .hero__actions {
    align-self: center;
    align-items: flex-start;
    margin: 0;
  }

  .store-button {
    white-space: nowrap;
  }
}

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