/* ============================================================
   PabloSoft — global + component styles
   Loaded after tokens.css
   ============================================================ */

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.65;
  color: var(--text);
  background: var(--bg-base);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

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

/* Accessibility utilities ---------------------------------- */
.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;
}
.skip-link {
  position: absolute;
  inset-inline-start: 1rem;
  inset-block-start: 1rem;
  z-index: 200;
  padding: 0.7rem 1.2rem;
  background: var(--bg-base);
  color: var(--text-strong);
  border: 2px solid var(--brand-3);
  border-radius: var(--radius-sm);
  font-family: var(--font-display);
  font-weight: 600;
  transform: translateY(-160%);
  transition: transform var(--dur-fast) var(--ease-out-expo);
}
.skip-link:focus { transform: translateY(0); }

/* Atmosphere: fixed gradient field + film grain ------------- */
.atmosphere {
  position: fixed;
  inset: 0;
  z-index: -2;
  overflow: hidden;
  pointer-events: none;
}
.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  opacity: 0.5;
  will-change: transform;
}
.blob--1 {
  width: 48vw; height: 48vw; top: -12vw; left: -8vw;
  background: radial-gradient(circle, var(--brand-1), transparent 68%);
  animation: drift1 26s ease-in-out infinite alternate;
}
.blob--2 {
  width: 42vw; height: 42vw; top: 28vh; right: -12vw;
  background: radial-gradient(circle, var(--brand-2), transparent 68%);
  animation: drift2 32s ease-in-out infinite alternate;
}
.blob--3 {
  width: 40vw; height: 40vw; bottom: -14vw; left: 24vw;
  background: radial-gradient(circle, var(--brand-3), transparent 68%);
  opacity: 0.35;
  animation: drift3 38s ease-in-out infinite alternate;
}
.grain {
  position: fixed;
  inset: -50%;
  z-index: -1;
  pointer-events: none;
  opacity: 0.045;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

@keyframes drift1 { to { transform: translate3d(8vw, 10vh, 0) scale(1.15); } }
@keyframes drift2 { to { transform: translate3d(-7vw, -6vh, 0) scale(1.1); } }
@keyframes drift3 { to { transform: translate3d(5vw, -8vh, 0) scale(0.9); } }

/* Layout primitives ---------------------------------------- */
.wrap {
  width: 100%;
  max-width: var(--max-w);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
section { position: relative; }
.section-pad { padding-block: var(--space-section); }

/* Typography ----------------------------------------------- */
h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.04;
  letter-spacing: -0.03em;
  color: var(--text-strong);
}
.gradient-text {
  background: var(--gradient-text);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-family: var(--font-display);
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.eyebrow::before {
  content: "";
  width: 1.8rem; height: 1px;
  background: var(--gradient-brand);
}
a { color: inherit; text-decoration: none; }

/* Unified visible focus for all interactive elements -------- */
a:focus-visible {
  outline: 2px solid var(--brand-3);
  outline-offset: 3px;
  border-radius: 4px;
}

/* Buttons --------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.85rem 1.5rem;
  border-radius: var(--radius-pill);
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform var(--dur) var(--ease-spring),
    box-shadow var(--dur) var(--ease-out-expo),
    background var(--dur) var(--ease-out-expo),
    border-color var(--dur);
}
.btn svg { width: 1.15em; height: 1.15em; }
.btn--primary {
  color: var(--on-bright);
  background: var(--gradient-bright);
  box-shadow: 0 12px 30px -12px var(--brand-glow);
  font-weight: 600;
}
.btn--primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 44px -14px var(--brand-glow);
  filter: brightness(1.04);
}
.btn--ghost {
  color: var(--text-strong);
  background: var(--surface-glass);
  border-color: var(--surface-border);
  backdrop-filter: blur(8px);
}
.btn--ghost:hover {
  transform: translateY(-3px);
  border-color: var(--surface-border-strong);
  background: var(--surface-glass-strong);
}
.btn:focus-visible { outline: 2px solid var(--brand-3); outline-offset: 3px; }

/* Header ---------------------------------------------------- */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  transition: background var(--dur) var(--ease-out-expo),
    border-color var(--dur) var(--ease-out-expo);
  border-bottom: 1px solid transparent;
}
.site-header.scrolled {
  background: oklch(11% 0.018 270 / 0.72);
  backdrop-filter: blur(16px) saturate(140%);
  border-bottom-color: var(--surface-border);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 4.6rem;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.18rem;
  letter-spacing: -0.02em;
  color: var(--text-strong);
}
.brand .mark {
  display: grid;
  place-items: center;
  width: 2.1rem; height: 2.1rem;
  border-radius: 0.6rem;
  background: var(--gradient-brand);
  box-shadow: 0 6px 18px -8px var(--brand-glow);
}
.brand .mark svg { width: 1.2rem; height: 1.2rem; }
.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
  list-style: none;
}
.nav-links a {
  font-size: 0.92rem;
  color: var(--text-muted);
  transition: color var(--dur-fast);
}
.nav-links a:hover { color: var(--text-strong); }

/* Hero ------------------------------------------------------ */
.hero {
  padding-top: clamp(8rem, 6rem + 9vw, 13rem);
  padding-bottom: clamp(4rem, 2rem + 6vw, 8rem);
  text-align: center;
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.45rem 0.95rem;
  border-radius: var(--radius-pill);
  background: var(--surface-glass);
  border: 1px solid var(--surface-border);
  backdrop-filter: blur(8px);
  font-size: var(--text-sm);
  color: var(--text-muted);
  margin-bottom: 2rem;
}
.hero-badge .dot {
  width: 0.5rem; height: 0.5rem;
  border-radius: 50%;
  background: var(--app-level);
  box-shadow: 0 0 0 4px oklch(74% 0.18 150 / 0.18);
}
.hero h1 {
  font-size: var(--text-hero);
  max-width: 15ch;
  margin-inline: auto;
}
.hero-lead {
  margin: 1.6rem auto 0;
  max-width: 48ch;
  font-size: var(--text-lead);
  color: var(--text-muted);
}
.hero-actions {
  margin-top: 2.5rem;
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* Floating icon constellation in hero ---------------------- */
.hero-orbit {
  margin-top: clamp(3.5rem, 2rem + 6vw, 6rem);
  display: flex;
  justify-content: center;
  gap: clamp(0.8rem, 0.2rem + 2vw, 1.6rem);
  flex-wrap: wrap;
}
.orbit-icon {
  width: clamp(3.6rem, 2.4rem + 4vw, 5rem);
  height: clamp(3.6rem, 2.4rem + 4vw, 5rem);
  border-radius: 24%;
  overflow: hidden;
  border: 1px solid var(--surface-border);
  box-shadow: var(--shadow-card);
  animation: bob 5s ease-in-out infinite;
  will-change: transform;
  transition: transform var(--dur) var(--ease-spring);
}
.orbit-icon img { width: 100%; height: 100%; object-fit: cover; }
.orbit-icon:nth-child(2) { animation-delay: 0.4s; }
.orbit-icon:nth-child(3) { animation-delay: 0.8s; }
.orbit-icon:nth-child(4) { animation-delay: 1.2s; }
.orbit-icon:nth-child(5) { animation-delay: 1.6s; }
.orbit-icon:hover { transform: translateY(-8px) scale(1.06); }
@keyframes bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

/* Stat strip ------------------------------------------------ */
.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--surface-border);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.stat {
  background: oklch(13% 0.02 270 / 0.7);
  backdrop-filter: blur(8px);
  padding: clamp(1.4rem, 1rem + 1.5vw, 2.3rem);
  text-align: center;
}
.stat .num {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 1.2rem + 2vw, 2.8rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  background: var(--gradient-text);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.stat .label {
  margin-top: 0.4rem;
  font-size: var(--text-sm);
  color: var(--text-muted);
}

/* Section heading ------------------------------------------ */
.section-head { max-width: 62ch; margin-bottom: clamp(2.5rem, 1.5rem + 3vw, 4rem); }
.section-head.center { margin-inline: auto; text-align: center; }
.section-head h2 { font-size: var(--text-h2); margin-top: 1rem; }
.section-head p {
  margin-top: 1.1rem;
  font-size: var(--text-lead);
  color: var(--text-muted);
}

/* Apps bento grid ------------------------------------------ */
.apps-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: clamp(1rem, 0.5rem + 1.2vw, 1.5rem);
}
.app-card {
  --accent: var(--brand-1);
  position: relative;
  grid-column: span 2;
  display: flex;
  flex-direction: column;
  padding: clamp(1.5rem, 1rem + 1.5vw, 2.2rem);
  border-radius: var(--radius-lg);
  background: var(--surface-glass);
  border: 1px solid var(--surface-border);
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  isolation: isolate;
  transition: transform var(--dur) var(--ease-out-expo),
    border-color var(--dur), box-shadow var(--dur);
}
/* Editorial composition: feature row cards span 3 cols */
.app-card--feature { grid-column: span 3; }

.app-card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: radial-gradient(
    120% 90% at 0% 0%,
    color-mix(in oklch, var(--accent) 24%, transparent),
    transparent 60%
  );
  opacity: 0.7;
  transition: opacity var(--dur);
}
.app-card:hover {
  transform: translateY(-6px);
  border-color: color-mix(in oklch, var(--accent) 45%, transparent);
  box-shadow: var(--shadow-float),
    0 0 50px -24px color-mix(in oklch, var(--accent) 80%, transparent);
}
.app-card:hover::before { opacity: 1; }

.app-head { display: flex; align-items: center; gap: 1.1rem; }
.app-icon {
  width: 4.6rem; height: 4.6rem;
  border-radius: 24%;
  overflow: hidden;
  flex-shrink: 0;
  border: 1px solid color-mix(in oklch, var(--accent) 30%, transparent);
  box-shadow: 0 12px 28px -14px var(--accent);
}
.app-icon img { width: 100%; height: 100%; object-fit: cover; }
.app-head h3 { font-size: var(--text-h3); letter-spacing: -0.02em; }
.app-card .cat {
  display: inline-block;
  margin-top: 0.35rem;
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: 0.04em;
  /* Lighter mix keeps category text >= 4.5:1 on the dark surface */
  color: color-mix(in oklch, var(--accent) 70%, white 24%);
  text-transform: uppercase;
}
.app-card p {
  margin-top: 1.2rem;
  color: var(--text-muted);
  font-size: var(--text-base);
  flex: 1;
}
.app-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1.6rem;
  font-family: var(--font-display);
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--text-strong);
  width: fit-content;
}
.app-link svg { width: 1em; height: 1em; transition: transform var(--dur) var(--ease-spring); }
.app-card:hover .app-link svg { transform: translateX(4px); }

/* Values ---------------------------------------------------- */
.values {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(1rem, 0.5rem + 1.5vw, 1.8rem);
}
.value {
  padding: clamp(1.5rem, 1rem + 1.5vw, 2.2rem);
  border-radius: var(--radius);
  background: var(--surface-glass);
  border: 1px solid var(--surface-border);
  transition: transform var(--dur) var(--ease-out-expo), border-color var(--dur);
}
.value:hover { transform: translateY(-4px); border-color: var(--surface-border-strong); }
.value .v-icon {
  width: 2.8rem; height: 2.8rem;
  border-radius: 0.8rem;
  display: grid;
  place-items: center;
  background: var(--surface-glass-strong);
  border: 1px solid var(--surface-border);
  margin-bottom: 1.2rem;
  color: var(--brand-3);
}
.value .v-icon svg { width: 1.4rem; height: 1.4rem; }
.value h3 { font-size: 1.2rem; }
.value p { margin-top: 0.7rem; color: var(--text-muted); font-size: var(--text-base); }

/* About / studio ------------------------------------------- */
.about-card {
  position: relative;
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: clamp(2rem, 1rem + 4vw, 4rem);
  align-items: center;
  padding: clamp(2rem, 1.5rem + 3vw, 4rem);
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, oklch(17% 0.03 280 / 0.8), oklch(13% 0.02 270 / 0.6));
  border: 1px solid var(--surface-border);
  overflow: hidden;
}
.about-card::after {
  content: "";
  position: absolute;
  width: 24rem; height: 24rem;
  right: -6rem; top: -8rem;
  background: radial-gradient(circle, var(--brand-glow), transparent 65%);
  opacity: 0.35;
  pointer-events: none;
}
.about-card h2 { font-size: var(--text-h2); }
.about-card .about-body { position: relative; z-index: 1; }
.about-card p {
  margin-top: 1.2rem;
  color: var(--text-muted);
  font-size: var(--text-lead);
  max-width: 52ch;
}
.signature { margin-top: 1.8rem; font-family: var(--font-display); font-size: 1.05rem; color: var(--text-strong); }
.signature span {
  display: block;
  font-family: var(--font-body);
  font-size: var(--text-sm);
  color: var(--text-muted);
  margin-top: 0.2rem;
}
.about-panel { display: grid; gap: 0.9rem; position: relative; z-index: 1; }
.about-panel .pill {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.9rem 1.1rem;
  border-radius: var(--radius);
  background: var(--surface-glass);
  border: 1px solid var(--surface-border);
  font-size: 0.95rem;
}
.about-panel .pill svg { width: 1.2rem; height: 1.2rem; color: var(--brand-3); flex-shrink: 0; }

/* CTA ------------------------------------------------------- */
.cta {
  text-align: center;
  padding: clamp(3rem, 2rem + 5vw, 6rem) clamp(1.5rem, 1rem + 3vw, 4rem);
  border-radius: var(--radius-lg);
  background: var(--gradient-bright);
  position: relative;
  overflow: hidden;
}
.cta::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  opacity: 0.06;
  mix-blend-mode: overlay;
}
.cta h2 { font-size: var(--text-h2); color: var(--on-bright); max-width: 18ch; margin-inline: auto; position: relative; }
.cta p { margin: 1rem auto 0; max-width: 42ch; color: oklch(32% 0.04 285); font-size: var(--text-lead); position: relative; }
.cta .btn--dark {
  margin-top: 2rem;
  background: oklch(15% 0.02 270);
  color: var(--text-strong);
  box-shadow: 0 18px 40px -18px oklch(0% 0 0 / 0.7);
  position: relative;
}
.cta .btn--dark:hover { transform: translateY(-3px); }
/* Cyan focus ring is invisible on the bright gradient — use white */
.cta .btn--dark:focus-visible { outline-color: oklch(97% 0.008 270); }

/* Footer ---------------------------------------------------- */
.site-footer {
  border-top: 1px solid var(--surface-border);
  padding-block: clamp(3rem, 2rem + 3vw, 4.5rem) 2.5rem;
  margin-top: var(--space-section);
}
.footer-grid { display: flex; justify-content: space-between; gap: 2.5rem; flex-wrap: wrap; align-items: flex-start; }
.footer-grid .brand { margin-bottom: 1rem; }
.footer-col h3 {
  font-family: var(--font-display);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 1rem;
}
.footer-col ul { list-style: none; display: grid; gap: 0.6rem; }
.footer-col a { color: var(--text-muted); font-size: 0.92rem; transition: color var(--dur-fast); }
.footer-col a:hover { color: var(--text-strong); }
.footer-about { max-width: 32ch; color: var(--text-muted); font-size: 0.92rem; }
.footer-bottom {
  margin-top: 3rem;
  padding-top: 1.8rem;
  border-top: 1px solid var(--surface-border);
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  font-size: var(--text-sm);
  color: var(--text-muted);
}

/* Scroll reveal -------------------------------------------- */
/* Hiding is gated behind .js so content stays visible if JS never runs. */
.js .reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity var(--dur-slow) var(--ease-out-expo),
    transform var(--dur-slow) var(--ease-out-expo);
}
.js .reveal.in { opacity: 1; transform: none; }
.js .reveal[data-delay="1"] { transition-delay: 0.08s; }
.js .reveal[data-delay="2"] { transition-delay: 0.16s; }
.js .reveal[data-delay="3"] { transition-delay: 0.24s; }
.js .reveal[data-delay="4"] { transition-delay: 0.32s; }

/* Responsive ----------------------------------------------- */
@media (max-width: 900px) {
  .apps-grid { grid-template-columns: repeat(2, 1fr); }
  .app-card, .app-card--feature { grid-column: span 1; }
  .values { grid-template-columns: 1fr; }
  .about-card { grid-template-columns: 1fr; }
  .nav-links { display: none; }
}
@media (max-width: 560px) {
  .apps-grid { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr; }
  .hero-actions .btn { width: 100%; justify-content: center; }
  .app-head { flex-direction: row; }
}

/* Reduced motion ------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .js .reveal { opacity: 1; transform: none; }
  .blob { animation: none; }
  .blob, .orbit-icon { will-change: auto; }
}
