/* ============================================
   PETI PLANET — Design System
   Following algagatlas.hu design principles
   ============================================ */

/* ---------- Google Fonts ---------- */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;600;700;800;900&family=Open+Sans:wght@300;400;600&display=swap');

/* ---------- Design Tokens ---------- */
:root {
  /* Colors */
  --color-navy: #001A3D;
  --color-navy-deep: #000F24;
  --color-navy-mid: #002855;
  --color-teal: #00A9C1;
  --color-teal-dark: #008A9E;
  --color-teal-light: #00d4ff;
  --color-cyan-glow: rgba(0, 169, 193, 0.25);
  --color-white: #FFFFFF;
  --color-white-soft: rgba(255, 255, 255, 0.85);
  --color-white-muted: rgba(255, 255, 255, 0.6);
  --color-success: #2ecc71;
  --color-error: #e74c3c;

  /* Typography */
  --font-heading: 'Montserrat', sans-serif;
  --font-body: 'Open Sans', sans-serif;

  /* Spacing */
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2.5rem;
  --space-xl: 4rem;
  --space-xxl: 6rem;

  /* Border */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 16px;

  /* Transitions */
  --ease-out: cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --transition-base: 0.3s var(--ease-out);
}

/* ---------- Reset ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: var(--font-body);
  font-weight: 400;
  line-height: 1.6;
  color: var(--color-white);
  background-color: var(--color-navy-deep);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--color-teal-light);
  text-decoration: none;
  transition: color var(--transition-base);
}

a:hover {
  color: var(--color-teal);
}

/* ---------- Typography ---------- */
h1,
h2,
h3,
h4 {
  font-family: var(--font-heading);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  line-height: 1.2;
}

h1 {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 900;
}

h2 {
  font-size: clamp(1.5rem, 3.5vw, 2.5rem);
  font-weight: 800;
}

h3 {
  font-size: clamp(1.1rem, 2.5vw, 1.5rem);
  font-weight: 700;
}

p {
  font-size: clamp(1rem, 2vw, 1.15rem);
  color: var(--color-white-soft);
}

/* ---------- Layout ---------- */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-md);
}

.section {
  padding: var(--space-xl) 0;
  position: relative;
}

/* ---------- HERO SECTION ---------- */
.hero {
  position: relative;
  min-height: 65vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: var(--space-xxl) 0 var(--space-xl);
}

.hero__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero__bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 40%;
}

.hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg,
      rgba(0, 15, 36, 0.35) 0%,
      rgba(0, 26, 61, 0.55) 50%,
      var(--color-navy-deep) 100%);
  z-index: 1;
}

.hero__content {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 850px;
  padding: 0 var(--space-md);
}

.hero__badge {
  display: inline-block;
  background: rgba(0, 169, 193, 0.2);
  border: 1px solid var(--color-teal);
  color: var(--color-teal-light);
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 0.5rem 1.5rem;
  border-radius: 50px;
  margin-bottom: var(--space-md);
  backdrop-filter: blur(4px);
}

.hero__title {
  color: var(--color-white);
  margin-bottom: var(--space-sm);
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
}

.hero__title span {
  color: var(--color-teal);
}

.hero__subtitle {
  font-size: clamp(1.05rem, 2.2vw, 1.3rem);
  color: var(--color-white-soft);
  margin-bottom: var(--space-lg);
  line-height: 1.7;
}

.hero__stats {
  display: flex;
  justify-content: center;
  gap: var(--space-lg);
  flex-wrap: wrap;
  margin-top: var(--space-md);
}

.hero__stat {
  text-align: center;
}

.hero__stat-value {
  font-family: var(--font-heading);
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  font-weight: 900;
  color: var(--color-white);
  display: block;
}

.hero__stat-label {
  font-size: 0.85rem;
  color: var(--color-white-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ---------- WAVE DIVIDER ---------- */
.wave-divider {
  display: block;
  width: 100%;
  height: auto;
  margin-top: -2px;
  margin-bottom: -2px;
}

.wave-divider--top {
  transform: rotate(180deg);
}

/* ---------- MISSION CARDS SECTION ---------- */
.cards-section {
  background: var(--color-navy);
  padding: var(--space-xl) 0;
}

.cards-section__title {
  text-align: center;
  color: var(--color-white);
  margin-bottom: var(--space-xl);
}

.cards-section__title span {
  color: var(--color-teal);
}

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

.card {
  background: linear-gradient(145deg, var(--color-teal), var(--color-teal-dark));
  border-radius: var(--radius-md);
  padding: var(--space-lg);
  transition: transform var(--transition-base), box-shadow var(--transition-base);
  position: relative;
  overflow: hidden;
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--color-teal-light), transparent);
}

.card:hover,
.card:active {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0, 169, 193, 0.3);
}

.card__icon {
  display: none;
}

.card__title {
  color: var(--color-white);
  margin-bottom: var(--space-sm);
  font-size: 1.2rem;
}

.card__text {
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.95rem;
  line-height: 1.6;
}

/* ---------- FORM SECTION ---------- */
.form-section {
  background: var(--color-navy-deep);
  padding: var(--space-xxl) 0;
  position: relative;
}

.form-section__inner {
  max-width: 700px;
  margin: 0 auto;
  text-align: center;
}

.form-section__title {
  color: var(--color-white);
  margin-bottom: var(--space-sm);
}

.form-section__title span {
  color: var(--color-teal);
}

.form-section__subtitle {
  color: var(--color-white-muted);
  margin-bottom: var(--space-xl);
  font-size: 1.05rem;
}

/* ---------- FORM ---------- */
.subscribe-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  text-align: left;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-md);
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.form-group--full {
  grid-column: 1 / -1;
}

.form-label {
  font-family: var(--font-heading);
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-white-soft);
}

.form-input {
  width: 100%;
  padding: 1rem 1.2rem;
  font-family: var(--font-body);
  font-size: 1.05rem;
  color: var(--color-white);
  background: var(--color-navy-mid);
  border: 2px solid rgba(0, 169, 193, 0.3);
  border-radius: var(--radius-sm);
  outline: none;
  transition: border-color var(--transition-base), box-shadow var(--transition-base);
  min-height: 52px;
  -webkit-appearance: none;
}

.form-input::placeholder {
  color: var(--color-white-muted);
}

.form-input:focus {
  border-color: var(--color-teal);
  box-shadow: 0 0 0 3px var(--color-cyan-glow);
}

.form-input.error {
  border-color: var(--color-error);
  box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.2);
}

/* ---------- GDPR Checkbox ---------- */
.gdpr-group {
  display: flex;
  align-items: flex-start;
  gap: var(--space-sm);
  cursor: pointer;
  padding: var(--space-sm) 0;
}

.gdpr-checkbox {
  appearance: none;
  -webkit-appearance: none;
  width: 28px;
  height: 28px;
  min-width: 28px;
  border: 2px solid rgba(0, 169, 193, 0.5);
  border-radius: var(--radius-sm);
  background: var(--color-navy-mid);
  cursor: pointer;
  position: relative;
  transition: all var(--transition-base);
  margin-top: 2px;
}

.gdpr-checkbox:checked {
  background: var(--color-teal);
  border-color: var(--color-teal);
}

.gdpr-checkbox:checked::after {
  content: '✓';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: var(--color-white);
  font-size: 1rem;
  font-weight: 700;
}

.gdpr-checkbox.error {
  border-color: var(--color-error);
  box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.2);
}

.gdpr-label {
  font-size: 0.9rem;
  color: var(--color-white-muted);
  line-height: 1.5;
  cursor: pointer;
}

.gdpr-label a {
  color: var(--color-teal-light);
  text-decoration: underline;
}

/* ---------- Submit Button ---------- */
.btn-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  padding: 1.1rem 2rem;
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-white);
  background: linear-gradient(135deg, var(--color-teal), var(--color-teal-dark));
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition-base);
  min-height: 56px;
  position: relative;
  overflow: hidden;
}

.btn-submit::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.15), transparent);
  transition: left 0.5s;
}

.btn-submit:hover::before,
.btn-submit:active::before {
  left: 100%;
}

.btn-submit:hover,
.btn-submit:active {
  background: linear-gradient(135deg, var(--color-teal-light), var(--color-teal));
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(0, 169, 193, 0.4);
}

.btn-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn-submit .spinner {
  display: none;
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: var(--color-white);
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

.btn-submit.loading .spinner {
  display: block;
}

.btn-submit.loading .btn-text {
  opacity: 0;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ---------- Form Messages ---------- */
.form-message {
  padding: var(--space-md);
  border-radius: var(--radius-md);
  font-size: 1rem;
  text-align: center;
  display: none;
  animation: fadeInUp 0.4s var(--ease-out);
}

.form-message.success {
  display: block;
  background: rgba(46, 204, 113, 0.15);
  border: 1px solid var(--color-success);
  color: var(--color-success);
}

.form-message.error {
  display: block;
  background: rgba(231, 76, 60, 0.15);
  border: 1px solid var(--color-error);
  color: var(--color-error);
}

.form-message__icon {
  font-size: 2rem;
  display: block;
  margin-bottom: 0.5rem;
}

/* ---------- FOOTER ---------- */
.footer {
  background: var(--color-navy-deep);
  border-top: 1px solid rgba(0, 169, 193, 0.15);
  padding: var(--space-lg) 0 var(--space-md);
  text-align: center;
}

.footer__links {
  display: flex;
  justify-content: center;
  gap: var(--space-lg);
  margin-bottom: var(--space-md);
  flex-wrap: wrap;
}

.footer__link {
  font-family: var(--font-heading);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-teal);
  transition: color var(--transition-base);
}

.footer__link:hover {
  color: var(--color-teal-light);
}

.footer__copy {
  font-size: 0.8rem;
  color: var(--color-white-muted);
}

/* ---------- Animations ---------- */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-in {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s var(--ease-out), transform 0.6s var(--ease-out);
}

.animate-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Staggered card animations */
.card:nth-child(1) {
  transition-delay: 0.1s;
}

.card:nth-child(2) {
  transition-delay: 0.2s;
}

.card:nth-child(3) {
  transition-delay: 0.3s;
}

/* ---------- Tablet Responsive (Portrait) ---------- */
@media (max-width: 900px) {
  .cards-grid {
    grid-template-columns: 1fr;
    gap: var(--space-md);
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: 55vh;
    padding: var(--space-xl) 0 var(--space-lg);
  }

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

  .hero__stat-value {
    font-size: 1.8rem;
  }

  .section {
    padding: var(--space-lg) 0;
  }
}

/* Tablet landscape optimizations */
@media (min-width: 901px) and (max-width: 1366px) {
  html {
    font-size: 17px;
  }

  .cards-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-lg);
  }

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

  .form-input {
    min-height: 56px;
    font-size: 1.1rem;
  }

  .btn-submit {
    min-height: 60px;
    font-size: 1.15rem;
  }

  .gdpr-checkbox {
    width: 32px;
    height: 32px;
    min-width: 32px;
  }
}

/* Small phone fallback */
@media (max-width: 480px) {
  .hero__stats {
    flex-direction: column;
    gap: var(--space-sm);
  }

  .container {
    padding: 0 var(--space-sm);
  }
}