:root {
  --bg: #070807;
  --bg-soft: #10130f;
  --card: #121611;
  --card-2: #172014;
  --text: #f7f7ef;
  --muted: #c3c6b9;
  --green: #47d16c;
  --green-deep: #1c8f49;
  --yellow: #f2d03b;
  --amber: #e59b25;
  --blue: #3aa2ff;
  --line: rgba(242, 208, 59, 0.18);
  --line-green: rgba(71, 209, 108, 0.34);
  --shadow: 0 26px 90px rgba(0, 0, 0, 0.52);
  --radius: 26px;
  --container: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 12% 10%, rgba(71, 209, 108, 0.22), transparent 25rem),
    radial-gradient(circle at 86% 18%, rgba(58, 162, 255, 0.14), transparent 26rem),
    radial-gradient(circle at 52% 92%, rgba(242, 208, 59, 0.12), transparent 30rem),
    linear-gradient(180deg, var(--bg), #030403 78%);
  line-height: 1.6;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(71,209,108,0.035) 1px, transparent 1px),
    linear-gradient(rgba(242,208,59,0.030) 1px, transparent 1px);
  background-size: 58px 58px;
  z-index: -1;
}

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

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

.container {
  width: min(var(--container), calc(100% - 40px));
  margin: 0 auto;
}

.section {
  padding: 96px 0;
  position: relative;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(7, 8, 7, 0.82);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.logo-mark {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 1px solid var(--line-green);
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(71,209,108,0.30), rgba(242,208,59,0.16));
  color: var(--yellow);
  font-weight: 900;
  letter-spacing: 0.04em;
  box-shadow: 0 0 30px rgba(71, 209, 108, 0.16);
}

.logo-text {
  display: grid;
  line-height: 1.1;
}

.logo-text strong {
  font-size: 1.05rem;
}

.logo-text small {
  color: var(--muted);
  font-size: 0.76rem;
}

.main-nav {
  display: flex;
  gap: 8px;
  align-items: center;
}

.main-nav a {
  color: var(--muted);
  padding: 10px 14px;
  border-radius: 999px;
  transition: 0.2s ease;
}

.main-nav a:hover,
.main-nav a:focus {
  color: var(--text);
  background: rgba(71, 209, 108, 0.14);
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 40px;
  border: 1px solid var(--line);
  background: rgba(18, 22, 17, 0.86);
  border-radius: 12px;
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  background: var(--green);
  border-radius: 999px;
}

.hero {
  min-height: calc(100vh - 76px);
  display: flex;
  align-items: center;
  overflow: hidden;
}

.hero-bg-photo {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(7,8,7,0.92) 0%, rgba(7,8,7,0.72) 45%, rgba(7,8,7,0.28) 100%),
    linear-gradient(180deg, rgba(7,8,7,0.20), rgba(7,8,7,0.95)),
    url("img/hero_rafelectronic.jpg") center / cover no-repeat;
  opacity: 0.95;
  transform: scale(1.04);
  animation: heroFloat 18s ease-in-out infinite alternate;
}

.grid-bg {
  position: absolute;
  inset: 0;
  opacity: 0.22;
  background-image:
    linear-gradient(rgba(71,209,108,0.18) 1px, transparent 1px),
    linear-gradient(90deg, rgba(242,208,59,0.12) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: linear-gradient(to bottom, black, transparent 82%);
  pointer-events: none;
}

.hero-grid {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1.08fr 0.92fr;
  gap: 56px;
  align-items: center;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--yellow);
  font-size: 0.82rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.14em;
}

h1, h2, h3, p {
  margin-top: 0;
}

h1 {
  font-size: clamp(2.7rem, 6.6vw, 5.6rem);
  line-height: 0.96;
  letter-spacing: -0.06em;
  margin-bottom: 24px;
  text-shadow: 0 14px 50px rgba(0,0,0,0.58);
}

h2 {
  font-size: clamp(2rem, 4vw, 3.15rem);
  line-height: 1.05;
  letter-spacing: -0.04em;
  margin-bottom: 18px;
}

h3 {
  font-size: 1.22rem;
  margin-bottom: 10px;
}

.lead {
  color: #ecece6;
  font-size: clamp(1.1rem, 2vw, 1.32rem);
  max-width: 750px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin: 32px 0;
}

.btn {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-height: 48px;
  padding: 13px 22px;
  border-radius: 999px;
  font-weight: 900;
  border: 1px solid transparent;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  color: #081008;
  background: linear-gradient(135deg, var(--yellow), var(--green));
  box-shadow: 0 14px 42px rgba(242, 208, 59, 0.20);
}

.btn-primary:hover {
  box-shadow: 0 20px 54px rgba(71, 209, 108, 0.28);
}

.btn-secondary {
  color: var(--text);
  background: rgba(18, 22, 17, 0.76);
  border-color: var(--line);
}

.hero-points {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-points span {
  border: 1px solid rgba(242,208,59,0.18);
  background: rgba(18, 22, 17, 0.84);
  color: #ededeb;
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 0.92rem;
}

.hero-card {
  justify-self: end;
  width: 100%;
  max-width: 500px;
}

.photo-card {
  position: relative;
  overflow: hidden;
  border-radius: 32px;
  border: 1px solid var(--line-green);
  background: var(--card);
  box-shadow: var(--shadow);
}

.photo-card-main {
  animation: cardFloat 7s ease-in-out infinite;
}

.photo-card img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  transform: scale(1.02);
}

.photo-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 44%, rgba(0,0,0,0.74));
  pointer-events: none;
}

.photo-caption {
  position: absolute;
  left: 22px;
  right: 22px;
  bottom: 20px;
  z-index: 2;
  display: grid;
  gap: 2px;
}

.photo-caption strong {
  color: var(--yellow);
  font-size: 1.35rem;
}

.photo-caption span {
  color: #fff;
}

.scroll-indicator {
  position: absolute;
  bottom: 28px;
  left: 50%;
  z-index: 3;
  transform: translateX(-50%);
  width: 24px;
  height: 42px;
  border: 1px solid var(--line-green);
  border-radius: 999px;
  opacity: 0.76;
}

.scroll-indicator span {
  position: absolute;
  left: 50%;
  top: 8px;
  width: 5px;
  height: 5px;
  border-radius: 999px;
  background: var(--yellow);
  transform: translateX(-50%);
  animation: scrollDot 1.4s ease-in-out infinite;
}

.motto-section {
  background:
    linear-gradient(180deg, rgba(23,32,20,0.44), rgba(7,8,7,0.05));
}

.motto-grid {
  display: grid;
  grid-template-columns: 0.92fr 1.08fr;
  gap: 48px;
  align-items: center;
}

.motto-image {
  border-radius: 30px;
  overflow: hidden;
  border: 1px solid rgba(58,162,255,0.24);
  box-shadow: var(--shadow);
}

.motto-image img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
}

.motto-text p,
.text-block p,
.section-head p,
.realizations p,
.cta p,
.contact p {
  color: var(--muted);
}

.two-col {
  display: grid;
  grid-template-columns: 0.92fr 1.08fr;
  gap: 60px;
  align-items: start;
}

.text-block {
  border-left: 2px solid var(--green);
  padding-left: 28px;
}

.section-head {
  max-width: 780px;
  margin-bottom: 40px;
}

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

.service-card,
.step,
.gallery-item,
.contact-card,
.cta-box {
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(23,32,20,0.90), rgba(12,14,11,0.92));
  border-radius: var(--radius);
  box-shadow: 0 18px 56px rgba(0, 0, 0, 0.25);
}

.service-card {
  overflow: hidden;
  min-height: 430px;
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.service-card:hover {
  transform: translateY(-6px);
  border-color: var(--line-green);
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.36);
}

.service-card img {
  width: 100%;
  height: 185px;
  object-fit: cover;
  filter: saturate(1.10) contrast(1.05);
}

.service-content {
  padding: 24px;
}

.service-card p {
  color: var(--muted);
}

.service-card ul {
  padding-left: 18px;
  color: #e8e8df;
}

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

.step {
  padding: 26px;
  transition: transform 0.22s ease, border-color 0.22s ease;
}

.step:hover {
  transform: translateY(-5px);
  border-color: rgba(242,208,59,0.42);
}

.step span {
  color: var(--yellow);
  font-size: 2.1rem;
  font-weight: 900;
  letter-spacing: -0.06em;
}

.gallery {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 230px;
  gap: 16px;
}

.gallery-item {
  position: relative;
  overflow: hidden;
  display: block;
  transition: transform 0.22s ease, border-color 0.22s ease;
}

.gallery-item.big {
  grid-column: span 2;
  grid-row: span 2;
}

.gallery-item.wide {
  grid-column: span 2;
}

.gallery-item:hover {
  transform: translateY(-5px);
  border-color: var(--line-green);
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s ease, filter 0.45s ease;
  filter: saturate(1.08) contrast(1.04);
}

.gallery-item:hover img {
  transform: scale(1.06);
  filter: saturate(1.22) contrast(1.08);
}

.gallery-item::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 35%, rgba(0,0,0,0.78));
  pointer-events: none;
}

.gallery-item span {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 16px;
  z-index: 2;
  color: var(--yellow);
  font-weight: 900;
  font-size: 1.05rem;
}

.cta-box {
  padding: 38px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  border-color: rgba(242, 208, 59, 0.34);
  background:
    radial-gradient(circle at 12% 25%, rgba(242,208,59,0.12), transparent 20rem),
    radial-gradient(circle at 90% 40%, rgba(58,162,255,0.10), transparent 18rem),
    linear-gradient(135deg, rgba(71,209,108,0.16), rgba(12,14,11,0.94));
}

.contact-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 40px;
  align-items: start;
}

.contact-card {
  padding: 16px;
  display: grid;
  gap: 10px;
}

.contact-card a,
.contact-card div {
  display: grid;
  gap: 4px;
  padding: 18px;
  border-radius: 16px;
  background: rgba(7, 8, 7, 0.60);
  border: 1px solid rgba(242, 208, 59, 0.15);
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.contact-card a:hover {
  border-color: var(--line-green);
  transform: translateX(4px);
}

.contact-card span {
  color: var(--muted);
  font-size: 0.9rem;
}

.contact-card strong {
  color: var(--text);
  word-break: break-word;
}

.site-footer {
  border-top: 1px solid var(--line);
  background: #030403;
}

.footer-inner {
  min-height: 86px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  color: var(--muted);
  font-size: 0.92rem;
}

.footer-inner p {
  margin: 0;
}

.floating-contact {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 90;
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border-radius: 999px;
  color: #081008;
  background: linear-gradient(135deg, var(--yellow), var(--green));
  box-shadow: 0 18px 50px rgba(71, 209, 108, 0.24);
  font-size: 1.5rem;
  animation: pulsePhone 2.4s ease-in-out infinite;
}

.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-delay {
  transition-delay: 0.14s;
}

@keyframes heroFloat {
  from { transform: scale(1.04) translateY(0); }
  to { transform: scale(1.08) translateY(-12px); }
}

@keyframes cardFloat {
  0%, 100% { transform: translateY(0) rotate(-0.3deg); }
  50% { transform: translateY(-10px) rotate(0.3deg); }
}

@keyframes scrollDot {
  0% { transform: translate(-50%, 0); opacity: 0.4; }
  50% { transform: translate(-50%, 14px); opacity: 1; }
  100% { transform: translate(-50%, 0); opacity: 0.4; }
}

@keyframes pulsePhone {
  0%, 100% { box-shadow: 0 18px 50px rgba(71, 209, 108, 0.24); }
  50% { box-shadow: 0 18px 64px rgba(242, 208, 59, 0.34); }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
  .reveal {
    opacity: 1;
    transform: none;
  }
}

@media (max-width: 960px) {
  .section {
    padding: 74px 0;
  }

  .hero {
    min-height: auto;
  }

  .hero-grid,
  .two-col,
  .contact-grid,
  .motto-grid {
    grid-template-columns: 1fr;
  }

  .hero-card {
    justify-self: start;
    max-width: none;
  }

  .cards {
    grid-template-columns: repeat(2, 1fr);
  }

  .steps {
    grid-template-columns: repeat(2, 1fr);
  }

  .gallery {
    grid-template-columns: repeat(2, 1fr);
  }

  .gallery-item.big,
  .gallery-item.wide {
    grid-column: span 2;
  }

  .cta-box {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 720px) {
  .container {
    width: min(100% - 28px, var(--container));
  }

  .menu-toggle {
    display: block;
  }

  .main-nav {
    position: absolute;
    left: 14px;
    right: 14px;
    top: 76px;
    display: none;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(7, 8, 7, 0.96);
    box-shadow: var(--shadow);
  }

  .main-nav.is-open {
    display: grid;
  }

  .main-nav a {
    padding: 12px 14px;
  }

  .logo-text small {
    display: none;
  }

  .cards,
  .steps,
  .gallery {
    grid-template-columns: 1fr;
  }

  .gallery {
    grid-auto-rows: 230px;
  }

  .gallery-item.big,
  .gallery-item.wide {
    grid-column: span 1;
    grid-row: span 1;
  }

  .hero-actions {
    display: grid;
  }

  .btn {
    width: 100%;
  }

  .photo-card {
    border-radius: 24px;
  }

  .service-card {
    min-height: auto;
  }

  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
    padding: 24px 0;
  }

  .floating-contact {
    width: 54px;
    height: 54px;
    right: 16px;
    bottom: 16px;
  }
}


/* ===== V1.5 WOW additions ===== */

.ambient-orbs {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: -1;
}

.ambient-orbs span {
  position: absolute;
  width: 34rem;
  height: 34rem;
  border-radius: 999px;
  filter: blur(70px);
  opacity: 0.18;
  animation: orbMove 18s ease-in-out infinite alternate;
}

.ambient-orbs span:nth-child(1) {
  left: -12rem;
  top: 6rem;
  background: var(--green);
}

.ambient-orbs span:nth-child(2) {
  right: -10rem;
  top: 18rem;
  background: var(--blue);
  animation-delay: 2s;
}

.ambient-orbs span:nth-child(3) {
  left: 30%;
  bottom: -18rem;
  background: var(--yellow);
  animation-delay: 4s;
}

.trust-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 26px;
  max-width: 720px;
}

.trust-strip div {
  padding: 16px 18px;
  border: 1px solid rgba(242, 208, 59, 0.18);
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(71,209,108,0.14), rgba(58,162,255,0.06)),
    rgba(12, 14, 11, 0.68);
  box-shadow: 0 18px 42px rgba(0,0,0,0.20);
}

.trust-strip strong {
  display: block;
  color: var(--yellow);
  font-size: 1.04rem;
  line-height: 1.2;
}

.trust-strip span {
  display: block;
  color: #e8e8df;
  font-size: 0.92rem;
}

.specialty-band {
  overflow: hidden;
  border-top: 1px solid rgba(242, 208, 59, 0.16);
  border-bottom: 1px solid rgba(71, 209, 108, 0.18);
  background:
    linear-gradient(90deg, rgba(71,209,108,0.12), rgba(242,208,59,0.10), rgba(58,162,255,0.10));
  mask-image: linear-gradient(90deg, transparent, black 8%, black 92%, transparent);
}

.specialty-track {
  display: flex;
  width: max-content;
  gap: 14px;
  padding: 16px 0;
  animation: marquee 38s linear infinite;
}

.specialty-track span {
  white-space: nowrap;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 999px;
  padding: 8px 14px;
  color: #f7f7ef;
  background: rgba(7, 8, 7, 0.45);
  font-size: 0.92rem;
  font-weight: 700;
}

.why {
  background:
    radial-gradient(circle at 10% 10%, rgba(58,162,255,0.10), transparent 24rem),
    linear-gradient(180deg, rgba(7,8,7,0.0), rgba(23,32,20,0.34), rgba(7,8,7,0.0));
}

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

.why-card {
  position: relative;
  overflow: hidden;
  padding: 28px;
  min-height: 245px;
  border: 1px solid rgba(242, 208, 59, 0.18);
  border-radius: var(--radius);
  background:
    linear-gradient(160deg, rgba(71,209,108,0.14), rgba(58,162,255,0.08) 52%, rgba(242,208,59,0.08)),
    rgba(12,14,11,0.92);
  box-shadow: 0 18px 56px rgba(0, 0, 0, 0.25);
  transition: transform 0.24s ease, border-color 0.24s ease, box-shadow 0.24s ease;
}

.why-card::before {
  content: "";
  position: absolute;
  inset: -80px;
  background: conic-gradient(from 120deg, transparent, rgba(242,208,59,0.13), transparent, rgba(71,209,108,0.13), transparent);
  opacity: 0;
  transition: opacity 0.24s ease;
}

.why-card:hover {
  transform: translateY(-6px);
  border-color: rgba(71, 209, 108, 0.45);
  box-shadow: 0 30px 88px rgba(0, 0, 0, 0.34);
}

.why-card:hover::before {
  opacity: 1;
  animation: cardGlow 3.8s linear infinite;
}

.why-card > * {
  position: relative;
  z-index: 2;
}

.why-card span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  margin-bottom: 18px;
  border-radius: 16px;
  color: #081008;
  background: linear-gradient(135deg, var(--yellow), var(--green));
  font-weight: 900;
}

.why-card p {
  color: var(--muted);
}

.service-card,
.gallery-item,
.photo-card,
.step,
.contact-card,
.cta-box {
  transform-style: preserve-3d;
}

.service-card:hover img,
.photo-card:hover img {
  filter: saturate(1.22) contrast(1.08) brightness(1.04);
}

.service-card::after,
.photo-card::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(120deg, transparent 0%, rgba(255,255,255,0.10) 40%, transparent 62%);
  transform: translateX(-120%);
  transition: transform 0.7s ease;
}

.service-card:hover::after,
.photo-card:hover::before {
  transform: translateX(120%);
}

.contact-card a,
.contact-card div {
  position: relative;
  overflow: hidden;
}

.contact-card a::after {
  content: "→";
  position: absolute;
  right: 18px;
  top: 50%;
  transform: translate(12px, -50%);
  opacity: 0;
  color: var(--yellow);
  font-weight: 900;
  transition: 0.2s ease;
}

.contact-card a:hover::after {
  opacity: 1;
  transform: translate(0, -50%);
}

.btn-primary {
  position: relative;
  overflow: hidden;
}

.btn-primary::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent, rgba(255,255,255,0.38), transparent);
  transform: translateX(-120%);
  transition: transform 0.55s ease;
}

.btn-primary:hover::after {
  transform: translateX(120%);
}

@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

@keyframes orbMove {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to { transform: translate3d(4rem, -2rem, 0) scale(1.08); }
}

@keyframes cardGlow {
  to { transform: rotate(360deg); }
}

@media (max-width: 960px) {
  .trust-strip,
  .why-grid {
    grid-template-columns: 1fr;
  }

  .trust-strip {
    max-width: none;
  }
}

@media (max-width: 720px) {
  .specialty-track {
    animation-duration: 28s;
  }

  .ambient-orbs span {
    width: 22rem;
    height: 22rem;
  }
}


