/* BIEPE - base: layers, reset, fonts, design tokens, global elements */

@layer reset, defaults;

@layer reset {
  /* Box sizing rules */
  *,
  *::before,
  *::after {
    box-sizing: border-box;
  }

  /* Remove default margins */
  * {
    margin: 0;
  }

  /* Prevent font size inflation */
  html {
    -moz-text-size-adjust: none;
    -webkit-text-size-adjust: none;
    text-size-adjust: none;
    scrollbar-gutter: stable;
  }

  /* Remove list styles on ul, ol elements with a list role, which suggests default styling will be removed */
  ul[role='list'],
  ol[role='list'] {
    list-style: none;
  }

  ul[class]:not(
.list,
[class*='marker']
    ),
  ol[class]:not(
.list,
[class*='marker']
    ) {
    padding: 0;
    list-style: none;
  }

  /* Set body min height */
  body {
    min-block-size: 100svh;
    display: flex;
    flex-direction: column;

    main {
flex-grow: 1;
    }
  }

  /* A elements that don't have a class get default styles */
  a:not([class]) {
    text-decoration-skip-ink: auto;
  }

  /* Make media easier to work with */
  img,
  picture,
  video,
  canvas,
  svg,
  a:not(
    p > a,
    span > a,
    h1 > a,
    h2 > a,
    h3 > a,
    h4 > a,
    h5 > a,
    h6 > a,
    li > a,
    em > a,
    q > a,
    label > a,
    strong > a,
    figcaption > a
  ) {
    max-inline-size: 100%;
    height: auto;
    display: block;
  }

  /* Inherit fonts for inputs and buttons */
  input,
  button,
  textarea,
  select {
    font: inherit;
    font-size: inherit;
  }

  button {
    cursor: pointer;
    background-color: transparent;
    border: none;
    color: currentColor;
  }

  /* Make sure textareas without a rows attribute are not tiny */
  textarea:not([rows]) {
    min-height: 10em;
  }

  /* Avoid text overflows */
  p,
  h1,
  h2,
  h3,
  h4,
  h5,
  h6 {
    overflow-wrap: break-word;
  }

  figure > img {
    inline-size: 100%;
  }

  img {
    block-size: auto;
  }


  .screen-reader-text {
    border: 0;
    clip-path: inset(50%);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    width: 1px;
    word-wrap: normal !important;
  }

  .screen-reader-text:focus {
    background-color: #ddd;
    clip-path: none;
    color: #444;
    display: block;
    font-size: 1em;
    height: auto;
    left: 5px;
    line-height: normal;
    padding: 15px 23px 14px;
    text-decoration: none;
    top: 5px;
    width: auto;
    z-index: 100000;
  }
}

@layer defaults {
  body {
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    font-family: system-ui;
    display: flex;
    flex-direction: column;
  }
}

/* Inter, self-hosted (SIL OFL 1.1) */
@font-face { font-family: "Inter"; font-style: normal; font-weight: 100 900; font-display: swap; src: url("../assets/fonts/inter-latin-ext.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 100 900; font-display: swap; src: url("../assets/fonts/inter-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

/* ==========================================================================
   BIEPE DESIGN TOKENS  -  source: Figma "BIEPE website style guide" (Website / v1.0)
   Edit here, the whole site follows.
   Layer 1: primitives (raw values)   Layer 2: semantic (what they mean)
   Section-level overrides live in each section's own class (--hero-*, etc.)
   ========================================================================== */

:root {
  /* ---- Primitives: color (style guide §02) ---- */
  --cyan-500: #11afdf;          /* brand.cyan   */
  --cyan-600: #0e93bd;          /* hover / contrast (derived; not defined in the guide) */
  --cyan-100: #e3f5fc;          /* soft tint (derived) */
  --navy-900: #19222a;          /* ink.navy     */
  --navy-800: #212d37;          /* dark-section lift (derived) */
  --slate-600: #606c76;         /* ink.slate    */
  --mist-100: #f1f6f8;          /* surface.mist */
  --mist-50: #f8fafb;           /* lighter mist (derived) */
  --stroke-200: #d6dde1;        /* stroke.default */
  --stroke-300: #cad3d8;        /* stroke.soft    */
  --white: #ffffff;             /* surface.white  */

  /* Legacy aliases so older references keep working */
  --blue-500: var(--cyan-500);
  --blue-300: var(--cyan-500);
  --gray-50: var(--mist-50);
  --gray-100: var(--mist-100);
  --gray-200: var(--stroke-200);

  /* ---- Semantic: color. One bright accent only: cyan. ---- */
  --color-primary: var(--cyan-500);
  --color-primary-hover: var(--cyan-600);
  --color-primary-soft: var(--cyan-100);
  --color-accent: var(--cyan-500);
  --color-dark: var(--navy-900);
  --color-dark-2: var(--navy-800);
  --color-surface: var(--mist-100);
  --color-surface-alt: var(--mist-50);
  --color-bg: var(--white);
  --color-border: var(--stroke-200);
  --color-border-soft: var(--stroke-300);
  --color-text: var(--navy-900);
  --color-text-muted: var(--slate-600);
  --color-text-inverse: var(--white);
  --color-text-inverse-muted: rgb(255 255 255 / 0.8);
  --color-border-inverse: rgb(255 255 255 / 0.2);   /* stroke.inverse */
  --color-danger: hsl(0 65% 55%);
  --color-warning: hsl(38 95% 55%);
  --color-success: hsl(150 60% 45%);

  /* ---- Typography (style guide §01): a single Inter family ---- */
  --font-heading: "Inter", system-ui, sans-serif;
  --font-body: "Inter", system-ui, sans-serif;
  --font-mono: var(--font-body);   /* no second family: labels use Inter too */

  /* size / line-height per role. Big sizes scale down on small screens. */
  --text-xs: 0.75rem;                                            /* overline 12/16 */
  --text-sm: 0.875rem;                                           /* label 14/20 */
  --text-base: 1rem;                                             /* body 16/28 */
  --text-lg: 1.25rem;                                            /* lead 20/32 */
  --text-xl: 1.5rem;                                             /* subheading (H4) 24/30 */
  --text-2xl: clamp(1.75rem, 1.2rem + 1.5vw, 2.25rem);           /* heading (H3) 36/40 */
  --text-3xl: clamp(2rem, 1.2rem + 2.3vw, 3rem);                 /* title (H2) 48/48 */
  --text-4xl: clamp(2.5rem, 1.5rem + 3vw, 3.75rem);              /* display (H1) 60/60 */

  --leading-display: 1;
  --leading-title: 1;
  --leading-heading: 1.1111;
  --leading-sub: 1.25;
  --leading-lead: 1.6;
  --leading-body: 1.75;
  --leading-label: 1.4286;
  --leading-overline: 1.3333;

  --tracking-display: -0.02em;     /* -1.2px at 60px */
  --tracking-heading: 0;
  --tracking-eyebrow: 0.2em;       /* 2.4px at 12px */

  --weight-regular: 400;
  --weight-medium: 500;
  --weight-semibold: 600;

  /* ---- Spacing: 4px base unit (style guide §04) ---- */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-14: 3.5rem;
  /* named aliases used across the build */
  --space-3xs: var(--space-1);
  --space-2xs: var(--space-2);
  --space-xs: var(--space-3);
  --space-s: var(--space-4);
  --space-m: var(--space-6);
  --space-l: var(--space-8);
  --space-xl: var(--space-12);
  --space-2xl: var(--space-14);
  --space-section: clamp(4rem, 2rem + 6vw, 7rem);       /* layout.section 112 */
  --space-section-lg: clamp(5rem, 2.5rem + 7vw, 8rem);  /* layout.section.lg 128 (editorial moments) */

  /* ---- Layout (1440 desktop frame) ---- */
  --content-width: 1400px;                                  /* layout.max (gutters included) */
  --content-width-narrow: 760px;
  --edge: 1.25rem;                                          /* layout.edge 20 */
  --gutter: clamp(1.25rem, 0.2rem + 3.6vw, 3.25rem);        /* layout.gutter 52 = 20 edge + 32 inner */

  /* ---- Strokes, radius, depth (style guide §05) ---- */
  --border-width: 1px;
  --radius-xs: 2px;     /* nav */
  --radius-s: 4px;      /* control */
  --radius-m: 8px;      /* guide only */
  --radius-l: 14px;
  --radius-photo: 12px;   /* photography in sections (Figma 261003-BIEPE-1440w) */
  --radius-pill: 999px;
  --shadow-control: 0 1px 2px rgb(0 0 0 / 0.05);            /* the only shadow on controls */
  --shadow-s: 0 1px 2px rgb(23 34 42 / 0.06);
  --shadow-m: 0 8px 24px rgb(23 34 42 / 0.1);
  --shadow-l: 0 24px 60px rgb(23 34 42 / 0.18);
  --shadow-elevated: 0 12px 40px -8px hsl(220 20% 14% / 0.15);   /* hero media + floating previews */

  /* ---- Motion ---- */
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --duration: 180ms;
  --anim-duration: 700ms;   /* load reveal */
  --anim-distance: 14px;
  --anim-stagger: 90ms;
  --anim-scroll-distance: 24px; /* scroll reveal */
  --menu-duration: 320ms;   /* mobile offset menu */

  /* ---- Buttons & controls (style guide §03) ---- */
  --btn-bg: var(--color-primary);
  --btn-bg-hover: var(--color-primary-hover);
  --btn-color: var(--color-text-inverse);
  --btn-height: 3rem;            /* 48 */
  --btn-pad-x: 1.5rem;           /* 24 */
  --btn-radius: var(--radius-s); /* 4 */
  --btn-compact-height: 2.25rem; /* 36 */
  --btn-compact-pad-x: 0.75rem;  /* 12 */
  --btn-compact-radius: var(--radius-xs);

  --card-bg: var(--color-bg);
  --card-border: var(--color-border);
  --card-padding: var(--space-8);
  --card-radius: 0;
}

/* ---- Base ---- */
:root { interpolate-size: allow-keywords; }   /* lets height animate to auto (FAQ accordion) */
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: var(--leading-body);
  font-weight: var(--weight-regular);
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
}

/* Semibold headings carry the hierarchy */
h1, h2, h3, h4 {
  font-family: var(--font-heading);
  font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-heading);
  margin: 0;
}
h1 { font-size: var(--text-4xl); line-height: var(--leading-display); letter-spacing: var(--tracking-display); }
h2 { font-size: var(--text-3xl); line-height: var(--leading-title); }
h3 { font-size: var(--text-2xl); line-height: var(--leading-heading); }
h4 { font-size: var(--text-xl); line-height: var(--leading-sub); }
p { margin: 0; }
a { color: inherit; text-decoration: none; }
img, svg { max-width: 100%; display: block; }

/* ---- Load reveal ---- */
@keyframes reveal-up {
  from { opacity: 0; transform: translateY(var(--anim-distance)); }
  to { opacity: 1; transform: none; }
}
/* Header: cyan over the hero, turns white (dark text) once the page scrolls - CSS only, progressive */
@keyframes nav-solid {
  to {
    background-color: rgb(255 255 255 / 0.95); color: var(--color-text); border-color: var(--color-border);
    --nav-btn-bg: var(--color-primary); --nav-btn-fg: var(--white);
    --nav-show-light: none; --nav-show-color: block; --nav-burger: var(--color-text);
  }
}
@keyframes reveal-scroll {
  from { opacity: 0; transform: translateY(var(--anim-scroll-distance)); }
  to { opacity: 1; transform: none; }
}
@keyframes slide-in-right {
  from { transform: translateX(100%); }
  to { transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  * , *::before, *::after { animation-duration: 0.01ms !important; animation-delay: 0ms !important; }
}
