/* ===================================================
   FlowApps — Main Stylesheet
   =================================================== */

:root {
  --c-bg: #fafbff;
  --c-surface: #ffffff;
  --c-text: #0f172a;
  --c-text-muted: #64748b;
  --c-primary: #6366f1;
  --c-primary-light: #818cf8;
  --c-accent: #06b6d4;
  --c-border: #e2e8f0;
  --c-gradient: linear-gradient(135deg, #6366f1, #06b6d4);
  --c-gradient-warm: linear-gradient(135deg, #f59e0b, #ef4444);
  --c-gradient-cool: linear-gradient(135deg, #06b6d4, #10b981);

  --font: 'Inter', system-ui, -apple-system, sans-serif;
  --radius: 20px;
  --radius-sm: 12px;
  --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.04);
  --shadow-md: 0 4px 24px rgba(15, 23, 42, 0.06);
  --shadow-lg: 0 12px 48px rgba(15, 23, 42, 0.08);
  --shadow-xl: 0 24px 64px rgba(15, 23, 42, 0.1);
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);

  --container: 1120px;
  --nav-h: 72px;
}

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font);
  color: var(--c-text);
  background: var(--c-bg);
  line-height: 1.6;
  overflow-x: hidden;
}

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

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

ul { list-style: none; }

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

.gradient-text {
  background: var(--c-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font);
  font-weight: 600;
  border: none;
  cursor: pointer;
  border-radius: 100px;
  transition: var(--transition);
  white-space: nowrap;
}

.btn--sm {
  padding: 8px 20px;
  font-size: 0.875rem;
}

.btn--lg {
  padding: 16px 36px;
  font-size: 1.05rem;
}

.btn--primary {
  background: var(--c-gradient);
  color: #fff;
  box-shadow: 0 4px 20px rgba(99, 102, 241, 0.35);
}

.btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(99, 102, 241, 0.45);
}

.btn--white {
  background: #fff;
  color: var(--c-primary);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.btn--white:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
}

/* ---- NAV ---- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--nav-h);
  z-index: 100;
  transition: var(--transition);
  background: transparent;
}

.nav--scrolled {
  background: rgba(250, 251, 255, 0.85);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  border-bottom: 1px solid var(--c-border);
  box-shadow: var(--shadow-sm);
}

.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.nav__logo img {
  height: 32px;
  width: auto;
}

.nav__links {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav__links a {
  font-size: 0.925rem;
  font-weight: 500;
  color: var(--c-text-muted);
  transition: var(--transition);
}

.nav__links a:hover {
  color: var(--c-text);
}

.nav__links .btn {
  color: #fff;
  background: var(--c-gradient);
}

.nav__toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.nav__toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--c-text);
  border-radius: 2px;
  transition: var(--transition);
}

/* ---- HERO ---- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding-top: var(--nav-h);
}

.hero__bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.hero__orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.4;
  animation: orbFloat 20s ease-in-out infinite;
}

.hero__orb--1 {
  width: 600px;
  height: 600px;
  background: #6366f1;
  top: -10%;
  right: -10%;
  animation-delay: 0s;
}

.hero__orb--2 {
  width: 500px;
  height: 500px;
  background: #06b6d4;
  bottom: -15%;
  left: -5%;
  animation-delay: -7s;
}

.hero__orb--3 {
  width: 350px;
  height: 350px;
  background: #8b5cf6;
  top: 40%;
  left: 50%;
  animation-delay: -14s;
}

@keyframes orbFloat {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(30px, -40px) scale(1.05); }
  66% { transform: translate(-20px, 20px) scale(0.95); }
}

.hero__content {
  position: relative;
  text-align: center;
  z-index: 2;
}

.hero__badge {
  display: inline-block;
  padding: 8px 20px;
  border-radius: 100px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--c-primary);
  background: rgba(99, 102, 241, 0.08);
  border: 1px solid rgba(99, 102, 241, 0.15);
  margin-bottom: 28px;
  letter-spacing: 0.02em;
}

.hero__title {
  font-size: clamp(2.8rem, 7vw, 5rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin-bottom: 24px;
}

.hero__sub {
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  color: var(--c-text-muted);
  max-width: 520px;
  margin: 0 auto 40px;
  line-height: 1.7;
}

.hero__actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

.hero__scroll {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
}

.hero__scroll-line {
  width: 2px;
  height: 40px;
  background: var(--c-border);
  border-radius: 2px;
  position: relative;
  overflow: hidden;
}

.hero__scroll-line::after {
  content: '';
  position: absolute;
  top: -100%;
  left: 0;
  width: 100%;
  height: 50%;
  background: var(--c-primary);
  border-radius: 2px;
  animation: scrollLine 2s ease-in-out infinite;
}

@keyframes scrollLine {
  0% { top: -50%; }
  100% { top: 150%; }
}

/* ---- SECTION HEADER ---- */
.section-header {
  text-align: center;
  margin-bottom: 64px;
}

.section-header__tag {
  display: inline-block;
  padding: 6px 16px;
  border-radius: 100px;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--c-primary);
  background: rgba(99, 102, 241, 0.08);
  margin-bottom: 16px;
}

.section-header__title {
  font-size: clamp(2rem, 4vw, 2.8rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}

.section-header__sub {
  font-size: 1.1rem;
  color: var(--c-text-muted);
}

/* ---- APPS SECTION ---- */
.apps {
  padding: 120px 0;
}

.apps__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

/* ---- APP CARD ---- */
.app-card {
  position: relative;
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  padding: 40px 32px;
  transition: var(--transition);
  overflow: hidden;
}

.app-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  border-radius: var(--radius) var(--radius) 0 0;
  opacity: 0;
  transition: var(--transition);
}

.app-card--frase::before { background: var(--c-gradient-warm); }
.app-card--rapport::before { background: var(--c-gradient); }
.app-card--plass::before { background: var(--c-gradient-cool); }

.app-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-xl);
  border-color: transparent;
}

.app-card:hover::before {
  opacity: 1;
}

.app-card__icon {
  width: 56px;
  height: 56px;
  margin-bottom: 24px;
}

.app-card__icon svg {
  width: 100%;
  height: 100%;
}

.app-card__name {
  font-size: 1.35rem;
  font-weight: 700;
  margin-bottom: 12px;
  letter-spacing: -0.01em;
}

.app-card__desc {
  font-size: 0.95rem;
  color: var(--c-text-muted);
  line-height: 1.7;
  margin-bottom: 24px;
}

.app-card__link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--c-primary);
  transition: var(--transition);
}

.app-card__link:hover {
  gap: 10px;
}

.app-card__link svg {
  transition: var(--transition);
}

.app-card__link:hover svg {
  transform: translate(2px, -2px);
}

/* ---- ABOUT SECTION ---- */
.about {
  padding: 100px 0;
  background: var(--c-surface);
  border-top: 1px solid var(--c-border);
  border-bottom: 1px solid var(--c-border);
}

.about__inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}

.about__text .section-header__tag {
  display: inline-block;
  margin-bottom: 16px;
}

.about__text .section-header__title {
  text-align: left;
  margin-bottom: 20px;
}

.about__text p:last-child {
  color: var(--c-text-muted);
  font-size: 1.05rem;
  line-height: 1.8;
}

.about__values {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

.value {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 24px;
  border-radius: var(--radius-sm);
  background: var(--c-bg);
  border: 1px solid var(--c-border);
  transition: var(--transition);
}

.value:hover {
  border-color: rgba(99, 102, 241, 0.2);
  box-shadow: var(--shadow-md);
}

.value__icon {
  font-size: 1.6rem;
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(99, 102, 241, 0.06);
  border-radius: 12px;
}

.value h4 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.value p {
  font-size: 0.875rem;
  color: var(--c-text-muted);
}

/* ---- CTA SECTION ---- */
.cta {
  padding: 120px 0;
  background: var(--c-gradient);
  position: relative;
  overflow: hidden;
}

.cta::before {
  content: '';
  position: absolute;
  width: 500px;
  height: 500px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 50%;
  top: -200px;
  right: -100px;
}

.cta::after {
  content: '';
  position: absolute;
  width: 400px;
  height: 400px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 50%;
  bottom: -150px;
  left: -100px;
}

.cta__inner {
  text-align: center;
  position: relative;
  z-index: 2;
}

.cta__title {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
}

.cta__sub {
  font-size: 1.15rem;
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 40px;
}

/* ---- FOOTER ---- */
.footer {
  background: #0f172a;
  padding: 48px 0;
}

.footer__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}

.footer__brand {
  text-align: center;
}

.footer__brand img {
  height: 28px;
  width: auto;
  margin: 0 auto 8px;
}

.footer__legal {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.4);
}

.footer__links {
  display: flex;
  gap: 32px;
}

.footer__links a {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.5);
  transition: var(--transition);
}

.footer__links a:hover {
  color: #fff;
}

.footer__copy {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.25);
}

/* ---- REVEAL ANIMATION ---- */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s cubic-bezier(0.4, 0, 0.2, 1),
              transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

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

/* ---- RESPONSIVE ---- */
@media (max-width: 960px) {
  .apps__grid {
    grid-template-columns: 1fr;
    max-width: 480px;
    margin: 0 auto;
  }

  .about__inner {
    grid-template-columns: 1fr;
    gap: 48px;
  }

  .about__text .section-header__title {
    text-align: center;
  }

  .about__text {
    text-align: center;
  }
}

@media (max-width: 640px) {
  :root {
    --nav-h: 64px;
  }

  .nav__links {
    display: none;
    position: fixed;
    top: var(--nav-h);
    left: 0;
    right: 0;
    bottom: 0;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 24px;
    background: rgba(250, 251, 255, 0.97);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
  }

  .nav__links--open {
    display: flex;
  }

  .nav__links a {
    font-size: 1.15rem;
  }

  .nav__toggle {
    display: flex;
  }

  .nav__toggle--active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
  }

  .nav__toggle--active span:nth-child(2) {
    opacity: 0;
  }

  .nav__toggle--active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
  }

  .hero__title {
    font-size: clamp(2.2rem, 8vw, 3.5rem);
  }

  .apps {
    padding: 80px 0;
  }

  .app-card {
    padding: 32px 24px;
  }

  .cta {
    padding: 80px 0;
  }

  .footer__links {
    flex-direction: column;
    align-items: center;
    gap: 16px;
  }
}
