/* ==========================================================================
   Fonts — ABC Areal (Dinamo)
   ========================================================================== */

@font-face {
  font-family: "ABC Areal";
  src: url("../fonts/ABCAreal-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "ABC Areal";
  src: url("../fonts/ABCAreal-RegularItalic.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "ABC Areal";
  src: url("../fonts/ABCAreal-Medium.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

/* ==========================================================================
   Tokens — custom properties cross Shadow DOM, so every Lit
   component can read these.
   ========================================================================== */

:root {
  --font: "ABC Areal", "Helvetica Neue", Arial, sans-serif;

  /* Mobile-first type */
  --fs-body: 1.0625rem;   /* 17px */
  --lh-body: 1.25;
  --fs-nav: 0.8125rem;    /* 13px */

  /* Spacing */
  --pad-x: 1.25rem;                                         /* 20px */
  --pad-top: calc(env(safe-area-inset-top, 0px) + 6rem);   /* room for the fixed name */
  --nav-h: calc(env(safe-area-inset-bottom, 0px) + 4.5rem); /* space reserved for the nav */

  /* Colors */
  --white: #FFFFFF;
  --black: #000000;
  --placeholder-bg: #F2F2F2;
  --placeholder-line: #BDBDBD;
  --page-bg: var(--white);   /* switched by ado-app per section */

  /* Height of the area hidden behind Safari's floating toolbar
     (large viewport minus visible viewport). 0 where unsupported. */
  --under-bar: 0px;

  /* Motion */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-circ-out: cubic-bezier(0.08, 0.82, 0.17, 1);   /* GSAP circ.out */
}

@supports (height: 100lvh) {
  :root {
    --under-bar: calc(100lvh - 100dvh);
  }
}

@media (min-width: 768px) {
  :root {
    --fs-body: 1.1875rem;  /* 19px */
    --fs-nav: 0.75rem;     /* 12px — bottom nav on desktop */
    --pad-x: 2.5rem;
    --pad-top: 7rem;
  }
}

/* ==========================================================================
   Base
   ========================================================================== */

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

html,
body {
  height: 100%;
  overflow: hidden;            /* the horizontal track is the only scroller */
  overscroll-behavior: none;
  /* No transition: Safari samples this color to tint its toolbar,
     and it must read the final color, not a mid-fade one. */
  background: var(--page-bg);
}

html[data-theme="dark"] {
  --page-bg: var(--black);
}

body {
  font-family: var(--font);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  color: var(--black);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
}

ado-app {
  display: block;
  height: 100%;
}

::selection {
  color: var(--white);
  background: var(--black);
}
