/* 
   RazynLab — Build. Secure. Scale.
   Core Design System and Stylesheet
*/

:root {
  --bg: #000000;
  --fg: #ffffff;
  --muted: #7a7a7a;
  --faint: #4a4a4a;
  --line: #1c1c1c;
  --line2: #2a2a2a;
  --hover: #0a0a0a;
  --accent: #ffffff;
  --glow: rgba(255, 255, 255, 0.05);
}

/* Global Reset & Base */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  background: transparent;
  color: var(--fg);
  overflow-x: hidden;
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

::selection {
  background: #ffffff;
  color: #000000;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: var(--bg);
}
::-webkit-scrollbar-thumb {
  background: var(--line2);
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--muted);
}

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



/* Main Container Wrap */
.wrap {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 32px;
  position: relative;
  z-index: 1;
}

/* ---------- Navigation ---------- */
nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
  transition: background 0.3s, border-color 0.3s;
}

.nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 18px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-weight: 700;
  letter-spacing: .22em;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 9px;
}

.logo .dot {
  width: 7px;
  height: 7px;
  background: #ffffff;
  border-radius: 50%;
  display: inline-block;
  animation: pulse 2.4s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: .25; }
}

.nav-links {
  display: flex;
  gap: 34px;
  font-size: 13px;
}

.nav-links a {
  color: var(--muted);
  transition: color 0.2s, transform 0.2s;
}

.nav-links a:hover {
  color: var(--fg);
}

/* ── Nav Dropdown ─────────────────────────────────────────── */
.nav-dropdown {
  position: relative;
}

.nav-drop-trigger {
  background: none;
  border: none;
  padding: 0;
  font-family: inherit;
  font-size: 13px;
  color: var(--muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: color 0.2s;
}
.nav-drop-trigger:hover,
.nav-drop-trigger[aria-expanded="true"] {
  color: var(--fg);
}

.drop-arrow {
  font-size: 10px;
  transition: transform 0.2s;
  display: inline-block;
}
.nav-drop-trigger[aria-expanded="true"] .drop-arrow {
  transform: rotate(180deg);
}

.nav-drop-menu {
  position: absolute;
  top: calc(100% + 12px);
  left: 50%;
  transform: translateX(-50%);
  background: #0d0d0d;
  border: 1px solid var(--line2);
  border-radius: 6px;
  padding: 6px 0;
  min-width: 160px;
  display: none;
  flex-direction: column;
  z-index: 200;
  box-shadow: 0 8px 32px rgba(0,0,0,0.55);
}
.nav-drop-menu.open { display: flex; }

.nav-drop-menu a {
  font-size: 12px;
  color: var(--muted);
  padding: 9px 18px;
  text-decoration: none;
  letter-spacing: 0.04em;
  transition: color 0.15s, background 0.15s;
  white-space: nowrap;
}
.nav-drop-menu a:hover {
  color: var(--fg);
  background: rgba(255,255,255,0.04);
}

.nav-mobile-break {
  display: none;
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.04em;
  transition: color 0.2s;
}
.nav-mobile-break:hover { color: var(--fg); }

.nav-cta {
  font-size: 13px;
  border: 1px solid var(--line2);
  padding: 8px 16px;
  color: var(--fg);
  transition: all 0.2s ease;
}

.nav-cta:hover {
  background: #ffffff;
  color: #000000;
  border-color: #ffffff;
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.1);
}

/* ---------- Hero Section ---------- */
.hero {
  position: relative;
  padding: 130px 0 110px;
  z-index: 1;
}

/* Canvas overlay inside hero */
#physics-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: -1;
  pointer-events: none;
  background: #000000;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  color: var(--muted);
  letter-spacing: .08em;
  border: 1px solid var(--line2);
  padding: 7px 14px;
  margin-bottom: 40px;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.eyebrow .sq {
  width: 6px;
  height: 6px;
  background: #ffffff;
  display: inline-block;
}

.hero h1 {
  font-size: clamp(3.2rem, 11vw, 8.5rem);
  font-weight: 700;
  line-height: .92;
  letter-spacing: -.02em;
  margin-bottom: 34px;
}

.hero h1 .sep {
  color: var(--faint);
}

.hero p {
  font-size: 1rem;
  color: var(--muted);
  max-width: 620px;
  line-height: 1.85;
}

.hero-actions {
  display: flex;
  gap: 14px;
  margin-top: 44px;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 24px;
  font-size: 13px;
  border: 1px solid #ffffff;
  background: #ffffff;
  color: #000000;
  transition: all 0.25s ease;
  font-weight: 500;
}

.btn:hover {
  background: transparent;
  color: #ffffff;
  box-shadow: 0 0 15px rgba(255, 255, 255, 0.05);
}

.btn-ghost {
  background: transparent;
  color: #ffffff;
  border-color: var(--line2);
}

.btn-ghost:hover {
  background: #ffffff;
  color: #000000;
  border-color: #ffffff;
}

.btn .arrow {
  transition: transform 0.2s;
}

.btn:hover .arrow {
  transform: translateX(4px);
}

/* Floating Physics Control Panel */
.physics-controls {
  position: absolute;
  bottom: 24px;
  right: 32px;
  display: flex;
  gap: 6px;
  background: rgba(5, 5, 5, 0.85);
  border: 1px solid var(--line2);
  padding: 5px;
  z-index: 10;
  backdrop-filter: blur(8px);
}

.physics-label {
  font-size: 10px;
  color: var(--faint);
  display: flex;
  align-items: center;
  padding: 0 8px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.physics-btn {
  background: transparent;
  border: 1px solid transparent;
  color: var(--muted);
  padding: 4px 10px;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
  font-size: 11px;
}

.physics-btn:hover {
  color: var(--fg);
  border-color: var(--line);
}

.physics-btn.active {
  color: #000000;
  background: #ffffff;
  border-color: #ffffff;
  font-weight: 500;
}

/* ---------- Section Layout ---------- */
section {
  padding: 90px 0;
  position: relative;
  background: transparent;
}

.sec-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 54px;
  flex-wrap: wrap;
  gap: 12px;
}

.sec-label {
  font-size: 12px;
  color: var(--muted);
  letter-spacing: .14em;
}

.sec-title {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 700;
  letter-spacing: -.01em;
  margin-bottom: 14px;
}

.sec-sub {
  color: var(--muted);
  font-size: .92rem;
  max-width: 560px;
}

.idx {
  color: var(--faint);
  font-size: 12px;
  letter-spacing: .1em;
}

/* ---------- Services Grid ---------- */
.services {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border: 1px solid var(--line);
  border-bottom: none;
  border-right: none;
}

.card {
  padding: 30px 28px 34px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  position: relative;
  transition: background 0.25s ease, border-color 0.25s ease;
  background: rgba(5, 5, 5, 0.45);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.card:hover {
  background: rgba(15, 15, 15, 0.6);
  border-right-color: var(--line2);
  border-bottom-color: var(--line2);
}

.card .num {
  font-size: 12px;
  color: var(--faint);
  letter-spacing: .1em;
  margin-bottom: 26px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.card .glyph {
  color: var(--faint);
  font-size: 13px;
  transition: color 0.2s, transform 0.2s;
}

.card:hover .glyph {
  color: #ffffff;
  transform: scale(1.1);
}

.card h3 {
  font-size: 1.05rem;
  font-weight: 500;
  margin-bottom: 10px;
}

.card p {
  color: var(--muted);
  font-size: .85rem;
  line-height: 1.7;
}

/* ---------- Why Us Grid ---------- */
.why {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0;
  border: 1px solid var(--line);
}

.panel {
  padding: 34px 32px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  transition: background 0.25s ease;
  background: rgba(5, 5, 5, 0.45);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.panel:hover {
  background: rgba(15, 15, 15, 0.6);
}

.panel:nth-child(2n) {
  border-right: none;
}

.panel:nth-last-child(-n+2) {
  border-bottom: none;
}

.panel .pnum {
  font-size: 12px;
  color: var(--faint);
  margin-bottom: 20px;
}

.panel h3 {
  font-size: 1.15rem;
  font-weight: 500;
  margin-bottom: 12px;
}

.panel p {
  color: var(--muted);
  font-size: .88rem;
  line-height: 1.75;
}

/* ---------- Selected Work Rows ---------- */
.work {
  border-top: 1px solid var(--line);
}

.work-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 26px 8px;
  border-bottom: 1px solid var(--line);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: default;
}

.work-item:hover {
  padding-left: 22px;
  background: rgba(10, 10, 10, 0.65);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom-color: var(--line2);
}

.work-item .wl {
  display: flex;
  align-items: center;
  gap: 20px;
}

.work-item .wn {
  color: var(--faint);
  font-size: 12px;
  width: 32px;
}

.work-item .wt {
  font-size: 1rem;
  font-weight: 500;
}

.work-item .wtag {
  color: var(--muted);
  font-size: 12px;
  letter-spacing: .08em;
}

/* ---------- Contact Block ---------- */
.contact {
  border: 1px solid var(--line2);
  padding: 70px 40px;
  text-align: center;
  margin: 0 auto;
  background: rgba(5, 5, 5, 0.45);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: border-color 0.3s;
}

.contact:hover {
  border-color: var(--muted);
}

.contact h2 {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 700;
  letter-spacing: -.01em;
  margin-bottom: 18px;
}

.contact p {
  color: var(--muted);
  margin-bottom: 36px;
  font-size: .95rem;
}

.mailbtn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  border: 1px solid #ffffff;
  padding: 16px 28px;
  font-size: 14px;
  transition: all 0.2s ease;
}

.mailbtn:hover {
  background: #ffffff;
  color: #000000;
  box-shadow: 0 0 15px rgba(255, 255, 255, 0.1);
}

/* ---------- Footer ---------- */
footer {
  padding: 40px 32px;
  background: transparent;
}

.foot-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 12px;
  color: var(--muted);
}

.foot-inner .tag {
  letter-spacing: .14em;
}

/* ---------- Intersection Reveal animation ---------- */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.show {
  opacity: 1;
  transform: none;
}

/* ---------- Media Queries ---------- */
@media(max-width: 860px) {
  .services {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media(max-width: 640px) {
  .nav-links {
    display: none;
  }

  .nav-cta {
    display: none;
  }

  .nav-mobile-break {
    display: inline-flex;
    align-items: center;
    font-size: 12px;
    color: var(--fg);
    border: 1px solid var(--line2);
    padding: 8px 16px;
    letter-spacing: 0.04em;
    transition: background 0.2s, border-color 0.2s;
  }

  .nav-mobile-break:hover {
    background: rgba(255,255,255,0.05);
    border-color: var(--muted);
    color: var(--fg);
  }
  
  .services, .why {
    grid-template-columns: 1fr;
  }
  
  .card, .panel {
    border-right: none;
  }
  
  .panel:nth-last-child(2) {
    border-bottom: 1px solid var(--line);
  }
  
  .hero {
    padding: 90px 0 80px;
  }
  
  .wrap {
    padding: 0 22px;
  }
  
  .nav-inner {
    padding: 16px 22px;
  }
  
  .physics-controls {
    display: none; /* Hide physics controls on small screens for clean UX */
  }
}

@media(prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .logo .dot {
    animation: none;
  }
  #physics-canvas {
    display: none;
  }
}
