/* =================================================================
   xpflow Corporate Site — Styles
   ================================================================= */

/* RESET */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; scroll-behavior: smooth; }
body { font-family: var(--font-body); font-size: var(--type-body); font-weight: 400; line-height: var(--lh-body); letter-spacing: var(--ls-body); color: var(--xp-mist); background-color: var(--xp-black); overflow-x: hidden; }
img, video { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }
ul, ol { list-style: none; }

/* TYPOGRAPHY */
h1, .h1 { font-family: var(--font-display); font-size: var(--type-h1); font-weight: 300; line-height: var(--lh-h1); letter-spacing: var(--ls-h1); color: var(--xp-white); }
h2, .h2 { font-family: var(--font-display); font-size: var(--type-h2); font-weight: 400; line-height: var(--lh-h2); letter-spacing: var(--ls-h2); color: var(--xp-white); }
h3, .h3 { font-family: var(--font-display); font-size: var(--type-h3); font-weight: 400; line-height: var(--lh-h3); color: var(--xp-white); }
h4, .h4 { font-family: var(--font-body); font-size: var(--type-h4); font-weight: 500; color: var(--xp-white); }
p { max-width: var(--prose-max-width); }
p + p { margin-top: var(--space-4); }

.text-display { font-family: var(--font-display); font-size: var(--type-display); font-weight: 300; line-height: var(--lh-display); letter-spacing: var(--ls-display); color: var(--xp-pure-white); }
.text-overline { font-family: var(--font-body); font-size: var(--type-overline); font-weight: 500; letter-spacing: var(--ls-overline); text-transform: uppercase; color: var(--xp-accent); }
.text-body-lg { font-size: var(--type-body-lg); font-weight: 300; line-height: var(--lh-body); }
.text-stat { font-family: var(--font-display); font-size: var(--type-stat); font-weight: 300; line-height: 1; color: var(--xp-accent); }
.text-italic { font-style: italic; font-family: var(--font-display); color: var(--xp-mist); }

/* LAYOUT */
.container { width: 100%; max-width: var(--container-max); margin: 0 auto; padding: 0 var(--space-5); }
.container--wide { max-width: var(--container-wide); }
.container--narrow { max-width: var(--container-narrow); }
@media (min-width: 768px) { .container { padding: 0 var(--space-8); } }
@media (min-width: 1280px) { .container { padding: 0 var(--space-12); } }

.section { padding-block: var(--space-16); position: relative; }
@media (min-width: 1024px) { .section { padding-block: var(--space-24); } }
.section--dark { background: var(--xp-black); }
.section--warm { background: #0F0D0B; }
.section--charcoal { background: var(--xp-black-warm); }

.section__header { margin-bottom: var(--space-12); }
.section__header .text-overline { margin-bottom: var(--space-3); }
.section__header h2 { margin-bottom: var(--space-6); }

.grid { display: grid; gap: var(--space-6); }
.grid--2 { grid-template-columns: 1fr; }
.grid--3 { grid-template-columns: 1fr; }
@media (min-width: 768px) { .grid--2 { grid-template-columns: repeat(2, 1fr); } .grid--3 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .grid--3 { grid-template-columns: repeat(3, 1fr); } }

.grid--split { display: grid; grid-template-columns: 1fr; gap: var(--space-10); align-items: center; }
@media (min-width: 1024px) { .grid--split { grid-template-columns: 1fr 1fr; gap: var(--space-16); } }

/* NAV */
.nav { position: fixed; top: 0; left: 0; right: 0; height: var(--nav-height); display: flex; align-items: center; z-index: var(--z-nav); transition: background-color 0.4s var(--ease-out), transform 0.3s var(--ease-out); border-bottom: 1px solid transparent; }
.nav--transparent { background-color: transparent; }
.nav--scrolled { background-color: rgba(10,10,10,0.95); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); border-bottom-color: rgba(255,255,255,0.06); }
.nav--hidden { transform: translateY(-100%); }
.nav__inner { display: flex; align-items: center; justify-content: space-between; width: 100%; max-width: var(--container-wide); margin: 0 auto; padding: 0 var(--space-5); }
@media (min-width: 768px) { .nav__inner { padding: 0 var(--space-8); } }
@media (min-width: 1280px) { .nav__inner { padding: 0 var(--space-12); } }
.nav__logo { height: 28px; }
.nav__logo img { height: 100%; width: auto; }
.nav__links { display: none; align-items: center; gap: var(--space-8); }
@media (min-width: 1024px) { .nav__links { display: flex; } }
.nav__link { font-size: var(--type-nav); font-weight: 400; letter-spacing: var(--ls-nav); text-transform: uppercase; color: var(--xp-mist); position: relative; padding: var(--space-2) 0; transition: color var(--duration-normal) var(--ease-out); }
.nav__link::after { content: ''; position: absolute; bottom: 0; left: 0; width: 0; height: 1px; background: var(--xp-accent); transition: width var(--duration-normal) var(--ease-out); }
.nav__link:hover { color: var(--xp-pure-white); }
.nav__link:hover::after { width: 100%; }
.nav__link--active { color: var(--xp-pure-white); }
.nav__link--active::after { width: 100%; }

/* HAMBURGER */
.nav__hamburger { display: flex; flex-direction: column; justify-content: center; gap: 6px; width: 24px; height: 44px; cursor: pointer; }
@media (min-width: 1024px) { .nav__hamburger { display: none; } }
.nav__hamburger span { display: block; width: 100%; height: 1.5px; background: var(--xp-pure-white); transition: transform var(--duration-normal) var(--ease-out), opacity var(--duration-normal); transform-origin: center; }
.nav__hamburger--open span:first-child { transform: translateY(3.75px) rotate(45deg); }
.nav__hamburger--open span:nth-child(2) { opacity: 0; }
.nav__hamburger--open span:last-child { transform: translateY(-3.75px) rotate(-45deg); }

/* MOBILE MENU */
.mobile-menu { position: fixed; inset: 0; background: var(--xp-black); z-index: var(--z-mobile-menu); display: flex; flex-direction: column; justify-content: center; padding: var(--space-12) var(--space-8); opacity: 0; pointer-events: none; transition: opacity 0.4s var(--ease-out); }
.mobile-menu--open { opacity: 1; pointer-events: auto; }
.mobile-menu__link { font-family: var(--font-display); font-size: 2rem; font-weight: 300; color: var(--xp-mist); display: block; padding: var(--space-4) 0; transition: color var(--duration-normal) ease; }
.mobile-menu__link:hover { color: var(--xp-pure-white); }

/* HERO */
.hero { position: relative; min-height: 100vh; min-height: 100dvh; overflow: hidden; display: flex; align-items: center; }
.hero--center { align-items: center; }
.hero__bg { position: absolute; inset: 0; z-index: 0; }
.hero__bg::after { content: ''; position: absolute; inset: 0; background: linear-gradient(to top, rgba(10,10,10,0.9) 0%, rgba(10,10,10,0.5) 40%, rgba(10,10,10,0.3) 100%); }
.hero__grain { position: absolute; inset: 0; z-index: 1; opacity: 0.03; background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); pointer-events: none; }
.hero__content { position: relative; z-index: 2; padding-top: var(--nav-height); width: 100%; }
.hero__title { font-family: var(--font-display); font-size: var(--type-display); font-weight: 300; line-height: var(--lh-display); letter-spacing: var(--ls-display); color: var(--xp-pure-white); max-width: 14ch; }
.hero__subtitle { font-size: var(--type-body-lg); font-weight: 300; color: var(--xp-mist); max-width: 45ch; margin-top: var(--space-6); }
.hero__scroll { position: absolute; bottom: var(--space-8); left: 50%; transform: translateX(-50%); z-index: 2; display: flex; flex-direction: column; align-items: center; gap: var(--space-2); }
.hero__scroll-text { font-size: var(--type-caption); letter-spacing: var(--ls-overline); text-transform: uppercase; color: var(--xp-ash); }
.hero__scroll-line { width: 1px; height: 40px; background: var(--xp-ash); position: relative; overflow: hidden; }
.hero__scroll-line::after { content: ''; position: absolute; top: -100%; left: 0; width: 100%; height: 100%; background: var(--xp-pure-white); animation: scrollLine 2s ease-in-out infinite; }
@keyframes scrollLine { 0% { top: -100%; } 50% { top: 100%; } 100% { top: 100%; } }

/* BUTTONS */
.btn { display: inline-flex; align-items: center; gap: var(--space-2); font-family: var(--font-body); font-size: var(--type-nav); font-weight: 500; letter-spacing: var(--ls-nav); text-transform: uppercase; cursor: pointer; transition: all var(--duration-normal) var(--ease-out); }
.btn:focus-visible { outline: 2px solid var(--xp-accent); outline-offset: 3px; }
.btn--primary { padding: var(--space-3) var(--space-8); background: var(--xp-accent); color: var(--xp-black); border: none; }
.btn--primary:hover { background: var(--xp-accent-light); transform: translateY(-1px); }
.btn--secondary { padding: var(--space-3) var(--space-8); background: transparent; color: var(--xp-white); border: 1px solid var(--xp-slate); }
.btn--secondary:hover { border-color: var(--xp-mist); color: var(--xp-pure-white); }
.btn--ghost { padding: var(--space-2) 0; background: transparent; color: var(--xp-mist); border: none; position: relative; }
.btn--ghost::after { content: ''; position: absolute; bottom: 0; left: 0; width: 0; height: 1px; background: var(--xp-accent); transition: width var(--duration-normal) var(--ease-out); }
.btn--ghost:hover { color: var(--xp-pure-white); }
.btn--ghost:hover::after { width: 100%; }
.btn__arrow { display: inline-block; transition: transform var(--duration-normal) ease; }
.btn:hover .btn__arrow { transform: translateX(4px); }

/* CARDS */
.card-product { background: var(--xp-black-warm); border: var(--border-subtle); padding: var(--space-8); position: relative; overflow: hidden; transition: all 0.4s var(--ease-out); }
.card-product::before { content: ''; position: absolute; top: 0; left: var(--space-8); right: var(--space-8); height: 1px; background: linear-gradient(90deg, transparent, var(--xp-accent), transparent); opacity: 0; transition: opacity 0.4s ease; }
.card-product:hover::before { opacity: 1; }
.card-product:hover { border-color: rgba(255,255,255,0.08); transform: translateY(-4px); }
.card-product__title { font-family: var(--font-display); font-size: var(--type-h3); font-weight: 400; color: var(--xp-white); margin-bottom: var(--space-4); }
.card-product__description { color: var(--xp-mist); max-width: 45ch; }

.card-team { background: var(--xp-black-warm); border: var(--border-subtle); overflow: hidden; transition: all 0.4s var(--ease-out); }
.card-team:hover { border-color: rgba(255,255,255,0.08); transform: translateY(-4px); }
.card-team__image-wrap { overflow: hidden; aspect-ratio: 3/4; background: var(--xp-charcoal); }
.card-team__image { width: 100%; height: 100%; object-fit: cover; filter: grayscale(20%); transition: all 0.6s var(--ease-out); }
.card-team:hover .card-team__image { filter: grayscale(0%); transform: scale(1.05); }
.card-team__content { padding: var(--space-6); }
.card-team__name { font-size: var(--type-h4); font-weight: 500; color: var(--xp-white); }
.card-team__title { font-size: var(--type-body-sm); color: var(--xp-silver); margin-top: var(--space-1); }

.card-career { background: transparent; border: var(--border-solid); padding: var(--space-6) var(--space-8); display: flex; flex-direction: column; gap: var(--space-3); transition: all var(--duration-normal) ease; }
@media (min-width: 768px) { .card-career { flex-direction: row; align-items: center; justify-content: space-between; } }
.card-career:hover { background: var(--xp-black-warm); border-color: var(--xp-slate); }
.card-career__title { font-size: var(--type-h4); font-weight: 500; color: var(--xp-white); }
.card-career__meta { display: flex; align-items: center; gap: var(--space-4); }
.card-career__tag { font-size: var(--type-caption); font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; color: var(--xp-accent); background: var(--xp-accent-muted); padding: var(--space-1) var(--space-3); }
.card-career__location { font-size: var(--type-body-sm); color: var(--xp-silver); }
.card-career__arrow { color: var(--xp-ash); font-size: 1.25rem; transition: all var(--duration-normal) ease; flex-shrink: 0; }
.card-career:hover .card-career__arrow { color: var(--xp-accent); transform: translateX(4px); }

/* STATS */
.stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--space-8); padding: var(--space-12) 0; }
@media (min-width: 768px) { .stats { grid-template-columns: repeat(4, 1fr); } }
@media (min-width: 1024px) { .stats > *:not(:last-child) { border-right: 1px solid var(--xp-graphite); } }
.stat { text-align: center; padding: var(--space-4); }
.stat__number { font-family: var(--font-display); font-size: var(--type-stat); font-weight: 300; line-height: 1; color: var(--xp-accent); }
.stat__label { font-size: var(--type-caption); font-weight: 500; letter-spacing: 0.15em; text-transform: uppercase; color: var(--xp-silver); margin-top: var(--space-3); }

/* DIVIDERS */
.divider { border: none; height: 1px; background: var(--xp-graphite); margin: 0; }
.divider--accent { background: linear-gradient(90deg, transparent, var(--xp-accent) 20%, var(--xp-accent) 80%, transparent); max-width: 200px; margin: 0 auto; }
.divider--wide { max-width: 60%; margin: 0 auto; }

/* MANIFESTO */
.manifesto { padding: var(--space-32) 0; }
.manifesto__statement { font-family: var(--font-display); font-size: var(--type-h2); font-weight: 300; line-height: 1.3; color: var(--xp-white); max-width: 20ch; margin-bottom: var(--space-20); }
.manifesto__statement:last-child { margin-bottom: 0; }
.manifesto__statement--muted { color: var(--xp-silver); }
.manifesto__statement--accent { color: var(--xp-accent); font-style: italic; }
@media (min-width: 768px) { .manifesto__statement { font-size: var(--type-h1); max-width: 18ch; } }

/* ALFIE SHOWCASE */
.alfie-showcase { position: relative; }
.alfie-showcase__image { position: relative; overflow: hidden; border: var(--border-subtle); }
.alfie-showcase__image img { width: 100%; display: block; filter: brightness(0.9) contrast(1.05); }
.alfie-showcase__image::after { content: ''; position: absolute; inset: 0; background: linear-gradient(135deg, rgba(10,10,10,0.3), transparent 60%); pointer-events: none; }
.alfie-showcase__glow { position: absolute; top: -50%; right: -30%; width: 80%; height: 200%; background: radial-gradient(ellipse, rgba(201,168,76,0.05), transparent 70%); pointer-events: none; z-index: 0; }

/* FORM */
.form-group { position: relative; margin-bottom: var(--space-8); }
.form-input { width: 100%; padding: var(--space-4) 0; background: transparent; border: none; border-bottom: 1px solid var(--xp-slate); color: var(--xp-white); font-family: var(--font-body); font-size: var(--type-body); font-weight: 300; transition: border-color var(--duration-normal) ease; }
.form-input::placeholder { color: var(--xp-ash); }
.form-input:focus { outline: none; border-bottom-color: var(--xp-accent); }
.form-select { width: 100%; padding: var(--space-4) 0; background: transparent; border: none; border-bottom: 1px solid var(--xp-slate); color: var(--xp-white); font-family: var(--font-body); font-size: var(--type-body); font-weight: 300; appearance: none; -webkit-appearance: none; cursor: pointer; transition: border-color var(--duration-normal) ease; }
.form-select:focus { outline: none; border-bottom-color: var(--xp-accent); }
.form-select option { background: var(--xp-black-warm); color: var(--xp-white); }
textarea.form-input { resize: vertical; min-height: 120px; border: 1px solid var(--xp-slate); padding: var(--space-4); margin-top: var(--space-2); }
textarea.form-input:focus { border-color: var(--xp-accent); }
.form-label { display: block; font-size: var(--type-body-sm); color: var(--xp-ash); margin-bottom: var(--space-2); }

/* CONTACT CATEGORIES */
.contact-categories { display: grid; grid-template-columns: 1fr; gap: var(--space-6); margin-bottom: var(--space-16); }
@media (min-width: 768px) { .contact-categories { grid-template-columns: repeat(2, 1fr); } }
.contact-card { border: 1px solid var(--xp-graphite); padding: var(--space-8); transition: all var(--duration-normal) ease; }
.contact-card:hover { border-color: var(--xp-slate); }
.contact-card__title { font-family: var(--font-display); font-size: var(--type-h3); font-weight: 400; color: var(--xp-white); margin-bottom: var(--space-4); }
.contact-card__desc { color: var(--xp-silver); margin-bottom: var(--space-6); font-size: var(--type-body-sm); }
.contact-card__email { color: var(--xp-accent); font-size: var(--type-body-sm); transition: color var(--duration-normal) ease; }
.contact-card__email:hover { color: var(--xp-accent-light); }

/* FORMAT BLOCKS */
.format-block { border-left: 1px solid rgba(201,168,76,0.3); padding-left: var(--space-8); margin-bottom: var(--space-10); }
.format-block:last-child { margin-bottom: 0; }
.format-block h3 { margin-bottom: var(--space-4); }

/* VALUE ITEMS */
.value-item { margin-bottom: var(--space-10); }
.value-item:last-child { margin-bottom: 0; }
.value-item h4 { margin-bottom: var(--space-2); }

/* FOOTER */
.footer { background: var(--xp-black); border-top: 1px solid var(--xp-graphite); padding: var(--space-20) 0 var(--space-12); }
.footer__grid { display: grid; grid-template-columns: 1fr; gap: var(--space-10); }
@media (min-width: 768px) { .footer__grid { grid-template-columns: 2fr 1fr 1fr 1fr; gap: var(--space-8); } }
.footer__logo { height: 22px; margin-bottom: var(--space-4); }
.footer__logo img { height: 100%; width: auto; }
.footer__tagline { font-size: var(--type-body-sm); color: var(--xp-ash); max-width: 30ch; }
.footer__col-title { font-size: var(--type-overline); font-weight: 500; letter-spacing: var(--ls-overline); text-transform: uppercase; color: var(--xp-ash); margin-bottom: var(--space-4); }
.footer__link { display: flex; align-items: center; font-size: var(--type-body-sm); color: var(--xp-silver); padding: var(--space-1) 0; min-height: 44px; transition: color var(--duration-normal) ease; }
.footer__link:hover { color: var(--xp-pure-white); }
.footer__bottom { margin-top: var(--space-12); padding-top: var(--space-6); border-top: 1px solid rgba(255,255,255,0.04); display: flex; flex-direction: column; gap: var(--space-4); align-items: center; }
@media (min-width: 768px) { .footer__bottom { flex-direction: row; justify-content: space-between; } }
.footer__copyright { font-size: var(--type-caption); color: var(--xp-ash); }
.footer__legal { display: flex; gap: var(--space-6); }
.footer__legal a { font-size: var(--type-caption); color: var(--xp-ash); transition: color var(--duration-normal) ease; }
.footer__legal a:hover { color: var(--xp-pure-white); }

/* SCROLL REVEALS */
.reveal { opacity: 0; transform: translateY(40px); transition: opacity var(--duration-reveal) var(--ease-out), transform var(--duration-reveal) var(--ease-out); }
.reveal.is-visible { opacity: 1; transform: translateY(0); }
.reveal-stagger > * { opacity: 0; transform: translateY(30px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal-stagger.is-visible > *:nth-child(1) { transition-delay: 0ms; }
.reveal-stagger.is-visible > *:nth-child(2) { transition-delay: 100ms; }
.reveal-stagger.is-visible > *:nth-child(3) { transition-delay: 200ms; }
.reveal-stagger.is-visible > *:nth-child(4) { transition-delay: 300ms; }
.reveal-stagger.is-visible > *:nth-child(5) { transition-delay: 400ms; }
.reveal-stagger.is-visible > *:nth-child(6) { transition-delay: 500ms; }
.reveal-stagger.is-visible > * { opacity: 1; transform: translateY(0); }

/* LOADER */
.loader { position: fixed; inset: 0; background: var(--xp-black); display: flex; align-items: center; justify-content: center; z-index: var(--z-loader); transition: opacity 0.5s ease; }
.loader--hidden { opacity: 0; pointer-events: none; }
.loader__mark { height: 32px; opacity: 0.6; animation: loaderPulse 1.5s ease-in-out infinite; }
@keyframes loaderPulse { 0%, 100% { opacity: 0.4; transform: scale(1); } 50% { opacity: 1; transform: scale(1.05); } }

/* INTERIOR PAGE HERO */
.page-hero { padding-top: calc(var(--nav-height) + var(--space-24)); padding-bottom: var(--space-16); background: var(--xp-black); }
@media (min-width: 1024px) { .page-hero { padding-bottom: var(--space-24); } }
.page-hero__overline { margin-bottom: var(--space-3); }
.page-hero__title { font-family: var(--font-display); font-size: var(--type-h1); font-weight: 300; line-height: var(--lh-h1); letter-spacing: var(--ls-h1); color: var(--xp-pure-white); max-width: 20ch; }
.page-hero__subtitle { font-size: var(--type-body-lg); font-weight: 300; color: var(--xp-mist); max-width: 50ch; margin-top: var(--space-6); }

/* CONFIRMATION */
#form-confirmation { display: none; }
#form-confirmation h3 { margin-bottom: var(--space-4); }

/* REDUCED MOTION */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
  .reveal, .reveal-stagger > * { opacity: 1; transform: none; }
}

/* UTILITIES */
.text-center { text-align: center; }
.mx-auto { margin-left: auto; margin-right: auto; }
.mt-6 { margin-top: var(--space-6); }
.mt-8 { margin-top: var(--space-8); }
.mt-10 { margin-top: var(--space-10); }
.mt-12 { margin-top: var(--space-12); }
.mb-6 { margin-bottom: var(--space-6); }
.mb-8 { margin-bottom: var(--space-8); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
