/* =============================================================
   NEXTONE CONSTRUCTIONS PVT LTD — Shared Design System
   Palette: Corporate Blue #1A365D | Engineering Orange #DD6B20
            Slate Charcoal #2D3748 | Off-White #F7FAFC
   Font: Inter
   ============================================================= */

/* ---------- Design Tokens ---------- */
:root {
  --blue: #1A365D;
  --blue-700: #142a4a;
  --blue-900: #0f2038;
  --orange: #DD6B20;
  --orange-600: #c25a16;
  --charcoal: #2D3748;
  --offwhite: #F7FAFC;
  --white: #ffffff;
  --gray-100: #edf2f7;
  --gray-200: #e2e8f0;
  --gray-300: #cbd5e0;
  --gray-500: #718096;
  --gray-600: #4a5568;
  --text: #2D3748;
  --muted: #5b6676;

  --radius: 10px;
  --radius-lg: 16px;
  --shadow-sm: 0 1px 3px rgba(16, 24, 40, 0.08);
  --shadow: 0 6px 18px rgba(16, 24, 40, 0.10);
  --shadow-lg: 0 18px 40px rgba(16, 24, 40, 0.16);

  --container: 1200px;
  --header-h: 84px;

  --ff: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  --transition: 0.25s ease;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--ff);
  color: var(--text);
  background: var(--white);
  line-height: 1.6;
  font-size: 16px;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; height: auto; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; padding: 0; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
h1, h2, h3, h4 { line-height: 1.2; color: var(--blue); font-weight: 800; letter-spacing: -0.01em; }

/* ---------- Layout helpers ---------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 20px;
}
.section { padding: 72px 0; }
.section--tight { padding: 48px 0; }
.section--alt { background: var(--offwhite); }
.section__head { max-width: 760px; margin: 0 auto 48px; text-align: center; }
.eyebrow {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--orange);
  margin-bottom: 12px;
}
.section__title { font-size: clamp(1.6rem, 3.4vw, 2.4rem); }
.section__sub { color: var(--muted); margin-top: 14px; font-size: 1.05rem; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 26px;
  border-radius: var(--radius);
  font-weight: 700;
  font-size: 0.95rem;
  transition: var(--transition);
  white-space: nowrap;
}
.btn--primary { background: var(--orange); color: #fff; box-shadow: 0 6px 16px rgba(221, 107, 32, 0.3); }
.btn--primary:hover { background: var(--orange-600); transform: translateY(-2px); }
.btn--blue { background: var(--blue); color: #fff; }
.btn--blue:hover { background: var(--blue-700); transform: translateY(-2px); }
.btn--ghost { background: transparent; color: #fff; border: 2px solid rgba(255,255,255,0.7); }
.btn--ghost:hover { background: #fff; color: var(--blue); }
.btn--outline { background: transparent; color: var(--blue); border: 2px solid var(--blue); }
.btn--outline:hover { background: var(--blue); color: #fff; }
.btn--block { width: 100%; }

/* =============================================================
   TOP BAR
   ============================================================= */
.topbar {
  background: var(--blue-900);
  color: #cdd7e6;
  font-size: 0.82rem;
}
.topbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 40px;
  gap: 16px;
  flex-wrap: wrap;
}
.topbar__contact { display: flex; gap: 20px; flex-wrap: wrap; }
.topbar__contact a { display: inline-flex; align-items: center; gap: 6px; transition: var(--transition); }
.topbar__contact a:hover { color: var(--orange); }
.topbar__tag { color: #9fb0c7; font-weight: 500; }

/* =============================================================
   HEADER / NAV
   Left: blue container with logo + ISO badge
   Right: brand text + nav
   ============================================================= */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: #fff;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}
.header.is-scrolled { box-shadow: var(--shadow); }
.header__inner {
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  min-height: var(--header-h);
  gap: 20px;
}

/* Left: brand block (logo only, no container) */
.brandblock {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 8px 0;
  position: relative;
  flex: none;
}
.brandblock__logo {
  height: 76px;
  width: auto;
}

/* Brand text next to logo */
.brandtext { display: flex; flex-direction: column; justify-content: center; line-height: 1.15; }
.brandtext strong { font-size: 1.42rem; font-weight: 800; color: var(--blue); letter-spacing: -0.015em; }
.brandtext strong .cap { color: var(--orange); }
.brandtext small { font-size: 0.78rem; color: var(--orange); font-weight: 700; letter-spacing: 0.02em; font-style: italic; margin-top: 2px; }

/* Right side: nav + ISO badge */
.header__right {
  display: flex;
  align-items: center;
  gap: 28px;
  flex: 1;
  justify-content: flex-end;
}

.nav { display: flex; align-items: center; gap: 4px; }
.nav__link {
  padding: 10px 14px;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--charcoal);
  border-radius: 8px;
  transition: var(--transition);
  position: relative;
}
.nav__link:hover { color: var(--blue); background: var(--gray-100); }
.nav__link.is-active { color: var(--orange); }
.nav__link.is-active::after {
  content: "";
  position: absolute;
  left: 14px; right: 14px; bottom: 4px;
  height: 2px;
  background: var(--orange);
  border-radius: 2px;
}
.nav__cta {
  background: var(--orange);
  color: #fff !important;
  margin-left: 8px;
}
.nav__cta:hover { background: var(--orange-600); }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px; height: 44px;
  border-radius: 8px;
}
.nav-toggle span {
  display: block; width: 24px; height: 2px;
  background: var(--blue); border-radius: 2px;
  transition: var(--transition);
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* =============================================================
   FOOTER  (mirrors nexTonecodes reference layout)
   ============================================================= */
.footer { background: #fff; color: var(--charcoal); border-top: 1px solid var(--gray-200); }
.footer__inner {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr 1fr 1.2fr;
  gap: 32px;
  padding: 56px 20px 44px;
  align-items: start;
}
.footer__brand img { max-height: 118px; width: auto; }

.footer__col h4 { color: var(--blue); font-size: 1.1rem; font-weight: 800; margin-bottom: 20px; }
.footer__col a { display: block; padding: 7px 0; color: var(--gray-600); font-size: 0.95rem; transition: var(--transition); }
.footer__col a:hover { color: var(--orange); transform: translateX(3px); }

.footer__parent h4 { color: var(--blue); font-size: 1.1rem; font-weight: 800; margin-bottom: 20px; }
.footer__parent-logo img { max-height: 96px; width: auto; }

/* Registered-with strip */
.footer__reg { border-top: 1px solid var(--gray-200); }
.footer__reg-inner {
  display: flex; align-items: center; gap: 26px;
  padding: 24px 20px; flex-wrap: wrap;
}
.footer__reg-label { color: var(--blue); font-weight: 700; font-size: 1rem; }
.reg-badges { display: flex; align-items: center; gap: 30px; flex-wrap: wrap; }
.reg-badges img { max-height: 46px; width: auto; filter: grayscale(0.1); opacity: 0.95; }

/* Connect strip */
.footer__connect { border-top: 1px solid var(--gray-200); }
.footer__connect-inner { display: flex; align-items: center; gap: 20px; padding: 20px; flex-wrap: wrap; }
.footer__connect-label { color: var(--blue); font-weight: 700; }
.footer__social { display: flex; gap: 18px; align-items: center; }
.footer__social a {
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--charcoal); transition: var(--transition);
}
.footer__social a svg { width: 22px; height: 22px; display: block; }
.footer__social a:hover { color: var(--blue); transform: translateY(-2px); }

/* Bottom bar */
.footer__bar { background: var(--blue-900); color: #c7d2e2; font-size: 0.85rem; }
.footer__bar .container { display: flex; align-items: center; justify-content: space-between; padding-block: 16px; gap: 12px; flex-wrap: wrap; }
.footer__bar-links { display: flex; gap: 18px; }
.footer__bar-links a:hover { color: var(--orange); }

/* =============================================================
   REVEAL ANIMATION
   ============================================================= */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1 !important; transform: none !important; }
  html { scroll-behavior: auto; }
}

/* =============================================================
   BACK TO TOP
   ============================================================= */
.to-top {
  position: fixed; right: 22px; bottom: 22px;
  width: 48px; height: 48px; border-radius: 50%;
  background: var(--orange); color: #fff; font-size: 1.3rem;
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow); opacity: 0; visibility: hidden;
  transform: translateY(10px); transition: var(--transition); z-index: 90;
}
.to-top.is-visible { opacity: 1; visibility: visible; transform: none; }
.to-top:hover { background: var(--orange-600); }

/* =============================================================
   RESPONSIVE — mobile-first breakpoints
   ============================================================= */
@media (max-width: 980px) {
  .footer__inner { grid-template-columns: repeat(3, 1fr); }
  .footer__brand { grid-column: 1 / -1; }
  .header__right { gap: 16px; }
}

@media (max-width: 860px) {
  .nav-toggle { display: flex; }
  .nav {
    position: fixed;
    top: var(--header-h); left: 0; right: 0;
    background: #fff;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 10px 16px 20px;
    box-shadow: var(--shadow-lg);
    transform: translateY(-150%);
    transition: transform 0.3s ease;
    max-height: calc(100vh - var(--header-h));
    overflow-y: auto;
  }
  .nav.is-open { transform: translateY(0); }
  .nav__link { padding: 14px 10px; border-bottom: 1px solid var(--gray-100); }
  .nav__link.is-active::after { display: none; }
  .nav__cta { margin: 10px 0 0; text-align: center; }
}

@media (max-width: 640px) {
  .section { padding: 52px 0; }
  .footer__inner { grid-template-columns: 1fr; gap: 28px; }
  .brandblock { padding: 6px 0; gap: 10px; }
  .brandblock__logo { height: 58px; }
  .brandtext strong { font-size: 1.05rem; }
  .brandtext small { font-size: 0.68rem; }
  .topbar__contact { gap: 12px; font-size: 0.76rem; }
  .footer__bar .container { flex-direction: column; text-align: center; }
}


/* =============================================================
   MOBILE DISPLAY POLISH (added) — header, nav, topbar, footer
   Scoped to small screens; desktop view unchanged.
   ============================================================= */

/* Large phone / small tablet */
@media (max-width: 860px) {
  /* Keep header on one tidy row */
  .header__inner { gap: 12px; align-items: center; }
  .header__right { gap: 10px; }
  /* Mobile menu rows: comfortable tap targets */
  .nav__link { padding: 16px 12px; font-size: 1rem; }
  .nav__cta { padding: 14px; font-size: 1rem; }
  /* Topbar: drop the slogan tag, keep contact info */
  .topbar__tag { display: none; }
}

/* Phones */
@media (max-width: 640px) {
  /* Topbar can wrap to show phone/email without crowding */
  .topbar__inner { justify-content: center; }
  .topbar__contact { justify-content: center; flex-wrap: wrap; }
  /* Brand text sizing */
  .brandtext strong { font-size: 1rem; line-height: 1.1; }
  .brandtext small { font-size: 0.66rem; }
  .brandblock__logo { height: 52px; }
  /* Footer links: a bit more breathing room when stacked */
  .footer__inner { text-align: left; }
  .reg-badges { gap: 20px; justify-content: center; }
  .footer__reg-inner, .footer__connect-inner { justify-content: center; text-align: center; }
}

/* Very small phones */
@media (max-width: 400px) {
  /* Hide only the e-mail in the topbar to prevent overflow; keep phones */
  .topbar__contact a:last-child { display: none; }
  /* Hide the slogan line under the brand name to avoid crowding the hamburger */
  .brandtext small { display: none; }
  .brandtext strong { font-size: 0.95rem; }
  .brandblock__logo { height: 46px; }
}
