/* ============================================
   IBIZA NODE LABS — Design Tokens
   ============================================ */

:root {
  /* Color */
  --indigo-deep: #29106d;
  --indigo-soft: #3d1f8f;
  --terracotta: #e2743a;
  --terracotta-deep: #c65a26;
  --ocean-light: #7fc4d6;
  --ocean-pale: #bfe3ea;
  --sand: #f6ecdd;
  --sand-deep: #ede0cb;
  --ink: #221733;
  --ink-soft: #4a3d63;
  --glass-white: rgba(255, 255, 255, 0.55);
  --glass-border: rgba(255, 255, 255, 0.35);

  /* Type */
  --font-display: "Fraunces", Georgia, serif;
  --font-body: "Manrope", "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", monospace;

  /* Layout */
  --container: 1180px;
  --radius-lg: 28px;
  --radius-md: 18px;
  --radius-sm: 10px;
  --nav-height: 88px;
}

.text-white {
  color: #ffffff;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--sand);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

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

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

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 32px;
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--terracotta-deep);
  display: inline-block;
  margin-bottom: 18px;
}

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.08;
  color: var(--indigo-deep);
}

p {
  line-height: 1.65;
  color: var(--ink-soft);
}

/* ============================================
   NAV
   ============================================ */

.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--nav-height);
  display: flex;
  align-items: center;
  background: var(--sand);
  border-bottom: 1px solid transparent;
  transition: background-color 0.5s ease, height 0.5s ease, box-shadow 0.5s ease,
    backdrop-filter 0.5s ease;
}

.nav.scrolled {
  height: 62px;
  background: rgba(237, 224, 203, 0.3);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  box-shadow: 0 8px 30px rgba(41, 16, 109, 0.08);
}

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

.nav-logo {
  width: 168px;
  transition: width 0.5s ease;
}

.nav.scrolled .nav-logo {
  width: 138px;
}

.nav-links {
  display: flex;
  gap: 40px;
  font-size: 15px;
  font-weight: 600;
}

.nav-links a {
  position: relative;
  padding: 6px 0;
}

.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  height: 2px;
  width: 0;
  background: var(--terracotta);
  transition: width 0.3s ease;
}

.nav-links a:hover::after {
  width: 100%;
}

.nav-cta {
  padding: 12px 24px;
  border-radius: 999px;
  background: var(--indigo-deep);
  color: var(--sand);
  font-weight: 700;
  font-size: 14px;
  transition: transform 0.3s ease, background 0.3s ease;
}

.nav-cta:hover {
  transform: translateY(-2px);
  background: var(--terracotta);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
}

.nav-toggle span {
  width: 26px;
  height: 2px;
  background: var(--indigo-deep);
}

.mobile-menu {
  position: fixed;
  top: var(--nav-height);
  left: 0;
  right: 0;
  z-index: 99;
  background: var(--sand);
  display: flex;
  flex-direction: column;
  padding: 12px 32px 24px;
  gap: 4px;
  transform: translateY(-12px);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.35s ease, opacity 0.35s ease;
  box-shadow: 0 20px 40px rgba(41, 16, 109, 0.12);
}

.mobile-menu.open {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.mobile-menu a {
  padding: 14px 0;
  font-weight: 600;
  border-bottom: 1px solid rgba(41, 16, 109, 0.08);
}

/* ============================================
   HERO
   ============================================ */

.hero {
  position: relative;
  min-height: 100vh;
  padding-top: var(--nav-height);
  display: flex;
  align-items: center;
  background: radial-gradient(
      ellipse 60% 50% at 80% 20%,
      rgba(127, 196, 214, 0.35),
      transparent 60%
    ),
    radial-gradient(
      ellipse 50% 40% at 15% 85%,
      rgba(226, 116, 58, 0.25),
      transparent 60%
    ),
    linear-gradient(160deg, var(--sand) 0%, var(--sand-deep) 55%, #e7d9c2 100%);
  overflow: hidden;
}

.hero-inner {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 60px 32px 120px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
  position: relative;
  z-index: 2;
  pointer-events: none;
}

.hero-copy {
  max-width: 640px;
  pointer-events: auto;
}

.hero-copy h1 {
  font-size: clamp(40px, 6vw, 68px);
  margin-bottom: 24px;
}

.hero-copy h1 em {
  font-style: italic;
  color: var(--terracotta);
}

.hero-copy p {
  font-size: 19px;
  max-width: 520px;
  margin-bottom: 36px;
}

.hero-actions {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
}

.btn-primary {
  padding: 16px 32px;
  background: var(--indigo-deep);
  color: var(--sand);
  border-radius: 999px;
  font-weight: 700;
  font-size: 15px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  box-shadow: 0 12px 30px rgba(41, 16, 109, 0.25);
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 40px rgba(41, 16, 109, 0.32);
}

.btn-secondary {
  padding: 16px 32px;
  border: 1.5px solid var(--indigo-deep);
  color: var(--indigo-deep);
  border-radius: 999px;
  font-weight: 700;
  font-size: 15px;
  transition: background 0.3s ease, color 0.3s ease;
}

.btn-secondary:hover {
  background: var(--indigo-deep);
  color: var(--sand);
}

/* Floating component chips field */

.chip-field {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

.chip {
  position: absolute;
  pointer-events: auto;
  touch-action: none;
  cursor: grab;
  background: var(--glass-white);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  box-shadow: 0 20px 45px rgba(41, 16, 109, 0.14);
  padding: 14px 16px;
  width: 190px;
  user-select: none;
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.35s ease;
  will-change: transform;
}

.chip:hover,
.chip.active-touch {
  box-shadow: 0 26px 60px rgba(41, 16, 109, 0.24);
  z-index: 10;
}

.chip.dragging {
  cursor: grabbing;
  transition: none;
}

.chip-label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--terracotta-deep);
  margin-bottom: 8px;
}

.chip-nav {
  display: flex;
  gap: 6px;
}

.chip-nav span {
  width: 22px;
  height: 6px;
  border-radius: 3px;
  background: var(--indigo-soft);
  opacity: 0.5;
}

.chip-btn-preview {
  display: inline-block;
  padding: 8px 18px;
  border-radius: 999px;
  background: var(--terracotta);
  color: white;
  font-size: 12px;
  font-weight: 700;
}

.chip-card-preview {
  height: 46px;
  border-radius: 8px;
  background: linear-gradient(120deg, var(--ocean-pale), var(--sand-deep));
}

.chip-quote {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 13px;
  color: var(--ink);
}

.chip-stars {
  color: var(--terracotta);
  font-size: 12px;
  margin-top: 6px;
}

.hero-hint {
  position: absolute;
  bottom: 40px;
  right: 32px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-soft);
  display: flex;
  align-items: center;
  gap: 8px;
  z-index: 3;
}

/* ============================================
   SECTIONS — shared
   ============================================ */

section {
  padding: 120px 0;
}

.section-head {
  max-width: 640px;
  margin-bottom: 64px;
}

.section-head h2 {
  font-size: clamp(32px, 4vw, 46px);
}

.section-alt {
  background: var(--sand-deep);
}

/* ============================================
   SERVICES
   ============================================ */

.services-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.service-card {
  background: white;
  border-radius: var(--radius-md);
  padding: 34px 26px;
  border: 1px solid rgba(41, 16, 109, 0.08);
  transition: transform 0.4s ease, box-shadow 0.4s ease, border-color 0.4s ease;
}

.service-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 24px 50px rgba(41, 16, 109, 0.14);
  border-color: transparent;
}

.service-icon {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background: var(--indigo-deep);
  margin-bottom: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.service-card h3 {
  font-size: 20px;
  margin-bottom: 12px;
}

.service-card p {
  font-size: 15px;
}

/* ============================================
   PROCESS
   ============================================ */

.process-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

.process-step {
  position: relative;
  padding-top: 28px;
}

.process-num {
  font-family: var(--font-display);
  font-size: 15px;
  color: var(--ocean-light);
  -webkit-text-stroke: 1.4px var(--indigo-deep);
  color: transparent;
  font-size: 54px;
  line-height: 1;
  margin-bottom: 18px;
  display: block;
}

.process-step h3 {
  font-size: 21px;
  margin-bottom: 10px;
}

.process-step p {
  font-size: 15px;
}

/* ============================================
   PORTFOLIO
   ============================================ */

.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 26px;
}

.portfolio-card {
  border-radius: var(--radius-md);
  overflow: hidden;
  background: white;
  border: 1px solid rgba(41, 16, 109, 0.08);
  transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.portfolio-card:hover {
  transform: translateY(-6px) scale(1.015);
  box-shadow: 0 26px 55px rgba(41, 16, 109, 0.16);
}

.portfolio-thumb {
  height: 190px;
  background: linear-gradient(135deg, var(--indigo-deep), var(--ocean-light));
  position: relative;
  overflow: hidden;
}

.portfolio-thumb span {
  position: absolute;
  bottom: 14px;
  left: 18px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: white;
  opacity: 0.85;
}

.portfolio-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  inset: 0;
}

.portfolio-thumb {
  position: relative;
}

.portfolio-body {
  padding: 22px 24px 26px;
}

.portfolio-body h3 {
  font-size: 18px;
  margin-bottom: 6px;
}

.portfolio-body p {
  font-size: 14px;
}

.portfolio-tag {
  display: inline-block;
  margin-top: 14px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--terracotta-deep);
}

/* ============================================
   CONTACT
   ============================================ */

.contact {
  background: linear-gradient(160deg, var(--indigo-deep), #1c0b4d);
  color: var(--sand);
  border-radius: var(--radius-lg);
  margin: 0 32px;
  padding: 80px 60px;
  max-width: calc(var(--container) - 64px);
  margin: 0 auto;
  position: relative;
  overflow: hidden;
}

.contact::before {
  content: "";
  position: absolute;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(127, 196, 214, 0.25), transparent 70%);
  top: -160px;
  right: -120px;
}

.contact-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  position: relative;
  z-index: 2;
}

.contact-copy h2 {
  color: var(--sand);
  font-size: clamp(30px, 4vw, 42px);
  margin-bottom: 18px;
}

.contact-copy p {
  color: rgba(246, 236, 221, 0.75);
  font-size: 16px;
}

.contact-meta {
  margin-top: 36px;
  font-family: var(--font-mono);
  font-size: 13px;
  color: rgba(246, 236, 221, 0.6);
  line-height: 2;
}

.form-group {
  margin-bottom: 18px;
}

.form-group label {
  display: block;
  font-size: 13px;
  font-family: var(--font-mono);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: rgba(246, 236, 221, 0.65);
  margin-bottom: 8px;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(246, 236, 221, 0.25);
  background: rgba(255, 255, 255, 0.06);
  color: var(--sand);
  font-family: var(--font-body);
  font-size: 15px;
  transition: border-color 0.3s ease, background 0.3s ease;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: rgba(246, 236, 221, 0.4);
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--terracotta);
  background: rgba(255, 255, 255, 0.1);
}

.form-group textarea {
  resize: vertical;
  min-height: 120px;
}

.form-submit {
  padding: 15px 34px;
  border: none;
  border-radius: 999px;
  background: var(--terracotta);
  color: white;
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
  transition: transform 0.3s ease, background 0.3s ease;
}

.form-submit:hover {
  transform: translateY(-3px);
  background: #f08a4b;
}

/* ============================================
   FOOTER
   ============================================ */

footer {
  padding: 60px 0 40px;
  background: var(--sand);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 30px;
  border-top: 1px solid rgba(41, 16, 109, 0.12);
  padding-top: 40px;
}

.footer-logo {
  width: 160px;
}

.footer-links {
  display: flex;
  gap: 32px;
  font-size: 14px;
  font-weight: 600;
}

.footer-note {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-soft);
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 900px) {
  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .process-list {
    grid-template-columns: 1fr;
    gap: 44px;
  }
  .portfolio-grid {
    grid-template-columns: 1fr;
  }
  .contact-inner {
    grid-template-columns: 1fr;
  }
  .contact {
    padding: 56px 30px;
  }
  .chip {
    width: 160px;
  }
}

@media (max-width: 720px) {
  .nav-links,
  .nav-cta {
    display: none;
  }
  .nav-toggle {
    display: flex;
  }
  .services-grid {
    grid-template-columns: 1fr;
  }
  .hero-hint {
    display: none;
  }
  section {
    padding: 80px 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}
