/* ========================================
   AGENCY — Full Restyle
   sutera.ch inspired: bold, minimal, alive
   ======================================== */

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

:root {
  --font-display: 'Space Grotesk', sans-serif;
  --font-body: 'Inter', sans-serif;
  --bg: #f5f5f0;
  --text: #0a0a0a;
  --muted: #7a7a72;
  --border: #d4d4cc;
  --accent-1: #BCD4FD;
  --accent-2: #E88150;
  --accent-3: #59E7CA;
  --accent-4: #C9C1FF;
  --margin: clamp(24px, 5vw, 72px);
  --gap: clamp(100px, 15vh, 200px);
}

html { font-size: 16px; }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  cursor: default;
}

a { color: inherit; text-decoration: none; }
ul { list-style: none; }
em { font-style: italic; }

/* --- Grain overlay --- */
.grain {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  z-index: 999;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 128px 128px;
}

/* --- Cursor glow --- */
.cursor-glow {
  position: fixed;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(232, 141, 80, 0.07) 0%, transparent 70%);
  pointer-events: none;
  z-index: 1;
  transform: translate(-50%, -50%);
  transition: opacity 0.3s;
  opacity: 0;
}

body:hover .cursor-glow { opacity: 1; }

/* --- Section label --- */
.section-label {
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 1.5rem;
}

/* ========================================
   HEADER
   ======================================== */
.header {
  position: fixed;
  top: 0; left: 0;
  width: 100%;
  z-index: 100;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px var(--margin);
  mix-blend-mode: difference;
  color: #fff;
}

.header__logo {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.header__tagline {
  font-size: 0.75rem;
  font-weight: 400;
  opacity: 0.6;
  display: none;
}

.header__meta {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.7rem;
  opacity: 0.6;
}

.header__time-label {
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* ========================================
   HERO — Full viewport, 3D centred
   ======================================== */
.hero {
  height: 100dvh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 0 var(--margin);
  position: relative;
  overflow: hidden;
}

.hero__3d {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
}

.hero__3d canvas {
  pointer-events: auto;
}

.hero__3d canvas {
  width: 100% !important;
  height: 100% !important;
}

.hero__content {
  position: relative;
  z-index: 2;
  padding-top: 30vh;
  pointer-events: none;
  max-width: 55%;
  overflow: visible;
}

.hero__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(3.5rem, 8vw, 7.5rem);
  line-height: 1.1;
  letter-spacing: -0.04em;
  padding-bottom: 0.15em;
  overflow: visible;
}

.hero__title-line {
  display: block;
  opacity: 0;
  transform: translateY(60px);
}

.hero__title em {
  font-style: italic;
  font-weight: 700;
  color: #E88150;
  -webkit-text-fill-color: #E88150;
}

.hero__bottom {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  padding-bottom: 40px;
  pointer-events: none;
}

.hero__sub {
  font-size: clamp(0.85rem, 1.5vw, 1rem);
  color: var(--muted);
  max-width: 380px;
  line-height: 1.7;
}

.hero__scroll-hint {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--muted);
}

.hero__scroll-line {
  width: 1px;
  height: 50px;
  background: var(--muted);
  animation: scrollPulse 2s ease-in-out infinite;
  transform-origin: top;
}

@keyframes scrollPulse {
  0%, 100% { scaleY: 1; opacity: 1; }
  50% { scaleY: 0.4; opacity: 0.3; }
}

/* ========================================
   MARQUEE
   ======================================== */
.marquee {
  padding: 24px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  overflow: hidden;
  white-space: nowrap;
}

.marquee__track {
  display: inline-flex;
  align-items: center;
  gap: 2rem;
  animation: marqueeScroll 20s linear infinite;
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
}

.marquee__dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent-2);
  flex-shrink: 0;
}

@keyframes marqueeScroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* ========================================
   SERVICES — Dark 3D section
   ======================================== */
.services {
  padding: var(--gap) var(--margin);
  background: #110e14;
  position: relative;
  overflow: hidden;
}

.services::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 120px;
  background: linear-gradient(180deg, var(--bg) 0%, transparent 100%);
  z-index: 1;
  pointer-events: none;
}

.services::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 120px;
  background: linear-gradient(0deg, var(--bg) 0%, transparent 100%);
  z-index: 1;
  pointer-events: none;
}

.services .section-label {
  color: rgba(255, 255, 255, 0.45);
}

.services__title {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 3.5vw, 3rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: 1rem;
  color: #fff;
}

.services__drag-hint {
  text-align: center;
  font-size: 0.7rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: rgba(255, 255, 255, 0.25);
  margin-top: 1rem;
}

.service-item {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 2rem 0;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: padding-left 0.4s ease;
}

.service-item:first-child { border-top: 1px solid var(--border); }

.service-item:hover {
  padding-left: 1rem;
}

.service-item:hover .service-item__arrow {
  opacity: 1;
  transform: translateX(0);
}

.service-item:hover .service-item__num {
  color: var(--accent-2);
}

.service-item__num {
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--muted);
  min-width: 36px;
  transition: color 0.3s;
}

.service-item__content { flex: 1; }

.service-item__title {
  font-family: var(--font-display);
  font-size: clamp(1.1rem, 2vw, 1.5rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: 0.25rem;
}

.service-item__desc {
  font-size: 0.85rem;
  color: var(--muted);
  max-width: 500px;
  line-height: 1.65;
}

.service-item__arrow {
  font-size: 1.25rem;
  opacity: 0;
  transform: translateX(-10px);
  transition: all 0.3s ease;
  color: var(--accent-2);
}

/* ========================================
   SERVICES 3D — Three.js Phone Carousel
   ======================================== */
.services-3d {
  width: 100%;
  height: 600px;
  cursor: default;
  user-select: none;
  position: relative;
  z-index: 2;
}

.services-3d:active {
  cursor: grabbing;
}

@media (max-width: 900px) {
  .services-3d {
    height: 480px;
  }
}

/* ========================================
   PORTFOLIO — Grid cards with accent
   ======================================== */
.portfolio {
  padding: var(--gap) var(--margin);
  position: relative;
}

.portfolio__title {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 3.5vw, 3rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: 0.5rem;
}

.portfolio__hint {
  font-size: 0.8rem;
  color: var(--muted);
  margin-bottom: 3rem;
}

.portfolio__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

.portfolio__card {
  border-radius: 16px;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.5s ease;
  background: #fff;
}

.portfolio__card:hover {
  transform: translateY(-8px) scale(1.01);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.08);
}

.portfolio__card-img {
  width: 100%;
  aspect-ratio: 16 / 10;
  background: linear-gradient(135deg, var(--accent) 0%, color-mix(in srgb, var(--accent) 60%, #000) 100%);
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  padding: 1.5rem;
  position: relative;
  overflow: hidden;
}

.portfolio__card-img::before {
  content: '';
  position: absolute;
  top: 50%; left: 50%;
  width: 60%;
  height: 60%;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  transform: translate(-50%, -50%) rotate(-3deg);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.portfolio__card-num {
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.7);
  position: relative;
  z-index: 1;
}

.portfolio__card-title {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 600;
  padding: 1rem 1.5rem 0.25rem;
}

.portfolio__card-sub {
  font-size: 0.8rem;
  color: var(--muted);
  padding: 0 1.5rem 1.25rem;
}

/* --- Case Study Overlay --- */
.case-study {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(245, 245, 240, 0.97);
  backdrop-filter: blur(30px);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s ease;
}

.case-study.active {
  opacity: 1;
  pointer-events: all;
}

.case-study__close {
  position: absolute;
  top: 24px; right: 32px;
  background: none;
  border: 1px solid var(--border);
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--text);
  width: 48px; height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.3s;
}

.case-study__close:hover {
  background: var(--text);
  color: var(--bg);
  border-color: var(--text);
}

.case-study__inner {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 4rem;
  max-width: 1100px;
  width: 90%;
  align-items: center;
}

.case-study__image {
  width: 100%;
  aspect-ratio: 16 / 10;
  border-radius: 16px;
  overflow: hidden;
}

.case-study__num {
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--muted);
}

.case-study__title {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 2.5vw, 2.25rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0.5rem 0 1rem;
}

.case-study__desc {
  font-size: 0.95rem;
  color: var(--muted);
  line-height: 1.7;
  margin-bottom: 1.5rem;
}

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

.case-study__tag {
  font-size: 0.7rem;
  font-weight: 600;
  padding: 6px 16px;
  border-radius: 100px;
  border: 1px solid var(--border);
  color: var(--text);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ========================================
   ABOUT
   ======================================== */
.about {
  padding: var(--gap) var(--margin);
}

.about__headline {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 2.75rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.3;
  max-width: 820px;
  margin-bottom: 4rem;
}

.about__headline em {
  background: linear-gradient(135deg, var(--accent-3), var(--accent-1));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.about__details {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}

.about__detail-label {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
  display: block;
  margin-bottom: 0.75rem;
}

.about__detail p {
  font-size: 0.9rem;
  line-height: 1.7;
}

/* ========================================
   PRICING
   ======================================== */
.pricing {
  padding: var(--gap) var(--margin);
}

.pricing__title {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 3.5vw, 3rem);
  font-weight: 700;
  letter-spacing: -0.03em;
}

.pricing__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  margin-top: 3rem;
}

.pricing__card {
  padding: 2.5rem 2rem;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(10px);
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.5s ease;
}

.pricing__card:hover {
  transform: translateY(-6px);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.06);
}

.pricing__card--featured {
  border-color: var(--accent-3);
  background: linear-gradient(180deg, rgba(89, 231, 202, 0.08) 0%, rgba(255,255,255,0.6) 100%);
}

.pricing__card-label {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--muted);
  display: block;
  margin-bottom: 1.25rem;
}

.pricing__card-price {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 1.5rem;
}

.pricing__card-price span {
  font-size: 1rem;
  font-weight: 400;
  color: var(--muted);
}

.pricing__card-features li {
  font-size: 0.85rem;
  padding: 0.6rem 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.04);
}

.pricing__card-features li:last-child { border-bottom: none; }

/* ========================================
   CTA
   ======================================== */
.cta {
  padding: var(--gap) var(--margin);
  text-align: center;
}

.cta__title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3.5rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: 1rem;
}

.cta__sub {
  font-size: 1rem;
  color: var(--muted);
  margin-bottom: 2.5rem;
}

.cta__form {
  max-width: 500px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  text-align: left;
}

.cta__field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.cta__label {
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
}

.cta__input {
  width: 100%;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--border);
  padding: 14px 0;
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--text);
  outline: none;
  transition: border-color 0.3s ease;
}

.cta__input::placeholder {
  color: var(--muted);
  opacity: 0.5;
}

.cta__input:focus {
  border-color: var(--accent-2);
}

.cta__textarea {
  resize: vertical;
  min-height: 80px;
}

.cta__button {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 600;
  padding: 18px 52px;
  border-radius: 100px;
  background: var(--text);
  color: var(--bg);
  letter-spacing: 0.02em;
  border: none;
  cursor: pointer;
  align-self: center;
  margin-top: 0.75rem;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.cta__button:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.18);
}

/* ========================================
   FOOTER
   ======================================== */
.footer {
  padding: 3rem var(--margin);
  border-top: 1px solid var(--border);
}

.footer__top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
}

.footer__brand {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
}

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

.footer__links a {
  font-size: 0.8rem;
  color: var(--muted);
  transition: color 0.3s;
}

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

.footer__bottom p {
  font-size: 0.7rem;
  color: var(--muted);
}

/* ========================================
   RESPONSIVE
   ======================================== */
@media (min-width: 768px) {
  .header__tagline { display: block; }
}

@media (max-width: 900px) {
  .hero__content { padding-top: 10vh; max-width: 90%; }

  .hero__bottom { flex-direction: column; gap: 2rem; align-items: flex-start; }

  .hero__scroll-hint { display: none; }

  .about__details { grid-template-columns: 1fr; }

  .pricing__grid { grid-template-columns: 1fr; }

  .portfolio__grid { grid-template-columns: 1fr; }

  .case-study__inner { grid-template-columns: 1fr; gap: 2rem; }
}

@media (max-width: 540px) {
  .hero__title { font-size: 2.75rem; }

  .service-item { flex-wrap: wrap; }

  .service-item__arrow { display: none; }
}
