/*
  ============================================================
  Vibe Boilerplate — style.css
  ============================================================
  Vanilla CSS only. No preprocessors, no external libraries.
  Organised into the following sections:

    1.  Design Tokens (CSS Custom Properties)
    2.  Base Reset & Defaults
    3.  Typography
    4.  Layout Utilities
    5.  Skip Link
    6.  Video Player
    7.  Utility Classes
    8.  Reduced Motion

  HOW TO CUSTOMISE:
  - Change design token values in Section 1.
  - Most visual changes can be made there alone.
  - Add new component blocks below the existing ones.
  - Do not change the order of the base/reset sections.
  ============================================================
*/


/* ============================================================
   1. DESIGN TOKENS
   All reusable values live here as CSS custom properties.
   Changing these cascades through the entire stylesheet.
   ============================================================ */

:root {

  /* --- Colour Palette --- */
  /* Primary brand colour and its scale */
  --color-primary-100: #dbeafe;
  --color-primary-200: #bfdbfe;
  --color-primary-500: #3b82f6;
  --color-primary:     #000000;  /* main interactive colour */
  --color-primary-700: #1d4ed8;
  --color-primary-900: #1e3a8a;

  /* Neutral scale — used for text, borders, backgrounds */
  --color-neutral-50:  #f8fafc;
  --color-neutral-100: #f1f5f9;
  --color-neutral-200: #e2e8f0;
  --color-neutral-300: #cbd5e1;
  --color-neutral-500: #64748b;
  --color-neutral-700: #334155;
  --color-neutral-900: #0f172a;

  /* Semantic colours */
  --color-text:        #ffffff;
  --color-text-muted:  var(--color-neutral-300);
  --color-bg:          #000000;
  --color-bg-alt:      #000000;
  --color-border:      var(--color-neutral-200);
  --color-focus-ring:  var(--color-primary);

  /* Status colours */
  --color-success:     #16a34a;
  --color-success-bg:  #dcfce7;
  --color-error:       #dc2626;
  --color-error-bg:    #fee2e2;
  --color-warning:     #d97706;
  --color-warning-bg:  #fef3c7;

  /* --- Typography --- */
  /* System font stack — no external fonts required */
  --font-family-base:    system-ui, -apple-system, BlinkMacSystemFont,
                         "Segoe UI", Roboto, Helvetica, Arial, sans-serif,
                         "Apple Color Emoji", "Segoe UI Emoji";
  --font-family-mono:    ui-monospace, "Cascadia Code", "Source Code Pro",
                         Menlo, Consolas, "DejaVu Sans Mono", monospace;

  /* Type scale (using a fluid base between 16–18px) */
  --font-size-xs:   0.75rem;    /* 12px */
  --font-size-sm:   0.875rem;   /* 14px */
  --font-size-base: 1rem;       /* 16px */
  --font-size-lg:   1.125rem;   /* 18px */
  --font-size-xl:   1.25rem;    /* 20px */
  --font-size-2xl:  1.5rem;     /* 24px */
  --font-size-3xl:  1.875rem;   /* 30px */
  --font-size-4xl:  2.25rem;    /* 36px */
  --font-size-5xl:  3rem;       /* 48px */

  --font-weight-normal:   400;
  --font-weight-medium:   500;
  --font-weight-semibold: 600;
  --font-weight-bold:     700;

  --line-height-tight:  1.25;
  --line-height-snug:   1.375;
  --line-height-normal: 1.5;
  --line-height-relaxed:1.625;

  /* --- Spacing Scale --- */
  /* Based on a 4px grid */
  --space-1:  0.25rem;   /* 4px  */
  --space-2:  0.5rem;    /* 8px  */
  --space-3:  0.75rem;   /* 12px */
  --space-4:  1rem;      /* 16px */
  --space-5:  1.25rem;   /* 20px */
  --space-6:  1.5rem;    /* 24px */
  --space-8:  2rem;      /* 32px */
  --space-10: 2.5rem;    /* 40px */
  --space-12: 3rem;      /* 48px */
  --space-16: 4rem;      /* 64px */
  --space-20: 5rem;      /* 80px */
  --space-24: 6rem;      /* 96px */

  /* --- Layout --- */
  --container-max:       72rem;   /* 1152px — main max-width */
  --container-narrow:    48rem;   /* 768px  — text/form columns */
  --container-padding-x: var(--space-4);

  /* --- Borders & Radius --- */
  --border-width:  1px;
  --radius-sm:     0.25rem;
  --radius-md:     0.5rem;
  --radius-lg:     0.75rem;
  --radius-xl:     1rem;
  --radius-full:   9999px;

  /* --- Shadows --- */
  --shadow-sm:  0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md:  0 4px 6px -1px rgb(0 0 0 / 0.07), 0 2px 4px -2px rgb(0 0 0 / 0.05);
  --shadow-lg:  0 10px 15px -3px rgb(0 0 0 / 0.07), 0 4px 6px -4px rgb(0 0 0 / 0.05);
  --shadow-xl:  0 20px 25px -5px rgb(0 0 0 / 0.08), 0 8px 10px -6px rgb(0 0 0 / 0.05);

  /* --- Transitions --- */
  --transition-fast:   150ms ease;
  --transition-normal: 250ms ease;
  --transition-slow:   400ms ease;

  /* --- Z-Index Layers --- */
  --z-base:    0;
  --z-raised:  10;
  --z-nav:     100;
  --z-overlay: 200;
  --z-modal:   300;
  --z-toast:   400;
}


/* ============================================================
   2. BASE RESET & DEFAULTS
   A lightweight opinionated reset on top of browser defaults.
   ============================================================ */

/*
  Box-sizing border-box on everything.
  This makes width/height include padding and border.
*/
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* Remove list styles when a list has role="list" */
ul[role="list"],
ol[role="list"] {
  list-style: none;
}

/* Smooth scrolling for anchor links, unless motion is reduced */
html {
  scroll-behavior: smooth;
  /* Prevent layout shift from scrollbar appearing */
  scrollbar-gutter: stable;
}

/* Base body styles */
body {
  font-family:  var(--font-family-base);
  font-size:    var(--font-size-base);
  font-weight:  var(--font-weight-normal);
  line-height:  var(--line-height-normal);
  color:        var(--color-text);
  background:   var(--color-bg);
  /* Prevent text from looking blurry on sub-pixel rendering */
  -webkit-font-smoothing:  antialiased;
  -moz-osx-font-smoothing: grayscale;
  touch-action: none;
  overflow: hidden;
  overscroll-behavior: none;
  background: #000;
}

/* Prevent zoom/pinch on iOS/mobile */
body * {
  touch-action: none;
}

/* Images and media: responsive by default */
img,
picture,
video,
canvas,
svg {
  display: block;
  max-width: 100%;
}

/* Inherit fonts for form elements (browsers don't do this by default) */
input,
button,
textarea,
select {
  font: inherit;
}

/* Prevent text overflow in headings and paragraphs */
p,
h1, h2, h3, h4, h5, h6 {
  overflow-wrap: break-word;
}

/* Allow text areas to resize only vertically */
textarea {
  resize: vertical;
}

/* Ensure anchors inherit colour by default (override per-component) */
a {
  color: var(--color-primary);
  text-decoration: underline;
}

a:hover {
  color: var(--color-primary-700);
}

/* Horizontal rule */
hr {
  border: none;
  border-top: var(--border-width) solid var(--color-border);
  margin-block: var(--space-8);
}

/* Code / pre styles */
code,
kbd,
samp,
pre {
  font-family: var(--font-family-mono);
  font-size: 0.9em;
}

pre {
  overflow-x: auto;
  background: var(--color-neutral-100);
  padding: var(--space-4);
  border-radius: var(--radius-md);
}


/* ============================================================
   3. TYPOGRAPHY
   Heading and text defaults.
   ============================================================ */

h1, h2, h3, h4, h5, h6 {
  font-weight:  var(--font-weight-bold);
  line-height:  var(--line-height-tight);
  color:        var(--color-text);
}

h1 { font-size: clamp(var(--font-size-3xl), 5vw, var(--font-size-5xl)); }
h2 { font-size: clamp(var(--font-size-2xl), 3.5vw, var(--font-size-4xl)); }
h3 { font-size: clamp(var(--font-size-xl),  2.5vw, var(--font-size-3xl)); }
h4 { font-size: var(--font-size-xl); }
h5 { font-size: var(--font-size-lg); }
h6 { font-size: var(--font-size-base); }

/* A utility class for muted / secondary text */
.text-muted {
  color: var(--color-text-muted);
}

/* Small text */
small, .text-sm {
  font-size: var(--font-size-sm);
}


/* ============================================================
   4. LAYOUT UTILITIES
   Container and general layout helpers.
   ============================================================ */

/* Standard centred container with side padding */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--container-padding-x);
}

/* Narrower container for text-heavy content */
.container--narrow {
  max-width: var(--container-narrow);
}

/* Visually hidden — accessible text that is hidden but readable by screen readers */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}


/* ============================================================
   5. SKIP LINK
   Appears on focus only; allows keyboard users to bypass nav.
   ============================================================ */

.skip-link {
  position: absolute;
  top: var(--space-2);
  left: var(--space-2);
  z-index: var(--z-toast);
  padding: var(--space-2) var(--space-4);
  background: var(--color-primary);
  color: #fff;
  font-weight: var(--font-weight-semibold);
  border-radius: var(--radius-md);
  text-decoration: none;
  /* Hidden until focused */
  transform: translateY(-200%);
  transition: transform var(--transition-fast);
}

.skip-link:focus {
  transform: translateY(0);
  outline: 2px solid var(--color-neutral-900);
  outline-offset: 2px;
}


/* ============================================================
   6. VIDEO PLAYER
   ============================================================ */

.section--video {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 0;
  background-color: transparent;
  position: relative;
  z-index: 1;
}

.video-container {
  width: 100%;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.video-player {
  width: 100%;
  max-width: 100%;
  margin: 0;
  box-shadow: none;
  background: transparent;
  line-height: 0;
}

#main-video {
  width: 100%;
  height: 100%;
  max-height: 100vh;
  object-fit: contain;
  display: block;
}

.background-blur {
  position: fixed;
  top: -10%;
  left: -10%;
  width: 120%;
  height: 120%;
  background-size: cover;
  background-position: center;
  filter: blur(40px) brightness(0.4);
  z-index: -1;
  pointer-events: none;
}


/* ============================================================
   7. UTILITY CLASSES
   One-off helpers for common adjustments.
   ============================================================ */

/* Text alignment */
.text-left   { text-align: left;   }
.text-center { text-align: center; }
.text-right  { text-align: right;  }

/* Display */
.hidden        { display: none !important; }
.block         { display: block; }
.inline-block  { display: inline-block; }
.flex          { display: flex; }
.inline-flex   { display: inline-flex; }

/* Spacing helpers */
.mt-auto { margin-top: auto; }
.mb-0    { margin-bottom: 0; }

/* Max-width clamp for readable prose */
.prose {
  max-width: 65ch;
  line-height: var(--line-height-relaxed);
}

.prose p + p {
  margin-top: var(--space-4);
}

.prose ul,
.prose ol {
  padding-left: var(--space-6);
  margin-top: var(--space-4);
}

.prose li + li {
  margin-top: var(--space-2);
}


/* ============================================================
   8. REDUCED MOTION
   Disable or simplify animations for users who prefer it.
   https://developer.mozilla.org/en-US/docs/Web/CSS/@media/prefers-reduced-motion
   ============================================================ */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration:   0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration:  0.01ms !important;
    scroll-behavior:      auto !important;
  }
}


/* ============================================================
   9. BUTTONS
   ============================================================ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-2) var(--space-4);
  font-weight: var(--font-weight-medium);
  border-radius: var(--radius-md);
  cursor: pointer;
  border: none;
  transition: background var(--transition-fast), transform var(--transition-fast);
  text-decoration: none;
  font-size: var(--font-size-sm);
}

.btn--primary {
  background: var(--color-primary-500);
  color: #fff;
}

.btn--primary:hover,
.btn--primary:focus-visible {
  background: var(--color-primary-700);
}

.btn--text {
  background: transparent;
  color: var(--color-text-muted);
}

.btn--text:hover,
.btn--text:focus-visible {
  color: var(--color-text);
}


/* ============================================================
   10. INSTALL PROMPT
   ============================================================ */

.install-prompt {
  position: fixed;
  bottom: var(--space-6);
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - (var(--space-6) * 2));
  max-width: 400px;
  background: rgba(30, 41, 59, 0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: var(--space-4);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  z-index: var(--z-toast);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.install-prompt p {
  margin-bottom: var(--space-4);
  font-size: var(--font-size-sm);
  line-height: var(--line-height-snug);
}

.install-prompt__actions {
  display: flex;
  gap: var(--space-2);
  justify-content: flex-end;
}
