/* =========================================================
   Home page specific styles
   ========================================================= */

/* ============= Hero ============= */
.hero {
  min-height: 100vh;
  padding: clamp(9rem, 14vw, 12rem) 0 4rem;
  position: relative;
  display: flex;
  align-items: center;
  background: var(--cream);
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  top: -10%; right: -15%;
  width: 70vw; height: 70vw;
  max-width: 900px; max-height: 900px;
  background: radial-gradient(circle at 30% 30%, rgba(255, 91, 31, 0.18), transparent 60%);
  pointer-events: none;
  z-index: 0;
}
.hero::after {
  content: '';
  position: absolute;
  bottom: -20%; left: -10%;
  width: 60vw; height: 60vw;
  max-width: 700px; max-height: 700px;
  background: radial-gradient(circle, rgba(47, 107, 58, 0.12), transparent 70%);
  pointer-events: none;
  z-index: 0;
}

.hero-grid-overlay {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(to right, rgba(14,15,12,0.04) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(14,15,12,0.04) 1px, transparent 1px);
  background-size: 80px 80px;
  pointer-events: none;
  z-index: 0;
}

.hero-inner { position: relative; z-index: 2; width: 100%; }

.hero-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: clamp(2.5rem, 5vw, 4rem);
  flex-wrap: wrap;
  gap: 1rem;
}
.hero-meta .meta-item {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}
.hero-meta .meta-item .live {
  display: inline-block;
  width: 7px; height: 7px;
  background: var(--accent);
  border-radius: 50%;
  margin-right: 8px;
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(1.3); }
}

.hero h1 {
  margin-bottom: 2.5rem;
  max-width: 14ch;
}
.hero h1 .em-line {
  font-family: var(--font-italic);
  font-style: italic;
  color: var(--accent);
  font-weight: 400;
}
.hero h1 .strike {
  position: relative;
  display: inline-block;
}
.hero h1 .strike::after {
  content: '';
  position: absolute;
  left: -2%; right: -2%;
  top: 52%;
  height: 0.08em;
  background: var(--ink);
  transform: scaleX(0);
  transform-origin: left;
  animation: strike 1s 1.2s cubic-bezier(.2,.7,.2,1) forwards;
}
@keyframes strike { to { transform: scaleX(1); } }

.hero-bottom {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: clamp(2rem, 5vw, 5rem);
  align-items: end;
  margin-top: clamp(2rem, 4vw, 3rem);
}
@media (max-width: 800px) { .hero-bottom { grid-template-columns: 1fr; } }

.hero-sub p { font-size: clamp(1.05rem, 1.4vw, 1.2rem); margin-bottom: 2rem; }
.hero-cta { display: flex; gap: 1rem; flex-wrap: wrap; }

.hero-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  border-top: 1px solid var(--line-soft);
  padding-top: 1.5rem;
}
.hero-stats .stat .num {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(2rem, 4vw, 3rem);
  letter-spacing: -0.03em;
  line-height: 1;
  display: block;
  margin-bottom: 0.4rem;
}
.hero-stats .stat .num em {
  font-family: var(--font-italic);
  font-style: italic;
  color: var(--accent);
}
.hero-stats .stat .lbl {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  line-height: 1.4;
}

/* Scroll indicator */
.scroll-indicator {
  position: absolute;
  bottom: 2rem; left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
  z-index: 2;
}
.scroll-indicator .line {
  width: 1px; height: 30px;
  background: linear-gradient(to bottom, var(--ink), transparent);
  animation: scrollLine 2s ease-in-out infinite;
}
@keyframes scrollLine {
  0% { transform: scaleY(0); transform-origin: top; }
  50% { transform: scaleY(1); transform-origin: top; }
  51% { transform: scaleY(1); transform-origin: bottom; }
  100% { transform: scaleY(0); transform-origin: bottom; }
}
@media (max-width: 800px) { .scroll-indicator { display: none; } }

/* ============= Services overview ============= */
.services-overview { background: var(--paper); }
.services-list { display: flex; flex-direction: column; }
.service-row {
  display: grid;
  grid-template-columns: 80px 1fr 2fr auto;
  gap: clamp(1rem, 3vw, 2.5rem);
  padding: clamp(2rem, 4vw, 3rem) 0;
  border-bottom: 1px solid var(--line-soft);
  align-items: center;
  transition: background 300ms ease, padding 300ms ease;
  position: relative;
}
.service-row:first-child { border-top: 1px solid var(--line-soft); }
.service-row:hover { background: var(--cream-warm); padding-left: 1rem; padding-right: 1rem; }
.service-row .num {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.1em;
}
.service-row h3 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.5rem, 2.6vw, 2rem);
  letter-spacing: -0.02em;
}
.service-row h3 em {
  font-family: var(--font-italic);
  font-style: italic;
  color: var(--accent);
}
.service-row p { font-size: 1rem; max-width: 50ch; }
.service-row .arrow-link {
  width: 50px; height: 50px;
  border: 1px solid var(--ink);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 250ms ease, color 250ms ease, transform 250ms ease;
  flex-shrink: 0;
}
.service-row:hover .arrow-link { background: var(--ink); color: var(--cream); transform: rotate(-45deg); }

@media (max-width: 800px) {
  .service-row { grid-template-columns: 1fr; gap: 0.75rem; }
  .service-row .arrow-link { display: none; }
}

/* ============= Why us ============= */
.why-us {
  background: var(--ink);
  color: var(--cream);
  position: relative;
  overflow: hidden;
}
.why-us::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
}
.why-us .eyebrow { color: rgba(244, 239, 230, 0.6); }
.why-us .eyebrow .dot { background: var(--accent); }
.why-us h2 { color: var(--cream); }
.why-us p { color: rgba(244, 239, 230, 0.75); }

.why-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: rgba(244, 239, 230, 0.15);
  border: 1px solid rgba(244, 239, 230, 0.15);
}
@media (max-width: 800px) { .why-grid { grid-template-columns: 1fr; } }

.why-cell {
  background: var(--ink);
  padding: clamp(2rem, 4vw, 3rem);
  position: relative;
  transition: background 300ms ease;
}
.why-cell:hover { background: var(--ink-soft); }
.why-cell .index {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--accent);
  letter-spacing: 0.16em;
  margin-bottom: 2rem;
}
.why-cell h3 {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: 1.75rem;
  margin-bottom: 1rem;
  color: var(--cream);
}
.why-cell h3 em {
  font-family: var(--font-italic);
  font-style: italic;
  color: var(--accent);
}

/* ============= Manifesto / quote ============= */
.manifesto {
  background: var(--cream);
  text-align: left;
}
.manifesto .quote {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(2rem, 5vw, 4.5rem);
  line-height: 1.05;
  letter-spacing: -0.03em;
  max-width: 22ch;
}
.manifesto .quote em {
  font-family: var(--font-italic);
  font-style: italic;
  color: var(--accent);
  font-weight: 400;
}
.manifesto-author {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line-soft);
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ============= Testimonial ============= */
.testimonials { background: var(--paper); }
.testimonial-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; }
@media (max-width: 800px) { .testimonial-grid { grid-template-columns: 1fr; } }
.testimonial {
  background: var(--cream);
  padding: clamp(1.75rem, 3vw, 2.5rem);
  border: 1px solid var(--line-soft);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 280px;
}
.testimonial .mark {
  font-family: var(--font-italic);
  font-size: 4rem;
  line-height: 0.5;
  color: var(--accent);
  margin-bottom: 1.5rem;
  display: block;
}
.testimonial p {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(1.1rem, 1.6vw, 1.3rem);
  line-height: 1.4;
  color: var(--ink);
  margin-bottom: 2rem;
  letter-spacing: -0.01em;
}
.testimonial p em { font-family: var(--font-italic); font-style: italic; }
.testimonial-author {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.testimonial-author .name {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.05em;
  color: var(--ink);
  text-transform: uppercase;
}
.testimonial-author .role {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.12em;
  color: var(--muted);
  text-transform: uppercase;
}

/* ============= Final CTA ============= */
.cta-block {
  background: var(--accent);
  color: var(--paper);
  padding: clamp(4rem, 9vw, 7rem) 0;
  position: relative;
  overflow: hidden;
}
.cta-block::before {
  content: 'seivei';
  position: absolute;
  bottom: -60px; right: -40px;
  font-family: var(--font-italic);
  font-style: italic;
  font-size: clamp(8rem, 25vw, 22rem);
  font-weight: 400;
  color: rgba(244, 239, 230, 0.1);
  line-height: 0.9;
  pointer-events: none;
  user-select: none;
}
.cta-block .container { position: relative; z-index: 1; }
.cta-block h2 {
  color: var(--paper);
  font-weight: 300;
  max-width: 18ch;
  margin-bottom: 2rem;
}
.cta-block h2 em { font-family: var(--font-italic); font-style: italic; }
.cta-block .btn-light { color: var(--accent); }
.cta-block .btn-light:hover { background: var(--ink); color: var(--cream); }
.cta-block p { color: rgba(244, 239, 230, 0.85); max-width: 50ch; margin-bottom: 2.5rem; font-size: 1.1rem; }

/* =========================================================
   HERO — Interactive constellation field
   ========================================================= */

.hero-field {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  opacity: 0;
  transition: opacity 1200ms cubic-bezier(.2,.7,.2,1);
}
.hero-field.ready { opacity: 1; }

/* Floating capability tags that hover around the headline.
   They participate in the mouse parallax (transform set by JS) and
   feel like real elements your cursor can pass between. */
.hero-orbit {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
}
.orbit-tag {
  position: absolute;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink);
  background: rgba(250, 246, 238, 0.72);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(14, 15, 12, 0.08);
  padding: 0.55rem 0.85rem;
  border-radius: 999px;
  white-space: nowrap;
  opacity: 0;
  transform: translate3d(0, 12px, 0);
  transition:
    opacity 900ms cubic-bezier(.2,.7,.2,1),
    transform 900ms cubic-bezier(.2,.7,.2,1);
  will-change: transform;
}
.orbit-tag .dot {
  width: 6px; height: 6px;
  background: var(--accent);
  border-radius: 50%;
}
.orbit-tag--2 .dot { background: var(--accent-2); }
.orbit-tag--3 .dot { background: var(--accent-3); }
.orbit-tag--4 .dot { background: var(--ink); }

.hero-orbit.ready .orbit-tag {
  opacity: 1;
  transform: translate3d(0, 0, 0);
}
.hero-orbit.ready .orbit-tag--1 { transition-delay: 600ms; }
.hero-orbit.ready .orbit-tag--2 { transition-delay: 750ms; }
.hero-orbit.ready .orbit-tag--3 { transition-delay: 900ms; }
.hero-orbit.ready .orbit-tag--4 { transition-delay: 1050ms; }

/* Positioning — placed in the negative space around the headline */
.orbit-tag--1 { top: 22%;  right: 6%;  }
.orbit-tag--2 { top: 44%;  right: 14%; }
.orbit-tag--3 { top: 62%;  right: 4%;  }
.orbit-tag--4 { top: 30%;  right: 22%; }

@media (max-width: 1100px) {
  .orbit-tag--1 { top: 18%;  right: 4%; }
  .orbit-tag--2 { top: 38%;  right: 10%; }
  .orbit-tag--3 { display: none; }
  .orbit-tag--4 { display: none; }
}
@media (max-width: 800px) {
  /* Keep the field on mobile but hide tags to avoid crowding */
  .orbit-tag { display: none; }
}

/* Respect reduced motion: still show field but no animation */
@media (prefers-reduced-motion: reduce) {
  .hero-field { opacity: 0.6; transition: none; }
  .orbit-tag  { transition: none; transform: none; opacity: 1; }
}

/* =========================================================
   HERO CANVAS — strand field
   ========================================================= */
.hero-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;             /* above radial gradients (z:0), below text (z:2) */
  pointer-events: none;   /* hero still receives mousemove via parent */
}

/* Soften the existing radial gradients so they sit with the field instead of competing */
.hero::before { opacity: 0.55; }
.hero::after  { opacity: 0.6; }

/* A subtle paper vignette behind the headline so text always wins */
.hero-inner::before {
  content: "";
  position: absolute;
  left: 50%; top: 38%;
  transform: translate(-50%, -50%);
  width: 110%; height: 120%;
  background: radial-gradient(ellipse at center, var(--cream) 0%, rgba(244, 239, 230, 0.92) 28%, rgba(244, 239, 230, 0) 62%);
  pointer-events: none;
  z-index: -1;
}

/* On small screens we keep the canvas but reduce its visual weight */
@media (max-width: 700px) {
  .hero-canvas { opacity: 0.85; }
}

/* Reduced motion — strands stay drawn (the JS draws a single static frame) */
@media (prefers-reduced-motion: reduce) {
  .hero-canvas { opacity: 0.5; }
}
