/* ═══════════════════════════════════════════════════════════════
   RAMBHA TECHNOLOGIES — Design System Implementation
   Based on DESIGN.md: "The Architectural Core"
   ═══════════════════════════════════════════════════════════════ */

/* ────────── RESET ────────── */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* ────────── DESIGN TOKENS ────────── */
:root {
  /* Color Palette — Material 3 inspired */
  --primary:                    #041920;
  --primary-container:          #1a2e35;
  --primary-fixed:              #d0e6ef;
  --primary-fixed-dim:          #b4cad3;
  --on-primary:                 #ffffff;
  --on-primary-container:       #81969e;
  --on-primary-fixed-variant:   #364a51;

  --secondary:                  #855300;
  --secondary-container:        #fea619;
  --secondary-fixed:            #ffddb8;
  --secondary-fixed-dim:        #ffb95f;
  --on-secondary:               #ffffff;

  --surface:                    #f2fbff;
  --surface-container-low:      #e4f7ff;
  --surface-container:          #dcf1fb;
  --surface-container-high:     #d6ecf5;
  --surface-container-highest:  #d0e6ef;
  --surface-container-lowest:   #ffffff;
  --surface-bright:             #f2fbff;

  --on-surface:                 #091e25;
  --on-surface-variant:         #42484a;
  --outline:                    #73787a;
  --outline-variant:            #c2c7ca;
  --inverse-surface:            #1f333a;
  --inverse-on-surface:         #def4fe;

  --error:                      #ba1a1a;

  /* Typography */
  --font-headline: 'Manrope', sans-serif;
  --font-body:     'Inter', sans-serif;

  /* Elevation — Ambient Shadows (no heavy drop shadows) */
  --shadow-ambient: 0 0 24px rgba(9, 30, 37, 0.06);

  /* Radii — "Professional & Modern" */
  --radius-sm:   0.25rem;
  --radius-default: 0.5rem;
  --radius-lg:   0.75rem;
  --radius-xl:   1rem;
  --radius-full: 9999px;

  /* Transitions */
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Material Symbols config */
.material-symbols-outlined {
  font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  color: var(--on-surface);
  background: var(--surface);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  /* Fit the page exactly to viewport height */
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

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

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

/* ═══════════════════════════════════════════════════════════════
   BUTTONS — Per Design Spec §5
   ═══════════════════════════════════════════════════════════════ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-headline);
  font-weight: 700;
  font-size: 0.8125rem;
  border: none;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
}

/* Primary: solid secondary, on-secondary text, full roundedness */
.btn--primary {
  background: var(--secondary);
  color: var(--on-secondary);
  padding: 10px 24px;
  border-radius: var(--radius-full);
  box-shadow: 0 4px 16px rgba(133, 83, 0, 0.2);
}

.btn--primary:hover {
  transform: scale(1.02);
  box-shadow: 0 8px 28px rgba(133, 83, 0, 0.3);
}

.btn--primary:active {
  transform: scale(0.97);
}

/* Secondary: surface-container-highest bg, primary text, no border */
.btn--secondary {
  background: var(--surface-container-highest);
  color: var(--primary);
  padding: 10px 24px;
  border-radius: var(--radius-full);
}

.btn--secondary:hover {
  transform: scale(1.02);
  box-shadow: var(--shadow-ambient);
}

/* ═══════════════════════════════════════════════════════════════
   NAVBAR — Glassmorphism floating bar (Design Spec §5 Navigation)
   ═══════════════════════════════════════════════════════════════ */

.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  /* Glassmorphism: surface-container-lowest at 80% + 20px blur */
  background: rgba(255, 255, 255, 0.80);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  /* No borders — tonal transition creates separation */
  /* Subtle ambient shadow for float effect */
  box-shadow: 0 1px 12px rgba(9, 30, 37, 0.05);
}

.navbar__inner {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 48px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 64px;
  height: 56px;
}

/* Logo — far left */
.navbar__logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.navbar__logo-img {
  height: 32px;
  width: auto;
}

/* Left group: links + CTA */
.navbar__right {
  display: flex;
  align-items: center;
  gap: 28px;
}

.navbar__links {
  display: flex;
  align-items: center;
  gap: 24px;
}

/* label-md: 0.75rem, all-caps, +0.05em tracking */
.navbar__link {
  font-family: var(--font-body);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--on-surface-variant);
  transition: color var(--transition);
  padding: 2px 0;
}

.navbar__link:hover {
  color: var(--secondary);
}

.navbar__link--active {
  color: var(--secondary);
  font-weight: 700;
  border-bottom: 2px solid var(--secondary);
  padding-bottom: 0;
}

.navbar__cta {
  font-size: 0.75rem;
  padding: 7px 18px;
  /* Outline style to match original design */
  background: transparent;
  color: var(--primary);
  border: 1.5px solid var(--primary);
  box-shadow: none;
}

.navbar__cta:hover {
  background: var(--primary);
  color: var(--on-primary);
  transform: none;
  box-shadow: none;
}

/* Hamburger (mobile) */
.navbar__hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.navbar__hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--primary);
  border-radius: 2px;
  transition: transform var(--transition), opacity var(--transition);
}

/* ═══════════════════════════════════════════════════════════════
   HERO — Full-width, left-aligned editorial text
   Tonal gradient from primary to transparent
   ═══════════════════════════════════════════════════════════════ */

.hero {
  position: relative;
  width: 100%;
  /* ~45% of viewport minus navbar */
  height: clamp(300px, 42vh, 420px);
  overflow: hidden;
  flex-shrink: 0;
}

.hero__bg {
  position: absolute;
  inset: 0;
}

.hero__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  filter: brightness(1.15);
}

/* Primary tint overlay */
.hero__tint {
  position: absolute;
  inset: 0;
  background: rgba(4, 25, 32, 0.20);
}

/* Tonal gradient: left-heavy, from primary to transparent */
.hero__gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to right,
    rgba(4, 25, 32, 0.82) 0%,
    rgba(4, 25, 32, 0.45) 35%,
    rgba(4, 25, 32, 0.10) 65%,
    transparent 100%
  );
}

.hero__content {
  position: relative;
  z-index: 2;
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 48px;
  height: 100%;
  display: flex;
  align-items: center;
}

.hero__text-block {
  max-width: 600px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* display-lg: 3.5rem, tight letter-spacing — "Editorial" impact */
.hero__title {
  font-family: var(--font-headline);
  font-size: clamp(2.2rem, 5vw, 3.5rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.08;
  color: var(--on-primary);
}

.hero__title-accent {
  color: var(--secondary-fixed-dim);
  /* Use the orange-amber but from the secondary-fixed family */
  color: #ffb95f;
}

.text-glow {
  color: #ffb95f !important;
  text-shadow: 0 0 20px rgba(133, 83, 0, 0.4);
}

/* body-lg sub-lead */
.hero__subtitle {
  font-family: var(--font-body);
  font-size: clamp(0.875rem, 1.5vw, 1.05rem);
  font-weight: 400;
  color: rgba(255, 255, 255, 0.88);
  line-height: 1.65;
  max-width: 440px;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  padding-top: 4px;
}

.hero__cta {
  font-size: 0.875rem;
  padding: 11px 28px;
}

/* Glassmorphism floating chip */
.hero__chip {
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: var(--radius-xl);
  padding: 12px 16px;
  max-width: 200px;
}

.hero__chip-head {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 4px;
}

.hero__chip-icon {
  font-size: 18px;
  color: #ffb95f;
}

.hero__chip-label {
  font-family: var(--font-headline);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--on-primary);
}

.hero__chip-text {
  font-size: 0.625rem;
  color: rgba(255, 255, 255, 0.65);
  line-height: 1.4;
}

/* ═══════════════════════════════════════════════════════════════
   SERVICES — Primary background, tonal card layering
   ═══════════════════════════════════════════════════════════════ */

.services {
  position: relative;
  background: var(--primary);
  /* flex-grow to fill remaining space */
  flex: 1;
  display: flex;
  align-items: center;
  overflow: hidden;
  padding: 48px 0;
}

/* Signature ambient glow texture (per §2 Glass & Gradient Rule) */
.services__glow {
  position: absolute;
  top: 30%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(180, 202, 211, 0.05) 0%, transparent 70%);
  pointer-events: none;
}

.services__inner {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 48px;
  width: 100%;
  position: relative;
  z-index: 2;
}

/* label-md eyebrow */
.services__eyebrow {
  display: block;
  font-family: var(--font-body);
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #ffb95f;
  margin-bottom: 6px;
}

.services__title {
  font-family: var(--font-headline);
  font-size: clamp(1.4rem, 2.5vw, 1.75rem);
  font-weight: 700;
  color: var(--on-primary);
  letter-spacing: -0.01em;
}

.services__header {
  margin-bottom: 28px;
}

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

/* ────────── Service Cards ────────── */
/* Tonal layering: primary-container on primary bg = Level 1 on Level 0 */
/* No 1px borders — use ghost border at 15% opacity max */
.svc-card {
  background: var(--primary-container);
  border: 1px solid rgba(194, 199, 202, 0.05); /* outline-variant at ~5% */
  border-radius: var(--radius-xl);
  padding: 20px;
  display: flex;
  flex-direction: column;
  transition: background var(--transition), transform var(--transition);
}

.svc-card:hover {
  background: var(--on-primary-fixed-variant);
  transform: translateY(-2px);
}

/* Icon wrap — secondary at 10% opacity bg */
.svc-card__icon-wrap {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-lg);
  background: rgba(133, 83, 0, 0.10);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
  transition: background var(--transition);
}

.svc-card:hover .svc-card__icon-wrap {
  background: rgba(133, 83, 0, 0.20);
}

.svc-card__icon {
  font-size: 20px;
  color: var(--secondary);
}

.svc-card__icon-wrap--svg {
  width: 40px;
  height: 40px;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
}

.svc-card__icon-svg {
  width: 36px;
  height: 36px;
}

.svc-card__title {
  font-family: var(--font-headline);
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--on-primary);
  margin-bottom: 8px;
}

.svc-card__text {
  font-family: var(--font-body);
  font-size: 0.6875rem;
  color: var(--on-primary-container);
  line-height: 1.55;
  margin-bottom: 14px;
  flex: 1;
}

/* Learn More — label-md style */
.svc-card__link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: var(--font-body);
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  color: #ffb95f;
  transition: gap var(--transition);
}

.svc-card__arrow {
  font-size: 14px;
  transition: transform var(--transition);
}

.svc-card__link:hover {
  gap: 8px;
}

.svc-card__link:hover .svc-card__arrow {
  transform: translateX(2px);
}

/* ═══════════════════════════════════════════════════════════════
   FOOTER — Clean, minimal
   ═══════════════════════════════════════════════════════════════ */

.footer {
  background: var(--surface-container-lowest);
  /* No 1px border — tonal shift provides separation */
  padding: 16px 0;
  flex-shrink: 0;
}

.footer__inner {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 48px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 24px;
}

.footer__brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.footer__logo {
  height: 24px;
  width: auto;
}

.footer__tagline {
  font-family: var(--font-body);
  font-size: 0.625rem;
  letter-spacing: 0.04em;
  color: var(--on-surface-variant);
  border-left: 1px solid var(--outline-variant);
  padding-left: 14px;
}

.footer__nav {
  display: flex;
  justify-content: center;
  gap: 24px;
}

.footer__link {
  font-family: var(--font-body);
  font-size: 0.625rem;
  font-weight: 500;
  color: var(--on-surface-variant);
  transition: color var(--transition);
}

.footer__link:hover {
  color: var(--secondary);
}

.footer__end {
  display: flex;
  align-items: center;
  gap: 20px;
}

.footer__socials {
  display: flex;
  gap: 10px;
}

.footer__social {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--outline-variant);
  transition: color var(--transition);
  cursor: pointer;
}

.footer__social .material-symbols-outlined {
  font-size: 16px;
}

.footer__social:hover {
  color: var(--secondary);
}

.footer__copy {
  font-family: var(--font-body);
  font-size: 0.625rem;
  letter-spacing: 0.04em;
  color: var(--outline);
  white-space: nowrap;
}

/* ═══════════════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════════════ */

@media (max-width: 1024px) {
  .services__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .navbar__inner {
    padding: 0 20px;
  }

  .navbar__right {
    display: none;
    position: absolute;
    top: 56px;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    flex-direction: column;
    padding: 16px 0;
    box-shadow: 0 8px 24px rgba(9, 30, 37, 0.08);
  }

  .navbar__right--open {
    display: flex;
  }

  .navbar__links {
    flex-direction: column;
    gap: 0;
  }

  .navbar__link {
    padding: 12px 24px;
    width: 100%;
    font-size: 0.75rem;
  }

  .navbar__link--active {
    border-bottom: none;
    background: var(--surface-container-low);
  }

  .navbar__cta {
    margin: 12px 24px;
    width: calc(100% - 48px);
    text-align: center;
  }

  .navbar__hamburger {
    display: flex;
  }

  .navbar__hamburger--open span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
  }
  .navbar__hamburger--open span:nth-child(2) {
    opacity: 0;
  }
  .navbar__hamburger--open span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
  }

  .hero {
    height: clamp(260px, 38vh, 340px);
  }

  .hero__title {
    font-size: clamp(1.8rem, 6vw, 2.5rem);
  }

  .hero__chip {
    display: none;
  }

  .hero__content {
    padding: 0 20px;
  }

  .services {
    padding: 32px 0;
  }

  .services__inner {
    padding: 0 20px;
  }

  .services__grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .footer__inner {
    grid-template-columns: 1fr;
    gap: 14px;
    text-align: center;
    padding: 0 20px;
  }

  .footer__brand {
    justify-content: center;
  }

  .footer__tagline {
    display: none;
  }

  .footer__nav {
    justify-content: center;
  }

  .footer__end {
    justify-content: center;
    flex-wrap: wrap;
  }
}

@media (max-width: 480px) {
  .hero__title {
    font-size: 1.6rem;
  }

  .hero__subtitle {
    font-size: 0.8rem;
  }
}
