/* Barlow Condensed, served from this site. Licence: fonts/OFL.txt. */
@font-face {
  font-family: "Barlow Condensed";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("fonts/BarlowCondensed-Bold.woff2") format("woff2");
}

@font-face {
  font-family: "Barlow Condensed";
  font-style: italic;
  font-weight: 800;
  font-display: swap;
  src: url("fonts/BarlowCondensed-ExtraBoldItalic.woff2") format("woff2");
}

/* The app's colours (fitness-app, app/constants/colors.ts). */
:root {
  color-scheme: light;
  --primary: #2F3A70;
  --green: #8EBD38;
  --background: #F2F2F7;
  --text: #1C1C1E;
  /* The app's darker grey (neutralChipText): its usual secondary grey, #8E8E93,
     is too pale to read on this background. */
  --text-secondary: #6E6E73;
  --display: "Barlow Condensed", "Arial Narrow", system-ui, sans-serif;
  --body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--background);
  color: var(--text);
  font: 1rem/1.5 var(--body);
  text-align: center;
}

/* The language picker, top right: the page's language underlined in green,
   the others as links. */
header {
  display: flex;
  justify-content: flex-end;
  padding: max(16px, env(safe-area-inset-top)) max(24px, env(safe-area-inset-right)) 0 max(24px, env(safe-area-inset-left));
}

.languages {
  display: flex;
  gap: 4px;
  font: 700 1.125rem/1 var(--display);
  letter-spacing: 0.06em;
}

.languages a,
.languages span {
  padding: 8px 8px 6px;
  border-bottom: 3px solid transparent;
}

.languages span {
  color: var(--text);
  border-bottom-color: var(--green);
}

.languages a {
  text-decoration: none;
}

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

main {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: clamp(24px, 6vh, 48px) max(24px, env(safe-area-inset-right)) clamp(24px, 6vh, 48px) max(24px, env(safe-area-inset-left));
}

h1 {
  margin: 0;
  /* Follows the screen's width, and its height on a phone held sideways. */
  font: italic 800 clamp(3.5rem, min(25vw, 24vh), 10rem)/0.95 var(--display);
  color: var(--primary);
}

/* The loading bar under the name, leaning like the italic above
   it: a pale blue track that fills with green once, when the page opens, and
   stops at 95%. */
.loading {
  width: clamp(140px, 40vw, 260px);
  height: clamp(8px, 1.6vw, 12px);
  margin-top: clamp(16px, 3vw, 24px);
  background: rgb(47 58 112 / 0.12) linear-gradient(var(--green), var(--green)) no-repeat left / 95% 100%;
  transform: skewX(-12deg);
  animation: loading 1.8s ease-out 0.3s backwards;
}

/* Ends where the bar rests (95%, set above). */
@keyframes loading {
  from { background-size: 0% 100%; }
}

/* Phones set to reduce motion: the bar stays still, 95% full. */
@media (prefers-reduced-motion: reduce) {
  .loading {
    animation: none;
  }
}

.tagline {
  margin: clamp(20px, 3.5vw, 32px) 0 0;
  font: 700 clamp(1.25rem, 7vw, 2.25rem)/1.15 var(--display);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text);
}

.tagline span {
  color: var(--primary);
  white-space: nowrap;
}

.contact {
  margin: 20px 0 0;
  font-size: 1rem;
}

a {
  color: var(--primary);
  font-weight: 600;
  text-underline-offset: 0.2em;
}

a:hover {
  text-decoration-thickness: 2px;
}

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

footer {
  padding: 16px 24px max(20px, env(safe-area-inset-bottom));
  font-size: 0.875rem;
  color: var(--text-secondary);
}
