/* 
 * Read2Burn Secure Transfer - Modern CSS
 * Updated: 2025
 */

/* ==========================================================================
   Fonts
   ========================================================================== */

@font-face {
  font-family: "Montserrat";
  src: url("../fonts/montserrat-v31-latin-500.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Montserrat";
  src: url("../fonts/montserrat-v31-latin-600.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Montserrat";
  src: url("../fonts/montserrat-v31-latin-700.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* ==========================================================================
   CSS Variables
   ========================================================================== */
:root {
  color-scheme: light;
  --primary: #000;
  --text: #000;
  --text-muted: #999;
  --border: #000;
  --bg: #fff;
  --link: #999;
  --space-1: 0.5rem;
  --space-2: 1rem;
  --space-3: 1.5rem;
  --space-4: 2rem;
  --space-5: 5.5rem;
  --space-6: 9.25rem;
  --radius: 16px;
  --radius-button: 24px;
}

/* ==========================================================================
   Reset
   ========================================================================== */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  min-height: 100vh;
  font-family: "Montserrat", -apple-system, BlinkMacSystemFont, "Segoe UI",
    system-ui, sans-serif;
  font-size: 16px;
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}

/* Gradient Background */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background: radial-gradient(
      circle,
      rgba(48, 38, 131, 0.7) 0%,
      rgba(48, 38, 131, 0.5) 20%,
      rgba(48, 38, 131, 0) 40%,
      rgba(255, 255, 255, 0) 100%
    ),
    radial-gradient(
      circle,
      rgba(0, 158, 227, 0.9) 0%,
      rgba(0, 158, 227, 0.7) 20%,
      rgba(0, 158, 227, 0.1) 40%,
      rgba(255, 255, 255, 0) 100%
    ),
    radial-gradient(
      circle,
      rgba(0, 141, 54, 0.9) 0%,
      rgba(0, 141, 54, 0.7) 20%,
      rgba(0, 141, 54, 0.1) 40%,
      rgba(255, 255, 255, 0) 100%
    ),
    radial-gradient(
      circle,
      rgba(222, 220, 0, 0.9) 0%,
      rgba(222, 220, 0, 0.7) 20%,
      rgba(222, 220, 0, 0.1) 40%,
      rgba(255, 255, 255, 0) 100%
    ),
    linear-gradient(0deg, black, black);
  background-size: 300% 300%, 300% 300%, 300% 300%, 300% 300%, 100% 100%;
  background-repeat: no-repeat;
  background-position: 30% 30%, 70% 30%, 70% 70%, 30% 70%, 50% 50%;
  animation: gradient 20s linear infinite;
}

@keyframes gradient {
  0% {
    background-position: 30% 30%, 70% 30%, 70% 70%, 30% 70%, 50% 50%;
  }
  12.5% {
    background-position: 50% 20%, 80% 50%, 50% 80%, 20% 50%, 50% 50%;
  }
  25% {
    background-position: 70% 30%, 70% 70%, 30% 70%, 30% 30%, 50% 50%;
  }
  37.5% {
    background-position: 80% 50%, 50% 80%, 20% 50%, 50% 20%, 50% 50%;
  }
  50% {
    background-position: 70% 70%, 30% 70%, 30% 30%, 70% 30%, 50% 50%;
  }
  62.5% {
    background-position: 50% 80%, 20% 50%, 50% 20%, 80% 50%, 50% 50%;
  }
  75% {
    background-position: 30% 70%, 30% 30%, 70% 30%, 70% 70%, 50% 50%;
  }
  87.5% {
    background-position: 20% 50%, 50% 20%, 80% 50%, 50% 80%, 50% 50%;
  }
  100% {
    background-position: 30% 30%, 70% 30%, 70% 70%, 30% 70%, 50% 50%;
  }
}

/* ==========================================================================
   Layout
   ========================================================================== */
.container {
  min-height: 100vh;
  max-width: 1600px;
  margin: 0 auto;
  padding: var(--space-5) var(--space-6);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
}

.container > * {
  position: relative;
  z-index: 1;
}

.logo {
  position: absolute;
  top: var(--space-5);
  left: var(--space-6);
  z-index: 10;
  animation: fadeIn 0.8s ease-out;
}

.logo img {
  height: 40px;
  width: auto;
  transition: transform 0.3s ease;
}

.logo:hover img {
  transform: scale(1.05);
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.card {
  background: var(--bg);
  border-radius: var(--radius);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  padding: var(--space-4);
  max-width: clamp(320px, 90vw, 475px);
  width: 100%;
  min-height: 480px;
  transition: box-shadow 0.3s ease;
}

.card:hover {
  box-shadow: 0 12px 48px rgba(0, 0, 0, 0.15);
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.card h1 {
  font-size: clamp(22px, 3.5vw + 12px, 38px);
  font-weight: 700;
  letter-spacing: clamp(0.2px, 0.2vw, 0.5px);
  text-transform: uppercase;
  margin-bottom: var(--space-3);
  text-wrap: balance;
}

/* ==========================================================================
   Forms
   ========================================================================== */
.form {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

label {
  font-size: clamp(16px, 1.2vw, 18px);
  font-weight: 700;
  letter-spacing: clamp(0.5px, 0.08vw, 1.08px);
}

input,
textarea {
  width: 100%;
  padding: var(--space-2);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  font-size: 16px;
  font-weight: 500;
  letter-spacing: 0.96px;
  font-family: inherit;
  transition: all 0.3s ease;
  background: #fff;
}

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

input:hover,
textarea:hover {
  border-color: #333;
}

input:focus-visible,
textarea:focus-visible {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(0, 0, 0, 0.05);
  transform: translateY(-1px);
}

textarea[readonly] {
  background: #f9f9f9;
  cursor: default;
}

button {
  padding: 12px 32px;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: var(--radius-button);
  font-size: clamp(18px, 1.6vw, 21px);
  font-weight: 600;
  letter-spacing: clamp(0.6px, 0.1vw, 1.26px);
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

button::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.1) 0%,
    rgba(255, 255, 255, 0) 100%
  );
  opacity: 0;
  transition: opacity 0.3s ease;
}

button:hover {
  background: #333;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
}

button:hover::before {
  opacity: 1;
}

button:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

/* ==========================================================================
   Content
   ========================================================================== */
p {
  margin-bottom: var(--space-2);
  font-size: 16px;
  font-weight: 500;
  letter-spacing: 0.96px;
}

strong {
  font-weight: 700;
}

.footer {
  margin-top: var(--space-4);
  display: flex;
  gap: var(--space-2);
  font-size: 16px;
}

.footer a {
  color: #aaa;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.3s ease;
  position: relative;
}

.footer a::after {
  content: "";
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--primary);
  transition: width 0.3s ease;
}

.footer a:hover {
  color: var(--primary);
  transform: translateY(-1px);
}

.footer a:hover::after {
  width: 100%;
}

/* ==========================================================================
   Animation
   ========================================================================== */
#lottie-animation {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: clamp(280px, 50vw, 750px);
  height: auto;
  z-index: 0;
  pointer-events: none;
  opacity: 0.9;
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1400px) {
  .container {
    padding: var(--space-5) var(--space-4);
  }

  .logo {
    top: var(--space-5);
    left: var(--space-4);
  }
}

@media (max-width: 1200px) {
  .container {
    padding: var(--space-4) var(--space-3);
  }

  .logo {
    top: var(--space-4);
    left: var(--space-3);
  }
}

@media (max-width: 992px) {
  .container {
    flex-direction: column;
    align-items: center;
    padding: var(--space-4) var(--space-3);
    padding-top: 120px;
  }

  .logo {
    top: var(--space-4);
    left: var(--space-3);
  }

  #lottie-animation {
    display: none;
  }
}

@media (max-width: 768px) {
  .container {
    padding: var(--space-2);
    padding-top: calc(100px + env(safe-area-inset-top));
    flex-direction: column;
  }

  .logo {
    top: calc(var(--space-2) + env(safe-area-inset-top));
    left: calc(var(--space-2) + env(safe-area-inset-left));
  }

  .logo img {
    height: 28px;
  }

  .card {
    padding: var(--space-3);
    max-width: 100%;
    min-height: 420px;
  }
}

/* ==========================================================================
   Accessibility & Performance
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  body::before {
    animation: none;
  }

  button:hover,
  button:active {
    transform: none;
  }

  input:focus-visible,
  textarea:focus-visible {
    transform: none;
  }
}

@media (max-width: 768px) {
  body::before {
    animation-duration: 30s;
  }

  .card {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
  }

  .card:hover {
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.12);
  }
}
