/* =========================================================================
   BRUTEKS — Core Stylesheet
   Typography: Open Sans (exclusive)
   System: Blueprint (IT / teal) + Vector seam (Design / coral)
   ========================================================================= */

@import url('https://fonts.googleapis.com/css2?family=Open+Sans:ital,wght@0,300;0,400;0,500;0,600;0,700;0,800;1,400&display=swap');

:root{
  --ink:#0B1220;
  --ink-2:#0F1B2D;
  --ink-3:#142238;
  --paper:#F6F4EF;
  --paper-2:#EDEAE2;
  --paper-3:#E2DED2;
  --teal:#1FB6A6;
  --teal-dim:#14857A;
  --teal-glow:#5EEFDD;
  --coral:#FF6B4A;
  --coral-dim:#D6502F;
  --coral-glow:#FFA98C;
  --line-on-dark: rgba(246,244,239,0.12);
  --line-on-light: rgba(11,18,32,0.12);
  --ease-out-quint: cubic-bezier(0.22,1,0.36,1);
  --ease-out-expo: cubic-bezier(0.16,1,0.3,1);
}

*{ box-sizing: border-box; }

html{
  scroll-behavior: smooth;
}

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

body{
  font-family: 'Open Sans', system-ui, sans-serif;
  background-color: var(--ink);
  color: var(--paper);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* ---------- Scrollbar ---------- */
::-webkit-scrollbar{ width: 10px; height: 10px; }
::-webkit-scrollbar-track{ background: var(--ink); }
::-webkit-scrollbar-thumb{
  background: linear-gradient(180deg, var(--teal-dim), var(--coral-dim));
  border-radius: 10px;
  border: 2px solid var(--ink);
}

/* ---------- Focus visibility (accessibility floor) ---------- */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
[tabindex]:focus-visible{
  outline: 2px solid var(--teal-glow);
  outline-offset: 3px;
  border-radius: 4px;
}

/* =========================================================================
   BLUEPRINT GRID — IT motif: faint engineering grid on dark surfaces
   ========================================================================= */
.bp-grid{
  background-image:
    linear-gradient(var(--line-on-dark) 1px, transparent 1px),
    linear-gradient(90deg, var(--line-on-dark) 1px, transparent 1px);
  background-size: 56px 56px;
}

.bp-grid-fine{
  background-image:
    linear-gradient(rgba(246,244,239,0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(246,244,239,0.05) 1px, transparent 1px);
  background-size: 24px 24px;
}

/* =========================================================================
   THE SEAM — signature gradient element where IT (teal) meets Design (coral)
   ========================================================================= */
.seam-bg{
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}
.seam-bg::before{
  content: '';
  position: absolute;
  top: -20%;
  left: -10%;
  width: 70%;
  height: 140%;
  background: radial-gradient(circle at 30% 40%, rgba(31,182,166,0.30), transparent 60%);
  filter: blur(40px);
  animation: drift-a 22s var(--ease-out-quint) infinite alternate;
}
.seam-bg::after{
  content: '';
  position: absolute;
  bottom: -30%;
  right: -10%;
  width: 70%;
  height: 140%;
  background: radial-gradient(circle at 70% 60%, rgba(255,107,74,0.28), transparent 60%);
  filter: blur(40px);
  animation: drift-b 26s var(--ease-out-quint) infinite alternate;
}

@keyframes drift-a{
  0%{ transform: translate(0,0) scale(1); }
  100%{ transform: translate(6%, 4%) scale(1.12); }
}
@keyframes drift-b{
  0%{ transform: translate(0,0) scale(1); }
  100%{ transform: translate(-6%, -5%) scale(1.15); }
}

/* =========================================================================
   GLASSMORPHISM
   ========================================================================= */
.glass{
  background: linear-gradient(155deg, rgba(246,244,239,0.07), rgba(246,244,239,0.02));
  backdrop-filter: blur(20px) saturate(140%);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
  border: 1px solid rgba(246,244,239,0.12);
  box-shadow: 0 8px 40px -12px rgba(0,0,0,0.5), inset 0 1px 0 rgba(255,255,255,0.05);
}

.glass-strong{
  background: linear-gradient(155deg, rgba(246,244,239,0.11), rgba(246,244,239,0.03));
  backdrop-filter: blur(28px) saturate(160%);
  -webkit-backdrop-filter: blur(28px) saturate(160%);
  border: 1px solid rgba(246,244,239,0.16);
  box-shadow: 0 12px 50px -10px rgba(0,0,0,0.55), inset 0 1px 0 rgba(255,255,255,0.07);
}

.glass-light{
  background: linear-gradient(155deg, rgba(11,18,32,0.04), rgba(11,18,32,0.015));
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  border: 1px solid rgba(11,18,32,0.08);
  box-shadow: 0 8px 32px -14px rgba(11,18,32,0.18);
}

.glass-nav{
  background: rgba(11,18,32,0.55);
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  border-bottom: 1px solid rgba(246,244,239,0.08);
}
.glass-nav.is-scrolled{
  background: rgba(11,18,32,0.82);
  box-shadow: 0 8px 30px -14px rgba(0,0,0,0.5);
}

/* ---------- Corner brackets — crop-mark / schematic motif ---------- */
.corner-brackets{ position: relative; }
.corner-brackets::before,
.corner-brackets::after{
  content: '';
  position: absolute;
  width: 18px;
  height: 18px;
  border: 1.5px solid currentColor;
  opacity: 0.55;
  transition: all 0.4s var(--ease-out-quint);
}
.corner-brackets::before{
  top: 10px; left: 10px;
  border-right: none; border-bottom: none;
}
.corner-brackets::after{
  bottom: 10px; right: 10px;
  border-left: none; border-top: none;
}
.corner-brackets:hover::before{ top: 6px; left: 6px; opacity: 1; }
.corner-brackets:hover::after{ bottom: 6px; right: 6px; opacity: 1; }

/* =========================================================================
   TILT CARD — glassmorphic 3D hover tilt (driven by JS setting custom props)
   ========================================================================= */
.tilt-card{
  --rx: 0deg;
  --ry: 0deg;
  transform: perspective(1000px) rotateX(var(--rx)) rotateY(var(--ry)) translateZ(0);
  transition: transform 0.25s var(--ease-out-quint), box-shadow 0.25s ease;
  will-change: transform;
}
.tilt-card:hover{
  box-shadow: 0 20px 60px -16px rgba(0,0,0,0.6);
}

/* =========================================================================
   MAGNETIC BUTTON
   ========================================================================= */
.magnetic{
  position: relative;
  display: inline-flex;
  transition: transform 0.18s var(--ease-out-quint);
  will-change: transform;
}

/* =========================================================================
   SCROLL REVEAL SYSTEM
   ========================================================================= */
.reveal{
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.9s var(--ease-out-expo), transform 0.9s var(--ease-out-expo);
}
.reveal.is-visible{
  opacity: 1;
  transform: translateY(0);
}
.reveal-scale{
  opacity: 0;
  transform: scale(0.94);
  transition: opacity 0.8s var(--ease-out-expo), transform 0.8s var(--ease-out-expo);
}
.reveal-scale.is-visible{
  opacity: 1;
  transform: scale(1);
}
.reveal-left{
  opacity: 0;
  transform: translateX(-32px);
  transition: opacity 0.9s var(--ease-out-expo), transform 0.9s var(--ease-out-expo);
}
.reveal-left.is-visible{ opacity:1; transform: translateX(0); }
.reveal-right{
  opacity: 0;
  transform: translateX(32px);
  transition: opacity 0.9s var(--ease-out-expo), transform 0.9s var(--ease-out-expo);
}
.reveal-right.is-visible{ opacity:1; transform: translateX(0); }

/* Stagger helper delays applied via inline style --delay in markup */
.reveal, .reveal-scale, .reveal-left, .reveal-right{
  transition-delay: var(--delay, 0ms);
}

/* =========================================================================
   GRADIENT TEXT
   ========================================================================= */
.text-gradient-tc{
  background: linear-gradient(95deg, var(--teal) 0%, var(--teal-glow) 35%, var(--coral-glow) 65%, var(--coral) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.text-gradient-teal{
  background: linear-gradient(95deg, var(--teal-dim), var(--teal-glow));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.text-gradient-coral{
  background: linear-gradient(95deg, var(--coral-dim), var(--coral-glow));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* =========================================================================
   LABEL / EYEBROW
   ========================================================================= */
.eyebrow{
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.32em;
  text-transform: uppercase;
}

/* =========================================================================
   BUTTONS
   ========================================================================= */
.btn{
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.95rem 1.9rem;
  border-radius: 999px;
  transition: transform 0.3s var(--ease-out-quint), box-shadow 0.3s ease, background 0.3s ease, border-color 0.3s ease;
}
.btn-primary{
  background: linear-gradient(95deg, var(--teal) 0%, var(--coral) 100%);
  color: var(--ink);
  box-shadow: 0 10px 30px -10px rgba(31,182,166,0.45);
}
.btn-primary:hover{
  box-shadow: 0 14px 40px -10px rgba(255,107,74,0.55);
  transform: translateY(-2px);
}
.btn-ghost{
  border: 1px solid var(--line-on-dark);
  color: var(--paper);
  background: rgba(246,244,239,0.04);
}
.btn-ghost:hover{
  border-color: rgba(246,244,239,0.4);
  background: rgba(246,244,239,0.08);
  transform: translateY(-2px);
}
.btn-ghost-light{
  border: 1px solid var(--line-on-light);
  color: var(--ink);
  background: rgba(11,18,32,0.03);
}
.btn-ghost-light:hover{
  border-color: rgba(11,18,32,0.3);
  background: rgba(11,18,32,0.06);
  transform: translateY(-2px);
}

/* =========================================================================
   MOBILE MENU
   ========================================================================= */
.mobile-menu{
  transform: translateX(100%);
  transition: transform 0.55s var(--ease-out-expo);
}
.mobile-menu.is-open{
  transform: translateX(0);
}

/* =========================================================================
   MARQUEE — trust badge strip
   ========================================================================= */
.marquee-track{
  display: flex;
  width: max-content;
  animation: marquee 32s linear infinite;
}
.marquee-track:hover{ animation-play-state: paused; }
@keyframes marquee{
  0%{ transform: translateX(0); }
  100%{ transform: translateX(-50%); }
}

/* =========================================================================
   PORTFOLIO FILTER FADE
   ========================================================================= */
.gallery-item{
  transition: opacity 0.5s var(--ease-out-quint), transform 0.5s var(--ease-out-quint);
}
.gallery-item.is-hidden{
  opacity: 0;
  transform: scale(0.92);
  position: absolute;
  pointer-events: none;
}

/* =========================================================================
   FLOATING LABEL FORM
   ========================================================================= */
.field{ position: relative; }
.field input,
.field textarea,
.field select{
  width: 100%;
  background: rgba(246,244,239,0.04);
  border: 1px solid var(--line-on-dark);
  border-radius: 14px;
  padding: 1.5rem 1.1rem 0.7rem 1.1rem;
  color: var(--paper);
  font-family: inherit;
  font-size: 0.97rem;
  transition: border-color 0.3s ease, background 0.3s ease, box-shadow 0.3s ease;
}
.field textarea{ min-height: 140px; resize: vertical; }
.field input:focus,
.field textarea:focus,
.field select:focus{
  outline: none;
  border-color: var(--teal);
  background: rgba(31,182,166,0.06);
  box-shadow: 0 0 0 4px rgba(31,182,166,0.12);
}
.field label{
  position: absolute;
  left: 1.1rem;
  top: 1.05rem;
  font-size: 0.97rem;
  color: rgba(246,244,239,0.5);
  pointer-events: none;
  transform-origin: left top;
  transition: transform 0.22s var(--ease-out-quint), color 0.22s ease, top 0.22s ease;
}
.field input:focus + label,
.field input:not(:placeholder-shown) + label,
.field textarea:focus + label,
.field textarea:not(:placeholder-shown) + label,
.field select:focus + label,
.field select.has-value + label{
  top: 0.5rem;
  transform: scale(0.74);
  color: var(--teal-glow);
}
.field select{ appearance: none; }
.field .select-chevron{
  position: absolute;
  right: 1.1rem;
  top: 1.5rem;
  pointer-events: none;
  color: rgba(246,244,239,0.4);
}

/* =========================================================================
   UTILITY: section dividers
   ========================================================================= */
.hairline{
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--line-on-dark) 20%, var(--line-on-dark) 80%, transparent);
}
.hairline-light{
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--line-on-light) 20%, var(--line-on-light) 80%, transparent);
}

/* Loader bar shown briefly on first paint */
#page-loader{
  position: fixed; inset: 0; z-index: 200;
  background: var(--ink);
  display: flex; align-items: center; justify-content: center;
  transition: opacity 0.6s var(--ease-out-quint), visibility 0.6s;
}
#page-loader.is-hidden{ opacity: 0; visibility: hidden; }
.loader-mark{
  width: 56px; height: 56px;
  position: relative;
}

/* =========================================================================
   PAGE TRANSITION VEIL — smooth fade between pages
   ========================================================================= */
#page-veil{
  position: fixed; inset: 0; z-index: 300;
  background: var(--ink);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.45s var(--ease-out-quint);
}
#page-veil.is-active{
  opacity: 1;
  pointer-events: all;
}

/* Infrastructure diagram connector lines */
.diagram-line{
  stroke-dasharray: 6 6;
  animation: dash-flow 1.6s linear infinite;
}
@keyframes dash-flow{
  to{ stroke-dashoffset: -24; }
}

/* Process / quarter ticks (legitimate sequence use) */
.q-tick{
  font-variant-numeric: tabular-nums;
}
