/* ============================================
   LIQUID GLASS & AI CINEMA - CSS Reset
   Modern Normalize + Base Styles
   ============================================ */

/* ========================================
   BOX SIZING & RESET
   ======================================== */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* ========================================
   DOCUMENT
   ======================================== */
html {
  -webkit-text-size-adjust: 100%;
  -moz-tab-size: 4;
  tab-size: 4;
  scroll-behavior: smooth;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Respect reduced motion preference */
@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;
  }
}

/* ========================================
   BODY
   ======================================== */
body {
  min-height: 100vh;
  min-height: 100dvh;
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: var(--leading-normal);
  color: var(--text-primary);
  background: var(--bg-deep);
  overflow-x: hidden;
}

/* ========================================
   TYPOGRAPHY
   ======================================== */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: var(--font-semibold);
  line-height: var(--leading-tight);
  color: var(--text-primary);
  text-wrap: balance;
}

h1 { font-size: var(--text-5xl); }
h2 { font-size: var(--text-4xl); }
h3 { font-size: var(--text-3xl); }
h4 { font-size: var(--text-2xl); }
h5 { font-size: var(--text-xl); }
h6 { font-size: var(--text-lg); }

p {
  text-wrap: pretty;
  color: var(--text-secondary);
}

/* ========================================
   LINKS
   ======================================== */
a {
  color: inherit;
  text-decoration: none;
}

a:not([class]) {
  color: var(--color-blue);
  text-decoration-skip-ink: auto;
  transition: color var(--transition-fast);
}

a:not([class]):hover {
  color: var(--color-purple);
}

/* ========================================
   IMAGES & MEDIA
   ======================================== */
img,
picture,
video,
canvas,
svg {
  display: block;
  max-width: 100%;
  height: auto;
}

img {
  font-style: italic;
  vertical-align: middle;
  background-repeat: no-repeat;
  background-size: cover;
  shape-margin: 0.75rem;
}

/* ========================================
   FORMS
   ======================================== */
button,
input,
optgroup,
select,
textarea {
  font-family: inherit;
  font-size: 100%;
  line-height: inherit;
  color: inherit;
  margin: 0;
}

button,
[type="button"],
[type="reset"],
[type="submit"] {
  -webkit-appearance: button;
  appearance: button;
  cursor: pointer;
  background: transparent;
  border: none;
}

button:disabled,
[type="button"]:disabled,
[type="reset"]:disabled,
[type="submit"]:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

input,
textarea,
select {
  background: transparent;
  border: none;
  outline: none;
}

textarea {
  resize: vertical;
  min-height: 120px;
}

input::placeholder,
textarea::placeholder {
  color: var(--text-dim);
  opacity: 1;
}

/* Remove autofill background */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
textarea:-webkit-autofill,
textarea:-webkit-autofill:hover,
textarea:-webkit-autofill:focus,
select:-webkit-autofill,
select:-webkit-autofill:hover,
select:-webkit-autofill:focus {
  -webkit-text-fill-color: var(--text-primary);
  -webkit-box-shadow: 0 0 0px 1000px var(--bg-dark) inset;
  transition: background-color 5000s ease-in-out 0s;
}

/* ========================================
   LISTS
   ======================================== */
ul,
ol {
  list-style: none;
}

/* ========================================
   TABLES
   ======================================== */
table {
  border-collapse: collapse;
  border-spacing: 0;
  width: 100%;
}

/* ========================================
   MISC
   ======================================== */
hr {
  height: 1px;
  border: none;
  background: var(--glass-border);
  margin: var(--space-8) 0;
}

abbr[title] {
  text-decoration: underline dotted;
  cursor: help;
}

b,
strong {
  font-weight: var(--font-bold);
}

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

small {
  font-size: var(--text-sm);
}

sub,
sup {
  font-size: 75%;
  line-height: 0;
  position: relative;
  vertical-align: baseline;
}

sub { bottom: -0.25em; }
sup { top: -0.5em; }

/* ========================================
   FOCUS STYLES
   ======================================== */
:focus {
  outline: none;
}

:focus-visible {
  outline: 2px solid var(--color-blue);
  outline-offset: 2px;
}

/* ========================================
   SELECTION
   ======================================== */
::selection {
  background: rgba(var(--color-blue-rgb), 0.3);
  color: var(--text-primary);
}

/* ========================================
   SCROLLBAR (Webkit)
   ======================================== */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.3);
}

/* ========================================
   SCREEN READER ONLY
   ======================================== */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.sr-only-focusable:focus {
  position: static;
  width: auto;
  height: auto;
  padding: inherit;
  margin: inherit;
  overflow: visible;
  clip: auto;
  white-space: normal;
}
