/* ============================================================
   Shared page chrome — used by the homepage and every project
   detail page. Page-specific layout (chat card, project card)
   lives inline in each HTML file.
   ============================================================ */

* { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --serif: 'Source Serif 4', 'Times New Roman', Georgia, serif;
  --sans: 'Inter', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  --ink-soft: rgba(255,255,255,0.92);
  --ink-mute: rgba(255,255,255,0.7);
  --ink-faint: rgba(255,255,255,0.5);
  --glass-bg: rgba(255,255,255,0.16);
  --glass-bg-strong: rgba(255,255,255,0.22);
  --glass-border: rgba(255,255,255,0.32);
  --glass-shadow: 0 12px 40px rgba(0,0,0,0.22), 0 0 0 1px rgba(255,255,255,0.12) inset;
  --glass-shadow-lift: 0 22px 60px rgba(0,0,0,0.32), 0 0 0 1px rgba(255,255,255,0.18) inset;
  --scrim: linear-gradient(180deg, rgba(15,18,32,0.55) 0%, rgba(15,18,32,0.7) 100%);
}

html, body { height: 100%; }
body {
  font-family: var(--sans);
  color: var(--ink-soft);
  background: #0a0a0a;
  -webkit-font-smoothing: antialiased;
  cursor: default;
}

/* ============================================================
   SCENE — full-bleed background. Hero images cycle by TOD.
   ============================================================ */
.scene {
  position: fixed;
  inset: 0;
  overflow: hidden;
  z-index: 0;
}

.hero {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  image-rendering: auto;
  z-index: 5;
  transform-origin: 50% 50%;
  animation: kenburns 32s ease-in-out infinite alternate;
  will-change: transform, opacity;
  opacity: 0;
  transition: opacity 1200ms ease;
}
body[data-tod="night"] .hero[data-tod="night"] { opacity: 1; }
body[data-tod="dawn"]  .hero[data-tod="dawn"]  { opacity: 1; }
body[data-tod="day"]   .hero[data-tod="day"]   { opacity: 1; }

@keyframes kenburns {
  0%   { transform: scale(1.04) translate(0%, 0%); }
  100% { transform: scale(1.10) translate(-1.5%, -1%); }
}

/* drifting petals canvas — sits over the hero, below page content */
.petals {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 6;
  pointer-events: none;
}

/* ============================================================
   TOP NAV — frosted glass pill, fixed top center
   ============================================================ */
nav.top {
  position: fixed;
  top: 22px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 22px;
  padding: 8px 8px 8px 16px;
  background:
    linear-gradient(180deg, rgba(15,18,32,0.18) 0%, rgba(15,18,32,0.28) 100%),
    rgba(255,255,255,0.06);
  backdrop-filter: blur(28px) saturate(180%);
  -webkit-backdrop-filter: blur(28px) saturate(180%);
  border: none;
  border-radius: 999px;
  box-shadow: 0 14px 40px rgba(0,0,0,0.20);
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-soft);
}
nav.top a {
  color: var(--ink-soft);
  text-decoration: none;
  transition: opacity 200ms;
}
nav.top a:hover { opacity: 0.7; }
nav.top .icon-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  color: var(--ink-soft);
  transition: background 200ms, color 200ms;
}
nav.top .icon-link svg { width: 16px; height: 16px; }
nav.top .icon-link:hover {
  opacity: 1;
  background: rgba(255,255,255,0.10);
  color: #fff;
}
nav.top .cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  background: rgba(15,15,20,0.85);
  color: #fff;
  border-radius: 999px;
  font-weight: 500;
  white-space: nowrap;
  flex-shrink: 0;
}
nav.top .cta:hover { background: rgba(15,15,20,1); opacity: 1; }
nav.top .cta svg { width: 12px; height: 12px; }
.cta-short { display: none; }

/* ============================================================
   Toast — confirmations like "email copied"
   ============================================================ */
.toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%) translateY(12px);
  padding: 10px 18px;
  background: rgba(15,15,20,0.92);
  color: #fff;
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 500;
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.25);
  opacity: 0;
  transition: opacity 220ms ease, transform 220ms ease;
  z-index: 200;
  pointer-events: none;
}
.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ============================================================
   Mobile + reduced-motion overrides for shared chrome only.
   Page-specific mobile overrides live in each page.
   ============================================================ */
@media (max-width: 640px) {
  html, body { height: 100dvh; }
  .hero { object-position: 50% 65%; }

  nav.top {
    top: 12px;
    gap: 10px;
    padding: 6px 6px 6px 12px;
    font-size: 13px;
    max-width: calc(100% - 24px);
  }
  nav.top .icon-link { width: 26px; height: 26px; }
  nav.top .icon-link svg { width: 14px; height: 14px; }
  nav.top .cta { padding: 6px 12px; }
  .cta-full { display: none; }
  .cta-short { display: inline; }
}

@media (prefers-reduced-motion: reduce) {
  .hero { animation: none; }
}
