/* Aganya Solutions — site composition layer.
   Built on top of the Modernist design system (styles.css). This file holds
   page layout, grids and section patterns; colors, type and spacing always
   come from the design system's tokens — never a hard-coded value here. */

html { scroll-behavior: smooth; }
body { overflow-x: hidden; }

.container {
  max-width: 1120px;
  margin: 0 auto;
  padding-inline: var(--space-6);
}

/* — header / nav — */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--color-bg);
}
.site-header .nav {
  max-width: 1120px;
  margin: 0 auto;
  padding-inline: var(--space-6);
}
.nav-links {
  display: flex;
  gap: var(--space-6);
  list-style: none;
  margin: 0;
  padding: 0;
  align-items: center;
}
.nav-links a {
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-size: 12px;
}
.nav-cta { margin-left: var(--space-2); }
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--space-2);
  margin-left: auto;
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--color-text);
  margin: 4px 0;
}

@media (max-width: 760px) {
  .nav-toggle { display: inline-flex; flex-direction: column; }
  .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-4);
    background: var(--color-bg);
    border-bottom: 1px solid var(--color-divider);
    padding: var(--space-4) var(--space-6) var(--space-6);
    display: none;
  }
  .nav-links.is-open { display: flex; box-shadow: var(--shadow-md); }
  .nav-cta { margin-left: 0; }
}

/* — sections — */
.section {
  padding: var(--space-8) 0;
}
.section-tight { padding: var(--space-6) 0; }

.eyebrow {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-accent-700);
  margin: 0 0 var(--space-3);
}
.eyebrow-muted { color: var(--color-neutral-600); }

/* — hero — */
.hero {
  display: grid;
  gap: var(--space-8);
  align-items: center;
}
.hero-split { grid-template-columns: 1.05fr 1fr; }
.hero-actions { display: flex; gap: var(--space-3); flex-wrap: wrap; margin-top: var(--space-2); }
.hero-lead { max-width: 620px; font-size: 16px; }

@media (max-width: 860px) {
  .hero-split { grid-template-columns: 1fr; }
}

/* home hero: the headline shares the row with the demo video, so it's set
   a step below the design system's 42px h1 */
.hero-title { font-size: 36px; }
.hero-media { min-width: 0; }
.hero-video { display: block; width: 100%; height: auto; background: var(--color-surface); }

/* — product screenshots / demo video — flat frame, zero radius; kept in
   colour (unlike photography) because the UI's red/green carries meaning */
.screenshot {
  margin: 0;
  background: var(--color-surface);
  border: 1px solid var(--color-divider);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.screenshot img { display: block; width: 100%; height: auto; }
/* standalone screenshots (cropped to the app content) that shouldn't span
   the full container; flush left, full width again on small screens */
.screenshot-narrow { max-width: 70%; }
@media (max-width: 860px) {
  .screenshot-narrow { max-width: none; }
}

/* — placeholder panels (stand in for screenshots/photography until real
   assets are shot) — kept visually intentional rather than a broken image */
.panel {
  background: var(--color-surface);
  border: 1px solid var(--color-divider);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  text-align: center;
  padding: var(--space-4);
  color: var(--color-neutral-600);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transition: transform 150ms ease, box-shadow 150ms ease;
}
.panel:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.panel::before {
  content: "";
  width: 22px;
  height: 22px;
  flex: none;
  background-color: var(--color-neutral-500);
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='3' width='18' height='18' rx='0'/%3E%3Ccircle cx='9' cy='9' r='2'/%3E%3Cpath d='M21 15l-5-5L5 21'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='3' width='18' height='18' rx='0'/%3E%3Ccircle cx='9' cy='9' r='2'/%3E%3Cpath d='M21 15l-5-5L5 21'/%3E%3C/svg%3E");
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
}

/* — metrics grid (home) — */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--color-divider);
  border-top: 1px solid var(--color-divider);
  border-bottom: 1px solid var(--color-divider);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.metrics-grid > div { background: var(--color-bg); padding: var(--space-6); }
.metrics-grid > .metrics-note { background: var(--color-surface); display: flex; align-items: flex-end; }
@media (max-width: 700px) {
  .metrics-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 480px) {
  .metrics-grid { grid-template-columns: 1fr; }
}

/* — generic responsive grids — */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-6); }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-6); }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-4); }
@media (max-width: 860px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}

.ruled-cols {
  display: grid;
  gap: 1px;
  background: var(--color-divider);
  border: 1px solid var(--color-divider);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.ruled-cols > * { background: var(--color-bg); padding: var(--space-6); }
.ruled-cols-2 { grid-template-columns: 1fr 1fr; }
.ruled-cols-3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 860px) {
  .ruled-cols-2, .ruled-cols-3 { grid-template-columns: 1fr; }
}

/* — label + content layout (method steps on home) — */
.method-cols {
  grid-template-columns: 220px 1fr;
  background: none;
  border: none;
}
@media (max-width: 860px) {
  .method-cols { grid-template-columns: 1fr; }
}

/* — numbered method steps — */
.steps { display: flex; flex-direction: column; gap: var(--space-4); }
.step {
  display: flex;
  gap: var(--space-4);
  padding-bottom: var(--space-4);
  border-bottom: 1px solid var(--color-neutral-300);
}
.step:last-child { border-bottom: none; padding-bottom: 0; }
.step-index {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.1em;
  color: var(--color-accent-700);
  width: 28px;
  flex: none;
}

/* — poster / CTA banner (the one place the accent runs as a field) — */
.cta-banner {
  background: var(--color-accent);
  color: var(--color-bg);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: var(--space-8) var(--space-6);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-6);
  flex-wrap: wrap;
}
.cta-banner h2 { color: var(--color-bg); }
.cta-banner p { color: color-mix(in srgb, var(--color-bg) 85%, transparent); }
.cta-banner .btn-primary { background: var(--color-bg); color: var(--color-text); }
.cta-banner .btn-primary:hover { background: var(--color-neutral-200); }

/* — cookie notice — */
.cookie-banner {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 50;
  background: var(--color-text);
  color: var(--color-neutral-300);
  padding: var(--space-4) var(--space-6);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  flex-wrap: wrap;
  box-shadow: var(--shadow-lg);
}
.cookie-banner p { margin: 0; font-size: 13px; max-width: 640px; }
.cookie-banner-actions { display: flex; gap: var(--space-2); flex-wrap: wrap; flex: none; }
.cookie-banner .btn-secondary {
  color: var(--color-bg);
  border-color: color-mix(in srgb, var(--color-bg) 40%, transparent);
}
.cookie-banner .btn-secondary:hover { background: color-mix(in srgb, var(--color-bg) 12%, transparent); }
@media (max-width: 600px) {
  .cookie-banner { flex-direction: column; align-items: stretch; }
  .cookie-banner-actions .btn { flex: 1; }
}

/* — footer — */
.site-footer {
  background: var(--color-text);
  color: var(--color-neutral-400);
}
.site-footer .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-4);
  padding-block: var(--space-4);
  flex-wrap: wrap;
}
.site-footer a { color: var(--color-neutral-400); }
.site-footer a:hover { color: var(--color-bg); }
.footer-brand { font-weight: 700; font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--color-bg); }
.footer-links { display: flex; gap: var(--space-4); list-style: none; margin: 0; padding: 0; font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; }

/* — logo lockup — */
.brand-mark { display: flex; align-items: center; }
.brand-mark img { height: 24px; width: auto; display: block; }

/* — pricing/who-uses row on home — */
.audience-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-4);
}
@media (max-width: 760px) {
  .audience-row { grid-template-columns: 1fr 1fr; }
}

/* — segmented control label row on the contact form — */
.seg-row { display: flex; flex-wrap: wrap; gap: var(--space-2); }

/* — motion: hover feedback, hero entrance, scroll reveal —
   Purposeful and on-brand: crisp translate + shadow, no gradients/glow/bounce.
   Fully suppressed for prefers-reduced-motion. — */
.btn, .card, .nav-links a, .footer-links a {
  transition: background-color 150ms ease, color 150ms ease,
    border-color 150ms ease, transform 150ms ease, box-shadow 150ms ease;
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }

@keyframes rise-in {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: none; }
}
.hero-anim > * {
  animation: rise-in 500ms ease-out both;
}
.hero-anim > *:nth-child(1) { animation-delay: 0ms; }
.hero-anim > *:nth-child(2) { animation-delay: 80ms; }
.hero-anim > *:nth-child(3) { animation-delay: 160ms; }
.hero-anim > *:nth-child(4) { animation-delay: 240ms; }
.hero-anim > *:nth-child(5) { animation-delay: 320ms; }

.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 500ms ease-out, transform 500ms ease-out;
}
.reveal.is-visible { opacity: 1; transform: none; }
/* the metrics grid and ruled-cols layouts use their own background as the
   divider lines between cells — fading a cell's opacity lets that color
   bleed through mid-transition, so those cells only animate position,
   staying fully opaque */
.metrics-grid .reveal, .ruled-cols > .reveal { opacity: 1; }

@media (prefers-reduced-motion: reduce) {
  .hero-anim > * { animation: none; opacity: 1; transform: none; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .btn, .card, .nav-links a, .footer-links a, .panel { transition: none; }
}
