/* =============================================
   Tabnora — landing page styles
   ============================================= */

:root {
  --body-highlight:  #AEEDE0;
  --body-mid:        #7FD8C9;
  --body-shadow:     #5FBFB0;
  --panel-bg:        #E8F8F4;
  --cheek-pink:      #FF9AA2;
  --antenna-yellow:  #FFD166;
  --eye-navy:        #1B2A49;
  --eye-blue:        #3A5BA0;
  --white:           #FFFFFF;

  --font: 'Nunito', sans-serif;
  --radius-pill: 999px;
  --radius-card: 20px;
  --max-w: 900px;
  --section-gap: 5rem;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font);
  background: var(--white);
  color: var(--eye-navy);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* ── Layout ── */
.container {
  width: min(var(--max-w), 100% - 2.5rem);
  margin-inline: auto;
}

/* ── Nav ── */
.nav {
  background: rgba(232, 248, 244, 0.94);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid rgba(127, 216, 201, 0.2);
}

.nav__inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.9rem 1.5rem;
  max-width: 1100px;
  margin-inline: auto;
}

.nav__logo {
  font-weight: 800;
  font-size: 1.05rem;
  color: var(--eye-navy);
  letter-spacing: -0.02em;
  text-decoration: none;
}

.nav__links {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.nav__link {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--body-shadow);
  text-decoration: none;
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  transition: background 0.2s ease-in-out, color 0.2s ease-in-out;
}

.nav__link:hover {
  background: rgba(95, 191, 176, 0.18);
  color: var(--eye-navy);
}

.nav__link--current {
  color: var(--eye-navy);
  background: rgba(174, 237, 224, 0.55);
}

.nav__github {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--body-shadow);
  text-decoration: none;
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  background: rgba(95, 191, 176, 0.12);
  transition: background 0.2s ease-in-out, color 0.2s ease-in-out;
}

.nav__github:hover {
  background: rgba(95, 191, 176, 0.28);
  color: var(--eye-navy);
}

/* ── Hero ── */
.hero {
  background: var(--panel-bg);
  padding: 4.5rem 1.25rem 5.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  overflow: hidden;
}

.hero__alien-wrap {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  width: clamp(280px, 40vw, 500px);
  margin-bottom: 2rem;
}

.hero__alien-glow {
  position: absolute;
  bottom: -8%;
  left: 50%;
  transform: translateX(-50%);
  width: 70%;
  height: 40px;
  background: radial-gradient(ellipse, rgba(127, 216, 201, 0.55) 0%, transparent 70%);
  border-radius: 50%;
  animation: glow-pulse 3.2s ease-in-out infinite alternate;
  pointer-events: none;
}

@keyframes glow-pulse {
  from { opacity: 0.7; transform: translateX(-50%) scaleX(1); }
  to   { opacity: 1;   transform: translateX(-50%) scaleX(1.1); }
}

.hero__alien-tracker {
  width: 100%;
  transform-origin: 50% 58%;
  transition: transform 0.35s ease-out;
  will-change: transform;
}

.hero__alien-stage {
  position: relative;
  width: 100%;
  animation:
    bob 3.2s ease-in-out infinite alternate,
    hero-alien-arrive 0.65s ease-out both;
  transform-origin: 50% 60%;
}

.hero__alien {
  width: 100%;
  height: auto;
  display: block;
  user-select: none;
  pointer-events: none;
  position: relative;
  z-index: 1;
}

.hero__alien--blink {
  position: absolute;
  inset: 0;
  opacity: 0;
  z-index: 2;
  /* Compensate: the AI-generated blink art draws the character slightly
     smaller within its 1024×1024 canvas than idle does. Without this scale,
     swapping looks like a visible shrink at every blink. */
  transform: scale(1.06);
  transform-origin: 50% 58%;
}

@keyframes bob {
  from { transform: translateY(0) rotate(0deg); }
  to   { transform: translateY(-12px) rotate(0.8deg); }
}

.hero__copy {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 680px;
  gap: 0;
}

.hero__badge {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--body-shadow);
  background: rgba(95, 191, 176, 0.18);
  border-radius: 999px;
  padding: 0.3em 0.9em;
  margin-bottom: 1.25rem;
}

.hero__headline {
  font-size: clamp(3rem, 7vw, 6.5rem);
  font-weight: 800;
  color: var(--eye-navy);
  line-height: 1.04;
  margin-bottom: 1.25rem;
  letter-spacing: -0.03em;
}

.hero__sub {
  font-size: clamp(1rem, 1.8vw, 1.15rem);
  color: rgba(27, 42, 73, 0.72);
  max-width: 420px;
  margin-bottom: 2rem;
  line-height: 1.65;
}

.hero__footnote {
  font-size: 0.83rem;
  color: var(--body-shadow);
  margin-top: 0.85rem;
  letter-spacing: 0.01em;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--antenna-yellow);
  color: var(--eye-navy);
  font-family: var(--font);
  font-size: 1rem;
  font-weight: 700;
  padding: 0.85rem 2rem;
  border-radius: var(--radius-pill);
  text-decoration: none;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(255, 209, 102, 0.45);
  transition: transform 0.25s ease-in-out, box-shadow 0.25s ease-in-out;
}

.btn-primary:hover {
  transform: scale(1.04);
  box-shadow: 0 6px 22px rgba(255, 209, 102, 0.55);
}

/* ── Hero tab chips ── */
.hero__alien-wrap {
  position: relative;
}

.hero__tab-chip {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 0.42rem;
  padding: 0.4rem 0.9rem 0.4rem 0.62rem;
  background: var(--white);
  border-radius: 999px;
  box-shadow: 0 2px 16px rgba(27, 42, 73, 0.09), 0 1px 4px rgba(27, 42, 73, 0.05);
  font-size: 0.76rem;
  font-weight: 700;
  color: rgba(27, 42, 73, 0.82);
  pointer-events: none;
  user-select: none;
  white-space: nowrap;
  letter-spacing: 0.01em;
}

.hero__tab-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}

.hero__tab-chip--1 {
  top: 10%;
  right: -44%;
  animation: chip-drift 5.1s ease-in-out infinite alternate;
}
.hero__tab-chip--1 .hero__tab-dot { background: var(--cheek-pink); }

.hero__tab-chip--2 {
  bottom: 30%;
  left: -42%;
  animation: chip-drift 4.7s ease-in-out infinite alternate-reverse;
  animation-delay: -1.6s;
}
.hero__tab-chip--2 .hero__tab-dot { background: var(--body-mid); }

.hero__tab-chip--3 {
  top: 54%;
  right: -46%;
  animation: chip-drift 5.9s ease-in-out infinite alternate;
  animation-delay: -3.1s;
}
.hero__tab-chip--3 .hero__tab-dot { background: var(--antenna-yellow); }

@keyframes chip-drift {
  from { transform: translateY(0) rotate(-0.8deg); }
  to   { transform: translateY(-9px) rotate(1.2deg); }
}

@media (max-width: 700px) {
  .hero__tab-chip { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .hero__tab-chip { animation: none; }
}

/* ── Promise section ── */
.promise {
  background: var(--white);
  overflow: hidden;
}

.promise__beat {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 0;
  min-height: 380px;
}

.promise__beat--flip {
  direction: rtl;
}

.promise__beat--flip > * {
  direction: ltr;
}

.promise__beat-alien {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 3.5rem 2rem;
  background: var(--panel-bg);
  height: 100%;
}

.promise__beat--flip .promise__beat-alien {
  background: var(--body-highlight);
}

.promise__beat:nth-child(3) .promise__beat-alien {
  background: rgba(174, 237, 224, 0.45);
}

.promise__beat-alien img {
  width: clamp(180px, 22vw, 280px);
  height: auto;
  display: block;
  transition: transform 0.35s ease-in-out;
  filter: drop-shadow(0 8px 24px rgba(95, 191, 176, 0.3));
}

.promise__beat-alien img:hover {
  transform: scale(1.07) rotate(-2deg);
}

.promise__beat-copy {
  padding: 3.5rem clamp(2rem, 5vw, 4.5rem);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.promise__beat-num {
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  color: var(--body-shadow);
  text-transform: uppercase;
}

.promise__beat-h {
  font-size: clamp(2.8rem, 5vw, 4.5rem);
  font-weight: 800;
  color: var(--eye-navy);
  line-height: 1.0;
  letter-spacing: -0.03em;
}

.promise__beat-body {
  font-size: clamp(1rem, 1.5vw, 1.1rem);
  color: rgba(27, 42, 73, 0.72);
  line-height: 1.65;
  max-width: 380px;
}

/* ── How it works ── */
.how {
  background: var(--white);
  padding: var(--section-gap) 1.25rem calc(var(--section-gap) * 1.25);
}

.how__inner {
  max-width: 960px;
  margin-inline: auto;
}

.how__header {
  text-align: center;
  margin-bottom: 3.5rem;
}

.how__eyebrow {
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--body-shadow);
  margin-bottom: 0.75rem;
}

.how__heading {
  font-size: clamp(2.4rem, 5vw, 3.8rem);
  font-weight: 800;
  color: var(--eye-navy);
  line-height: 1.08;
  letter-spacing: -0.03em;
}

.how__steps {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  position: relative;
}

/* Connector line between step circles */
.how__steps::before {
  content: '';
  position: absolute;
  top: 2rem;
  left: calc(100% / 6);
  right: calc(100% / 6);
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--body-highlight) 15%, var(--body-mid) 50%, var(--body-highlight) 85%, transparent);
  pointer-events: none;
  z-index: 0;
}

.how__step {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 0 clamp(1rem, 3vw, 2.5rem);
  position: relative;
  z-index: 1;
}

.how__step-num-wrap {
  width: 4rem;
  height: 4rem;
  border-radius: 50%;
  background: var(--panel-bg);
  border: 2px solid var(--body-highlight);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
  flex-shrink: 0;
  transition: background 0.25s ease-in-out, border-color 0.25s ease-in-out;
}

.how__step:hover .how__step-num-wrap {
  background: var(--body-highlight);
  border-color: var(--body-mid);
}

.how__step-num {
  font-size: 0.88rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: var(--body-shadow);
}

.how__step-title {
  font-size: clamp(1.2rem, 2vw, 1.45rem);
  font-weight: 800;
  color: var(--eye-navy);
  margin-bottom: 0.65rem;
  line-height: 1.15;
  letter-spacing: -0.01em;
}

.how__step-body {
  font-size: 0.97rem;
  color: rgba(27, 42, 73, 0.68);
  line-height: 1.65;
  max-width: 240px;
}

@media (max-width: 700px) {
  .how__steps {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  .how__steps::before {
    display: none;
  }

  .how__step {
    align-items: flex-start;
    text-align: left;
    flex-direction: row;
    gap: 1.25rem;
    padding: 0;
  }

  .how__step-num-wrap {
    margin-bottom: 0;
  }

  .how__step-body {
    max-width: 100%;
  }
}

/* ── App screenshot ── */
.app-preview {
  background: var(--white);
  padding: 0 1.25rem var(--section-gap);
  text-align: center;
}

.app-preview__frame {
  display: inline-block;
  border-radius: 14px;
  overflow: hidden;
  box-shadow:
    0 2px 4px rgba(27, 42, 73, 0.04),
    0 8px 24px rgba(27, 42, 73, 0.1),
    0 24px 60px rgba(27, 42, 73, 0.1);
  max-width: 880px;
  width: 100%;
  border: 1px solid rgba(127, 216, 201, 0.4);
}

.app-preview__chrome {
  background: rgba(174, 237, 224, 0.7);
  height: 34px;
  display: flex;
  align-items: center;
  padding: 0 14px;
  gap: 8px;
}

.app-preview__dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(95, 191, 176, 0.55);
  flex-shrink: 0;
}

.app-preview__img {
  display: block;
  width: 100%;
  height: auto;
}

.app-preview__caption {
  margin-top: 1.1rem;
  font-size: 0.88rem;
  color: var(--body-shadow);
  font-style: italic;
}

/* ── Trust section ── */
.trust {
  background: var(--eye-navy);
  color: var(--white);
  padding: var(--section-gap) 1.25rem;
  text-align: center;
}

.trust__heading {
  font-size: clamp(1.4rem, 3.5vw, 2rem);
  font-weight: 800;
  margin-bottom: 1.5rem;
  line-height: 1.2;
}

.trust__heading em {
  color: var(--body-highlight);
  font-style: normal;
}

.trust__list {
  list-style: none;
  display: inline-flex;
  flex-direction: column;
  gap: 0.75rem;
  text-align: left;
  margin: 0 auto 2rem;
}

.trust__list li {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  font-size: 1.05rem;
  color: rgba(255, 255, 255, 0.85);
  line-height: 1.55;
}

.trust__list li::before {
  content: '✓';
  color: var(--body-mid);
  font-weight: 800;
  flex-shrink: 0;
  margin-top: 0.05em;
}

/* ── FAQ ── */
.faq {
  padding: var(--section-gap) 1.25rem;
  background: var(--panel-bg);
}

.faq__heading {
  font-size: 1.6rem;
  font-weight: 800;
  text-align: center;
  margin-bottom: 2.5rem;
  color: var(--eye-navy);
}

.faq__list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-width: 680px;
  margin-inline: auto;
}

details.faq__item {
  background: var(--white);
  border-radius: var(--radius-card);
  overflow: hidden;
}

details.faq__item summary {
  list-style: none;
  cursor: pointer;
  padding: 1.2rem 1.5rem;
  font-size: 1rem;
  font-weight: 700;
  color: var(--eye-navy);
  display: flex;
  justify-content: space-between;
  align-items: center;
  user-select: none;
  transition: background 0.2s ease-in-out;
}

details.faq__item summary::-webkit-details-marker { display: none; }

details.faq__item summary::after {
  content: '+';
  font-size: 1.3rem;
  font-weight: 400;
  color: var(--body-shadow);
  flex-shrink: 0;
  transition: transform 0.2s ease-in-out;
}

details.faq__item[open] summary::after {
  transform: rotate(45deg);
}

details.faq__item summary:hover {
  background: var(--panel-bg);
}

.faq__answer {
  padding: 0 1.5rem 1.2rem;
  font-size: 0.97rem;
  color: rgba(27, 42, 73, 0.78);
  line-height: 1.65;
}

/* ── Closer CTA ── */
.closer {
  background: var(--panel-bg);
  padding: 5rem 1.25rem 5.5rem;
  text-align: center;
  overflow: hidden;
}

.closer__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
}

.closer__alien {
  width: clamp(160px, 22vw, 240px);
  height: auto;
  display: block;
  margin-bottom: 2rem;
  animation: bob 3.2s ease-in-out infinite alternate;
  filter: drop-shadow(0 8px 28px rgba(95, 191, 176, 0.35));
  pointer-events: none;
  user-select: none;
}

.closer__headline {
  font-size: clamp(2.4rem, 5vw, 4rem);
  font-weight: 800;
  color: var(--eye-navy);
  line-height: 1.05;
  letter-spacing: -0.03em;
  margin-bottom: 0.75rem;
}

.closer__sub {
  font-size: clamp(1rem, 1.8vw, 1.15rem);
  color: rgba(27, 42, 73, 0.65);
  margin-bottom: 2rem;
  line-height: 1.55;
}

.closer__footnote {
  font-size: 0.83rem;
  color: var(--body-shadow);
  margin-top: 0.85rem;
  letter-spacing: 0.01em;
}

/* ── Footer ── */
.footer {
  background: var(--eye-navy);
  color: rgba(255, 255, 255, 0.55);
  padding: 2.5rem 1.25rem;
  text-align: center;
  font-size: 0.9rem;
}

.footer__alien {
  width: clamp(56px, 8vw, 80px);
  height: auto;
  display: block;
  margin: 0 auto 1.25rem;
  opacity: 0.7;
  animation: bob 4s ease-in-out infinite alternate;
  filter: drop-shadow(0 4px 10px rgba(127, 216, 201, 0.25));
  pointer-events: none;
  user-select: none;
}

.footer__tagline {
  font-size: 1rem;
  font-weight: 700;
  color: var(--body-highlight);
  margin-bottom: 0.75rem;
}

.footer a {
  color: var(--body-mid);
  text-decoration: none;
}

.footer a:hover {
  text-decoration: underline;
}

/* ═══════════════════════════════════════════════════
   Desktop hero — character-forward side-by-side layout
   Alien fills the left half; copy reads left-to-right
   on the right. Tab chips are built for the stacked
   layout and are hidden here — the large alien carries
   the hero on its own at this scale.
   ═══════════════════════════════════════════════════ */
@media (min-width: 1024px) {
  .hero {
    flex-direction: row;
    flex-wrap: nowrap;
    justify-content: center;
    align-items: center;
    text-align: left;
    padding: 4rem max(3rem, 6vw) 5rem;
    gap: clamp(2.5rem, 5vw, 5rem);
    min-height: 80vh;
  }

  .hero__alien-wrap {
    width: clamp(380px, 44vw, 600px);
    flex-shrink: 0;
    margin-bottom: 0;
  }

  .hero__tab-chip {
    display: none;
  }

  .hero__copy {
    align-items: flex-start;
    flex: 1;
    max-width: 460px;
  }

  .hero__headline {
    font-size: clamp(3.5rem, 4.5vw, 5.5rem);
  }
}

/* ── Tablet / Mobile ── */
@media (max-width: 760px) {
  .hero__alien-wrap {
    width: min(260px, 68vw);
    margin-bottom: 1.5rem;
  }

  .promise__beat,
  .promise__beat--flip {
    grid-template-columns: 1fr;
    direction: ltr;
    min-height: auto;
  }

  .promise__beat-alien {
    padding: 2.5rem 1.5rem;
  }

  .promise__beat-alien img {
    width: clamp(140px, 45vw, 200px);
  }

  .promise__beat-copy {
    padding: 2rem 1.5rem 2.5rem;
    gap: 0.5rem;
  }

  .promise__beat-h {
    font-size: clamp(2.4rem, 11vw, 3.2rem);
  }

  .promise__beat-body {
    max-width: 100%;
  }
}

@media (max-width: 480px) {
  :root { --section-gap: 3.5rem; }

  .hero { padding: 3rem 1rem 3.5rem; }
}

/* ── Hero entrance animation ── */
@keyframes hero-alien-arrive {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes hero-copy-enter {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

.hero__badge    { animation: hero-copy-enter 0.5s ease-out 0.20s both; }
.hero__headline { animation: hero-copy-enter 0.6s ease-out 0.30s both; }
.hero__sub      { animation: hero-copy-enter 0.6s ease-out 0.42s both; }
.hero__copy .btn-primary { animation: hero-copy-enter 0.5s ease-out 0.54s both; }
.hero__footnote { animation: hero-copy-enter 0.5s ease-out 0.64s both; }

@media (prefers-reduced-motion: reduce) {
  .hero__alien-stage {
    animation: bob 3.2s ease-in-out infinite alternate;
  }
  .hero__badge, .hero__headline, .hero__sub,
  .hero__copy .btn-primary, .hero__footnote {
    animation: none;
  }
}

/* ── Scroll-reveal ── */
[data-reveal] {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

[data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}

[data-reveal-delay="1"] { transition-delay: 0.08s; }
[data-reveal-delay="2"] { transition-delay: 0.16s; }
[data-reveal-delay="3"] { transition-delay: 0.24s; }
[data-reveal-delay="4"] { transition-delay: 0.32s; }
[data-reveal-delay="5"] { transition-delay: 0.40s; }

@media (prefers-reduced-motion: reduce) {
  [data-reveal] {
    opacity: 1;
    transform: none;
    transition: none;
  }
}
