/*
 * etagia.ch - pre-launch placeholder.
 *
 * Tokens are lifted verbatim from the product's single source of truth,
 * src/app/globals.css in the etagia repo. Two deliberate departures, both
 * forced by this being a static page with no next-themes script:
 *   1. the dark set hangs off `prefers-color-scheme` instead of a `.dark`
 *      class, so there is no theme toggle and no flash-of-wrong-theme;
 *   2. the handful of Tailwind utilities the page needs are hand-written
 *      below rather than pulling a build step into a ConfigMap.
 * The VALUES are unchanged - keep them in sync with globals.css.
 */

/* Instrument Sans, latin subset, variable 400..700. Self-hosted: the product
   loads this via next/font precisely so no request reaches Google (FR-004),
   and a placeholder that phoned home would quietly break that promise. */
@font-face {
  font-family: "Instrument Sans";
  font-style: normal;
  font-weight: 400 700;
  font-stretch: 100%;
  font-display: swap;
  src: url(instrument-sans-latin.woff2) format("woff2");
  unicode-range: U+00-FF, U+131, U+152-153, U+2BB-2BC, U+2C6, U+2DA, U+2DC,
    U+304, U+308, U+329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212,
    U+2215, U+FEFF, U+FFFD;
}

/* Metric overrides copied from the app's generated fallback face, so the
   swap from Arial costs no layout shift. */
@font-face {
  font-family: "Instrument Sans Fallback";
  src: local(Arial);
  ascent-override: 94.42%;
  descent-override: 24.33%;
  line-gap-override: 0%;
  size-adjust: 102.74%;
}

:root {
  color-scheme: light;

  --radius: 0.625rem;
  --radius-lg: var(--radius);
  --radius-xl: calc(var(--radius) + 4px);

  --motion-duration-md: 250ms;
  --motion-ease-standard: cubic-bezier(0.2, 0, 0, 1);

  --background: oklch(0.99 0.003 195);
  --foreground: oklch(0.22 0.012 230);
  --card: oklch(1 0 0);
  --card-foreground: oklch(0.22 0.012 230);

  --primary: oklch(0.52 0.1 195);
  --primary-foreground: oklch(0.99 0 0);

  --secondary: oklch(0.96 0.006 210);
  --muted: oklch(0.96 0.006 210);
  --muted-foreground: oklch(0.45 0.014 230);

  --accent: oklch(0.94 0.014 195);
  --accent-foreground: oklch(0.3 0.03 210);

  --border: oklch(0.9 0.005 220);
  --ring: oklch(0.52 0.1 195);
}

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;

    --background: oklch(0.18 0.012 230);
    --foreground: oklch(0.95 0.004 210);
    --card: oklch(0.21 0.014 230);
    --card-foreground: oklch(0.95 0.004 210);

    --primary: oklch(0.7 0.11 195);
    --primary-foreground: oklch(0.18 0.02 230);

    --secondary: oklch(0.27 0.014 230);
    --muted: oklch(0.27 0.014 230);
    --muted-foreground: oklch(0.7 0.012 220);

    --accent: oklch(0.3 0.02 200);
    --accent-foreground: oklch(0.95 0.004 210);

    --border: oklch(1 0 0 / 12%);
    --ring: oklch(0.7 0.11 195);
  }
}

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

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

body {
  margin: 0;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--background);
  color: var(--foreground);
  font-family: "Instrument Sans", "Instrument Sans Fallback", ui-sans-serif,
    system-ui, sans-serif;
  font-size: 1rem;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, p, ul { margin: 0; }
ul { list-style: none; padding: 0; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; }

.container {
  margin-inline: auto;
  width: 100%;
  max-width: 72rem;
  padding-inline: 1rem;
}
@media (min-width: 640px) {
  .container { padding-inline: 1.5rem; }
}

/* Keyboard-only escape hatch out of the header, same pattern as every
   marketing page in the app. */
.skip-link {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.skip-link:focus {
  position: fixed;
  top: 1rem; left: 1rem;
  z-index: 50;
  width: auto; height: auto;
  margin: 0; padding: 0.5rem 1rem;
  clip-path: none;
  border-radius: calc(var(--radius) - 2px);
  background: var(--background);
  color: var(--foreground);
  font-size: 0.875rem;
  font-weight: 500;
  outline: 2px solid var(--ring);
}

/* header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  border-bottom: 1px solid var(--border);
  background: color-mix(in oklab, var(--background) 95%, transparent);
}
@supports (backdrop-filter: blur(8px)) {
  .site-header {
    background: color-mix(in oklab, var(--background) 80%, transparent);
    backdrop-filter: blur(8px);
  }
}
.site-header > .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  min-height: 4rem;
}

.logo { display: inline-flex; align-items: center; min-height: 2.75rem; }
.logo img { height: 1.75rem; width: auto; }
.logo .dark-only { display: none; }
@media (prefers-color-scheme: dark) {
  .logo .light-only { display: none; }
  .logo .dark-only { display: block; }
}

.locales { display: flex; align-items: center; gap: 0.125rem; }
.locales a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  min-width: 2.75rem;
  padding-inline: 0.5rem;
  border-radius: calc(var(--radius) - 2px);
  font-size: 0.875rem;
  font-weight: 500;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--muted-foreground);
  transition: color 150ms var(--motion-ease-standard);
}
.locales a:hover { color: var(--foreground); }

/* language panes */

/*
 * One document, three locales, no JavaScript: only the :target pane is shown,
 * and :has() supplies German when the URL carries no fragment at all. This
 * keeps etagia.ch/#fr shareable, which a radio/checkbox toggle would not, and
 * mirrors the app's own link-based locale switcher.
 */
/*
 * Switching locale must not scroll the page. All three panes start at the same
 * document position and only one is ever displayed, so the top of the page is
 * always the right place to land -- but :target makes the browser scroll the
 * pane to the viewport top, tucking the badge under the sticky header.
 * A scroll-margin larger than the pane's offset from the document top makes the
 * computed target negative, which the browser clamps to 0. Hence 100vh rather
 * than a header-sized nudge: it is the value that reliably means "do not move".
 */
.pane { display: none; scroll-margin-top: 100vh; }
.pane:target { display: block; }
body:not(:has(.pane:target)) #de { display: block; }

/* The switcher marks the active locale off the same :target test, so the
   current language reads correctly with no script involved. */
body:not(:has(.pane:target)) .locales a[href="#de"],
body:has(#de:target) .locales a[href="#de"],
body:has(#fr:target) .locales a[href="#fr"],
body:has(#it:target) .locales a[href="#it"] {
  color: var(--foreground);
}

/* hero */

main { flex: 1 1 auto; }

.hero { padding-block: 3rem 2rem; }
@media (min-width: 640px) {
  .hero { padding-block: 5rem 2rem; }
}
.hero-inner { max-width: 48rem; display: grid; gap: 1.5rem; }

.badge {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: 0.375rem;
  border-radius: 9999px;
  padding: 0.25rem 0.75rem;
  background: color-mix(in oklab, var(--primary) 10%, transparent);
  color: var(--primary);
  font-size: 0.75rem;
  font-weight: 500;
  white-space: nowrap;
}
.badge svg { width: 0.75rem; height: 0.75rem; }

h1 {
  font-size: 2.25rem;
  line-height: 1.1;
  font-weight: 700;
  letter-spacing: -0.025em;
  text-wrap: balance;
}
@media (min-width: 640px) {
  h1 { font-size: 3rem; }
}

.lead {
  font-size: 1.125rem;
  color: var(--muted-foreground);
  text-wrap: pretty;
}

.launch-note {
  font-size: 1rem;
  font-weight: 500;
  color: var(--foreground);
}

.btn {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  height: 2.5rem;
  padding-inline: 1.5rem;
  border-radius: calc(var(--radius) - 2px);
  background: var(--primary);
  color: var(--primary-foreground);
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 150ms var(--motion-ease-standard);
}
.btn:hover { background: color-mix(in oklab, var(--primary) 90%, transparent); }
.btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px color-mix(in oklab, var(--ring) 50%, transparent);
}
@media (pointer: coarse) {
  .btn { min-height: 2.75rem; }
}

/* features */

.features { padding-block: 2.5rem; }
.features ul {
  display: grid;
  gap: 2rem;
  margin-top: 2rem;
}
@media (min-width: 768px) {
  .features ul { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

.card {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  background: var(--card);
  color: var(--card-foreground);
  padding: 1.5rem;
  box-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05);
}
.card h3 { font-size: 1rem; font-weight: 600; line-height: 1.25; }
.card p { font-size: 0.875rem; color: var(--muted-foreground); }

/* The recurring brand motif: a tinted square holding a 20px stroke glyph. */
.tile {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: var(--radius-lg);
  background: color-mix(in oklab, var(--primary) 10%, transparent);
  color: var(--primary);
}
.tile svg { width: 1.25rem; height: 1.25rem; }

.section-heading {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.025em;
}
@media (min-width: 640px) {
  .section-heading { font-size: 1.875rem; }
}

/* trust band */

.trust {
  border-block: 1px solid var(--border);
  background: color-mix(in oklab, var(--muted) 30%, var(--background));
}
.trust > .container { padding-block: 3.5rem; }
.trust ul {
  display: grid;
  gap: 2rem;
  margin-top: 2.5rem;
}
@media (min-width: 640px) {
  .trust ul { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1024px) {
  .trust ul { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
.trust li { display: grid; gap: 0.75rem; align-content: start; }
.trust h3 { font-size: 0.875rem; font-weight: 600; }
.trust p { font-size: 0.875rem; color: var(--muted-foreground); }

/* footer */

.site-footer {
  background: color-mix(in oklab, var(--muted) 30%, var(--background));
}
.site-footer > .container {
  padding-block: 2rem;
  display: grid;
  gap: 0.75rem;
  font-size: 0.875rem;
  color: var(--muted-foreground);
}
.site-footer a { text-decoration: none; color: var(--primary); }
.site-footer a:hover { text-decoration: underline; text-underline-offset: 4px; }

/* motion */

@keyframes reveal-on-load {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}
.reveal-on-load {
  animation: reveal-on-load var(--motion-duration-md) var(--motion-ease-standard) both;
}

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