/* ============================================================
   SAFES UNLOCKED — style.css
   Faithful recreation of the Hostinger Horizons React site
   Design tokens mirror the original tailwind / CSS variable system
   ============================================================ */

/* ── Reset ──────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Outfit', sans-serif;
  background: hsl(0 0% 100%);
  color: hsl(210 29% 24%);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
a { text-decoration: none; }

/* ── Design tokens (mirrors original CSS vars) ───────────── */
:root {
  --background:       hsl(0 0% 100%);
  --foreground:       hsl(210 29% 24%);
  --card:             hsl(0 0% 100%);
  --muted:            hsl(210 20% 96%);
  --muted-fg:         hsl(210 15% 45%);
  --primary:          hsl(212 79% 28%);
  --primary-fg:       hsl(0 0% 98%);
  --accent:           hsl(189 100% 50%);
  --accent-fg:        hsl(210 29% 24%);
  --border:           hsl(210 20% 88%);
  --destructive:      hsl(0 84% 60%);
  --radius:           0.75rem;
}

/* ── Layout helpers ─────────────────────────────────────── */
.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1.5rem;
}
@media (min-width: 640px)  { .container { padding: 0 2rem; } }
@media (min-width: 1024px) { .container { padding: 0 2.5rem; } }

/* ── Background patterns ────────────────────────────────── */
.grid-pattern-subtle {
  background-image:
    linear-gradient(to right,  hsl(210 20% 88% / 0.3) 1px, transparent 1px),
    linear-gradient(to bottom, hsl(210 20% 88% / 0.3) 1px, transparent 1px);
  background-size: 32px 32px;
}

/* ── Buttons ────────────────────────────────────────────── */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--primary);
  color: var(--primary-fg);
  padding: 0.75rem 1.75rem;
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-weight: 600;
  transition: background 0.2s, transform 0.1s;
}
.btn-primary:hover  { background: hsl(212 79% 23%); }
.btn-primary:active { transform: scale(0.98); }

.btn-sm { padding: 0.5rem 1.5rem; font-size: 0.85rem; }

.btn-accent {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--accent);
  color: var(--accent-fg);
  padding: 1rem 2rem;
  border-radius: var(--radius);
  font-size: 1rem;
  font-weight: 600;
  box-shadow: 0 4px 20px hsl(189 100% 50% / 0.3);
  transition: background 0.2s, transform 0.1s;
}
.btn-accent:hover  { background: hsl(189 100% 44%); }
.btn-accent:active { transform: scale(0.98); }

.btn-icon { width: 1.15rem; height: 1.15rem; flex-shrink: 0; }

.btn-submit {
  width: 100%;
  justify-content: center;
  font-size: 1rem;
  padding: 0.875rem;
  margin-top: 0.5rem;
}
.btn-submit:disabled { opacity: 0.55; cursor: not-allowed; }
.btn-submit:disabled:hover { background: var(--primary); }

/* ── Mono utility ───────────────────────────────────────── */
.mono-text {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem;
}

/* ============================================================
   HEADER
   ============================================================ */
#site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  background: hsl(0 0% 100% / 0.95);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
  transition: box-shadow 0.2s;
}
#site-header.scrolled { box-shadow: 0 2px 16px hsl(212 79% 28% / 0.08); }

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 4rem;
}

.logo-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--foreground);
}
.logo-icon-wrap {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: var(--radius);
  background: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: transform 0.2s;
}
.logo-link:hover .logo-icon-wrap { transform: scale(1.05); }
.logo-icon { width: 1.35rem; height: 1.35rem; color: hsl(0 0% 98%); }
.logo-name { font-size: 1.05rem; font-weight: 700; color: var(--foreground); line-height: 1.2; }
.logo-sub  { font-family: 'JetBrains Mono', monospace; font-size: 0.68rem; color: var(--muted-fg); }

.desktop-nav {
  display: none;
  align-items: center;
  gap: 2rem;
}
.desktop-nav button {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--foreground);
  transition: color 0.2s;
}
.desktop-nav button:hover { color: var(--primary); }
@media (min-width: 768px) { .desktop-nav { display: flex; } }

/* ============================================================
   HERO
   ============================================================ */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
}
.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    hsl(212 79% 15% / 0.95) 0%,
    hsl(218 69% 20% / 0.9)  50%,
    hsl(210 29% 20% / 0.95) 100%
  );
}
.hero-grid {
  position: absolute;
  inset: 0;
  opacity: 0.2;
  /* override border colour for dark overlay */
  background-image:
    linear-gradient(to right,  hsl(0 0% 100% / 0.15) 1px, transparent 1px),
    linear-gradient(to bottom, hsl(0 0% 100% / 0.15) 1px, transparent 1px);
}

.hero-content {
  position: relative;
  z-index: 10;
  text-align: center;
  padding: 8rem 0 4rem;
}

.coming-soon-badge {
  display: inline-block;
  margin-bottom: 1.5rem;
  padding: 0.4rem 1rem;
  border-radius: 999px;
  background: hsl(189 100% 50% / 0.2);
  border: 1px solid hsl(189 100% 50% / 0.3);
}
.coming-soon-badge span {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem;
  color: var(--accent);
}

.hero-title {
  font-size: clamp(2.25rem, 6vw, 3.75rem);
  font-weight: 800;
  color: hsl(0 0% 100%);
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: 1.5rem;
  text-wrap: balance;
}

.hero-body {
  font-size: clamp(1rem, 2vw, 1.2rem);
  color: hsl(0 0% 90%);
  line-height: 1.7;
  max-width: 680px;
  margin: 0 auto 2rem;
}

.hero-cta {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
}
@media (min-width: 640px) {
  .hero-cta { flex-direction: row; justify-content: center; }
}

.hero-live-indicator {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: hsl(0 0% 80%);
}
.pulse-dot {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: var(--accent);
  animation: pulse 2s infinite;
  flex-shrink: 0;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.5; transform: scale(1.3); }
}

/* ============================================================
   BENEFITS
   ============================================================ */
.benefits {
  padding: 6rem 0;
  background: var(--background);
  position: relative;
}
.benefits-grid-bg {
  position: absolute;
  inset: 0;
  opacity: 0.3;
  pointer-events: none;
}

.section-header {
  text-align: center;
  margin-bottom: 4rem;
}
.section-title {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 700;
  color: var(--foreground);
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin-bottom: 1rem;
  text-wrap: balance;
}
.section-body {
  font-size: 1.1rem;
  color: var(--muted-fg);
  max-width: 640px;
  margin: 0 auto;
  line-height: 1.65;
}

.benefits-cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.75rem;
}
@media (min-width: 768px) { .benefits-cards { grid-template-columns: 1fr 1fr; } }

.benefit-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) * 1.3);
  padding: 2rem;
  box-shadow: 0 2px 8px hsl(212 79% 28% / 0.04);
  transition: box-shadow 0.2s, transform 0.2s, border-color 0.2s;
}
.benefit-card:hover {
  box-shadow: 0 8px 30px hsl(212 79% 28% / 0.1);
  transform: translateY(-3px);
  border-color: hsl(189 100% 50% / 0.3);
}

.benefit-icon {
  width: 3rem;
  height: 3rem;
  border-radius: var(--radius);
  background: hsl(212 79% 28% / 0.06);
  border: 1px solid hsl(212 79% 28% / 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
  color: var(--primary);
  transition: background 0.2s;
}
.benefit-card:hover .benefit-icon { background: hsl(189 100% 50% / 0.1); color: hsl(189 80% 35%); }
.benefit-icon svg { width: 1.3rem; height: 1.3rem; }

.benefit-card h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--foreground);
  margin-bottom: 0.5rem;
}
.benefit-card p {
  font-size: 0.9rem;
  color: var(--muted-fg);
  line-height: 1.6;
}

/* ============================================================
   CONTACT / FORM SECTION
   ============================================================ */
.contact-section {
  padding: 6rem 0;
  background: var(--muted);
  position: relative;
  overflow: hidden;
}
.contact-bg-img {
  position: absolute;
  inset: 0;
  opacity: 0.05;
  pointer-events: none;
}
.contact-bg-img img { width: 100%; height: 100%; object-fit: cover; }

.form-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) * 1.5);
  padding: 2.5rem;
  box-shadow: 0 4px 20px hsl(212 79% 28% / 0.06);
  max-width: 820px;
  margin: 0 auto;
}
@media (min-width: 768px) { .form-card { padding: 3rem; } }

/* Status messages */
.form-status {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.875rem 1rem;
  border-radius: var(--radius);
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
}
.form-success {
  background: hsl(142 70% 45% / 0.1);
  border: 1px solid hsl(142 70% 45% / 0.3);
  color: hsl(142 60% 30%);
}
.form-error {
  background: hsl(0 84% 60% / 0.1);
  border: 1px solid hsl(0 84% 60% / 0.3);
  color: hsl(0 70% 40%);
}
.form-error a { color: var(--primary); }

/* Form layout */
form { display: flex; flex-direction: column; gap: 1.25rem; }

.form-row-2 { display: grid; grid-template-columns: 1fr; gap: 1.25rem; }
@media (min-width: 640px) { .form-row-2 { grid-template-columns: 1fr 1fr; } }

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

label {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--foreground);
}
.required { color: var(--primary); }

input[type="text"],
input[type="email"],
textarea {
  width: 100%;
  background: var(--background);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.65rem 0.875rem;
  font-family: 'Outfit', sans-serif;
  font-size: 0.95rem;
  color: var(--foreground);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  -webkit-appearance: none;
}
input:focus, textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px hsl(212 79% 28% / 0.1);
}
input.invalid, textarea.invalid {
  border-color: var(--destructive);
}
input::placeholder, textarea::placeholder { color: var(--muted-fg); opacity: 0.7; }
textarea { resize: vertical; min-height: 100px; }

.field-error {
  font-size: 0.8rem;
  color: var(--destructive);
  min-height: 1rem;
}

/* ── Spinner inside button ──────────────────────────────── */
.spinner {
  display: inline-block;
  width: 1rem;
  height: 1rem;
  border: 2px solid hsl(0 0% 98% / 0.3);
  border-top-color: hsl(0 0% 98%);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ============================================================
   FOOTER
   ============================================================ */
footer {
  background: var(--muted);
  border-top: 1px solid var(--border);
}
.footer-inner { padding: 3rem 0; }
.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
  margin-bottom: 3rem;
}
@media (min-width: 768px) { .footer-grid { grid-template-columns: 1fr 1fr; } }

.footer-logo { margin-bottom: 1rem; }
.footer-desc {
  font-size: 0.875rem;
  color: var(--muted-fg);
  line-height: 1.65;
  max-width: 400px;
}

.footer-contact-heading {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--foreground);
  margin-bottom: 1rem;
}
.footer-contact-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.footer-contact-list li {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.875rem;
  color: var(--muted-fg);
}
.contact-icon { width: 1rem; height: 1rem; color: var(--accent); flex-shrink: 0; }

.footer-bottom {
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}
.footer-bottom p { font-size: 0.85rem; color: var(--muted-fg); }

/* ============================================================
   ANIMATIONS
   ============================================================ */
.animate-fade-up {
  animation: fadeUp 0.8s ease both;
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(28px); }
  to   { opacity: 1; transform: translateY(0); }
}

.animate-on-scroll {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.animate-on-scroll.visible {
  opacity: 1;
  transform: translateY(0);
}
