/* ============================================
   e-pro.se/mac — Mac Services Stylesheet
   Author: Mats-Olof Liljegren, CEO e-pro
   Contact: info@e-pro.se
   © 2026 e-pro. All rights reserved.
   ============================================ */

/* === Variables === */
.mac-page {
  --mac-accent: #2563eb;
  --mac-text: #1a1a1a;
  --mac-text-muted: rgba(0,0,0,0.55);
  --mac-bg: #ffffff;
  --mac-bg-alt: #f5f5f7;
  --mac-border: rgba(0,0,0,0.08);
  --mac-max: 980px;
  font-family: 'Lora', Georgia, serif;
  background: var(--mac-bg);
  color: var(--mac-text);
}

/* === Layout === */
.mac-container {
  max-width: var(--mac-max);
  margin: 0 auto;
  padding: 0 2rem;
}

/* === Header === */
.mac-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 1.25rem 0;
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 0.5px solid var(--mac-border);
}
.mac-header .mac-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.mac-logo img {
  height: 32px;
  width: auto;
  display: block;
}
.mac-header nav {
  display: flex;
  gap: 2rem;
  align-items: center;
}
.mac-header nav a {
  color: var(--mac-text-muted);
  text-decoration: none;
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  transition: color 0.2s;
}
.mac-header nav a:hover,
.mac-header nav a.active {
  color: var(--mac-text);
}

/* === Labels === */
.mac-label,
.mac-section-label {
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--mac-accent);
  margin-bottom: 1rem;
}

/* === Button === */
.mac-knapp {
  display: inline-block;
  background: var(--mac-accent);
  color: #ffffff;
  text-decoration: none;
  padding: 0.75rem 1.75rem;
  border-radius: 980px;
  font-family: 'Lora', Georgia, serif;
  font-size: 1rem;
  transition: opacity 0.2s, transform 0.2s;
  margin-top: 2rem;
}
.mac-knapp:hover {
  opacity: 0.85;
  transform: scale(1.02);
}

/* === Hero === */
.mac-hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: calc(6rem + 80px) 0 6rem;
  background: var(--mac-bg);
}
.mac-hero .mac-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}
.mac-hero h1 {
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 600;
  line-height: 1.1;
  margin-bottom: 1.25rem;
  color: var(--mac-text);
}
.mac-hero-sub {
  font-size: clamp(1rem, 2vw, 1.2rem);
  color: var(--mac-text-muted);
  line-height: 1.7;
  max-width: 42ch;
}
.mac-hero-image img {
  width: 100%;
  border-radius: 16px;
  box-shadow: 0 24px 64px rgba(0,0,0,0.12);
}

/* === Sections === */
.mac-problem,
.mac-services,
.mac-how,
.mac-contact {
  padding: clamp(5rem, 12vw, 10rem) 0;
}
.mac-problem,
.mac-how {
  background: var(--mac-bg);
}
.mac-services {
  background: var(--mac-bg-alt);
}
.mac-contact {
  background: var(--mac-bg);
}
.mac-problem h2,
.mac-services h2,
.mac-how h2,
.mac-contact h2 {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 600;
  line-height: 1.15;
  margin-bottom: 1.5rem;
  color: var(--mac-text);
}
.mac-problem p,
.mac-contact p {
  color: var(--mac-text-muted);
  font-size: clamp(1rem, 2vw, 1.2rem);
  line-height: 1.8;
  max-width: 52ch;
}

/* === Service cards === */
.mac-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-top: 2rem;
}
.mac-card {
  background: #ffffff;
  border-radius: 16px;
  padding: 2rem;
  border: 0.5px solid var(--mac-border);
}
.mac-card h3 {
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  color: var(--mac-text);
}
.mac-card p {
  color: var(--mac-text-muted);
  font-size: 0.95rem;
  line-height: 1.7;
}

/* === Steps === */
.mac-steg {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 2rem;
  margin-top: 1.5rem;
}
.mac-steg li {
  display: flex;
  align-items: baseline;
  gap: 1.5rem;
}
.mac-steg-nummer {
  font-size: 2.5rem;
  font-weight: 600;
  color: var(--mac-accent);
  line-height: 1;
  min-width: 2rem;
}
.mac-steg p {
  color: var(--mac-text-muted);
  font-size: clamp(1rem, 2vw, 1.2rem);
  line-height: 1.8;
}

/* === Contact === */
.mac-contact .mac-knapp {
  display: inline-block;
}

/* === Footer === */
.mac-footer {
  background: var(--mac-bg-alt);
  padding: 2.5rem 0;
  border-top: 0.5px solid var(--mac-border);
}
.mac-footer p {
  font-size: 0.85rem;
  color: var(--mac-text-muted);
}
.mac-footer a {
  color: var(--mac-text-muted);
  text-decoration: none;
  transition: color 0.2s;
}
.mac-footer a:hover {
  color: var(--mac-text);
}

/* === Responsive === */
@media (max-width: 700px) {
  .mac-hero .mac-container {
    grid-template-columns: 1fr;
  }
  .mac-hero-image {
    order: -1;
  }
  .mac-grid {
    grid-template-columns: 1fr;
  }
}

/* === MacBook animation === */
.mb-scene {
  width: 100%;
  max-width: 460px;
  perspective: 1200px;
  margin: 0 auto;
}
.mb-lid {
  width: 100%;
  transform-origin: bottom center;
  transform: rotateX(-110deg);
  animation: mbOpenLid 1.4s cubic-bezier(0.4, 0, 0.2, 1) 0.3s forwards;
}
@keyframes mbOpenLid {
  0%   { transform: rotateX(-110deg); }
  100% { transform: rotateX(-8deg); }
}
.mb-screen-outer {
  background: #1a1a1c;
  border-radius: 14px 14px 0 0;
  padding: 10px 10px 0;
  box-shadow: 0 0 0 1px rgba(255,255,255,0.08);
}
.mb-screen-inner {
  background: #000;
  border-radius: 8px 8px 0 0;
  aspect-ratio: 16/10;
  overflow: hidden;
  position: relative;
}
.mb-screen-glow {
  position: absolute;
  inset: 0;
  background: #0f1923;
  opacity: 0;
  animation: mbScreenOn 0.6s ease 1.5s forwards;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
}
@keyframes mbScreenOn {
  0%   { opacity: 0; }
  100% { opacity: 1; }
}
.mb-apple {
  width: 36px;
  height: 36px;
  opacity: 0;
  animation: mbFadeIn 0.8s ease 1.9s forwards;
}
.mb-tagline {
  font-family: -apple-system, sans-serif;
  font-size: 13px;
  font-weight: 300;
  color: rgba(255,255,255,0.5);
  letter-spacing: 0.08em;
  opacity: 0;
  animation: mbFadeIn 0.8s ease 2.2s forwards;
}
@keyframes mbFadeIn {
  to { opacity: 1; }
}
.mb-notch {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 120px;
  height: 22px;
  background: #000;
  border-radius: 0 0 12px 12px;
}
.mb-base {
  background: #1d1d1f;
  border-radius: 0 0 4px 4px;
  height: 18px;
  position: relative;
}
.mb-base::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 30%;
  height: 4px;
  background: #2a2a2c;
  border-radius: 2px 2px 0 0;
}
.mb-bottom {
  width: 105%;
  margin-left: -2.5%;
  height: 12px;
  background: #1a1a1c;
  border-radius: 0 0 8px 8px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.4);
}

/* === MacBook Pro screen animation === */
.mbp-wrap {
  position: relative;
  width: 100%;
}

.mbp-img {
  width: 100%;
  display: block;
}

.mbp-screen {
  position: absolute;
  top: 4.2%;
  left: 9.1%;
  width: 80.9%;
  height: 48.4%;
  border-radius: 2px;
  overflow: hidden;
}

.mbp-screen-bg {
  position: absolute;
  inset: 0;
  background: #000;
  opacity: 0;
  animation: mbpScreenOn 1s ease 0.5s forwards;
}

@keyframes mbpScreenOn {
  0%   { opacity: 0; }
  100% { opacity: 1; background: radial-gradient(ellipse at center, #0d1a2a 0%, #080d14 100%); }
}

.mbp-screen-content {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8%;
}

.mbp-apple {
  width: 9%;
  min-width: 24px;
  opacity: 0;
  animation: mbpLogoIn 0.7s cubic-bezier(0.34, 1.3, 0.64, 1) 1.3s forwards;
}

@keyframes mbpLogoIn {
  from { opacity: 0; transform: scale(0.7); }
  to   { opacity: 1; transform: scale(1); }
}

.mbp-text {
  font-family: -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: clamp(7px, 1.3vw, 13px);
  font-weight: 300;
  letter-spacing: 0.1em;
  color: rgba(255,255,255,0.38);
  white-space: nowrap;
  opacity: 0;
  animation: mbpTextIn 0.7s ease 2s forwards;
}

@keyframes mbpTextIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

@media (max-width: 700px) {
  .mbp-text { letter-spacing: 0.06em; }
}

/* === MacBook Pro hero === */
.mbp-wrap {
  position: relative;
  width: 100%;
}
.mbp-img {
  width: 100%;
  display: block;
}
.mbp-screen {
  position: absolute;
  top: 8.36%;
  left: 14.58%;
  width: 70.9%;
  height: 67.5%;
  overflow: hidden;
}
.mbp-screen-bg {
  position: absolute;
  inset: 0;
  background: #000;
  opacity: 0;
  animation: mbpOn 1s ease 0.5s forwards;
}
@keyframes mbpOn {
  to { opacity: 1; background: radial-gradient(ellipse at center, #0d1a2a 0%, #060d14 100%); }
}
.mbp-screen-content {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6%;
}
.mbp-apple {
  width: 8%;
  min-width: 20px;
  max-width: 48px;
  opacity: 0;
  animation: mbpLogo 0.7s cubic-bezier(0.34, 1.3, 0.64, 1) 1.3s forwards;
}
@keyframes mbpLogo {
  from { opacity: 0; transform: scale(0.7); }
  to   { opacity: 1; transform: scale(1); }
}
.mbp-text {
  font-family: -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: clamp(7px, 1.2vw, 13px);
  font-weight: 300;
  letter-spacing: 0.1em;
  color: rgba(255,255,255,0.38);
  white-space: nowrap;
  opacity: 0;
  animation: mbpText 0.7s ease 2s forwards;
}
@keyframes mbpText {
  from { opacity: 0; transform: translateY(5px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* === Fix transparent overlay === */
.mbp-screen {
  background: transparent !important;
}
.mbp-screen-bg {
  display: none !important;
}

/* === Zoom in innan animering === */
.mbp-wrap {
  overflow: hidden;
}
.mbp-img {
  transform: scale(1.08);
  animation: mbpZoomIn 1.2s cubic-bezier(0.25, 0.1, 0.1, 1) 0s forwards;
}
@keyframes mbpZoomIn {
  0%   { transform: scale(1.08); }
  100% { transform: scale(1); }
}

/* === Pop in-effekt === */
.mbp-wrap {
  opacity: 0;
  transform: scale(0.88);
  animation: mbpPopIn 0.7s cubic-bezier(0.34, 1.2, 0.64, 1) 0s forwards;
}
@keyframes mbpPopIn {
  0%   { opacity: 0; transform: scale(0.88); }
  100% { opacity: 1; transform: scale(1); }
}

/* === Override pop in - börja från 10% === */
.mbp-wrap {
  animation: mbpPopIn2 0.7s cubic-bezier(0.34, 1.2, 0.64, 1) 0s forwards !important;
}
@keyframes mbpPopIn2 {
  0%   { opacity: 0; transform: scale(0.1); }
  100% { opacity: 1; transform: scale(1); }
}

/* === Ta bort bakgrund bakom MacBook === */
.mac-hero-image {
  background: transparent !important;
}
.mbp-wrap {
  background: transparent !important;
}
