/* Z8Z Innovation — practice site theme */

:root {
  --bg: #0a0a0b;
  --bg-elevated: #111113;
  --bg-card: #141416;
  --border: rgba(255, 255, 255, 0.07);
  --border-strong: rgba(255, 255, 255, 0.12);
  --text: #f4f4f5;
  --text-muted: #a1a1aa;
  --text-dim: #71717a;
  --accent: #22d3ee;
  --accent-soft: rgba(34, 211, 238, 0.12);
  --accent-ring: rgba(34, 211, 238, 0.35);
  --header-h: 4.25rem;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 1rem);
}

body {
  margin: 0;
  min-height: 100vh;
  position: relative;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  background-color: var(--bg);
  color: var(--text-muted);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* —— Ambient logo atmosphere —— */
.ambient {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.ambient__glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(40px);
}

.ambient__glow--tr {
  top: -12%;
  right: -8%;
  width: min(70vw, 42rem);
  height: min(70vw, 42rem);
  background: radial-gradient(circle, rgba(34, 211, 238, 0.14) 0%, rgba(34, 211, 238, 0.04) 42%, transparent 70%);
}

.ambient__glow--bl {
  bottom: -18%;
  left: -12%;
  width: min(55vw, 34rem);
  height: min(55vw, 34rem);
  background: radial-gradient(circle, rgba(34, 211, 238, 0.06) 0%, transparent 68%);
}

/* Primary fixed logo wash — large, soft, right-weighted */
.ambient__mark {
  position: absolute;
  background-image: url("../assets/logo.jpg");
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center 28%;
  will-change: transform;
}

.ambient__mark--primary {
  top: -6%;
  right: -12%;
  width: min(92vw, 56rem);
  height: min(92vw, 56rem);
  opacity: 0.13;
  filter: blur(1.5px) saturate(1.15) brightness(0.95);
  mask-image: radial-gradient(ellipse 62% 58% at 50% 42%, #000 0%, #000 38%, transparent 78%);
  -webkit-mask-image: radial-gradient(ellipse 62% 58% at 50% 42%, #000 0%, #000 38%, transparent 78%);
  animation: ambient-drift 48s ease-in-out infinite alternate;
}

/* Secondary ghost — deep in the field, slightly rotated */
.ambient__mark--ghost {
  bottom: -18%;
  left: -22%;
  width: min(70vw, 38rem);
  height: min(70vw, 38rem);
  opacity: 0.055;
  filter: blur(4px) saturate(0.9) brightness(0.85);
  transform: rotate(-8deg) scale(1.05);
  mask-image: radial-gradient(ellipse 55% 55% at 50% 50%, #000 0%, transparent 72%);
  -webkit-mask-image: radial-gradient(ellipse 55% 55% at 50% 50%, #000 0%, transparent 72%);
  animation: ambient-drift-alt 64s ease-in-out infinite alternate;
}

.ambient__grain {
  position: absolute;
  inset: 0;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 180px 180px;
  mix-blend-mode: soft-light;
}

.ambient__vignette {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 90% 70% at 50% 20%, transparent 0%, rgba(10, 10, 11, 0.35) 55%, rgba(10, 10, 11, 0.88) 100%),
    linear-gradient(180deg, rgba(10, 10, 11, 0.2) 0%, transparent 25%, transparent 70%, rgba(10, 10, 11, 0.75) 100%);
}

@keyframes ambient-drift {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to   { transform: translate3d(-2.5%, 2%, 0) scale(1.04); }
}

@keyframes ambient-drift-alt {
  from { transform: rotate(-8deg) scale(1.05) translate3d(0, 0, 0); }
  to   { transform: rotate(-6deg) scale(1.08) translate3d(3%, -2%, 0); }
}

/* Keep content above ambient layer */
.site-header,
main,
.site-footer {
  position: relative;
  z-index: 1;
}

::selection {
  background: rgba(34, 211, 238, 0.28);
  color: #fff;
}

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

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

/* —— Header —— */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--header-h);
  border-bottom: 1px solid var(--border);
  background: rgba(10, 10, 11, 0.78);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.site-header__inner {
  max-width: 72rem;
  margin: 0 auto;
  padding: 0 1.25rem;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

@media (min-width: 640px) {
  .site-header__inner {
    padding: 0 1.5rem;
  }
}

@media (min-width: 1024px) {
  .site-header__inner {
    padding: 0 2rem;
  }
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
}

.brand__mark {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.65rem;
  object-fit: cover;
  flex-shrink: 0;
  box-shadow: 0 0 0 1px var(--accent-ring);
}

.brand__name {
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
  white-space: nowrap;
}

/* Nav links with underline hover */
.nav-desktop {
  display: none;
  align-items: center;
  gap: 2rem;
}

@media (min-width: 768px) {
  .nav-desktop {
    display: flex;
  }
}

.nav-link {
  position: relative;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: color 0.2s ease;
  padding: 0.25rem 0;
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 100%;
  height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.22s ease;
}

.nav-link:hover,
.nav-link:focus-visible {
  color: var(--text);
}

.nav-link:hover::after,
.nav-link:focus-visible::after {
  transform: scaleX(1);
}

/* Mobile menu button */
.menu-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.5rem;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text);
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.menu-toggle:hover {
  border-color: var(--border-strong);
  background: rgba(255, 255, 255, 0.03);
}

@media (min-width: 768px) {
  .menu-toggle {
    display: none;
  }
}

.menu-toggle__icon {
  width: 1.15rem;
  height: 1.15rem;
}

.nav-mobile {
  display: none;
  border-bottom: 1px solid var(--border);
  background: rgba(10, 10, 11, 0.96);
  backdrop-filter: blur(14px);
}

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

@media (min-width: 768px) {
  .nav-mobile,
  .nav-mobile.is-open {
    display: none;
  }
}

.nav-mobile__inner {
  max-width: 72rem;
  margin: 0 auto;
  padding: 0.75rem 1.25rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.nav-mobile .nav-link {
  display: block;
  padding: 0.75rem 0.25rem;
  font-size: 1rem;
}

/* —— Layout helpers —— */
.section {
  max-width: 72rem;
  margin: 0 auto;
  padding: 4.5rem 1.25rem;
}

@media (min-width: 640px) {
  .section {
    padding: 5.5rem 1.5rem;
  }
}

@media (min-width: 1024px) {
  .section {
    padding: 6.5rem 2rem;
  }
}

.section--tight {
  padding-top: 3.5rem;
  padding-bottom: 3.5rem;
}

.section-label {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
}

.section-title {
  margin: 0.75rem 0 0;
  font-size: clamp(1.75rem, 3.5vw, 2.25rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--text);
  line-height: 1.15;
}

.section-lead {
  margin: 1rem 0 0;
  max-width: 36rem;
  font-size: 1.05rem;
  line-height: 1.65;
  color: var(--text-muted);
}

.divider {
  border: 0;
  border-top: 1px solid var(--border);
  margin: 0;
}

/* —— Hero —— */
.hero {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

/* Hero-local logo: clearer than the fixed wash, still atmospheric */
.hero__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.hero__logo {
  position: absolute;
  top: 50%;
  right: -8%;
  width: min(95vw, 48rem);
  height: min(95vw, 48rem);
  transform: translateY(-48%);
  background-image: url("../assets/logo.jpg");
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center 30%;
  opacity: 0.28;
  filter: saturate(1.2) contrast(1.05);
  mask-image:
    linear-gradient(90deg, transparent 0%, #000 28%, #000 72%, transparent 100%),
    radial-gradient(ellipse 70% 68% at 55% 45%, #000 0%, #000 40%, transparent 78%);
  -webkit-mask-image:
    linear-gradient(90deg, transparent 0%, #000 28%, #000 72%, transparent 100%),
    radial-gradient(ellipse 70% 68% at 55% 45%, #000 0%, #000 40%, transparent 78%);
  -webkit-mask-composite: source-in;
  mask-composite: intersect;
  box-shadow: 0 0 120px 40px rgba(34, 211, 238, 0.06);
}

.hero__veil {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(105deg, rgba(10, 10, 11, 0.92) 0%, rgba(10, 10, 11, 0.78) 38%, rgba(10, 10, 11, 0.45) 62%, rgba(10, 10, 11, 0.72) 100%),
    radial-gradient(ellipse 55% 70% at 78% 42%, rgba(34, 211, 238, 0.1) 0%, transparent 60%);
}

.hero__inner {
  position: relative;
  z-index: 1;
  max-width: 72rem;
  margin: 0 auto;
  padding: 5rem 1.25rem 5.5rem;
}

@media (min-width: 640px) {
  .hero__inner {
    padding: 6.5rem 1.5rem 7rem;
  }
}

@media (min-width: 1024px) {
  .hero__inner {
    padding: 7.5rem 2rem 8rem;
  }

  .hero__logo {
    right: -2%;
    width: min(58vw, 52rem);
    height: min(58vw, 52rem);
    opacity: 0.32;
  }
}

.hero__content {
  max-width: 42rem;
}

.hero h1 {
  margin: 0;
  font-size: clamp(2.75rem, 8vw, 4.5rem);
  font-weight: 800;
  letter-spacing: -0.045em;
  line-height: 1.02;
  color: var(--text);
}

.hero__sub {
  margin: 1.5rem 0 0;
  font-size: clamp(1.15rem, 2.4vw, 1.4rem);
  font-weight: 500;
  line-height: 1.45;
  color: #e4e4e7;
}

.hero__support {
  margin: 1rem 0 0;
  max-width: 32rem;
  font-size: 1.05rem;
  line-height: 1.65;
  color: var(--text-muted);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border-radius: 0.65rem;
  padding: 0.85rem 1.35rem;
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, filter 0.2s ease;
}

.btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.btn-primary {
  background: var(--accent);
  color: #041016;
}

.btn-primary:hover {
  filter: brightness(1.08);
}

.btn-ghost {
  background: transparent;
  border-color: var(--border-strong);
  color: var(--text);
}

.btn-ghost:hover {
  border-color: var(--accent-ring);
  background: var(--accent-soft);
}

.hero__cta {
  margin-top: 2.25rem;
}

/* —— Cards —— */
.card-grid {
  display: grid;
  gap: 1.25rem;
  margin-top: 2.75rem;
}

@media (min-width: 768px) {
  .card-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
  }
}

.card {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 1.75rem;
  border-radius: 1rem;
  border: 1px solid var(--border);
  background: rgba(17, 17, 19, 0.72);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: border-color 0.25s ease, transform 0.25s ease, background 0.25s ease;
}

.card:hover {
  border-color: rgba(34, 211, 238, 0.28);
  background: rgba(20, 20, 22, 0.82);
  transform: translateY(-2px);
}

.card__icon {
  width: 2.25rem;
  height: 2.25rem;
  color: var(--accent);
}

.card__icon svg {
  width: 100%;
  height: 100%;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.card h3 {
  margin: 0;
  font-size: 1.125rem;
  font-weight: 650;
  letter-spacing: -0.02em;
  color: var(--text);
}

.card p {
  margin: 0;
  font-size: 0.975rem;
  line-height: 1.6;
  color: var(--text-muted);
}

/* —— Approach principles —— */
.principles {
  margin-top: 2.75rem;
  display: grid;
  gap: 1rem;
}

@media (min-width: 768px) {
  .principles {
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
  }
}

.principle {
  padding: 1.5rem 1.5rem 1.65rem;
  border-radius: 1rem;
  border: 1px solid var(--border);
  background: rgba(17, 17, 19, 0.68);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.principle__num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 700;
  color: #041016;
  background: var(--accent);
}

.principle h3 {
  margin: 1rem 0 0;
  font-size: 1.05rem;
  font-weight: 650;
  letter-spacing: -0.02em;
  color: var(--text);
}

.principle p {
  margin: 0.6rem 0 0;
  font-size: 0.95rem;
  line-height: 1.55;
  color: var(--text-muted);
}

/* —— Contact —— */
.contact-panel {
  margin-top: 2.5rem;
  display: grid;
  gap: 2.5rem;
  align-items: start;
}

@media (min-width: 900px) {
  .contact-panel {
    grid-template-columns: 1fr 1.15fr;
    gap: 3.5rem;
  }
}

.contact-meta {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.contact-email {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--accent);
  transition: filter 0.2s ease;
}

.contact-email:hover {
  filter: brightness(1.12);
}

.contact-note {
  font-size: 0.9rem;
  color: var(--text-dim);
}

.contact-form {
  display: grid;
  gap: 1rem;
  padding: 1.5rem;
  border-radius: 1rem;
  border: 1px solid var(--border);
  background: rgba(17, 17, 19, 0.78);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

@media (min-width: 640px) {
  .contact-form {
    padding: 1.75rem;
  }
}

.field {
  display: grid;
  gap: 0.4rem;
}

.field label {
  font-size: 0.8rem;
  font-weight: 550;
  color: var(--text-dim);
  letter-spacing: 0.02em;
}

.field input,
.field textarea {
  width: 100%;
  border-radius: 0.55rem;
  border: 1px solid var(--border-strong);
  background: rgba(0, 0, 0, 0.35);
  color: var(--text);
  font: inherit;
  font-size: 0.95rem;
  padding: 0.75rem 0.9rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.field input::placeholder,
.field textarea::placeholder {
  color: var(--text-dim);
}

.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--accent-ring);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.field textarea {
  min-height: 7.5rem;
  resize: vertical;
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.85rem 1.25rem;
  margin-top: 0.25rem;
}

.form-hint {
  font-size: 0.8rem;
  color: var(--text-dim);
  line-height: 1.4;
}

.form-status {
  display: none;
  margin: 0;
  font-size: 0.875rem;
  color: var(--accent);
}

.form-status.is-visible {
  display: block;
}

.form-status.is-success {
  color: #5eead4;
}

.form-status.is-error {
  color: #fca5a5;
}

/* Honeypot — visually hidden, not display:none (some bots skip those) */
.hp-field {
  position: absolute;
  left: -10000px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.contact-form {
  position: relative;
}

.contact-form button:disabled {
  opacity: 0.65;
  cursor: wait;
}

/* —— Footer —— */
.site-footer {
  border-top: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.25);
}

.site-footer__inner {
  max-width: 72rem;
  margin: 0 auto;
  padding: 2.25rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  font-size: 0.85rem;
  color: var(--text-dim);
}

@media (min-width: 640px) {
  .site-footer__inner {
    padding: 2.25rem 1.5rem;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
  }
}

@media (min-width: 1024px) {
  .site-footer__inner {
    padding: 2.25rem 2rem;
  }
}

.site-footer p {
  margin: 0;
  line-height: 1.5;
}

/* —— Fade-in on scroll —— */
.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

.reveal-delay-1 { transition-delay: 0.08s; }
.reveal-delay-2 { transition-delay: 0.16s; }
.reveal-delay-3 { transition-delay: 0.24s; }

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .card:hover,
  .card {
    transform: none;
  }

  .ambient__mark--primary,
  .ambient__mark--ghost {
    animation: none;
  }
}

/* Mobile: keep atmosphere, dial back intensity for readability */
@media (max-width: 639px) {
  .ambient__mark--primary {
    opacity: 0.09;
    right: -28%;
    width: 120vw;
    height: 120vw;
  }

  .ambient__mark--ghost {
    opacity: 0.04;
  }

  .hero__logo {
    opacity: 0.2;
    right: -35%;
    width: 130vw;
    height: 130vw;
  }

  .hero__veil {
    background:
      linear-gradient(180deg, rgba(10, 10, 11, 0.82) 0%, rgba(10, 10, 11, 0.7) 45%, rgba(10, 10, 11, 0.88) 100%),
      radial-gradient(ellipse 80% 60% at 70% 30%, rgba(34, 211, 238, 0.08) 0%, transparent 65%);
  }
}
