/* 
  High-End Editorial Tech & Creative Concierge 
  FlowByrån - Marketing Automation Sverige
*/

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&family=JetBrains+Mono:wght@500;700&family=Playfair+Display:ital,wght@0,600;0,700;0,800;1,600;1,700&display=swap');

:root {
  /* Colors - Warm Minimalist */
  --bg-linen: #F9F7F2;
  --bg-white: #FFFFFF;
  --primary-orange: #FF6600;
  --primary-orange-hover: #E55B00;
  --navy-deep: #0B1B32;
  --navy-light: #1A2E4C;

  --text-body: #475569;
  --text-dark: #1e293b;
  --text-muted: #64748b;

  /* Utilities */
  --shadow-soft: 0 4px 20px rgba(0, 0, 0, 0.05);
  --shadow-hover: 0 10px 30px rgba(0, 0, 0, 0.08);
  --shadow-kinetic: 0 20px 40px rgba(0, 0, 0, 0.12);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 24px;

  --transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  --max-width: 1200px;
}

/* Base Styles & Texture Overlay */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', sans-serif;
  background-color: var(--bg-linen);
  color: var(--text-body);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  position: relative;
}

/* Paper Texture Overlay */
body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.4;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.08'/%3E%3C/svg%3E");
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: 'Playfair Display', serif;
  color: var(--navy-deep);
  line-height: 1.15;
}

h1 {
  font-size: 4.5rem;
  letter-spacing: -0.02em;
  margin-bottom: 1.5rem;
  font-weight: 800;
}

h2 {
  font-size: 3rem;
  letter-spacing: -0.01em;
  margin-bottom: 1rem;
  font-weight: 700;
}

h3 {
  font-size: 2rem;
  margin-bottom: 0.75rem;
  font-weight: 700;
}

h4 {
  font-size: 1.35rem;
  font-weight: 600;
  font-family: 'Inter', sans-serif;
}

p {
  margin-bottom: 1rem;
}

a {
  color: var(--primary-orange);
  text-decoration: none;
  transition: var(--transition);
}

a:hover {
  text-decoration: underline;
}

.highlight {
  color: var(--primary-orange);
  font-style: italic;
}

/* Mono Micro-copy */
.mono-text {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  text-transform: uppercase;
}

.mono-dark {
  color: var(--navy-deep);
  font-weight: 700;
}

.mono-orange {
  color: var(--primary-orange);
  font-weight: 700;
}

/* Layout Utilities */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
  position: relative;
  z-index: 10;
}

.section {
  padding: 8rem 0;
  position: relative;
}

.text-center {
  text-align: center;
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
}

/* Bento Box Grid */
.bento-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: minmax(180px, auto);
  grid-auto-flow: dense;
  gap: 1.5rem;
}

.bento-card {
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  box-shadow: var(--shadow-soft);
  transition: var(--transition);
  border: 1px solid rgba(0, 0, 0, 0.03);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  position: relative;
  overflow: hidden;
}

/* Variations for asymmetrical grid */
.bento-large {
  grid-column: span 2;
  grid-row: span 2;
}

.bento-wide {
  grid-column: span 2;
  grid-row: span 1;
}

.bento-tall {
  grid-column: span 1;
  grid-row: span 2;
}

.bento-card:hover {
  transform: translateY(-5px) scale(1.02);
  box-shadow: var(--shadow-hover);
  border-color: rgba(255, 102, 0, 0.3);
}

.bento-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(255, 102, 0, 0) 0%, rgba(255, 102, 0, 0.05) 100%);
  opacity: 0;
  transition: var(--transition);
  z-index: 0;
}

.bento-card:hover::after {
  opacity: 1;
}

.bento-card>* {
  position: relative;
  z-index: 1;
}

/* Buttons & CTA */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 1rem 2rem;
  font-family: 'JetBrains Mono', monospace;
  font-weight: 700;
  font-size: 0.9rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  border-radius: var(--radius-md);
  transition: var(--transition);
  cursor: pointer;
  text-decoration: none !important;
  border: 1.5px solid transparent;
}

.btn-primary {
  background-color: var(--primary-orange);
  color: #fff;
}

.btn-primary:hover {
  background-color: var(--navy-deep);
  transform: translateY(-3px);
  box-shadow: 0 10px 20px rgba(11, 27, 50, 0.2);
}

.btn-outline {
  background-color: transparent;
  border-color: var(--navy-deep);
  color: var(--navy-deep);
}

.btn-outline:hover {
  background-color: var(--navy-deep);
  color: #fff;
}

.btn-ghost {
  color: var(--navy-deep);
}

.btn-ghost:hover {
  color: var(--primary-orange);
}

/* Kinetic Stack Hero Elements */
.kinetic-wrapper {
  position: relative;
  height: 500px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.blur-blob {
  position: absolute;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, var(--primary-orange) 0%, rgba(255, 102, 0, 0) 70%);
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.6;
  z-index: 1;
  animation: pulseBlob 8s infinite alternate ease-in-out;
}

@keyframes pulseBlob {
  0% {
    transform: scale(1) translate(0, 0);
  }

  50% {
    transform: scale(1.2) translate(30px, -30px);
  }

  100% {
    transform: scale(0.9) translate(-20px, 20px);
  }
}

.kinetic-card {
  position: absolute;
  background: var(--bg-white);
  padding: 1.5rem 2rem;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-kinetic);
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 1rem;
  border: 1px solid rgba(0, 0, 0, 0.03);
  animation: floatCard 6s infinite ease-in-out;
}

.kinetic-card:nth-child(2) {
  top: 15%;
  left: 10%;
  animation-delay: 0s;
  transform: rotate(-5deg);
}

.kinetic-card:nth-child(3) {
  bottom: 20%;
  right: 5%;
  animation-delay: 1.5s;
  transform: rotate(3deg);
}

.kinetic-card:nth-child(4) {
  top: 40%;
  right: 25%;
  animation-delay: 3s;
  transform: rotate(8deg);
}

@keyframes floatCard {

  0%,
  100% {
    transform: translateY(0) rotate(var(--rot, 0deg));
  }

  50% {
    transform: translateY(-15px) rotate(calc(var(--rot, 0deg) + 2deg));
  }
}

/* Navbar */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 90px;
  background-color: rgba(249, 247, 242, 0.85);
  backdrop-filter: blur(12px);
  z-index: 1000;
  transition: var(--transition);
  border-bottom: 1px solid transparent;
}

.navbar.scrolled {
  border-bottom-color: rgba(0, 0, 0, 0.05);
}

.navbar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 100%;
}

.navbar-logo {
  font-family: 'Playfair Display', serif;
  font-weight: 800;
  font-size: 1.8rem;
  color: var(--navy-deep);
  text-decoration: none;
}

.navbar-logo span {
  color: var(--primary-orange);
  font-style: italic;
}

.navbar-links {
  display: flex;
  gap: 2.5rem;
}

.navbar-links a {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85rem;
  text-transform: uppercase;
  color: var(--navy-deep);
  font-weight: 700;
}

.navbar-links a:hover,
.navbar-links a.active {
  color: var(--primary-orange);
  text-decoration: none;
}

.navbar-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

/* Sticky Scroll Container */
.sticky-wrapper {
  display: flex;
  gap: 4rem;
  align-items: flex-start;
}

.sticky-content {
  flex: 1;
}

.sticky-sidebar {
  flex: 1;
  position: sticky;
  top: 120px;
}

/* Glassmorphism Panel */
.glass-panel {
  background: rgba(255, 255, 255, 0.4);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: var(--radius-lg);
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.05), inset 0 0 0 1px rgba(255, 255, 255, 0.5);
  padding: 2.5rem;
}

/* Comparison Table Editorial */
.editorial-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 2rem;
  font-family: 'Inter', sans-serif;
}

.editorial-table th,
.editorial-table td {
  padding: 1.5rem 1rem;
  border-bottom: 1px solid rgba(11, 27, 50, 0.1);
  text-align: left;
}

.editorial-table th {
  font-family: 'JetBrains Mono', monospace;
  text-transform: uppercase;
  font-size: 0.85rem;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

.editorial-table tr td:first-child {
  font-weight: 600;
  color: var(--navy-deep);
}

.editorial-table tr td:last-child {
  font-weight: 600;
  color: var(--primary-orange);
}

/* Human Element Portrait Cutout */
.human-element {
  position: absolute;
  right: -5%;
  bottom: -15%;
  z-index: 5;
  pointer-events: none;
  height: 120%;
  opacity: 0.9;
}

/* Footer Section */
.footer {
  background-color: var(--navy-deep);
  color: #f8fafc;
  padding: 6rem 0 3rem;
  position: relative;
  overflow: hidden;
}

.footer::before {
  content: '';
  position: absolute;
  top: -200px;
  right: -200px;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(255, 102, 0, 0.15) 0%, rgba(255, 102, 0, 0) 70%);
  border-radius: 50%;
  pointer-events: none;
}

.footer h5 {
  font-family: 'JetBrains Mono', monospace;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #fff;
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
}

.footer p {
  color: #94a3b8;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.footer-links a {
  color: #94a3b8;
  font-size: 1rem;
  font-family: 'Inter', sans-serif;
}

.footer-links a:hover {
  color: var(--primary-orange);
}

.footer-bottom {
  margin-top: 4rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  color: #94a3b8;
}

/* Animations */
.fade-up {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 1s cubic-bezier(0.16, 1, 0.3, 1), transform 1s cubic-bezier(0.16, 1, 0.3, 1);
}

.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}

.fade-up-delay-1 {
  transition-delay: 0.15s;
}

.fade-up-delay-2 {
  transition-delay: 0.3s;
}

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.3rem 0.75rem;
  border-radius: 50px;
  background-color: var(--navy-deep);
  color: #fff;
  text-transform: uppercase;
}

.badge-orange {
  background-color: var(--primary-orange);
  color: #fff;
}

/* Modals & Forms (Global) */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(11, 27, 50, 0.4);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: var(--transition);
}

.modal-overlay.open {
  opacity: 1;
  pointer-events: all;
}

.modal-content {
  width: 100%;
  max-width: 600px;
  margin: 0 1.5rem;
  transform: translateY(30px);
  transition: var(--transition);
}

.modal-overlay.open .modal-content {
  transform: translateY(0);
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-label {
  display: block;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--navy-deep);
  margin-bottom: 0.5rem;
  text-transform: uppercase;
}

.form-input,
.form-textarea {
  width: 100%;
  padding: 1rem;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(0, 0, 0, 0.1);
  font-family: 'Inter', sans-serif;
  font-size: 1rem;
  background: var(--bg-white);
  transition: var(--transition);
}

.form-textarea {
  resize: vertical;
  min-height: 120px;
}

.form-input:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--primary-orange);
  box-shadow: 0 0 0 3px rgba(255, 102, 0, 0.1);
}

/* Responsive */
@media (max-width: 1024px) {
  .bento-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .sticky-wrapper {
    flex-direction: column;
  }

  .sticky-sidebar {
    position: relative;
    top: 0;
    margin-top: 3rem;
    width: 100%;
  }

  h1 {
    font-size: 3.5rem;
  }
}

@media (max-width: 768px) {
  .grid-2 {
    grid-template-columns: 1fr;
  }

  .bento-grid {
    display: flex;
    flex-direction: column;
  }

  .bento-large,
  .bento-wide,
  .bento-tall {
    grid-column: auto;
    grid-row: auto;
  }

  .navbar-links,
  .navbar-actions {
    display: none;
  }

  .kinetic-wrapper {
    height: 350px;
  }

  .human-element {
    opacity: 0.2;
  }
}