/* Frevun Technologies — landing styles */
:root {
  --bg: #0b1220;
  --bg-alt: #0f1729;
  --panel: #131c30;
  --ink: #e8edf7;
  --muted: #9aa7c0;
  --line: #1f2b45;
  --brand: #4f7cff;
  --brand-2: #6ea8ff;
  --brand-btn: #3461e0;        /* button bg — passes 4.5:1 with white text */
  --brand-btn-hover: #2f5ad6;  /* darker hover, still AA */
  --radius: 14px;
  --maxw: 1080px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

a { color: inherit; text-decoration: none; }

/* Buttons */
.btn {
  display: inline-block;
  padding: 12px 22px;
  border-radius: 10px;
  font: inherit;
  font-weight: 600;
  font-size: 15px;
  background: transparent;
  border: 1px solid transparent;
  color: var(--ink);
  transition: transform .2s ease, background .2s ease, border-color .2s ease, box-shadow .2s ease;
  cursor: pointer;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--brand-btn); color: #fff; box-shadow: 0 4px 14px rgba(79,124,255,.25); }
.btn-primary:hover { background: var(--brand-btn-hover); box-shadow: 0 8px 26px rgba(79,124,255,.5); }
.btn-ghost { border: 1px solid var(--line); color: var(--ink); }
.btn-ghost:hover { border-color: var(--brand); box-shadow: 0 6px 20px rgba(79,124,255,.18); }

/* Brand */
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; }
.brand-mark {
  width: 34px; height: 34px; border-radius: 9px;
  object-fit: cover; display: block;
  background: var(--panel);
}
.brand-name { font-size: 17px; letter-spacing: .2px; }
.brand-light { color: var(--muted); font-weight: 600; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(11,18,32,.82);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.nav-links { display: flex; align-items: center; gap: 26px; }
.nav-links a { color: var(--muted); font-size: 15px; font-weight: 500; }
.nav-links a:hover { color: var(--ink); }
.nav-links .btn-ghost { color: var(--ink); }

/* Hero */
.hero { padding: 96px 0 64px; text-align: center; }
.eyebrow {
  text-transform: uppercase; letter-spacing: 2px; font-size: 12px;
  color: var(--brand-2); font-weight: 700; margin-bottom: 18px;
}
.hero h1 { font-size: clamp(34px, 5.5vw, 56px); line-height: 1.08; letter-spacing: -1px; }
.lede { max-width: 660px; margin: 22px auto 0; color: var(--muted); font-size: 18px; }
.hero-actions { display: flex; gap: 14px; justify-content: center; margin-top: 32px; flex-wrap: wrap; }
.hero-meta { display: flex; gap: 22px; justify-content: center; margin-top: 34px; color: var(--muted); font-size: 14px; flex-wrap: wrap; }

/* Trust bar */
.trust { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--bg-alt); }
.trust-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; padding: 30px 24px; }
.trust-grid div { display: flex; flex-direction: column; }
.trust-grid strong { font-size: 15px; }
.trust-grid span { color: var(--muted); font-size: 13px; }

/* Sections */
.section { padding: 86px 0; }
.section--alt { background: var(--bg-alt); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-title { font-size: clamp(26px, 3.5vw, 36px); letter-spacing: -.5px; }
.section-sub { color: var(--muted); margin-top: 12px; max-width: 620px; font-size: 17px; }

/* Product cards */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin-top: 42px; }
.card {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 28px;
  transition: transform .18s ease, border-color .18s ease;
}
.card:hover { transform: translateY(-4px); border-color: var(--brand); }
.card-icon {
  width: 46px; height: 46px; border-radius: 11px;
  display: grid; place-items: center; font-size: 20px;
  background: rgba(79,124,255,.12); color: var(--brand-2); margin-bottom: 18px;
}
.card h3 { font-size: 20px; }
.card p { color: var(--muted); margin-top: 8px; font-size: 15px; }
.card-status {
  display: inline-block; margin-top: 18px; font-size: 12px; font-weight: 600;
  color: #7fe0a8; background: rgba(127,224,168,.1); padding: 5px 12px; border-radius: 999px;
}
.card-status--soon { color: var(--brand-2); background: rgba(79,124,255,.12); }

/* About */
.about-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 54px; align-items: start; }
.about-grid p { color: var(--muted); margin-top: 16px; font-size: 17px; }
.about-grid p:first-of-type { margin-top: 22px; }
.facts { list-style: none; display: grid; gap: 14px; }
.facts li {
  display: flex; flex-direction: column;
  background: var(--panel); border: 1px solid var(--line);
  border-radius: 12px; padding: 16px 18px;
}
.facts strong { font-size: 14px; }
.facts span { color: var(--muted); font-size: 14px; }

/* Contact */
.contact { text-align: center; }
.contact .section-sub { margin: 12px auto 0; }
.contact-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 38px; }
.contact-card {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: 12px; padding: 24px; display: flex; flex-direction: column; gap: 6px;
  transition: border-color .15s ease, transform .15s ease;
}
.contact-card:hover { border-color: var(--brand); transform: translateY(-2px); }
.contact-card strong { font-size: 15px; }
.contact-card span { color: var(--muted); font-size: 14px; }
.contact-card .contact-cta { color: var(--brand-2); font-weight: 600; margin-top: 6px; }

/* Contact cards rendered as <button> — reset native styling */
button.contact-card {
  font: inherit; text-align: left; width: 100%; cursor: pointer;
}
.footer-link-btn {
  background: none; border: 0; padding: 0; cursor: pointer;
  font: inherit; color: var(--muted); text-align: left;
}
.footer-link-btn:hover { color: var(--ink); }

/* Contact modal */
.modal { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 20px; }
.modal[hidden] { display: none; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(4,8,16,.72); backdrop-filter: blur(3px); }
.modal-dialog {
  position: relative; z-index: 1; width: 100%; max-width: 480px;
  background: var(--panel); border: 1px solid var(--line); border-radius: 16px;
  padding: 30px; box-shadow: 0 24px 60px rgba(0,0,0,.5);
}
.modal-close {
  position: absolute; top: 14px; right: 16px;
  background: none; border: 0; color: var(--muted);
  font-size: 26px; line-height: 1; cursor: pointer;
}
.modal-close:hover { color: var(--ink); }
.modal-dialog h2 { font-size: 22px; }
.modal-sub { color: var(--muted); margin-top: 6px; font-size: 15px; }

#contactForm { display: grid; gap: 16px; margin-top: 22px; }
#contactForm label { display: grid; gap: 6px; }
#contactForm label > span { font-size: 13px; font-weight: 600; color: var(--ink); }
#contactForm input,
#contactForm select,
#contactForm textarea {
  font: inherit; color: var(--ink);
  background: var(--bg); border: 1px solid var(--line); border-radius: 10px;
  padding: 11px 13px; width: 100%; resize: vertical;
}
#contactForm input:focus,
#contactForm select:focus,
#contactForm textarea:focus { outline: none; border-color: var(--brand); }
.modal-submit { width: 100%; margin-top: 4px; }

.form-status { font-size: 14px; min-height: 1px; margin-top: 2px; }
.form-status--ok { color: #7fe0a8; }
.form-status--err { color: #ff8b8b; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); background: var(--bg-alt); padding: 48px 0 28px; }
.footer-grid { display: flex; justify-content: space-between; align-items: flex-start; gap: 30px; flex-wrap: wrap; }
.footer-note { color: var(--muted); margin-top: 12px; font-size: 14px; }
.footer-links { display: flex; flex-direction: column; gap: 10px; }
.footer-links a { color: var(--muted); font-size: 14px; }
.footer-links a:hover { color: var(--ink); }
.footer-legal {
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  margin-top: 34px; padding-top: 20px; border-top: 1px solid var(--line);
  color: var(--muted); font-size: 13px;
}

/* Legal pages */
.legal { padding: 64px 0 90px; }
.legal h1 { font-size: clamp(28px, 4vw, 40px); letter-spacing: -.5px; }
.legal .updated { color: var(--muted); margin-top: 8px; font-size: 14px; }
.legal h2 { font-size: 20px; margin-top: 36px; }
.legal p, .legal li { color: var(--muted); margin-top: 12px; font-size: 16px; }
.legal ul { margin-top: 10px; padding-left: 22px; }
.legal a { color: var(--brand-2); }
.back-link { display: inline-block; margin-top: 40px; color: var(--brand-2); font-weight: 600; }

/* Responsive */
@media (max-width: 860px) {
  .trust-grid { grid-template-columns: repeat(2, 1fr); }
  .cards { grid-template-columns: 1fr; }
  .about-grid { grid-template-columns: 1fr; gap: 32px; }
  .contact-cards { grid-template-columns: 1fr; }
  .nav-links a:not(.btn) { display: none; }
}

/* ===== Load & scroll reveal animations ===== */

/* Prevent the unstyled flash: fade the whole page in once CSS is ready */
body { opacity: 0; transition: opacity .5s ease; }
body.is-ready { opacity: 1; }

/* Hero: staged entrance on load */
.hero .eyebrow,
.hero h1,
.hero .lede,
.hero .hero-actions,
.hero .hero-meta {
  opacity: 0;
  transform: translateY(16px);
  animation: rise-in .7s cubic-bezier(.22,.61,.36,1) forwards;
}
.hero .eyebrow      { animation-delay: .15s; }
.hero h1            { animation-delay: .28s; }
.hero .lede         { animation-delay: .42s; }
.hero .hero-actions { animation-delay: .56s; }
.hero .hero-meta    { animation-delay: .70s; }

@keyframes rise-in {
  to { opacity: 1; transform: translateY(0); }
}

/* Scroll reveal for sections below the fold */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .6s ease, transform .6s cubic-bezier(.22,.61,.36,1);
  will-change: opacity, transform;
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger children within a revealed group (cards, facts, contact tiles) */
.reveal.is-visible .card,
.reveal.is-visible .contact-card,
.reveal.is-visible .trust-grid > div {
  animation: rise-in .55s cubic-bezier(.22,.61,.36,1) backwards;
}
.reveal.is-visible .card:nth-child(1),
.reveal.is-visible .contact-card:nth-child(1),
.reveal.is-visible .trust-grid > div:nth-child(1) { animation-delay: .05s; }
.reveal.is-visible .card:nth-child(2),
.reveal.is-visible .contact-card:nth-child(2),
.reveal.is-visible .trust-grid > div:nth-child(2) { animation-delay: .15s; }
.reveal.is-visible .card:nth-child(3),
.reveal.is-visible .contact-card:nth-child(3),
.reveal.is-visible .trust-grid > div:nth-child(3) { animation-delay: .25s; }
.reveal.is-visible .trust-grid > div:nth-child(4) { animation-delay: .35s; }

/* ===== Extra polish: logo intro, parallax, hover lift ===== */

/* Brand logo eases + spins in gently on load */
.site-header .brand-mark {
  animation: logo-in .8s cubic-bezier(.22,.61,.36,1) both;
}
@keyframes logo-in {
  from { opacity: 0; transform: scale(.6) rotate(-12deg); }
  to   { opacity: 1; transform: scale(1) rotate(0); }
}
/* Subtle continuous breathing glow on the header logo */
.site-header .brand-mark {
  box-shadow: 0 0 0 rgba(79,124,255,0);
  transition: box-shadow .3s ease, transform .3s ease;
}
.site-header .brand:hover .brand-mark {
  transform: rotate(-4deg) scale(1.05);
  box-shadow: 0 6px 18px rgba(79,124,255,.45);
}

/* Hero parallax — JS sets --scroll; hero content drifts slower than scroll */
.hero .container {
  transform: translateY(calc(var(--scroll, 0) * 0.18px));
  will-change: transform;
}

/* Card hover gets a soft glow to match buttons */
.card { transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease; }
.card:hover { box-shadow: 0 14px 36px rgba(0,0,0,.35), 0 0 0 1px rgba(79,124,255,.35); }
