/* 
   Bramporttech Digital Agency - Stylesheet
   Design system inspired by Scandinavian minimalism:
   - Base Canvas Background: #F1EBE5 (Warm Beige / Sand)
   - Dark Charcoal Typography: #1A1816
   - Modern Outfit Typeface
   - Smooth CSS transitions and floating interactive elements
*/

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&display=swap');

:root {
  --bg-primary: #F1EBE5;
  --text-primary: #1A1816;
  --text-secondary: #5C554F;
  --text-muted: #8E867E;
  --white: #FFFFFF;
  --black: #000000;

  /* Accent pastel colors */
  --accent-peach: #F2DDB8;
  --accent-pink: #EDC1CA;
  --accent-lavender: #C2BFCE;
  --accent-green: #D2DFD2;
  --accent-blue: #BCE2E2;

  /* Tertiary colors */
  --tertiary-dark: #120b2e;
  --tertiary-light: #fdcb6c;

  --transition-smooth: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-fast: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  --border-radius-sm: 8px;
  --border-radius-md: 16px;
  --border-radius-lg: 24px;
}

/* Custom selection */
::selection {
  background-color: var(--tertiary-light);
  color: var(--tertiary-dark);
}

::-moz-selection {
  background-color: var(--tertiary-light);
  color: var(--tertiary-dark);
}

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

html {
  scroll-behavior: smooth;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-family: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

body {
  overflow-x: hidden;
  line-height: 1.6;
}

/* Scrollbar styles */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
  background: var(--text-muted);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--text-primary);
}

/* Base structural layout */
.container {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 40px;
}

@media (max-width: 768px) {
  .container {
    padding: 0 20px;
  }
}

/* Typography elements */
h1,
h2,
h3,
h4,
h5 {
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

h1 {
  font-size: clamp(2.5rem, 5vw, 4.5rem);
}

h2 {
  font-size: clamp(2rem, 4vw, 3.2rem);
}

h3 {
  font-size: clamp(1.4rem, 2.5vw, 2rem);
}

p {
  font-weight: 300;
  font-size: clamp(1rem, 1.2vw, 1.15rem);
  color: var(--text-secondary);
}

strong {
  font-weight: 600;
  color: var(--text-primary);
}

.text-highlight {
  background-color: rgba(242, 221, 184, 0.7);
  /* warm accent-peach with opacity for natural highlight */
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 500;
  color: var(--text-primary);
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 16px 32px;
  border-radius: 50px;
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  transition: var(--transition-smooth);
  cursor: pointer;
  border: none;
}

.btn-primary {
  background-color: var(--text-primary);
  color: var(--bg-primary);
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 20px rgba(26, 24, 22, 0.15);
  background-color: var(--text-secondary);
}

.btn-secondary {
  background-color: transparent;
  color: var(--text-primary);
  border: 1px solid var(--text-primary);
}

.btn-secondary:hover {
  background-color: var(--text-primary);
  color: var(--bg-primary);
  transform: translateY(-3px);
}

.btn-icon {
  margin-left: 8px;
  transition: transform 0.3s ease;
}

.btn:hover .btn-icon {
  transform: translateX(4px);
}

/* Header & Nav */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 80px;
  z-index: 100;
  transition: var(--transition-smooth);
  border-bottom: 1px solid transparent;
}

.header.scrolled {
  background-color: rgba(241, 235, 229, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  height: 70px;
  border-bottom: 1px solid rgba(26, 24, 22, 0.06);
}

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

.logo {
  display: flex;
  align-items: center;
  font-weight: 800;
  font-size: 1.6rem;
  text-decoration: none;
  color: var(--text-primary);
  gap: 8px;
}

.logo-dot {
  width: 10px;
  height: 10px;
  background-color: var(--tertiary-light);
  border-radius: 50%;
  display: inline-block;
  animation: pulse-dot 2s infinite ease-in-out;
}

.logo-img {
  height: 58px;
  aspect-ratio: 2.39;
  display: block;
  object-fit: cover;
  object-position: left center;
  transition: var(--transition-fast);
  filter: brightness(0) invert(15.3%) sepia(12.5%) saturate(560.9%) hue-rotate(348deg) brightness(36.3%) contrast(91.5%);
}

.logo:hover .logo-img {
  opacity: 0.85;
}

.footer-logo-img {
  filter: brightness(0) invert(1) !important;
  opacity: 0.95;
  height: 82px;
}

.nav-links {
  display: flex;
  gap: 40px;
  align-items: center;
  list-style: none;
}

.nav-link {
  text-decoration: none;
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 1rem;
  transition: var(--transition-fast);
  position: relative;
  padding: 8px 0;
}

.nav-link:hover,
.nav-link.active {
  color: var(--text-primary);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--text-primary);
  transition: var(--transition-fast);
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 20px;
}

/* Mobile Menu Toggle */
.mobile-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 10px;
  z-index: 101;
}

.mobile-toggle span {
  display: block;
  width: 25px;
  height: 2px;
  background-color: var(--text-primary);
  margin: 5px 0;
  transition: var(--transition-fast);
}

@media (max-width: 992px) {
  .nav-links {
    display: none;
  }

  .mobile-toggle {
    display: block;
  }

  .nav-actions {
    display: none;
  }
}

/* Mobile Menu Overlay */
.mobile-menu {
  position: fixed;
  top: 0;
  right: -100%;
  width: 80%;
  max-width: 400px;
  height: 100vh;
  background-color: var(--bg-primary);
  z-index: 99;
  padding: 100px 40px 40px 40px;
  box-shadow: -10px 0 30px rgba(0, 0, 0, 0.05);
  transition: var(--transition-smooth);
  display: flex;
  flex-direction: column;
  gap: 30px;
}

.mobile-menu.open {
  right: 0;
}

.mobile-nav-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.mobile-nav-link {
  font-size: 1.8rem;
  font-weight: 700;
  text-decoration: none;
  color: var(--text-primary);
  transition: var(--transition-fast);
}

.mobile-nav-link:hover {
  opacity: 0.7;
}

/* Hero Section */
.hero-section {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: 120px;
  position: relative;
  overflow: hidden;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 60px;
  align-items: center;
  width: 100%;
}

@media (max-width: 992px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 40px;
    text-align: center;
    padding-bottom: 60px;
  }
}

.hero-tag {
  font-size: 1.1rem;
  font-weight: 400;
  color: var(--text-secondary);
  margin-bottom: 16px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.hero-description {
  margin-top: 24px;
  margin-bottom: 40px;
  font-size: 1.25rem;
  line-height: 1.7;
  max-width: 580px;
}

@media (max-width: 992px) {
  .hero-description {
    margin: 24px auto 40px auto;
  }
}

.hero-ctas {
  display: flex;
  gap: 20px;
}

@media (max-width: 992px) {
  .hero-ctas {
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .hero-ctas {
    flex-direction: column;
    gap: 12px;
  }
}

/* Interactive Floating Mockup Stack */
.hero-mockup-container {
  position: relative;
  height: 550px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.mockup-canvas-bg {
  position: absolute;
  width: 520px;
  height: 420px;
  background-color: rgba(237, 193, 202, 0.8);
  /* soft pink blob matching design */
  border-radius: 60% 40% 50% 50% / 40% 50% 40% 60%;
  z-index: 1;
  pointer-events: none;
  animation: blob-float 15s infinite ease-in-out alternate;
}

@keyframes blob-float {
  0% {
    border-radius: 60% 40% 50% 50% / 40% 50% 40% 60%;
    transform: translate(0, 0) rotate(0deg) scale(1);
  }

  33% {
    border-radius: 50% 50% 40% 60% / 50% 40% 60% 50%;
    transform: translate(15px, -15px) rotate(4deg) scale(1.03);
  }

  66% {
    border-radius: 45% 55% 55% 45% / 55% 45% 55% 45%;
    transform: translate(-10px, 10px) rotate(-3deg) scale(0.97);
  }

  100% {
    border-radius: 60% 40% 50% 50% / 40% 50% 40% 60%;
    transform: translate(0, 0) rotate(0deg) scale(1);
  }
}

.mockup-stack {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 2;
}

.mockup-phone {
  position: absolute;
  width: 180px;
  height: 360px;
  background-color: var(--white);
  border: 8px solid var(--text-primary);
  border-radius: 32px;
  overflow: hidden;
  box-shadow: 0 25px 50px -12px rgba(26, 24, 22, 0.25);
  transition: var(--transition-smooth);
}

.mockup-phone::before {
  content: '';
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 15px;
  background-color: var(--text-primary);
  border-radius: 10px;
  z-index: 10;
}

.mockup-phone img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: scale 0.5s ease;
}

.mockup-phone:hover img {
  scale: 1.05;
}

/* Position variables for the stack */
.phone-1 {
  transform: translateX(-110px) translateY(10px) rotate(-12deg);
  z-index: 3;
}

.phone-2 {
  transform: translateX(0) translateY(-20px) rotate(0deg);
  z-index: 4;
}

.phone-3 {
  transform: translateX(110px) translateY(20px) rotate(12deg);
  z-index: 3;
}

/* Hover effects for the stacked items */
.mockup-stack:hover .phone-1 {
  transform: translateX(-150px) translateY(-10px) rotate(-18deg);
}

.mockup-stack:hover .phone-2 {
  transform: translateX(0) translateY(-40px) scale(1.05);
}

.mockup-stack:hover .phone-3 {
  transform: translateX(150px) translateY(0px) rotate(18deg);
}

@media (max-width: 576px) {
  .hero-mockup-container {
    height: 380px;
  }

  .mockup-phone {
    width: 120px;
    height: 240px;
    border-radius: 20px;
    border-width: 5px;
  }

  .mockup-phone::before {
    width: 40px;
    height: 10px;
    top: 6px;
  }

  .phone-1 {
    transform: translateX(-60px) translateY(10px) rotate(-8deg);
  }

  .phone-2 {
    transform: translateX(0) translateY(-10px) rotate(0deg);
  }

  .phone-3 {
    transform: translateX(60px) translateY(15px) rotate(8deg);
  }

  .mockup-stack:hover .phone-1 {
    transform: translateX(-80px) translateY(-5px) rotate(-12deg);
  }

  .mockup-stack:hover .phone-2 {
    transform: translateX(0) translateY(-20px) scale(1.05);
  }

  .mockup-stack:hover .phone-3 {
    transform: translateX(80px) translateY(5px) rotate(12deg);
  }

  .mockup-canvas-bg {
    width: 320px;
    height: 280px;
  }
}

/* Services Grid (Appar, Webb, Design, Förvaltning) */
.section-padding {
  padding: 120px 0;
}

@media (max-width: 768px) {
  .section-padding {
    padding: 80px 0;
  }
}

.section-header {
  margin-bottom: 60px;
  max-width: 700px;
}

.section-subtitle {
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 12px;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background-color: rgba(26, 24, 22, 0.1);
  border-radius: var(--border-radius-lg);
  overflow: hidden;
}

@media (max-width: 992px) {
  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 576px) {
  .services-grid {
    grid-template-columns: 1fr;
  }
}

.service-card {
  background-color: var(--white);
  padding: 50px 32px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 360px;
  transition: var(--transition-smooth);
  position: relative;
  cursor: pointer;
}

.service-card:hover {
  background-color: var(--text-primary);
  color: var(--white);
}

.service-card:hover p,
.service-card:hover .service-number {
  color: rgba(241, 235, 229, 0.8);
}

.service-card:hover h3 {
  color: var(--white);
}

.service-number {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-muted);
  font-feature-settings: "tnum";
}

.service-icon {
  margin: 30px 0;
  width: 48px;
  height: 48px;
  color: var(--text-primary);
  transition: var(--transition-smooth);
}

.service-card:hover .service-icon {
  color: var(--bg-primary);
  transform: translateY(-5px);
}

.service-card h3 {
  font-size: 1.8rem;
  margin-bottom: 16px;
  color: var(--text-primary);
  transition: var(--transition-fast);
}

.service-card p {
  font-size: 1rem;
  font-weight: 300;
  color: var(--text-secondary);
  transition: var(--transition-fast);
}

/* Team Section with Background Video/Photo */
.about-section {
  background-color: var(--white);
  border-radius: var(--border-radius-lg);
  margin: 0 40px;
  padding: 80px;
}

@media (max-width: 992px) {
  .about-section {
    margin: 0 20px;
    padding: 40px 24px;
  }
}

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

@media (max-width: 992px) {
  .about-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }
}

.about-content h2 {
  margin-bottom: 24px;
}

.about-content p {
  margin-bottom: 20px;
  font-size: 1.1rem;
  line-height: 1.7;
}

.about-media-wrapper {
  position: relative;
  width: 100%;
  height: 400px;
  border-radius: var(--border-radius-md);
  overflow: hidden;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.05);
}

.about-media-wrapper img,
.about-media-wrapper video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Case Grid / Work section ("Schyssta digitala verk.") */
.cases-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 40px;
}

@media (max-width: 768px) {
  .cases-grid {
    grid-template-columns: 1fr;
    gap: 30px;
  }
}

.case-card {
  text-decoration: none;
  color: var(--text-primary);
  display: flex;
  flex-direction: column;
  border-radius: var(--border-radius-lg);
  overflow: hidden;
  background-color: var(--white);
  transition: var(--transition-smooth);
  border: 1px solid rgba(26, 24, 22, 0.04);
}

.case-thumbnail-wrapper {
  width: 100%;
  height: 480px;
  overflow: hidden;
  position: relative;
}

@media (max-width: 992px) {
  .case-thumbnail-wrapper {
    height: 360px;
  }
}

.case-thumbnail-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition-smooth);
}

.case-card:hover .case-thumbnail-wrapper img {
  scale: 1.04;
}

.case-details {
  padding: 40px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  background-color: var(--white);
}

@media (max-width: 576px) {
  .case-details {
    padding: 24px;
  }
}

.case-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.case-tag {
  font-size: 0.85rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 4px 12px;
  background-color: var(--bg-primary);
  color: var(--text-secondary);
  border-radius: 20px;
}

.case-title {
  font-size: 1.8rem;
  font-weight: 800;
  transition: var(--transition-fast);
}

.case-card:hover .case-title {
  color: var(--text-muted);
}

.case-excerpt {
  font-size: 1.05rem;
  font-weight: 300;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* Set dynamic custom highlight backgrounds on case card containers on hover */
.case-card.wires:hover {
  box-shadow: 0 30px 60px rgba(142, 134, 126, 0.15);
  transform: translateY(-5px);
}

.case-card.kumbro:hover {
  box-shadow: 0 30px 60px rgba(188, 226, 226, 0.25);
  transform: translateY(-5px);
}

.case-card.bjornberg:hover {
  box-shadow: 0 30px 60px rgba(194, 191, 206, 0.25);
  transform: translateY(-5px);
}

.case-card.arendra:hover {
  box-shadow: 0 30px 60px rgba(210, 223, 210, 0.25);
  transform: translateY(-5px);
}

.case-card.imago:hover {
  box-shadow: 0 30px 60px rgba(237, 193, 202, 0.25);
  transform: translateY(-5px);
}

.case-card.saenkelt:hover {
  box-shadow: 0 30px 60px rgba(242, 221, 184, 0.25);
  transform: translateY(-5px);
}

/* Contact Section & Form Styling */
.contact-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 80px;
}

@media (max-width: 992px) {
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 50px;
  }
}

.contact-info-block {
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.contact-meta-item h4 {
  font-size: 1rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.contact-meta-item p {
  font-size: 1.25rem;
  font-weight: 400;
  color: var(--text-primary);
}

.contact-meta-item a {
  color: var(--text-primary);
  text-decoration: none;
  font-weight: 500;
  transition: var(--transition-fast);
}

.contact-meta-item a:hover {
  color: var(--text-muted);
}

.contact-form {
  background-color: var(--white);
  padding: 60px;
  border-radius: var(--border-radius-lg);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.03);
}

@media (max-width: 576px) {
  .contact-form {
    padding: 30px 20px;
  }
}

.form-group {
  position: relative;
  margin-bottom: 40px;
}

.form-control {
  width: 100%;
  padding: 12px 0;
  background: transparent;
  border: none;
  border-bottom: 1px solid rgba(26, 24, 22, 0.2);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 1.1rem;
  font-weight: 400;
  transition: var(--transition-fast);
}

.form-control:focus {
  outline: none;
  border-bottom-color: var(--text-primary);
}

.form-label {
  position: absolute;
  top: 12px;
  left: 0;
  font-size: 1.1rem;
  color: var(--text-secondary);
  pointer-events: none;
  transition: var(--transition-fast);
}

.form-control:focus~.form-label,
.form-control:not(:placeholder-shown)~.form-label {
  top: -16px;
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
}

textarea.form-control {
  min-height: 100px;
  resize: none;
}

/* Form feedback message */
.form-message {
  margin-top: 20px;
  font-size: 1rem;
  font-weight: 500;
  display: none;
}

.form-message.success {
  color: #3b7a57;
  display: block;
}

.form-message.error {
  color: #c0392b;
  display: block;
}

/* Footer layout */
.footer {
  background-color: var(--text-primary);
  color: var(--bg-primary);
  padding: 80px 0 40px 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 60px;
  margin-bottom: 80px;
}

@media (max-width: 992px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 576px) {
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }
}

.footer-brand h2 {
  font-size: 2.2rem;
  color: var(--bg-primary);
  margin-bottom: 20px;
}

.footer-brand p {
  color: rgba(241, 235, 229, 0.6);
  max-width: 320px;
}

.footer-links-title {
  font-size: 0.9rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(241, 235, 229, 0.4);
  margin-bottom: 24px;
}

.footer-links-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-link {
  color: rgba(241, 235, 229, 0.8);
  text-decoration: none;
  transition: var(--transition-fast);
}

.footer-link:hover {
  color: var(--bg-primary);
  padding-left: 4px;
}

.footer-bottom {
  border-top: 1px solid rgba(241, 235, 229, 0.1);
  padding-top: 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
}

.footer-bottom p {
  font-size: 0.9rem;
  color: rgba(241, 235, 229, 0.5);
}

.social-links {
  display: flex;
  gap: 20px;
}

.social-link {
  color: rgba(241, 235, 229, 0.8);
  font-size: 1.2rem;
  transition: var(--transition-fast);
}

.social-link:hover {
  color: var(--bg-primary);
  transform: translateY(-2px);
}

/* Animations & Transitions */

/* Scroll reveals */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease, transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.reveal-delay-1 {
  transition-delay: 0.15s;
}

.reveal-delay-2 {
  transition-delay: 0.3s;
}

.reveal-delay-3 {
  transition-delay: 0.45s;
}

@keyframes pulse-dot {

  0%,
  100% {
    transform: scale(1);
    background-color: var(--tertiary-light);
    opacity: 1;
  }

  50% {
    transform: scale(1.35);
    background-color: var(--tertiary-dark);
    opacity: 0.85;
  }
}