/* ============================================
   DESIGN SYSTEM - savage.design
   ============================================ */

/* Font Import */
@import url("https://fonts.googleapis.com/css2?family=Roboto+Serif:wght@800&family=Roboto+Mono:wght@300;700&display=swap");

/* ============================================
   CSS Variables
   ============================================ */
:root {
  /* Typography */
  --font-primary: "Roboto Serif", serif;
  --font-secondary: "Roboto Mono", monospace;
  
  /* Colors */
  --color-white: #ffffff;
  --color-accent: #ffd000;
  --color-black: #000000;
  --color-grey-1: #484848;
  
  /* Typography Sizes - Desktop (1280+) */
  --h1-size: 128px;
  --h1-line-height: 1.7;
  --h2-size: 64px;
  --h2-line-height: 1.5;
  --h3-size: 40px;
  --h3-line-height: 1.3;
  --h4-size: 32px;
  --h4-line-height: 1.4;
  --h5-size: 24px;
  --h5-line-height: 1.5;
  --p-size: 16px;
  --p-line-height: 1.6;
  --p-sm-size: 12px;
  --p-sm-line-height: 1.5;
  --button-size: 16px;
  
  /* Cursor */
  --cursor-size: 48px;
  --cursor-size-hover: 64px;
  --cursor-size-click: 32px;
  
  /* Breakpoints (for reference in JS) */
  --breakpoint-mobile: 799px;
  --breakpoint-tablet: 800px;
  --breakpoint-desktop: 1280px;
}

/* ============================================
   Typography - Global Styles
   ============================================ */

/* Headings */
h1, h2, h3, h4, h5 {
  font-family: var(--font-primary);
  font-weight: 800;
  color: var(--color-white);
  margin: 0;
}

h1 {
  font-size: var(--h1-size);
  line-height: var(--h1-line-height);
}

h2 {
  font-size: var(--h2-size);
  line-height: var(--h2-line-height);
}

h3 {
  font-size: var(--h3-size);
  line-height: var(--h3-line-height);
}

h4 {
  font-size: var(--h4-size);
  line-height: var(--h4-line-height);
}

h5 {
  font-size: var(--h5-size);
  line-height: var(--h5-line-height);
}

/* Paragraphs */
p {
  font-family: var(--font-secondary);
  font-weight: 300;
  font-size: var(--p-size);
  line-height: var(--p-line-height);
  color: var(--color-white);
  margin: 0;
}

p.p-sm {
  font-size: var(--p-sm-size);
  line-height: var(--p-sm-line-height);
}

/* Buttons */
button, .button {
  font-family: var(--font-secondary);
  font-size: var(--button-size);
  font-weight: 300;
}

/* ============================================
   Responsive Typography - Tablet (800-1279px)
   ============================================ */
@media (min-width: 800px) and (max-width: 1279px) {
  :root {
    --h1-size: 72px;
    --h2-size: 48px;
    --h3-size: 32px;
    --h4-size: 24px;
    --h5-size: 20px;
    --p-size: 14px;
    --p-sm-size: 10px;
    --button-size: 14px;
  }
}

/* ============================================
   Responsive Typography - Mobile (1-799px)
   ============================================ */
@media (max-width: 799px) {
  :root {
    --h1-size: 48px;
    --h2-size: 36px;
    --h3-size: 28px;
    --h4-size: 20px;
    --h5-size: 16px;
    --p-size: 14px;
    --p-sm-size: 10px;
    --button-size: 14px;
  }
}

/* ============================================
   Custom Cursor
   ============================================ */

.custom-cursor {
  position: fixed;
  width: var(--cursor-size);
  height: var(--cursor-size);
  border-radius: 50%;
  background-color: var(--color-white);
  transform: translate(-50%, -50%);
  pointer-events: none;
  mix-blend-mode: difference;
  z-index: 9999;
  transition: width 300ms ease-out, height 300ms ease-out;
  will-change: transform;
}

.custom-cursor.hover {
  width: var(--cursor-size-hover);
  height: var(--cursor-size-hover);
}

.custom-cursor.click {
  width: var(--cursor-size-click);
  height: var(--cursor-size-click);
}

.mobile-swipe-hint {
  position: fixed;
  left: 16px;
  bottom: 20px;
  display: none;
  align-items: center;
  gap: 4px;
  padding: 6px 12px;
  border-radius: 9999px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(0, 0, 0, 0.55);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 9000;
}

.mobile-swipe-hint.is-visible {
  display: flex;
  opacity: 0.9;
}

.mobile-swipe-hint__text {
  font-family: var(--font-secondary);
  font-size: 12px;
  line-height: 1.4;
  color: var(--color-white);
}

@media (max-width: 1024px), (pointer: coarse) {
  .mobile-swipe-hint {
    display: flex;
  }

  body {
    cursor: auto;
  }

  .custom-cursor {
    display: none;
  }
}

/* ============================================
   Button Components
   ============================================ */

/* CTA Button with Slice Effect */
.cta-button {
  position: relative;
  display: inline-block;
  padding: 0 2rem;
  height: 60px;
  line-height: 60px;
  margin-top: 0;
  letter-spacing: 0.05em;
  font-family: var(--font-secondary);
  font-size: var(--button-size);
  font-weight: 300;
  color: var(--color-white);
  background: transparent;
  border: 1px solid var(--color-white);
  cursor: none;
  overflow: hidden;
  z-index: 21;
  transition: color 0.3s ease-in-out, border-color 0.3s ease-in-out;
}

/* Slice Effect - Two diagonal triangles that expand on hover */
.cta-button:before,
.cta-button:after {
  content: '';
  position: absolute;
  width: 0;
  height: 0;
  border: 0 solid;
  transform: rotate(360deg);
  transition: 0.3s ease-in-out;
  z-index: -1;
}

/* Bottom-left triangle */
.cta-button:before {
  bottom: 0;
  left: 0;
  border-color: transparent transparent transparent var(--color-white);
}

/* Top-right triangle */
.cta-button:after {
  top: 0;
  right: 0;
  border-color: transparent var(--color-white) transparent transparent;
}

/* Hover state - Triangles expand to fill the button */
.cta-button:hover {
  color: var(--color-black);
  border-color: var(--color-accent);
}

.cta-button:hover:before {
  border-width: 60px 200px;
  border-color: transparent transparent transparent var(--color-accent);
}

.cta-button:hover:after {
  border-width: 60px 200px;
  border-color: transparent var(--color-accent) transparent transparent;
}

/* Active/Click state */
.cta-button:active {
  transform: scale(0.98);
  transition: transform 0.1s ease;
}

/* Secondary Button - Simple Text Button */

.sec-button {
  display: inline-block;
  padding: 0 2rem;
  height: 60px;
  line-height: 60px;
  letter-spacing: 0.05em;
  font-family: var(--font-secondary);
  font-size: var(--button-size);
  font-weight: 300;
  color: var(--color-white);
  background: transparent;
  border: none;
  cursor: none;
  z-index: 21;
  opacity: 0.64;
  transition: color 300ms ease-out, opacity 300ms ease-out;
  text-decoration: none;
}

.sec-button:hover {
  opacity: 1.0;
  color: var(--color-accent);
}

.sec-button:active {
  transform: scale(0.98);
  transition: transform 0.3s ease;
}

/* ============================================
   Responsive Button Adjustments
   ============================================ */

/* Mobile - Buttons */
@media (max-width: 799px) {
  .cta-button,
  .sec-button {
    height: 50px;
    line-height: 50px;
    padding: 0 1.5rem;
  }

  .cta-button:hover:before,
  .cta-button:hover:after {
    border-width: 50px 150px;
  }
}

/* ============================================
   Demo Button Variations
   ============================================ */

/* Slice Button Demo (standalone version) */
.btn-slice {
  position: relative;
  display: inline-block;
  padding: 0 2rem;
  height: 60px;
  line-height: 60px;
  margin: 1rem;
  letter-spacing: 0.05em;
  background: transparent;
  border: 1px solid currentColor;
  cursor: none;
  overflow: hidden;
  text-decoration: none;
  transition: color 0.5s ease-in-out;
}

.btn-slice:before,
.btn-slice:after {
  content: '';
  position: absolute;
  width: 0;
  height: 0;
  border: 0 solid;
  transform: rotate(360deg);
  transition: 0.5s ease-in-out;
  z-index: -1;
}

.btn-slice:before {
  bottom: 0;
  left: 0;
}

.btn-slice:after {
  top: 0;
  right: 0;
}

.btn-slice:hover {
  color: #939d00;
}

.btn-slice:hover:before,
.btn-slice:hover:after {
  border-width: 60px 210px;
}

/* ============================================
   Fixed Buttons (WCAG & DYPA)
   ============================================ */

.fixed-buttons {
  position: fixed;
  bottom: 24px;
  right: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  z-index: 998;
}

.fixed-btn {
  width: 80px;
  height: 80px;
  background-color: var(--color-white);
  border: 2px solid var(--color-white);
  border-radius: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  transition: all 300ms ease-out;
  padding: 8px;
}

.fixed-btn:hover {
  transform: scale(1.05) translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
  border-color: var(--color-accent);
}

.fixed-btn:active {
  transform: scale(0.98);
}

.fixed-btn:focus {
  outline: 2px solid var(--color-accent);
  outline-offset: 4px;
}

.wcag-btn {
  background-color: var(--color-black);
  border-color: var(--color-white);
  border-radius: 0;
  padding: 0;
}

.wcag-btn img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.fixed-btn-text {
  color: var(--color-white);
  font-size: 14px;
  font-weight: 700;
  text-align: center;
  line-height: 1.2;
  font-family: var(--font-secondary);
}

.eu-funding-btn {
  background-color: var(--color-white);
  border-color: var(--color-white);
  border-radius: 0;
  padding: 0;
}

.eu-funding-btn img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 0;
}

/* Info Modals */
.info-modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 999;
}

.info-modal.active {
  display: flex;
}

.info-modal__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
}

.info-modal__content {
  position: relative;
  background: rgba(0, 0, 0, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  width: min(720px, 90vw);
  max-height: 90vh;
  overflow-y: auto;
  padding: 32px;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.6);
}

/* Custom slim scrollbar for modal */
.info-modal__content::-webkit-scrollbar {
  width: 6px;
}

.info-modal__content::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 3px;
}

.info-modal__content::-webkit-scrollbar-thumb {
  background: rgba(255, 208, 0, 0.6);
  border-radius: 3px;
  transition: background 200ms ease;
}

.info-modal__content::-webkit-scrollbar-thumb:hover {
  background: var(--color-accent);
}

/* Firefox scrollbar */
.info-modal__content {
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 208, 0, 0.6) rgba(255, 255, 255, 0.05);
}

.info-modal__close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.4);
  background: transparent;
  color: var(--color-white);
  font-size: 24px;
  cursor: pointer;
  transition: background 200ms ease, color 200ms ease;
}

.info-modal__close:hover {
  background: var(--color-accent);
  color: var(--color-black);
}

.info-modal__body h2 {
  font-size: 36px;
  margin-bottom: 16px;
}

.info-modal__body h3 {
  font-size: 20px;
  margin: 24px 0 12px;
  font-family: var(--font-secondary);
  color: var(--color-accent);
}

.info-modal__body p,
.info-modal__body li {
  font-family: var(--font-secondary);
  font-size: 16px;
  line-height: 1.6;
  margin-bottom: 12px;
}

.info-modal__body ul {
  padding-left: 20px;
  margin: 0 0 16px;
  list-style-type: disc;
}

.info-modal__body ul li {
  color: var(--color-white);
  display: list-item;
  margin-bottom: 8px;
}

.info-modal__body ul li::marker {
  color: var(--color-accent);
}

.info-modal__media {
  margin: 16px 0 24px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.info-modal__media img {
  width: 100%;
  display: block;
}

@media (max-width: 799px) {
  .info-modal__content {
    padding: 24px 20px;
  }

  .info-modal__body h2 {
    font-size: 28px;
  }

  .info-modal__body h3 {
    font-size: 18px;
  }

  .info-modal__body p,
  .info-modal__body li {
    font-size: 14px;
  }
}

/* Responsive adjustments */
@media (max-width: 799px) {
  .fixed-buttons {
    bottom: 16px;
    right: 16px;
    gap: 12px;
  }

  .fixed-btn {
    width: 64px;
    height: 64px;
  }

  .fixed-btn-text {
    font-size: 11px;
  }
}

