/* ============================================
   Utgift Landing Page Styles
   ============================================ */

/* --- Custom Properties --- */
:root {
  --brand: #00D084;
  --brand-dark: #00A86B;
  --brand-light: #E6FFF3;
  --text: #1A1A2E;
  --text-muted: #6B7280;
  --surface: #FFFFFF;
  --surface-alt: #F9FAFB;
  --footer-bg: #1A1A2E;
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 9999px;
  --shadow-card: 0 1px 3px rgba(0,0,0,0.08), 0 4px 12px rgba(0,0,0,0.04);
  --shadow-card-hover: 0 4px 16px rgba(0,0,0,0.12);
  --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --transition: 200ms ease;
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

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

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

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

/* --- Typography --- */
h1, h2, h3 {
  line-height: 1.2;
  letter-spacing: -0.02em;
  font-weight: 700;
}

h1 {
  font-size: clamp(2rem, 5vw, 3.5rem);
}

h2 {
  font-size: clamp(1.5rem, 3.5vw, 2.5rem);
}

h3 {
  font-size: 1.2rem;
}

/* --- Layout --- */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section-title {
  text-align: center;
  margin-bottom: 3rem;
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font);
  font-weight: 600;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
  font-size: 0.95rem;
  padding: 0.6rem 1.2rem;
}

.btn--sm {
  padding: 0.4rem 1rem;
  font-size: 0.85rem;
}

.btn--lg {
  padding: 0.85rem 1.8rem;
  font-size: 1.05rem;
}

.btn--primary {
  background: var(--brand);
  color: #fff;
}

.btn--primary:hover {
  background: var(--brand-dark);
  transform: translateY(-1px);
}

.btn--ghost {
  background: transparent;
  color: var(--text);
  border: 2px solid var(--text);
}

.btn--ghost:hover {
  background: var(--text);
  color: var(--surface);
}

.btn--white {
  background: #fff;
  color: var(--brand-dark);
}

.btn--white:hover {
  background: var(--brand-light);
  transform: translateY(-1px);
}

/* ============================================
   Navigation
   ============================================ */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 1rem 0;
  transition: background var(--transition), box-shadow var(--transition);
}

.nav--scrolled {
  background: rgba(255, 255, 255, 0.97);
  box-shadow: 0 1px 8px rgba(0,0,0,0.08);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

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

.nav__brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 700;
  font-size: 1.25rem;
}

.nav__icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
}

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

.nav__links a {
  font-weight: 500;
  font-size: 0.95rem;
  transition: color var(--transition);
}

.nav__links a:hover {
  color: var(--brand-dark);
}

/* Hamburger */
.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(--text);
  border-radius: 2px;
  transition: all var(--transition);
}

.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
   ============================================ */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 6rem 0 4rem;
  background: linear-gradient(135deg, var(--brand-light) 0%, var(--surface) 60%);
}

.hero__inner {
  display: flex;
  align-items: center;
  gap: 4rem;
}

.hero__text {
  flex: 1;
}

.hero__sub {
  color: var(--text-muted);
  font-size: 1.15rem;
  margin: 1.2rem 0 2rem;
  max-width: 520px;
}

.hero__actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.hero__visual {
  flex: 0 0 auto;
}

/* Phone Mockup */
.phone-frame {
  width: 280px;
  height: 572px;
  border-radius: 40px;
  border: 6px solid var(--text);
  overflow: hidden;
  position: relative;
  background: var(--surface-alt);
  box-shadow: 0 24px 48px rgba(0,0,0,0.15);
  animation: float 4s ease-in-out infinite;
}

.phone-frame::before {
  content: '';
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 24px;
  background: var(--text);
  border-radius: 12px;
  z-index: 2;
}

.phone-screen {
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.phone-screen img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}

/* ============================================
   Features
   ============================================ */
.features {
  padding: 6rem 0;
  background: var(--surface);
}

.features__grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: 1fr;
}

.card {
  padding: 2rem;
  border-radius: var(--radius-md);
  background: var(--surface);
  border: 1px solid #f0f0f0;
  box-shadow: var(--shadow-card);
  transition: transform var(--transition), box-shadow var(--transition);
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-card-hover);
}

.card__icon {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  background: var(--brand-light);
  color: var(--brand-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
}

.card h3 {
  margin-bottom: 0.5rem;
}

.card p {
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* ============================================
   Category Strip
   ============================================ */
.categories {
  padding: 3rem 0;
  background: var(--surface-alt);
}

.categories__strip {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  flex-wrap: wrap;
  padding: 0.5rem 0;
}

.categories__strip::-webkit-scrollbar {
  display: none;
}

.category-pill {
  flex-shrink: 0;
  scroll-snap-align: start;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-lg);
  font-size: 0.85rem;
  font-weight: 600;
  background: var(--surface);
  border: 2px solid var(--cat-color);
  color: var(--cat-color);
  white-space: nowrap;
}

.category-pill::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--cat-color);
}

/* ============================================
   Toast
   ============================================ */
.toast {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: var(--text);
  color: #fff;
  padding: 0.85rem 1.5rem;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-weight: 500;
  opacity: 0;
  transition: transform 0.3s ease, opacity 0.3s ease;
  z-index: 200;
  white-space: nowrap;
}

.toast--visible {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

/* ============================================
   How It Works
   ============================================ */
.how-it-works {
  padding: 6rem 0;
  background: var(--surface);
}

.steps {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}

.step {
  text-align: center;
  max-width: 280px;
}

.step__number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--brand);
  color: #fff;
  font-weight: 700;
  font-size: 0.85rem;
  margin-bottom: 0.75rem;
}

.step__icon {
  color: var(--brand-dark);
  margin-bottom: 0.75rem;
}

.step h3 {
  margin-bottom: 0.4rem;
}

.step p {
  color: var(--text-muted);
  font-size: 0.95rem;
}

.step__connector {
  width: 2px;
  height: 40px;
  border-left: 2px dashed #d1d5db;
}

/* ============================================
   CTA
   ============================================ */
.cta {
  padding: 5rem 0;
  background: var(--brand);
  color: #fff;
}

.cta__inner {
  text-align: center;
}

.cta__inner h2 {
  margin-bottom: 0.75rem;
}

.cta__inner p {
  opacity: 0.9;
  margin-bottom: 2rem;
  font-size: 1.1rem;
}

/* ============================================
   Footer
   ============================================ */
.footer {
  padding: 2.5rem 0;
  background: var(--footer-bg);
  color: #fff;
}

.footer__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
  text-align: center;
}

.footer__brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  font-size: 1.1rem;
}

.footer__icon {
  width: 28px;
  height: 28px;
  border-radius: 6px;
}

.footer__links {
  display: flex;
  gap: 1.5rem;
}

.footer__links a {
  font-size: 0.9rem;
  opacity: 0.7;
  transition: opacity var(--transition);
}

.footer__links a:hover {
  opacity: 1;
}

.footer__copy {
  font-size: 0.8rem;
  opacity: 0.5;
}

/* ============================================
   Responsive
   ============================================ */

/* Mobile */
@media (max-width: 639px) {
  .nav__toggle {
    display: flex;
  }

  .nav__links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    background: var(--surface);
    padding: 1.5rem;
    gap: 1rem;
    box-shadow: 0 8px 24px rgba(0,0,0,0.1);
    border-radius: 0 0 var(--radius-md) var(--radius-md);
  }

  .nav__links--open {
    display: flex;
  }

  .hero__inner {
    flex-direction: column;
    text-align: center;
    gap: 3rem;
  }

  .hero__sub {
    margin-left: auto;
    margin-right: auto;
  }

  .hero__actions {
    justify-content: center;
  }

  .phone-frame {
    width: 220px;
    height: 449px;
    border-radius: 32px;
  }

  .phone-frame::before {
    width: 62px;
    height: 18px;
    top: 8px;
    border-radius: 9px;
  }
}

/* Tablet+ */
@media (min-width: 640px) {
  .features__grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer__inner {
    flex-direction: row;
    justify-content: space-between;
  }
}

/* Desktop */
@media (min-width: 1024px) {
  .features__grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .steps {
    flex-direction: row;
    justify-content: center;
    gap: 0;
  }

  .step {
    flex: 1;
    max-width: 300px;
    padding: 0 2rem;
  }

  .step__connector {
    width: 80px;
    height: 2px;
    border-left: none;
    border-top: 2px dashed #d1d5db;
    align-self: center;
    margin-top: -2rem;
  }
}
