/* Brea's Fitness website. Colours, radii and type from the app (src/ui/theme.ts). */
:root {
  --background: #ffffff;
  --surface: #f6f2ee;
  --surface-strong: #ece4dd;
  --ink: #2e2522;
  --ink-muted: #6e635d;
  --border: #e3dad3;
  --primary: #3a2e2a;
  --primary-ink: #ffffff;
  --primary-soft: #efe7e0;
  --accent: #931d1b;
  --radius-md: 12px;
  --radius-lg: 16px;
  --content: 64rem;
  --text: 42rem;
}

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

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

body {
  margin: 0;
  background: var(--background);
  color: var(--ink);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 1rem;
  line-height: 1.6;
}

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

a {
  color: var(--primary);
  text-underline-offset: 0.15em;
}

:focus-visible {
  outline: 3px solid var(--primary);
  outline-offset: 3px;
  border-radius: 4px;
}

h1,
h2,
h3 {
  line-height: 1.2;
  margin: 0;
}

p {
  margin: 0;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 10;
  padding: 0.5rem 1rem;
  background: var(--primary);
  color: var(--primary-ink);
  border-radius: var(--radius-md);
}

.skip-link:focus {
  top: 1rem;
}

.wrap {
  width: 100%;
  max-width: var(--content);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Header ------------------------------------------------------------------ */

.site-header {
  border-bottom: 1px solid var(--border);
  background: var(--background);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 4rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  text-decoration: none;
}

.brand-symbol {
  width: auto;
  height: 2.25rem;
}

.brand-wordmark {
  width: auto;
  height: 1rem;
}

.languages {
  display: flex;
  gap: 0.25rem;
}

.languages a {
  display: inline-block;
  min-width: 2.75rem;
  padding: 0.375rem 0.625rem;
  border-radius: 999px;
  color: var(--ink-muted);
  font-size: 0.875rem;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
}

.languages a:hover {
  color: var(--primary);
  background: var(--primary-soft);
}

.languages a[aria-current="page"] {
  color: var(--primary-ink);
  background: var(--primary);
}

/* Hero -------------------------------------------------------------------- */

.hero {
  padding: 4rem 0 4.5rem;
  text-align: center;
}

.hero-logo {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
  margin-bottom: 2rem;
}

.hero-symbol {
  width: auto;
  height: 8rem;
  animation: symbol-in 0.9s ease-out both;
}

.hero-wordmark {
  width: min(22rem, 80vw);
  animation: rise-in 0.6s ease-out 0.45s both;
}

.hero-text {
  animation: fade-in 0.6s ease-out 0.8s both;
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  padding: 0.375rem 0.875rem;
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--primary);
  font-size: 0.875rem;
  font-weight: 600;
}

.status::before {
  content: "";
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: var(--accent);
}

.hero h1 {
  max-width: var(--text);
  margin: 0 auto 1rem;
  font-size: clamp(1.875rem, 5vw, 2.75rem);
  font-weight: 700;
  letter-spacing: -0.01em;
}

.lead {
  max-width: var(--text);
  margin: 0 auto;
  color: var(--ink-muted);
  font-size: 1.125rem;
}

/* Sections ---------------------------------------------------------------- */

.section {
  padding: 4rem 0;
}

.section-alt {
  background: var(--surface);
}

.section h2 {
  margin-bottom: 1rem;
  font-size: clamp(1.5rem, 3.5vw, 2rem);
  font-weight: 700;
}

.section-intro {
  max-width: var(--text);
  margin-bottom: 2rem;
  color: var(--ink-muted);
  font-size: 1.0625rem;
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
  gap: 1rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.card {
  padding: 1.5rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--background);
}

.card h3 {
  margin-bottom: 0.5rem;
  font-size: 1.125rem;
  font-weight: 700;
}

.card h3::before {
  content: "";
  display: block;
  width: 2rem;
  height: 3px;
  margin-bottom: 0.875rem;
  border-radius: 2px;
  background: var(--accent);
}

.card p {
  color: var(--ink-muted);
}

.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
  gap: 1rem;
  margin: 0 0 1.5rem;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.steps li {
  counter-increment: step;
}

.steps h3::before {
  content: counter(step);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  margin-bottom: 0.875rem;
  border-radius: 50%;
  background: var(--accent);
  color: #ffffff;
  font-size: 0.9375rem;
}

.note {
  color: var(--ink-muted);
  font-style: italic;
}

.notice {
  max-width: 48rem;
  padding: 1.75rem;
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius-lg);
  background: var(--surface);
}

.notice h3 {
  margin: 1.25rem 0 0.375rem;
  font-size: 1rem;
  font-weight: 700;
}

.notice h3:first-child {
  margin-top: 0;
}

.notice p + p {
  margin-top: 0.5rem;
}

.notice p {
  color: var(--ink-muted);
}

.development {
  max-width: var(--text);
}

.development p {
  font-size: 1.0625rem;
}

.development p + p {
  margin-top: 0.75rem;
}

/* Footer ------------------------------------------------------------------ */

.site-footer {
  padding: 2rem 0;
  border-top: 1px solid var(--border);
  color: var(--ink-muted);
  font-size: 0.875rem;
}

.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1.5rem;
}

.site-footer .brand-symbol {
  height: 1.75rem;
}

/* Language chooser (/) and 404 ------------------------------------------ */

.chooser {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  min-height: 100vh;
  padding: 2rem 1.5rem;
  text-align: center;
}

.chooser .stacked {
  width: min(18rem, 70vw);
}

.chooser-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
}

.button {
  display: inline-block;
  min-width: 9rem;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-md);
  background: var(--primary);
  color: var(--primary-ink);
  font-weight: 600;
  text-decoration: none;
}

.button:hover {
  background: #2e2522;
}

.chooser p {
  color: var(--ink-muted);
}

/* Motion: same idea as the app's launch animation ------------------------ */

@keyframes symbol-in {
  from {
    opacity: 0;
    transform: scale(0.86);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes rise-in {
  from {
    opacity: 0;
    transform: translateY(0.75rem);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fade-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-symbol,
  .hero-wordmark,
  .hero-text {
    animation: none;
  }
}

@media (max-width: 30rem) {
  .brand-wordmark {
    display: none;
  }

  .hero {
    padding-top: 3rem;
  }

  .hero-symbol {
    height: 6.5rem;
  }
}
