/* NIR SHAY & TEAM — Bright Future UI */

:root {
  --bg: #f7fbff;
  --white: #ffffff;
  --ink: #101827;
  --muted: #667085;

  --blue: #4285f4;
  --red: #ea4335;
  --yellow: #fbbc05;
  --green: #34a853;

  --cyan: #64e8ff;
  --cyan-soft: rgba(100, 232, 255, .22);

  --glass: rgba(255,255,255,.72);
  --border: rgba(20,40,80,.10);
  --shadow: 0 18px 50px rgba(35, 55, 90, .12);

  --radius-xl: 32px;
  --radius-lg: 24px;
  --radius-md: 18px;
}

/* GLOBAL */

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at 15% 5%, rgba(66,133,244,.12), transparent 30%),
    radial-gradient(circle at 85% 18%, rgba(52,168,83,.10), transparent 28%),
    radial-gradient(circle at 55% 95%, rgba(251,188,5,.10), transparent 32%),
    var(--bg);
  color: var(--ink);
  font-family: Inter, Assistant, system-ui, sans-serif;
}

section {
  padding: 90px 6vw;
}

/* HEADER */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: 78px;
  padding: 0 6vw;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255,255,255,.78);
  backdrop-filter: blur(22px);
  border-bottom: 1px solid var(--border);
}

.logo {
  font-weight: 900;
  font-size: 24px;
  letter-spacing: .03em;
}

.logo span:nth-child(1) { color: var(--blue); }
.logo span:nth-child(2) { color: var(--red); }
.logo span:nth-child(3) { color: var(--yellow); }
.logo span:nth-child(4) { color: var(--green); }

.nav {
  display: flex;
  gap: 32px;
}

.nav a {
  color: var(--ink);
  text-decoration: none;
  font-weight: 700;
  opacity: .78;
}

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

/* BUTTONS */

.btn-primary {
  border: 0;
  border-radius: 999px;
  padding: 15px 28px;
  color: #fff;
  font-weight: 900;
  background: linear-gradient(90deg, var(--blue), #7c5cff);
  box-shadow: 0 12px 34px rgba(66,133,244,.32);
}

.btn-secondary {
  border-radius: 999px;
  padding: 14px 26px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,.8);
  color: var(--ink);
  font-weight: 800;
}

/* HERO */

.hero {
  min-height: 78vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 50px;
  padding: 90px 6vw;
  background:
    linear-gradient(90deg, rgba(255,255,255,.96), rgba(255,255,255,.72)),
    var(--hero-image, none);
  background-size: cover;
  background-position: center;
}

.hero h1 {
  font-size: clamp(46px, 6vw, 86px);
  line-height: .98;
  margin: 0 0 24px;
  letter-spacing: -.04em;
}

.hero h1 strong {
  background: linear-gradient(90deg, var(--blue), #7c5cff);
  -webkit-background-clip: text;
  color: transparent;
}

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

.hero-video {
  position: relative;
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  background: var(--white);
}

.hero-video img,
.hero-video video {
  width: 100%;
  display: block;
}

/* STAT CARDS */

.stats {
  display: grid;
  gap: 16px;
}

.stat-card {
  background: var(--glass);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.stat-number {
  font-size: 34px;
  font-weight: 950;
  color: var(--blue);
}

/* FUTURE WORKSPACE */

.future-workspace {
  text-align: center;
  background: linear-gradient(180deg, #ffffff, #eef8ff);
}

.workspace-visual {
  min-height: 520px;
  border-radius: var(--radius-xl);
  background:
    linear-gradient(rgba(255,255,255,.38), rgba(255,255,255,.38)),
    var(--workspace-image, none);
  background-size: cover;
  background-position: center;
  border: 1px solid rgba(100,232,255,.45);
  box-shadow:
    var(--shadow),
    0 0 55px rgba(100,232,255,.28);
  overflow: hidden;
}

.section-title {
  font-size: clamp(34px, 4vw, 56px);
  margin: 0 0 18px;
  letter-spacing: -.03em;
}

.section-title strong {
  color: var(--blue);
}

.section-subtitle {
  color: var(--muted);
  font-size: 19px;
  max-width: 760px;
  margin: 0 auto 42px;
  line-height: 1.7;
}

/* TEAM */

.team-section {
  background: #fff;
}

.team-carousel {
  display: flex;
  gap: 26px;
  overflow-x: auto;
  padding: 20px 0 34px;
}

.team-card {
  min-width: 170px;
  text-align: center;
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 22px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.team-avatar {
  width: 116px;
  height: 116px;
  margin: 0 auto 16px;
  border-radius: 50%;
  border: 4px solid var(--blue);
  object-fit: cover;
  box-shadow: 0 0 30px rgba(66,133,244,.25);
}

.team-card:nth-child(4n+1) .team-avatar { border-color: var(--blue); }
.team-card:nth-child(4n+2) .team-avatar { border-color: var(--red); }
.team-card:nth-child(4n+3) .team-avatar { border-color: var(--yellow); }
.team-card:nth-child(4n+4) .team-avatar { border-color: var(--green); }

/* PORTFOLIO */

.portfolio-section {
  background: linear-gradient(180deg, #f7fbff, #ffffff);
}

.portfolio-carousel {
  display: flex;
  gap: 24px;
  overflow-x: auto;
  padding: 20px 0 36px;
}

.portfolio-card {
  min-width: 280px;
  background: var(--white);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.portfolio-card img {
  width: 100%;
  height: 170px;
  object-fit: cover;
}

.portfolio-card-content {
  padding: 18px;
}

/* SERVICES */

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

.service-card {
  min-height: 190px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 26px;
  box-shadow: var(--shadow);
  transition: .25s ease;
}

.service-card:hover {
  transform: translateY(-4px);
  box-shadow:
    var(--shadow),
    0 0 34px var(--cyan-soft);
}

.service-icon {
  width: 54px;
  height: 54px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  margin-bottom: 18px;
  color: #fff;
  background: var(--blue);
}

.service-card:nth-child(4n+1) .service-icon { background: var(--blue); }
.service-card:nth-child(4n+2) .service-icon { background: var(--red); }
.service-card:nth-child(4n+3) .service-icon { background: var(--yellow); color: #111; }
.service-card:nth-child(4n+4) .service-icon { background: var(--green); }

/* VIDEOS */

.video-carousel {
  display: flex;
  gap: 22px;
  overflow-x: auto;
  padding-bottom: 30px;
}

.video-card {
  min-width: 300px;
  height: 190px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  position: relative;
  background: #dfeeff;
  box-shadow: var(--shadow);
}

.video-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.video-card::after {
  content: "▶";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 42px;
  background: rgba(20, 40, 70, .22);
}

/* CTA */

.final-cta {
  text-align: center;
  border-radius: var(--radius-xl);
  background:
    radial-gradient(circle at 30% 20%, rgba(66,133,244,.18), transparent 32%),
    radial-gradient(circle at 70% 80%, rgba(52,168,83,.16), transparent 32%),
    #ffffff;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}

/* FOOTER */

.footer {
  padding: 60px 6vw;
  background: #ffffff;
  border-top: 1px solid var(--border);
  color: var(--muted);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
}

/* ============================================
   MOBILE NAV — Hamburger + drawer
   ============================================ */
#mobile-nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  cursor: pointer;
  padding: 10px;
  flex-direction: column;
  gap: 5px;
  align-items: stretch;
  justify-content: center;
}

#mobile-nav-toggle span {
  display: block;
  height: 2.5px;
  background: var(--ink);
  border-radius: 2px;
  transition: transform .25s ease, opacity .2s ease;
}

#mobile-nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
#mobile-nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
#mobile-nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }

#mobile-nav-drawer {
  display: none;
  position: fixed;
  top: 64px;
  right: 0;
  bottom: 0;
  width: 100%;
  background: rgba(255,255,255,.98);
  backdrop-filter: blur(22px);
  z-index: 49;
  flex-direction: column;
  padding: 32px 28px;
  gap: 4px;
  border-top: 1px solid var(--border);
  overflow-y: auto;
}

#mobile-nav-drawer.open { display: flex; }

#mobile-nav-drawer a {
  color: var(--ink);
  text-decoration: none;
  font-weight: 800;
  font-size: 22px;
  padding: 18px 8px;
  border-bottom: 1px solid var(--border);
  text-align: right;
}

#mobile-nav-drawer a:hover { color: var(--blue); }

/* ============================================
   RESPONSIVE — Full coverage
   Breakpoints: 1200 / 1000 / 768 / 640 / 480 / 375
   Note: many inline grid styles in index.html — use !important to override.
   ============================================ */

/* Prevent horizontal scroll across all viewports */
html, body { overflow-x: hidden; max-width: 100%; }
img, video, iframe { max-width: 100%; height: auto; }

/* === Large tablet / small desktop (≤1200px) === */
@media (max-width: 1200px) {
  section { padding: 70px 5vw; }
  .hero { padding: 70px 5vw; gap: 36px; }
  .hero h1 { font-size: clamp(40px, 5.5vw, 70px); }

  /* Stats: 4 → 2 */
  .stats { grid-template-columns: repeat(2, 1fr) !important; }

  /* About section image+text 1fr 1.4fr stays wide */
  #about > div[style*="grid-template-columns"] { gap: 40px !important; }

  /* Future workspace 4-features */
  .future-workspace > div[style*="z-index:2"] > div[style*="grid-template-columns:repeat(4, 1fr)"] {
    grid-template-columns: repeat(4, 1fr) !important;
    padding: 28px 24px !important;
  }
}

/* === Tablet (≤1000px) === */
@media (max-width: 1000px) {
  .hero { grid-template-columns: 1fr; min-height: auto; padding: 60px 5vw; gap: 28px; text-align: right; }
  .hero h1 { font-size: clamp(38px, 7vw, 56px); }
  .hero h1 img { width: 52px !important; height: 52px !important; }
  .hero p { font-size: 18px; }
  .hero-video { max-width: 560px; margin: 0 auto; }

  .nav { display: none; }
  #mobile-nav-toggle { display: flex; }
  .site-header { height: 64px; padding: 0 5vw; }
  .site-header .logo img { height: 44px !important; }

  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 28px; }

  /* Stats: still 2 cols, 4 rows */
  .stats { grid-template-columns: repeat(2, 1fr) !important; }

  /* About: stack image above text */
  #about > div[style*="grid-template-columns"] {
    grid-template-columns: 1fr !important;
    gap: 32px !important;
  }
  #about .hero-video { max-width: 380px; margin: 0 auto; }
  #about .section-title { text-align: center !important; }
  #about p { text-align: right; }

  /* Contact 2-options & form: 2 → 1 / stays 2 */
  #contact > .final-cta > div[style*="grid-template-columns: 1fr 1fr"] {
    grid-template-columns: 1fr !important;
    gap: 22px !important;
  }

  /* Process: 3 → 2 */
  #process .services-grid[style*="repeat(3, 1fr)"] {
    grid-template-columns: repeat(2, 1fr) !important;
  }

  /* Future workspace 4-features: 4 → 2 */
  .future-workspace > div[style*="z-index:2"] > div[style*="grid-template-columns:repeat(4, 1fr)"] {
    grid-template-columns: repeat(2, 1fr) !important;
    padding: 24px 22px !important;
    gap: 16px !important;
  }
  .workspace-visual { min-height: auto !important; }

  /* Video carousel: hide side frames on tablet */
  #vc-side-r, #vc-side-l { display: none !important; }
  #videos { padding: 60px 5vw !important; }
  #videos > div > div[style*="border-radius:64px"] {
    padding: 32px 24px !important;
    border-radius: 32px !important;
  }
}

/* === Mobile large (≤768px) === */
@media (max-width: 768px) {
  section { padding: 56px 22px; }
  .hero { padding: 56px 22px; min-height: auto; }
  .hero h1 { font-size: clamp(34px, 8vw, 46px); gap: 12px; }
  .hero p { font-size: 17px; }

  .section-title { font-size: clamp(28px, 6vw, 42px) !important; }
  .section-subtitle { font-size: 17px; }

  /* Service icon smaller */
  .service-icon { width: 46px; height: 46px; font-size: 20px; }

  /* Stats remain 2-col, smaller card */
  .stat-card { padding: 18px; }
  .stat-number { font-size: 28px; }

  /* Contact form: 2 → 1 col */
  #contact-form { grid-template-columns: 1fr !important; gap: 14px !important; }

  /* About image smaller */
  #about .hero-video { max-width: 280px; }

  /* Team carousel: smaller cards */
  .team-card { min-width: 150px; padding: 18px; }
  .team-avatar { width: 92px; height: 92px; }
  .team-section { padding-bottom: 80px; }

  /* Portfolio cards smaller */
  .portfolio-card { min-width: 240px; }
  .portfolio-card img,
  .portfolio-card > div[style*="height:170px"] { height: 140px !important; }

  /* Footer: 2 → 1 already triggers below; keep 2 here for breathing room */
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 24px; }
  .footer { padding: 48px 22px; }
}

/* === Mobile (≤640px) === */
@media (max-width: 640px) {
  section { padding: 48px 18px; }
  .hero { padding: 48px 18px; gap: 22px; }
  .hero h1 { font-size: clamp(30px, 9vw, 40px) !important; flex-wrap: wrap; }
  .hero h1 img { width: 44px !important; height: 44px !important; border-width: 2px !important; }
  .hero p { font-size: 16px; }
  .hero ul li { font-size: 14px; }
  .hero > div > div[style*="display:flex"][style*="gap:14px"] { flex-direction: column; align-items: stretch; }
  .hero .btn-primary, .hero .btn-secondary { text-align: center; width: 100%; }

  /* Buttons baseline smaller */
  .btn-primary { padding: 14px 22px; font-size: 14px; }
  .btn-secondary { padding: 12px 20px; font-size: 14px; }

  /* Stats: 2 → 1 col? Keep 2 for compactness on tiny screens */
  .stats { grid-template-columns: repeat(2, 1fr) !important; gap: 12px !important; }
  .stat-card { padding: 16px 12px; }
  .stat-number { font-size: 24px; }

  /* Future workspace 4-features still 2x2 */
  .future-workspace > div[style*="z-index:2"] > div[style*="grid-template-columns:repeat(4, 1fr)"] {
    padding: 20px 14px !important;
    gap: 14px !important;
  }
  .future-workspace { padding-top: 24px !important; }
  .future-workspace .workspace-visual { border-radius: var(--radius-lg) !important; }

  /* Services: 2 → 1 */
  .services-grid { grid-template-columns: 1fr; }

  /* Process: 2 → 1 */
  #process .services-grid[style*="repeat(3, 1fr)"] {
    grid-template-columns: 1fr !important;
  }

  /* Portfolio cards full width */
  .portfolio-card { min-width: 84vw; }

  /* Video carousel */
  #videos > div > div[style*="border-radius:64px"] {
    padding: 22px 16px !important;
    border-radius: 24px !important;
  }
  #videos h2 { font-size: 20px !important; }

  /* Section title scaling */
  .section-title { font-size: clamp(26px, 7vw, 36px) !important; }

  /* Footer: 1 col, centered logo */
  .footer-grid { grid-template-columns: 1fr; gap: 28px; text-align: right; }
  .footer { padding: 40px 18px 110px; } /* extra bottom padding for FABs */

  /* About: tighter */
  #about > div[style*="grid-template-columns"] { gap: 24px !important; }
  #about .hero-video { max-width: 240px; }
  #about h2 { font-size: clamp(26px, 7vw, 36px) !important; }
  #about p { font-size: 16px !important; }

  /* Contact section: tighter padding */
  #contact > .final-cta { padding: 48px 20px !important; border-radius: var(--radius-lg) !important; }

  /* FAB buttons: shrink slightly */
  .fab { width: 46px !important; height: 46px !important; }
  #nm-a11y-btn { width: 44px !important; height: 44px !important; }
  #nm-a11y-panel { width: 92vw !important; max-width: 320px; left: 4vw !important; }
}

/* === Tiny mobile (≤480px) === */
@media (max-width: 480px) {
  section { padding: 40px 14px; }
  .hero { padding: 40px 14px; }
  .hero h1 { font-size: clamp(26px, 8.5vw, 34px) !important; }

  .section-title { font-size: clamp(22px, 7vw, 30px) !important; }
  .section-subtitle { font-size: 15px; }

  /* Future workspace text overlay smaller */
  .future-workspace .workspace-visual > div[style*="top:6%"] h2 { font-size: clamp(14px, 4vw, 20px) !important; }
  .future-workspace .workspace-visual > div[style*="top:6%"] p { font-size: clamp(11px, 3vw, 14px) !important; }

  /* Stats: 1 col on tiny phones */
  .stats { grid-template-columns: 1fr !important; }

  /* Team avatar smaller */
  .team-avatar { width: 80px; height: 80px; border-width: 3px; }
  .team-card { min-width: 130px; }

  /* Hide accessibility text label on tiny */
  #nm-a11y-panel { width: 94vw !important; }
}

/* === Extra tiny (≤375px iPhone SE) === */
@media (max-width: 375px) {
  .hero h1 { font-size: 26px !important; }
  .stat-number { font-size: 22px; }
  section { padding: 36px 12px; }
}

/* === Landscape phone (short height) === */
@media (max-height: 480px) and (orientation: landscape) {
  .hero { min-height: auto; padding: 32px 5vw; }
  .site-header { height: 56px; }
}
