/* XPHASE shared site styles
   One shared source of truth for:
   - background banner
   - glass cards
   - navigation pills
   - buttons
   - page layout
*/

:root {
  --bg: #f3f5f7;
  --surface: rgba(255,255,255,0.88);
  --surface-strong: rgba(255,255,255,0.94);
  --text: #0f172a;
  --muted: #5b6472;
  --line: rgba(15,23,42,0.08);

  --radius-xl: 32px;
  --radius-lg: 24px;
  --shadow-lg: 0 24px 80px rgba(15,23,42,0.16);

  --content-width: 1020px;

  /* Shared background image */
  --banner-image: url('xphase-tech-banner.png');

  /* Shared page/banner overlay */
  --banner-overlay-top: rgba(6,12,22,0.72);
  --banner-overlay-bottom: rgba(6,12,22,0.82);
  --banner-position: center;

  /* Shared glass-card style */
  --glass-bg: rgba(40, 90, 140, 0.16);
  --glass-border: rgba(255,255,255,0.14);
  --glass-shadow: 0 24px 70px rgba(0,0,0,0.28);
  --glass-blur: blur(12px);

  /* Shared light-card style used on index content sections */
  --light-card-bg: rgba(255,255,255,0.88);
  --light-card-border: rgba(15,23,42,0.08);
  --light-card-shadow: 0 24px 80px rgba(15,23,42,0.16);
  --light-card-blur: blur(8px);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  line-height: 1.55;
}

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

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

/* Shared banner background */

.banner-page {
  color: white;
  background:
    linear-gradient(var(--banner-overlay-top), var(--banner-overlay-bottom)),
    var(--banner-image);
  background-size: cover;
  background-position: var(--banner-position);
  background-attachment: fixed;
}

/* Index page */
.index-page {
  color: var(--text);
}

/* When the index page also has banner-page, the banner continues below the hero */
.index-page.banner-page {
  color: white;
  background:
    linear-gradient(var(--banner-overlay-top), var(--banner-overlay-bottom)),
    var(--banner-image);
  background-size: cover;
  background-position: var(--banner-position);
  background-attachment: fixed;
}

/* Header and navigation */

.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 1000;
  transition: all 0.28s ease;
}

.site-header.scrolled {
  background: rgba(255,255,255,0.06);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(255,255,255,0.08);
  box-shadow: none;
}

.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 1000;
  transition: all 0.28s ease;

  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);

  background: rgba(255,255,255,0.06);

  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.header-inner {
  width: min(var(--content-width), calc(100% - 48px));
  margin: 0 auto;
  padding: 18px 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  position: relative;
}

.nav {
  margin-left: auto;
  display: flex;
  gap: 10px;
  align-items: center;
}

.nav a,
.nav-pill {
  padding: 10px 16px;
  border-radius: 999px;
  font-size: 14px;
  color: rgba(255,255,255,0.92);
  background: rgba(7,14,28,0.24);
  border: 1px solid rgba(255,255,255,0.18);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: all 0.22s ease;
}

.nav a:hover,
.nav-pill:hover,
.button:hover {
  transform: translateY(-1px);
}

/* Shared buttons */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 18px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 600;
  transition: all 0.22s ease;
}

.button-primary {
  background: white;
  color: #0f172a;
  box-shadow: 0 8px 24px rgba(255,255,255,0.14);
}

.button-secondary {
  color: white;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.18);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

/* Shared glass-card system
   This is the single source of truth for all dark transparent cards.
*/

.hero-card,
.glass-card,
.about-page .panel,
.mini {
  border-radius: var(--radius-xl);
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  color: white;
}

/* Shared page widths */

.hero-inner,
.container,
.about-main {
  width: min(var(--content-width), calc(100% - 48px));
  margin: 0 auto;
}

/* Index hero */

.index-hero {
  position: relative;
  overflow: hidden;
}

.index-hero .hero-inner {
  position: relative;
  z-index: 1;
  padding: 140px 0 60px;
  display: flex;
  align-items: flex-start;
}

.index-hero .hero-card {
  width: 100%;
  padding: 38px;
  border-radius: 34px;
}

.main-logo {
  width: 370px;
  margin-bottom: 15px;
  opacity: 0.95;
}

.eyebrow {
  margin: 0 0 16px;
  font-size: 12px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.76);
}

h1 {
  margin: 0 0 18px;
    font-size: clamp(1.75rem, 4.2vw, 3.85rem);
  line-height: 0.96;
  letter-spacing: -0.05em;
  max-width: min(720px, 100%);
}

.hero-copy {
  max-width: 680px;
  margin: 0 0 26px;
  font-size: 1.08rem;
  line-height: 1.85;
  color: rgba(255,255,255,0.88);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

/* Index content */

main {
  position: relative;
  z-index: 2;
}

.section {
  padding: 60px 0;
}

.section#services {
  padding-top: 20px;
}

.section#contact {
  padding-top: 20px;
}

.index-page .section#about {
  margin-top: -50px;
  padding-left: 0;
  padding-right: 0;
}

.panel,
.service,
.contact-panel {
  background: var(--light-card-bg);
  border: 1px solid var(--light-card-border);
  border-radius: var(--radius-xl);
  box-shadow: var(--light-card-shadow);
  backdrop-filter: var(--light-card-blur);
  -webkit-backdrop-filter: var(--light-card-blur);
}

.panel,
.contact-panel {
  padding: 38px;
}

.section-label {
  margin: 0 0 10px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #64748b;
}

h2 {
  margin: 0 0 16px;
  font-size: clamp(2rem, 3.4vw, 3.1rem);
  line-height: 1.02;
  letter-spacing: -0.04em;
}

.lead {
  margin: 0;
  max-width: 760px;
  font-size: 1.06rem;
  line-height: 1.8;
  color: var(--muted);
}

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

.service {
  padding: 30px;
  transition:
    transform 0.22s ease,
    box-shadow 0.22s ease;
}

.service:hover {
  transform: translateY(-3px);
  box-shadow: 0 20px 50px rgba(15,23,42,0.14);
}

.service h3 {
  margin: 0 0 12px;
  font-size: 1.45rem;
  letter-spacing: -0.03em;
}

.service p,
.contact-panel p {
  margin: 0;
  color: var(--muted);
  line-height: 1.8;
}

.contact-lines {
  margin-top: 24px;
  display: grid;
  gap: 8px;
  font-size: 1.03rem;
  color: #334155;
}

.footer {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 14px 24px 40px;
  color: #64748b;
  font-size: 0.94rem;
}


/* Index lower content cards should also use the shared glass style when scrolling over banner */
.index-page.banner-page .panel,
.index-page.banner-page .service,
.index-page.banner-page .contact-panel {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  color: white;
}

.index-page.banner-page .section-label {
  color: rgba(255,255,255,0.72);
}

.index-page.banner-page .lead,
.index-page.banner-page .service p,
.index-page.banner-page .contact-panel p {
  color: rgba(255,255,255,0.78);
}

.index-page.banner-page .contact-lines {
  color: rgba(255,255,255,0.88);
}

/* About page */

.about-main {
  padding: 140px 0 40px;
}

.about-page .hero-card {
  padding: 42px;
  margin-bottom: 24px;
}

.profile-grid {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 40px;
  align-items: start;
}

.profile-photo {
  width: 100%;
  border-radius: 24px;
  overflow: hidden;
  background: #dbe2ea;
  aspect-ratio: 4 / 5;
}

.profile-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-name {
  margin-top: 18px;
  font-size: 1.45rem;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.02em;
  color: white;
}

.profile-title {
  margin-top: 4px;
  font-size: 1rem;
  color: rgba(255,255,255,0.72);
  line-height: 1.5;
}

.about-page .lead {
  font-size: 1.08rem;
  line-height: 1.9;
  color: rgba(255,255,255,0.78);
}

.about-page .section {
  margin-top: 24px;
  padding: 0;
}

.about-page .panel {
  padding: 36px;
}

.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.mini {
  padding: 28px;
  border-radius: 28px;
}

.mini h3 {
  margin-top: 0;
  margin-bottom: 10px;
  color: white;
}

.linkedin {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 18px;
  padding: 12px 18px;
  border-radius: 999px;
  background: rgba(255,255,255,0.92);
  color: #0f172a;
  text-decoration: none;
  font-weight: 600;
}


/* Responsive */

@media (max-width: 920px) {
  .services {
    grid-template-columns: 1fr;
  }

  .banner-page {
    background-attachment: scroll;
  }
}

@media (max-width: 900px) {

  .profile-grid,
  .two-col {
    grid-template-columns: 1fr;
  }

  .profile-grid > div:first-child {
    order: 2;
  }

  .profile-grid > div:last-child {
    order: 1;
  }

}

@media (max-width: 760px) {
  .index-hero .hero-inner {
    padding-top: 118px;
  }
}

@media (max-width: 640px) {
  .header-inner,
  .hero-inner,
  .container,
  .footer,
  .about-main {
    width: min(var(--content-width), calc(100% - 36px));
  }

  .section {
    width: 100%;
    padding-left: 0;
    padding-right: 0;
  }
}

  .hero-card,
  .panel,
  .service,
  .contact-panel,
  .mini {
    padding: 26px;
  }

.hero-actions {
  flex-direction: row;
  align-items: center;
}

.button {
  width: auto;
}
}


/* Contact action pills */

.contact-actions {
  margin-top: 36px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}


/* FORCE NAVIGATION VISIBLE ON MOBILE */
@media (max-width: 760px) {
  .nav {
    display: flex !important;
  }

  .nav a {
    display: inline-flex !important;
  }
}

/* FORCE TRANSLUCENT HEADER EVEN WHEN SCROLLED */
.site-header.scrolled,
.index-page .site-header.scrolled,
.about-page .site-header.scrolled {
  background: rgba(255,255,255,0.06) !important;
  border-bottom: 1px solid rgba(255,255,255,0.08) !important;
  backdrop-filter: blur(14px) !important;
  -webkit-backdrop-filter: blur(14px) !important;
  box-shadow: none !important;
}

/* KEEP NAV PILLS DARK/TRANSLUCENT WHEN SCROLLED */
.site-header.scrolled .nav a,
.index-page .site-header.scrolled .nav a,
.about-page .site-header.scrolled .nav a {
  color: rgba(255,255,255,0.92) !important;
  background: rgba(7,14,28,0.24) !important;
  border: 1px solid rgba(255,255,255,0.18) !important;
}


/* Mobile fix: keep banner fixed so cards scroll over the same background */
@media (max-width: 920px) {
  .banner-page {
    background-attachment: fixed;
  }
}

/* Mobile-safe fixed banner */

body.banner-page::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;

  background:
    linear-gradient(var(--banner-overlay-top), var(--banner-overlay-bottom)),
    var(--banner-image);

  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

/* Disable normal banner rendering */

body.banner-page {
  background: transparent !important;
}

.index-hero.banner-page {
  background: transparent !important;
}

