/*
 * Base CSS for Polish Entertainment Agency Website
 * Style: cinematic, immersive, sophisticated, festive, editorial
 * --------------------------------------------------------------------------
 * Sections:
 * 1. CSS Variables
 * 2. Reset & Normalize
 * 3. Base Typography & Elements
 * 4. Layout Utilities
 * 5. Accessibility Utilities
 * 6. Components (Buttons, Forms, Cards)
 * 7. Media Queries & Motion Preferences
 * --------------------------------------------------------------------------
 */

/*
 * 1. CSS VARIABLES
 * --------------------------------------------------------------------------
 */
:root {
  /* Color Palette - Cinematic & Festive */
  --color-background: #050814;         /* deep midnight blue/charcoal mix */
  --color-surface: #0b1020;            /* slightly lifted surface for sections */
  --color-surface-elevated: #141a2c;   /* elevated cards / overlays */

  --color-text: #f7f2e9;               /* soft cream for main text */
  --color-text-muted: #c1b7a4;         /* muted cream-beige */
  --color-text-soft: #9b8f7b;          /* softer secondary */

  --color-primary: #c88a3a;            /* bronze gold */
  --color-primary-soft: rgba(200, 138, 58, 0.18);
  --color-primary-strong: #e0a959;

  --color-accent-terra: #c05c3c;       /* warm terracotta */
  --color-accent-terra-soft: rgba(192, 92, 60, 0.15);

  --color-success: #3aa672;            /* rich emerald */
  --color-warning: #e0a83a;            /* warm gold-yellow */
  --color-danger: #e04747;             /* cinematic red */

  /* Neutral Grays (cool-dark to warm-light) */
  --gray-900: #050814;
  --gray-800: #0e121f;
  --gray-700: #1c2233;
  --gray-600: #2a3143;
  --gray-500: #4b5365;
  --gray-400: #737b8c;
  --gray-300: #a0a6b5;
  --gray-200: #c7cbd6;
  --gray-100: #e4e6ed;
  --gray-50: #f6f6fa;

  /* Overlays & Borders */
  --color-border-subtle: rgba(255, 255, 255, 0.08);
  --color-border-strong: rgba(255, 255, 255, 0.16);
  --color-backdrop: rgba(0, 0, 0, 0.75);

  /* Typography - Polish language friendly */
  --font-sans: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-serif: "Playfair Display", "Times New Roman", serif;
  --font-display: "Playfair Display", "Times New Roman", serif;
  --font-mono: "JetBrains Mono", Menlo, Monaco, Consolas, "Liberation Mono", monospace;

  /* Fluid Type Scale (clamp for responsiveness) */
  --font-size-xs: 0.78rem;
  --font-size-sm: 0.875rem;
  --font-size-base: 1rem;
  --font-size-md: 1.0625rem;
  --font-size-lg: clamp(1.1rem, 1.02rem + 0.4vw, 1.3rem);
  --font-size-xl: clamp(1.35rem, 1.18rem + 0.8vw, 1.8rem);
  --font-size-2xl: clamp(1.7rem, 1.4rem + 1.2vw, 2.4rem);
  --font-size-3xl: clamp(2.2rem, 1.7rem + 1.8vw, 3.2rem);
  --font-size-4xl: clamp(2.8rem, 2rem + 2.5vw, 4.1rem);
  --font-size-hero: clamp(3.2rem, 2.4rem + 3.4vw, 5.2rem);

  --line-height-tight: 1.1;
  --line-height-snug: 1.3;
  --line-height-normal: 1.5;
  --line-height-relaxed: 1.7;

  /* Letter-spacing for editorial feel */
  --tracking-tight: -0.02em;
  --tracking-wide: 0.12em;

  /* Spacing Scale (0–96px) */
  --space-0: 0;
  --space-2: 2px;
  --space-4: 4px;
  --space-6: 6px;
  --space-8: 8px;
  --space-10: 10px;
  --space-12: 12px;
  --space-14: 14px;
  --space-16: 16px;
  --space-20: 20px;
  --space-24: 24px;
  --space-28: 28px;
  --space-32: 32px;
  --space-36: 36px;
  --space-40: 40px;
  --space-48: 48px;
  --space-56: 56px;
  --space-64: 64px;
  --space-72: 72px;
  --space-80: 80px;
  --space-88: 88px;
  --space-96: 96px;

  /* Radii */
  --radius-xs: 2px;
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-pill: 999px;
  --radius-card: 18px;

  /* Shadows (cinematic, soft) */
  --shadow-soft: 0 14px 40px rgba(0, 0, 0, 0.35);
  --shadow-soft-high: 0 32px 80px rgba(0, 0, 0, 0.6);
  --shadow-subtle: 0 8px 24px rgba(0, 0, 0, 0.35);
  --shadow-outline: 0 0 0 1px rgba(255, 255, 255, 0.12), 0 0 0 4px rgba(200, 138, 58, 0.4);

  /* Transitions */
  --transition-fast: 150ms ease-out;
  --transition-normal: 220ms ease-out;
  --transition-slow: 360ms ease-out;

  /* Layout */
  --container-max-width: 1200px;
  --container-wide-max-width: 1440px;
  --page-gutter: clamp(20px, 5vw, 72px);

  /* Z-index Layering for cinematic stacks */
  --z-base: 0;
  --z-raised: 10;
  --z-overlay: 40;
  --z-modal: 60;
  --z-toast: 70;
  --z-max: 999;
}

/*
 * 2. RESET & NORMALIZE
 * --------------------------------------------------------------------------
 */

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

/* Remove default margin & set base text rendering */
html,
body,
h1,
h2,
h3,
h4,
h5,
h6,
p,
figure,
blockquote,
dl,
dd {
  margin: 0;
}

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

body {
  min-height: 100vh;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

/* List reset */
ul[role="list"],
ol[role="list"],
ul,
ol {
  margin: 0;
  padding: 0;
}

li {
  list-style: none;
}

/* Anchor reset */
a {
  text-decoration: none;
  color: inherit;
}

/* Image & media responsiveness */
img,
picture,
video,
canvas,
svg {
  display: block;
  max-width: 100%;
}

picture img {
  width: 100%;
  height: auto;
}

/* Form elements inherit fonts */
input,
button,
textarea,
select {
  font: inherit;
  color: inherit;
}

button {
  border: none;
  padding: 0;
  background: none;
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
}

textarea {
  resize: vertical;
}

/* Remove default focus outline; we restore focus-visible later */
:focus {
  outline: none;
}

/* Tables */
table {
  border-collapse: collapse;
  border-spacing: 0;
}

/*
 * 3. BASE TYPOGRAPHY & ELEMENTS
 * --------------------------------------------------------------------------
 */

body {
  background-color: var(--color-background);
  color: var(--color-text);
  font-family: var(--font-sans);
  font-size: var(--font-size-base);
  line-height: var(--line-height-normal);
}

/* Smooth cinematic gradient on body (subtle) */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(circle at 10% 0%, rgba(192, 92, 60, 0.35), transparent 55%),
              radial-gradient(circle at 90% 100%, rgba(200, 138, 58, 0.32), transparent 60%);
  mix-blend-mode: soft-light;
  opacity: 0.6;
  z-index: -1;
}

/* Headings - editorial & cinematic */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-display);
  font-weight: 500;
  letter-spacing: var(--tracking-tight);
  color: var(--color-text);
}

h1 {
  font-size: var(--font-size-3xl);
  line-height: var(--line-height-tight);
  margin-bottom: var(--space-24);
}

h2 {
  font-size: var(--font-size-2xl);
  line-height: var(--line-height-tight);
  margin-bottom: var(--space-20);
}

h3 {
  font-size: var(--font-size-xl);
  line-height: var(--line-height-snug);
  margin-bottom: var(--space-16);
}

h4 {
  font-size: var(--font-size-lg);
  line-height: var(--line-height-snug);
  margin-bottom: var(--space-12);
}

h5 {
  font-size: var(--font-size-md);
  text-transform: uppercase;
  letter-spacing: var(--tracking-wide);
  margin-bottom: var(--space-8);
}

h6 {
  font-size: var(--font-size-sm);
  text-transform: uppercase;
  letter-spacing: var(--tracking-wide);
  margin-bottom: var(--space-6);
}

p {
  margin-bottom: var(--space-16);
  color: var(--color-text-muted);
}

p.lead,
.lead {
  font-size: var(--font-size-lg);
  line-height: var(--line-height-relaxed);
  color: var(--color-text);
}

strong,
b {
  font-weight: 600;
}

em,
i {
  font-style: italic;
}

small {
  font-size: var(--font-size-xs);
}

/* Links - subtle cinematic hover underline */
a {
  color: var(--color-primary);
  text-decoration: none;
  text-underline-offset: 3px;
  transition: color var(--transition-normal), text-decoration-color var(--transition-normal), opacity var(--transition-normal);
}

a:hover {
  color: var(--color-primary-strong);
  text-decoration: underline;
  text-decoration-color: rgba(200, 138, 58, 0.6);
}

/* Blockquotes for editorial storytelling */
blockquote {
  margin: var(--space-32) 0;
  padding-left: var(--space-24);
  border-left: 2px solid rgba(200, 138, 58, 0.7);
  color: var(--color-text);
  font-family: var(--font-serif);
  font-size: var(--font-size-lg);
  line-height: var(--line-height-relaxed);
}

blockquote footer {
  margin-top: var(--space-8);
  font-size: var(--font-size-sm);
  color: var(--color-text-soft);
}

hr {
  border: none;
  border-top: 1px solid var(--color-border-subtle);
  margin: var(--space-32) 0;
}

/*
 * 4. LAYOUT UTILITIES
 * --------------------------------------------------------------------------
 */

/* Containers - standard & wide for full-screen photo narratives */
.container {
  width: 100%;
  max-width: var(--container-max-width);
  margin-inline: auto;
  padding-inline: var(--page-gutter);
}

.container-wide {
  width: 100%;
  max-width: var(--container-wide-max-width);
  margin-inline: auto;
  padding-inline: var(--page-gutter);
}

.section {
  padding-block: clamp(56px, 10vh, 112px);
}

.section--bordered {
  border-top: 1px solid var(--color-border-subtle);
}

/* Flex utilities */
.flex {
  display: flex;
}

.inline-flex {
  display: inline-flex;
}

.flex-col {
  flex-direction: column;
}

.flex-row {
  flex-direction: row;
}

.flex-wrap {
  flex-wrap: wrap;
}

.items-center {
  align-items: center;
}

.items-start {
  align-items: flex-start;
}

.items-end {
  align-items: flex-end;
}

.justify-center {
  justify-content: center;
}

.justify-between {
  justify-content: space-between;
}

.justify-around {
  justify-content: space-around;
}

.gap-xs {
  gap: var(--space-8);
}

.gap-sm {
  gap: var(--space-12);
}

.gap-md {
  gap: var(--space-20);
}

.gap-lg {
  gap: var(--space-32);
}

.gap-xl {
  gap: var(--space-48);
}

/* Grid utilities */
.grid {
  display: grid;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-32);
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-32);
}

.grid-auto-fit {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: var(--space-24);
}

/* Alignment and spacing helpers */
.text-center {
  text-align: center;
}

.text-right {
  text-align: right;
}

.mt-0 { margin-top: 0; }
.mt-xs { margin-top: var(--space-8); }
.mt-sm { margin-top: var(--space-16); }
.mt-md { margin-top: var(--space-24); }
.mt-lg { margin-top: var(--space-40); }
.mt-xl { margin-top: var(--space-64); }

.mb-0 { margin-bottom: 0; }
.mb-xs { margin-bottom: var(--space-8); }
.mb-sm { margin-bottom: var(--space-16); }
.mb-md { margin-bottom: var(--space-24); }
.mb-lg { margin-bottom: var(--space-40); }
.mb-xl { margin-bottom: var(--space-64); }

.pt-section {
  padding-top: clamp(56px, 12vh, 120px);
}

.pb-section {
  padding-bottom: clamp(56px, 12vh, 120px);
}

/* Full-bleed media wrapper for cinematic imagery */
.full-bleed {
  width: 100vw;
  position: relative;
  left: 50%;
  right: 50%;
  margin-left: -50vw;
  margin-right: -50vw;
}

/* Overlay gradient helper for text over photos */
.overlay-gradient-bottom {
  position: relative;
}

.overlay-gradient-bottom::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.85), rgba(0, 0, 0, 0.2) 50%, transparent 100%);
  pointer-events: none;
}

/*
 * 5. ACCESSIBILITY UTILITIES
 * --------------------------------------------------------------------------
 */

/* 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:active,
.sr-only-focusable:focus {
  position: static;
  width: auto;
  height: auto;
  margin: 0;
  overflow: visible;
  clip: auto;
  white-space: normal;
}

/* Accessible focus styles using :focus-visible */
:where(a, button, input, textarea, select, summary, [tabindex]):focus-visible {
  outline: none;
  box-shadow: var(--shadow-outline);
  border-radius: var(--radius-sm);
}

/* High-contrast utility for key labels over photos */
.badge-contrast {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  background: rgba(0, 0, 0, 0.7);
  color: var(--color-text);
  font-size: var(--font-size-xs);
  text-transform: uppercase;
  letter-spacing: var(--tracking-wide);
}

/*
 * 6. COMPONENTS
 * --------------------------------------------------------------------------
 */

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  padding: 0.75rem 1.6rem;
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  font-size: var(--font-size-sm);
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: background-color var(--transition-normal),
              color var(--transition-normal),
              border-color var(--transition-normal),
              box-shadow var(--transition-normal),
              transform var(--transition-fast);
  will-change: transform, box-shadow;
}

.btn-primary {
  background: linear-gradient(135deg, #c88a3a, #e0a959);
  color: #130f09 !important;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.7);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.8);
}

.btn-primary:active {
  transform: translateY(0);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.8);
}

.btn-outline {
  background: transparent;
  color: var(--color-text);
  border-color: rgba(247, 242, 233, 0.4);
  box-shadow: 0 0 0 1px rgba(247, 242, 233, 0.08);
}

.btn-outline:hover {
  background: rgba(255, 255, 255, 0.03);
  border-color: rgba(247, 242, 233, 0.6);
}

.btn-ghost {
  background: rgba(0, 0, 0, 0.4);
  color: var(--color-text);
  border-color: transparent;
}

.btn-ghost:hover {
  background: rgba(0, 0, 0, 0.6);
}

.btn-terra {
  background: radial-gradient(circle at 0 0, #ff9a6c, #c05c3c 60%);
  color: #120908;
}

.btn:disabled,
.btn[aria-disabled="true"] {
  opacity: 0.6;
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}

/* Icon alignment inside buttons */
.btn > svg {
  width: 1.1em;
  height: 1.1em;
}

/* Form elements */
.form-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
  margin-bottom: var(--space-16);
}

label {
  font-size: var(--font-size-sm);
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--gray-200);
}

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="url"],
input[type="number"],
input[type="date"],
input[type="time"],
input[type="search"],
select,
textarea {
  width: 100%;
  padding: 0.75rem 0.9rem;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.12);
  background-color: rgba(5, 8, 20, 0.9);
  color: var(--color-text);
  font-size: var(--font-size-sm);
  transition: border-color var(--transition-normal),
              box-shadow var(--transition-normal),
              background-color var(--transition-normal);
}

input::placeholder,
textarea::placeholder {
  color: var(--gray-400);
}

input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  border-color: rgba(200, 138, 58, 0.85);
  box-shadow: 0 0 0 1px rgba(200, 138, 58, 0.4);
  background-color: rgba(11, 16, 32, 0.98);
}

input:disabled,
textarea:disabled,
select:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Checkbox & radio minimal reset (visuals handled in components if needed) */
input[type="checkbox"],
input[type="radio"] {
  accent-color: var(--color-primary);
}

/* Card component - for venue case studies, event journeys, etc. */
.card {
  position: relative;
  border-radius: var(--radius-card);
  background: radial-gradient(circle at 0% 0%, rgba(192, 92, 60, 0.12), transparent 65%),
              radial-gradient(circle at 100% 100%, rgba(200, 138, 58, 0.10), transparent 70%),
              var(--color-surface-elevated);
  border: 1px solid var(--color-border-subtle);
  box-shadow: var(--shadow-subtle);
  padding: var(--space-24);
  overflow: hidden;
}

.card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.04), transparent 40%);
  mix-blend-mode: soft-light;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-slow);
}

.card:hover::before {
  opacity: 1;
}

.card--compact {
  padding: var(--space-16);
}

.card-header {
  margin-bottom: var(--space-12);
}

.card-media {
  margin: -var(--space-24) -var(--space-24) var(--space-20);
  overflow: hidden;
}

.card-media img {
  width: 100%;
  height: auto;
}

.card-footer {
  margin-top: var(--space-20);
  padding-top: var(--space-12);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

/* Tag / chip for event formats */
.chip {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(14, 18, 31, 0.86);
  color: var(--gray-100);
  font-size: var(--font-size-xs);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.chip--terra {
  border-color: rgba(192, 92, 60, 0.7);
  background: rgba(192, 92, 60, 0.18);
  color: #ffe9dc;
}

.chip--gold {
  border-color: rgba(200, 138, 58, 0.8);
  background: rgba(200, 138, 58, 0.16);
  color: #fff6e3;
}

/*
 * 7. MEDIA QUERIES & MOTION PREFERENCES
 * --------------------------------------------------------------------------
 */

/* Responsive layout adjustments */
@media (max-width: 960px) {
  .grid-3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  h1 {
    margin-bottom: var(--space-20);
  }

  .section {
    padding-block: clamp(40px, 8vh, 80px);
  }
}

@media (max-width: 640px) {
  .grid-2,
  .grid-3 {
    grid-template-columns: minmax(0, 1fr);
  }

  .card {
    padding: var(--space-20);
  }

  .container,
  .container-wide {
    padding-inline: 18px;
  }

  .btn {
    width: auto;
  }
}

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

  html {
    scroll-behavior: auto;
  }

  body::before {
    transition: none;
  }
}
