/* The website's look. Colors come from colors.css (made from src/theme.ts); fonts match the app. */
* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: 'DM Sans', system-ui, sans-serif;
  font-size: 18px;
  line-height: 1.55;
  overflow-x: hidden;
}

h1,
h2,
h3,
.wordmark {
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 600;
  line-height: 1.2;
  margin: 0;
}

h2 {
  font-size: clamp(30px, 5vw, 44px);
}

.top,
main,
.bottom {
  max-width: 1040px;
  margin: 0 auto;
  padding: 0 22px;
}

/* Read by screen readers, hidden from view. */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* Header */
.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 22px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  text-decoration: none;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Language menu: a round button with a globe and the language code, opening a small card of languages. */
.lang-menu {
  position: relative;
}

.lang-menu summary {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper);
  color: var(--ink);
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  list-style: none;
}

.lang-menu summary::-webkit-details-marker {
  display: none;
}

.lang-menu summary:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

.lang-menu svg {
  fill: none;
  stroke: var(--accent);
  stroke-width: 1.8;
}

.lang-list {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  z-index: 10;
  display: grid;
  min-width: 230px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--paper);
  box-shadow: 0 20px 40px -20px var(--backdrop);
}

.lang-list a {
  padding: 10px 12px;
  border-radius: 10px;
  color: var(--ink);
  text-decoration: none;
}

.lang-list a:hover {
  background: var(--pink);
}

.lang-list a[aria-current='page'] {
  color: var(--accent);
  font-weight: 600;
}

.lang-list a[aria-current='page']::after {
  content: ' ✓';
}

.logo {
  border-radius: 12px;
}

.wordmark {
  font-size: 24px;
}

.pill,
.button {
  display: inline-block;
  border: 0;
  border-radius: 999px;
  background: var(--accent);
  color: var(--onAccent);
  font:
    600 16px 'DM Sans',
    system-ui,
    sans-serif;
  padding: 12px 22px;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.pill:hover,
.button:hover {
  transform: translateY(-2px);
}

/* Hero */
.hero {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  align-items: center;
  gap: 36px;
  padding: 56px 0 40px;
}

h1 {
  font-size: clamp(40px, 7vw, 68px);
}

.intro {
  color: var(--muted);
  font-size: 21px;
  max-width: 30ch;
  margin: 18px 0 30px;
}

.stores {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.store {
  display: inline-flex;
  flex-direction: column;
  min-width: 150px;
  padding: 8px 18px;
  border-radius: 12px;
  background: var(--ink);
  color: var(--bg);
  line-height: 1.25;
  opacity: 0.85;
}

.store-small {
  font-size: 12px;
}

.store-name {
  font-size: 19px;
  font-weight: 600;
}

/* Phones: a rounded frame around an animated scene (scenes.css) */
.phone {
  width: min(100%, 280px);
  margin: 0 auto;
  padding: 10px;
  border-radius: 44px;
  background: var(--ink);
  box-shadow: 0 30px 60px -30px var(--backdrop);
}

.hero-phone .phone {
  animation: float 6s ease-in-out infinite;
}

@keyframes float {
  50% {
    transform: translateY(-12px);
  }
}

/* Footer */
.bottom {
  border-top: 1px solid var(--line);
  padding-top: 22px;
  padding-bottom: 36px;
  font-size: 16px;
}

.label {
  display: block;
  color: var(--muted);
  margin-bottom: 8px;
}

.languages {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
}

.languages a {
  color: var(--accent);
  text-decoration: none;
  padding: 8px 0;
}

.languages a:hover {
  text-decoration: underline;
}

.languages a[aria-current='page'] {
  color: var(--ink);
  font-weight: 600;
}

.footer-columns {
  display: flex;
  flex-wrap: wrap;
  gap: 22px 64px;
}

.contact-soon {
  margin: 0;
  color: var(--muted);
}

.made {
  color: var(--muted);
  margin: 22px 0 0;
}

.made a {
  color: var(--accent);
}

/* Fade in while scrolling. Only when the script runs (.js), and never for people who turned motion off. */
.js .reveal {
  opacity: 0;
  transform: translateY(28px);
  transition:
    opacity 0.8s ease,
    transform 0.8s ease;
}

.js .reveal.shown {
  opacity: 1;
  transform: none;
}

.step-text {
  transition-delay: 0.12s;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .js .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .hero-phone .phone {
    animation: none;
  }
}

/* Phones and small windows: one column */
@media (max-width: 760px) {
  .hero {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .hero {
    padding-top: 36px;
  }

  .intro {
    margin-left: auto;
    margin-right: auto;
  }

  .stores {
    justify-content: center;
  }

  .phone {
    width: min(100%, 240px);
  }

  .top .pill {
    padding: 10px 16px;
    font-size: 15px;
  }

  .wordmark {
    font-size: 21px;
  }

  /* The language list spans the screen instead of hanging off its left edge. */
  .lang-list {
    position: fixed;
    top: 76px;
    left: 16px;
    right: 16px;
    min-width: 0;
  }
}

/* Small phones: the header keeps the icon, the language button and Create account, without the word. */
@media (max-width: 440px) {
  .top .wordmark {
    display: none;
  }
}
