/* ============================================================
   REFLEXTA — MAIN STYLESHEET
   ============================================================ */


/* ------------------------------------------------------------
   1. CUSTOM PROPERTIES
   ------------------------------------------------------------ */

:root {
  /* Colours */
  --bg:          #0C0D0F;
  --surface:     #141619;
  --border:      #26282C;
  --text:        #E6E4E0;
  --muted:       #8A8985;
  --accent:      #FF9500;
  --accent-dim:  #C97600;
  --blue:        #1E90FF;

  /* Typography */
  --font-heading: 'Space Grotesk', sans-serif;
  --font-body:    'IBM Plex Sans', sans-serif;

  /* Layout */
  --max-width:      1200px;
  --pad-inline:     24px;
  --section-pad:    140px;
}


/* ------------------------------------------------------------
   2. RESET & BASE
   ------------------------------------------------------------ */

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  overflow-x: hidden;
  max-width: 100%;
}

body {
  background-color: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  max-width: 100%;
}

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

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

ul {
  list-style: none;
}

address {
  font-style: normal;
}

/* Skip navigation link — keyboard users */
.skip-link {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 9999;
  padding: 12px 24px;
  background-color: var(--accent);
  color: var(--bg);
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  transform: translateY(-100%);
  transition: transform 150ms ease-out;
}

.skip-link:focus {
  transform: translateY(0);
}

/* Visible focus ring — keyboard nav */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}


/* ------------------------------------------------------------
   3. UTILITIES
   ------------------------------------------------------------ */

.container {
  width: 100%;
  max-width: var(--max-width);
  margin-inline: auto;
  padding-inline: var(--pad-inline);
}

/* Section wrapper — default dark bg */
.section {
  padding-block: var(--section-pad);
}

/* Micro-label */
.micro-label {
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 28px;
}

.micro-label--accent {
  color: var(--accent);
}

/* Text column constraint */
.text-column p {
  max-width: 64ch;
  font-size: 17px;
  color: var(--muted);
  line-height: 1.75;
  margin-bottom: 32px;
}

.text-column p:last-child {
  margin-bottom: 0;
}

/* Arrow link */
.link-arrow {
  display: inline-block;
  color: var(--accent);
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 500;
  background-image: linear-gradient(currentColor, currentColor);
  background-size: 0% 1px;
  background-repeat: no-repeat;
  background-position: left bottom;
  transition: color 200ms ease-out, background-size 200ms ease-out;
}

.link-arrow:hover,
.link-arrow:focus-visible {
  color: var(--accent-dim);
  background-size: 100% 1px;
}

/* Primary button */
.btn-primary {
  display: inline-block;
  background-color: var(--accent);
  color: var(--bg);
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 600;
  padding: 14px 32px;
  letter-spacing: 0.01em;
  transition: background-color 200ms ease-out, transform 200ms ease-out;
}

.btn-primary:hover,
.btn-primary:focus-visible {
  background-color: var(--accent-dim);
  transform: translateY(-2px);
}

.btn-primary:active {
  transform: translateY(0);
}


/* ------------------------------------------------------------
   4. HEADER
   ------------------------------------------------------------ */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: var(--bg);
  border-bottom: 1px solid var(--border);
  transition: background-color 300ms ease-out;
}

.site-header.is-scrolled {
  background-color: rgba(12, 13, 15, 0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: var(--max-width);
  margin-inline: auto;
  padding-inline: var(--pad-inline);
  height: 72px;
}

.site-logo img {
  height: 34px;
  width: auto;
}

/* Desktop nav */
.nav-desktop {
  display: flex;
  align-items: center;
  gap: 40px;
}

.nav-desktop a {
  font-family: var(--font-body);
  font-size: 15px;
  color: var(--muted);
  background-image: linear-gradient(currentColor, currentColor);
  background-size: 0% 1px;
  background-repeat: no-repeat;
  background-position: left bottom;
  transition: color 200ms ease-out, background-size 200ms ease-out;
}

.nav-desktop a:hover,
.nav-desktop a:focus-visible {
  color: var(--text);
  background-size: 100% 1px;
}

/* Hamburger button — hidden on desktop */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  padding: 8px;
  background: none;
  border: none;
  cursor: pointer;
}

.hamburger span {
  display: block;
  width: 100%;
  height: 1.5px;
  background-color: var(--text);
  border-radius: 1px;
  transition: transform 280ms ease-out, opacity 200ms ease-out;
}

/* Animated X state */
.hamburger[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(6.5px) rotate(45deg);
}
.hamburger[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}
.hamburger[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-6.5px) rotate(-45deg);
}

/* Mobile nav — hidden by default */
.nav-mobile {
  display: none;
  flex-direction: column;
  border-top: 1px solid var(--border);
  background-color: var(--bg);
}

.nav-mobile.is-open {
  display: flex;
}

.nav-mobile a {
  display: block;
  padding: 18px var(--pad-inline);
  font-family: var(--font-body);
  font-size: 16px;
  color: var(--text);
  border-bottom: 1px solid var(--border);
  transition: color 200ms ease-out;
}

.nav-mobile a:last-child {
  border-bottom: none;
}

.nav-mobile a:hover,
.nav-mobile a:focus-visible {
  color: var(--accent);
}


/* ------------------------------------------------------------
   5. HERO
   ------------------------------------------------------------ */

.hero {
  background-color: var(--bg);
  position: relative;
  overflow: hidden;
}

/* Ambient glow behind the mark */
.hero::before {
  content: "";
  position: absolute;
  top: -15%; right: -8%;
  width: 520px; height: 520px;
  background: radial-gradient(circle, rgba(255,149,0,0.10) 0%, rgba(255,149,0,0) 70%);
  filter: blur(50px);
  pointer-events: none;
  z-index: 0;
}

/* Faint logo mark as background texture */
.hero-mark-bg {
  position: absolute;
  top: 50%; right: -12%;
  width: 60%; max-width: 640px;
  transform: translateY(-50%) rotate(-4deg);
  opacity: 0.07;
  pointer-events: none;
  z-index: 0;
  animation: hero-mark-drift 8s ease-in-out infinite;
}

@keyframes hero-mark-drift {
  0%, 100% { transform: translateY(-50%) rotate(-4deg); }
  50%       { transform: translateY(calc(-50% + 15px)) rotate(-4deg); }
}

/* Text content sits above the background elements */
.hero .container {
  position: relative;
  z-index: 1;
}

@media (prefers-reduced-motion: reduce) {
  .hero-mark-bg {
    animation: none;
  }
}

/* Orange rule above micro-label */
.hero-label::before {
  content: '';
  display: block;
  width: 40px;
  height: 1px;
  background-color: var(--accent);
  margin-bottom: 20px;
}

.hero-heading {
  font-family: var(--font-heading);
  font-size: clamp(36px, 5vw, 68px);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.02em;
  color: var(--text);
  max-width: 820px;
  margin-bottom: 48px;
}

.hero-body {
  font-size: 18px;
  color: var(--muted);
  line-height: 1.75;
  max-width: 60ch;
  margin-bottom: 56px;
}


/* ------------------------------------------------------------
   6. SERVICES
   ------------------------------------------------------------ */

.services {
  background-color: var(--surface);
}

.services-heading {
  font-family: var(--font-heading);
  font-size: clamp(24px, 3vw, 38px);
  font-weight: 600;
  line-height: 1.2;
  max-width: 26ch;
  margin-bottom: 72px;
}

.service-list {
  border-top: 1px solid var(--border);
}

.service-item {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 48px;
  align-items: start;
  padding-block: 48px;
  border-bottom: 1px solid var(--border);
}

.service-name {
  font-family: var(--font-heading);
  font-size: 17px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.35;
  padding-left: 16px;
  border-left: 3px solid var(--accent);
}

.service-desc {
  font-size: 16px;
  color: var(--muted);
  line-height: 1.75;
  max-width: 56ch;
}


/* ------------------------------------------------------------
   7. CASE STUDY
   ------------------------------------------------------------ */

.case-study {
  background-color: var(--bg);
}

.case-study-heading {
  font-family: var(--font-heading);
  font-size: clamp(28px, 3.5vw, 48px);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.015em;
  max-width: 22ch;
  margin-bottom: 56px;
}

.case-study-body {
  margin-bottom: 0;
}

.case-study-body p {
  font-size: 17px;
  color: var(--muted);
  line-height: 1.75;
  max-width: 64ch;
  margin-bottom: 32px;
}

.case-study-body p:last-child {
  margin-bottom: 0;
}

/* Fact strip */
.fact-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1px;
  background-color: var(--border);
  margin-top: 80px;
  margin-bottom: 56px;
}

.fact {
  background-color: var(--surface);
  padding: 40px 36px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.fact-number {
  font-family: var(--font-heading);
  font-size: clamp(28px, 3vw, 40px);
  font-weight: 700;
  color: var(--text);
  line-height: 1;
}

.fact-label {
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}


/* ------------------------------------------------------------
   8. AFTER GO-LIVE
   ------------------------------------------------------------ */

.after-golive {
  background-color: var(--surface);
  border-top: 1px solid var(--border);
}

.after-golive-heading {
  font-family: var(--font-heading);
  font-size: clamp(32px, 4vw, 56px);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.02em;
  max-width: 18ch;
  margin-bottom: 64px;
}


/* ------------------------------------------------------------
   9. ABOUT BRIEF
   ------------------------------------------------------------ */

.about-brief {
  background-color: var(--bg);
}

.about-brief-heading {
  font-family: var(--font-heading);
  font-size: clamp(24px, 3vw, 38px);
  font-weight: 600;
  line-height: 1.2;
  max-width: 24ch;
  margin-bottom: 56px;
}

.about-brief .link-arrow {
  margin-top: 40px;
}


/* ------------------------------------------------------------
   10. FOOTER
   ------------------------------------------------------------ */

.site-footer {
  background-color: var(--surface);
  border-top: 1px solid var(--border);
  padding-top: 72px;
  padding-bottom: 48px;
}

.footer-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  padding-bottom: 64px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 40px;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.footer-nav {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.footer-nav a {
  font-family: var(--font-body);
  font-size: 15px;
  color: var(--muted);
  background-image: linear-gradient(currentColor, currentColor);
  background-size: 0% 1px;
  background-repeat: no-repeat;
  background-position: left bottom;
  transition: color 200ms ease-out, background-size 200ms ease-out;
}

.footer-nav a:hover,
.footer-nav a:focus-visible {
  color: var(--blue);
  background-size: 100% 1px;
}

.footer-contact {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-contact p {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.7;
}

.footer-contact a {
  color: var(--muted);
  background-image: linear-gradient(currentColor, currentColor);
  background-size: 0% 1px;
  background-repeat: no-repeat;
  background-position: left bottom;
  transition: color 200ms ease-out, background-size 200ms ease-out;
}

.footer-contact a:hover,
.footer-contact a:focus-visible {
  color: var(--blue);
  background-size: 100% 1px;
}

.footer-bottom p {
  font-size: 13px;
  color: var(--muted);
}


/* ------------------------------------------------------------
   11. INNER PAGES
   ------------------------------------------------------------ */

/* Current page nav indicator */
.nav-desktop a[aria-current="page"],
.nav-mobile  a[aria-current="page"] {
  color: var(--text);
}

/* Section background utility for inner pages */
.section--surface {
  background-color: var(--surface);
}

/* Page header — top section on inner pages */
.page-header {
  background-color: var(--bg);
  border-bottom: 1px solid var(--border);
}

.page-header-heading {
  font-family: var(--font-heading);
  font-size: clamp(28px, 3.5vw, 48px);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.02em;
  max-width: 680px;
  margin-bottom: 24px;
}

.page-header-body {
  font-size: 17px;
  color: var(--muted);
  line-height: 1.75;
  max-width: 58ch;
}

/* Section headings on inner pages */
.inner-heading {
  font-family: var(--font-heading);
  font-size: clamp(24px, 2.8vw, 36px);
  font-weight: 600;
  line-height: 1.2;
  margin-bottom: 48px;
}

/* Module / capability tag list */
.feature-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  margin-top: 48px;
  padding-top: 32px;
  border-top: 1px solid var(--border);
  list-style: none;
}

.feature-list li {
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

/* CTA block at the bottom of inner pages */
.cta-heading {
  font-family: var(--font-heading);
  font-size: clamp(24px, 3vw, 38px);
  font-weight: 600;
  line-height: 1.2;
  margin-bottom: 24px;
  max-width: 22ch;
}

.cta-body {
  font-size: 17px;
  color: var(--muted);
  line-height: 1.75;
  max-width: 58ch;
  margin-bottom: 48px;
}

/* Contact page */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
}

.contact-block {
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.contact-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.contact-label {
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 8px;
}

.contact-item a,
.contact-item p {
  font-size: 16px;
  color: var(--text);
  line-height: 1.7;
}

.contact-item a {
  transition: color 200ms ease-out;
}

.contact-item a:hover,
.contact-item a:focus-visible {
  color: var(--blue);
}


/* ------------------------------------------------------------
   12. SCROLL REVEAL
   ------------------------------------------------------------ */

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 400ms ease-out, transform 400ms ease-out;
}

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

.reveal[data-delay="1"] { transition-delay: 100ms; }
.reveal[data-delay="2"] { transition-delay: 200ms; }
.reveal[data-delay="3"] { transition-delay: 300ms; }

/* Immediately show all reveal elements under reduced motion */
@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}


/* ------------------------------------------------------------
   13. RESPONSIVE
   ------------------------------------------------------------ */

@media (max-width: 767px) {

  :root {
    --section-pad: 72px;
    --pad-inline:  20px;
  }

  /* Header */
  .nav-desktop {
    display: none;
  }

  .hamburger {
    display: flex;
  }

  /* Hero body: reduce font size */
  .hero-body {
    font-size: 16px;
  }

  /* Services: stack name + desc, scale back desktop increases */
  .services-heading {
    margin-bottom: 40px;
  }

  .service-item {
    grid-template-columns: 1fr;
    gap: 16px;
    padding-block: 28px;
  }

  .service-desc {
    max-width: 100%;
  }

  /* Case study: scale back heading and fact-strip margins */
  .case-study-heading {
    margin-bottom: 32px;
  }

  /* Fact strip: stack vertically, scale back margins */
  .fact-strip {
    grid-template-columns: 1fr;
    margin-top: 48px;
    margin-bottom: 40px;
  }

  .fact {
    padding: 32px 24px;
  }

  /* After go-live: scale back heading gap */
  .after-golive-heading {
    margin-bottom: 40px;
  }

  /* About: scale back heading gap */
  .about-brief-heading {
    margin-bottom: 36px;
  }

  /* Footer: stack columns */
  .footer-inner {
    grid-template-columns: 1fr;
    gap: 48px;
    padding-bottom: 48px;
  }

  /* Contact page: stack columns */
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 48px;
  }
}

/* Tablet and up — heading sizes and nav reset */
@media (min-width: 768px) {
  .nav-mobile {
    display: none !important;
  }

  /* Heading clamp floor raised: at 768px 3vw = 23px < 24px minimum,
     so headings were stuck at 24px from 375px through 800px.
     New values produce 30px at 768px and reach 38px at ~1190px. */
  .services-heading,
  .about-brief-heading {
    font-size: clamp(30px, 3.2vw, 38px);
  }

  /* Inner page section headings — same fix applied */
  .inner-heading {
    font-size: clamp(28px, 2.8vw, 36px);
  }
}

/* Wide desktop — restore wider footer column gap */
@media (min-width: 1100px) {
  .footer-inner {
    gap: 80px;
  }
}


/* ------------------------------------------------------------
   14. WHATSAPP FLOAT
   ------------------------------------------------------------ */

.whatsapp-float {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background-color: #25D366;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
  transition: transform 150ms ease-out, box-shadow 150ms ease-out;
}

.whatsapp-float:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.45);
}

/* White outline on focus — green bg makes orange outline hard to see */
.whatsapp-float:focus-visible {
  transform: scale(1.05);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.45);
  outline: 2px solid #fff;
  outline-offset: 3px;
}

@media (max-width: 480px) {
  .whatsapp-float {
    bottom: 16px;
    right: 16px;
    width: 48px;
    height: 48px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .whatsapp-float:hover,
  .whatsapp-float:focus-visible {
    transform: none;
  }
}
