:root {
  --bg-color: #1e1e2f;
  --text-color: #e0e0f0;
  --accent-color: #7e57c2;
  --accent-dark: #5e349a;
}

body.dark {
  background-color: var(--bg-color);
  color: var(--text-color);
}

.navbar {
  background: var(--bg-color);
  border-bottom: 1px solid var(--accent-dark);
  padding: 1rem 0;
}

.navbar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-size: 1.5rem;
  font-weight: bold;
  color: #ddd;
  text-decoration: none;
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 1.5rem;
}

/* link styles for both <a> and logout <button> */
.navbar .nav-links a,
.navbar .nav-links li form button {
  all: unset;                    /* remove default button styles */
  cursor: pointer;
  padding: 0;
  margin: 0;

  font-family: inherit;
  font-size: inherit;
  font-weight: 500;             /* match your <a> font-weight */
  color: var(--text-color);
  text-decoration: none;
}

.navbar .nav-links a:hover,
.navbar .nav-links a:focus,
.navbar .nav-links li form button:hover,
.navbar .nav-links li form button:focus {
  color: var(--accent-color);
}

.hero {
  padding: 4rem 0;
  text-align: center;
   /* existing properties … */
  background-size:cover;          /* already hinted, re-state explicitly      */
  background-position:center top; /* locks focal point slightly higher        */
}

.hero h1 {
  font-size: 3rem;
  margin-bottom: 1rem;
  color: var(--accent-color);
}

.hero p {
  font-size: 1.25rem;
  margin-bottom: 2rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.cta-buttons .btn {
  padding: 0.75rem 1.5rem;
  border-radius: 0.5rem;
  font-size: 1rem;
  transition: background 0.3s;
  margin: 0 0.5rem;
}

.btn.primary {
  background: var(--accent-color);
  color: #fff;
}

.btn.primary:hover {
  background: var(--accent-dark);
}

.btn.secondary {
  background: transparent;
  color: var(--accent-color);
  border: 2px solid var(--accent-color);
}

.btn.secondary:hover {
  background: var(--accent-color);
  color: #fff;
}

.features {
  padding: 4rem 0;
}

.features h2 {
  text-align: center;
  font-size: 2rem;
  margin-bottom: 2rem;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
}

.feature-item h3 {
  color: var(--accent-color);
  margin-bottom: 0.5rem;
}

.feature-item p {
  color: var(--text-color);
}

.download-form {
  max-width: 400px;
  margin: 0 auto;
}

/* ──────────────────────────────────────────────────────
   Landing-page tweaks (≤ 640 px)
   ────────────────────────────────────────────────────── */
@media (max-width: 640px) {
  .feature-grid,
  .usecase-grid,
  .stats-grid,
  .duality-grid,
  .step-grid {
    gap: 1.25rem;                 /* 2 rem → 1.25 rem for tighter vertical rhythm */
  }

  .hero video,
  .hero img { width: 100%; height: auto; }

  /* Cut down big hero CTAs so they don’t wrap mid-word */
  .hero .btn { width: 100%; max-width: 320px; margin-inline: auto; }
}

.duality-grid .item img{
  max-width:100%;          /* never spill outside its column          */
  width:100%;
  height:auto;
}

/* hard-limit hero-section visuals on narrow screens */
@media (max-width:640px){
  .duality-grid .item img{max-width:90vw;}   /* 90 % of viewport */
}

/* -------------------------------------------------
   Headline – wipe-on reveal **from left to right**,
   followed by a quick glow pulse
   -------------------------------------------------*/

/* (a) the wipe */
@keyframes revealLR {
  0%   { -webkit-mask-size: 0% 100%; mask-size: 0% 100%; }
  100% { -webkit-mask-size: 100% 100%; mask-size: 100% 100%; }
}

/* (b) the glow pulse you liked */
@keyframes glowPulse {
  0%,100% { text-shadow: 0 0 0 rgba(126,87,194,0); }
  50%     { text-shadow: 0 0 14px rgba(126,87,194,.75); }
}

/* Apply both animations in sequence */
.hero h1{
  display:inline-block;                 /* let the mask work on the text width */
  /* create a one-colour mask we can resize */
  -webkit-mask-image:linear-gradient(#000 0 0);
          mask-image:linear-gradient(#000 0 0);
  -webkit-mask-repeat:no-repeat;
          mask-repeat:no-repeat;

  /* 1) wipe-on (2 s)  →  2) glowPulse (2 s, starts after wipe) */
  animation:
      revealLR   1.5s  cubic-bezier(.25,.46,.45,.94)   forwards,
      glowPulse  2s  ease-out        2s              forwards;
}

/* ==============================================
   2)  “Start Free Now” button – visible pulse
       (needs inline-block so transform works)
   ============================================== */
@keyframes pulse {
  0%,100% { transform: scale(1);   }
  50%     { transform: scale(1.08); }
}

.hero .btn.primary {
  display: inline-block;            /* <-- makes the scale visible */
  animation: pulse 3s ease-in-out infinite;
  animation-delay: 3s;
  transform-origin: center;
}

/* ─────────── Hero CTA layout ─────────── */
.cta-buttons{
  display:flex;
  justify-content:center;
  gap:1rem;
  flex-wrap:wrap;          /* lets them wrap gracefully on tablets */
}

@media (max-width:640px){

  /* stack the two links, shrink them a bit, kill the pulse */
  .cta-buttons{
    flex-direction:column;
    align-items:center;
  }

  .cta-buttons .btn{
    display:block;         /* each button on its own line          */
    width:100%;
    max-width:320px;       /* stops silly 4K-wide “100 %” images   */
    font-size:1rem;        /* 16 px → 15 px root → ~15 px button   */
    padding:0.75rem 1.25rem;
    margin:0 auto;         /* horizontal centring                  */
  }

  .cta-buttons .btn.primary{
    animation:none;        /* the 1.08 × pulse was causing overlap */
  }
}

/* ─────────────────────────────────────────────
   Paste these *at the very end* of the same
   <style> tag that already contains .hero{…}
   ───────────────────────────────────────────── */

/* 1)  HERO - extra breathing room         */
.hero{
  padding:5.5rem 0 5rem !important;   /* ↑ top | ↓ bottom */
}
.hero h1{
  margin-bottom:1.25rem !important;   /* headline → copy  */
}
.hero p{
  margin:1.75rem auto 3rem !important;/* copy → buttons   */
}

/* 2)  “RecApp at Work” block              */
.atwork{
  background:#2e2e42;   /* match ‘How it works’ */
  padding:4rem 0;
  text-align:center;
}

.atwork h2{
  margin-bottom:2rem;
  color:#fff;           /* back to white */
}

/* make the heading look like every other section title */
.atwork h2{
  margin-bottom:2rem;
  font-size:2rem;          /* ← same as .features h2               */
  color:var(--text-color); /* ← same default body text colour      */
}

.atwork-video{
  display:block;
  margin:0 auto;
  width:100%;
  max-width:720px;
  border-radius:0.75rem;
  box-shadow:0 8px 24px rgba(0,0,0,.5);
}

/* style matches the hero blurb ("Record or import audio…") */
.atwork-tagline{
  font-size:1.25rem;       /* identical size                      */
  color:#fff;              /* identical colour (hero inherits #fff)*/
  max-width:700px;         /* identical line-length restraint     */
  margin:1.75rem auto 2.5rem;
}
