/* ============================================================
   imagemakerlab · Shared Design Tokens & Primitives
   Source of truth: /Users/link/ClaudeCompany/image-gen/DESIGN.md
   ============================================================ */

:root {
  /* Brand */
  --ps-blue: #0070cc;
  --ps-cyan: #1eaedb;
  --ps-blue-link: #0068bd;
  --link-hover: #1883fd;
  --ps-blue-air: #53b1ff;

  /* Commerce (reserved for purchases only — NOT generate) */
  --orange: #d53b00;
  --orange-active: #aa2f00;

  /* Surfaces */
  --black: #000;
  --shadow-black: #121314;
  --ink: #1f1f1f;
  --body: #6b6b6b;
  --mute: #ccc;
  --paper: #fff;
  --ice: #f5f7fa;
  --rule: #f3f3f3;
  --filter-mist: rgba(245, 247, 250, 0.3);

  /* Semantic */
  --warning-red: #c81b3a;
  --warning-amber: #c56a00;
  --warning-amber-bg: #fff5e6;
  --warning-red-bg: #fff0f2;
  --success-green: #2a8e4e;
  --success-green-bg: #ecf7f0;

  /* Shadows (DESIGN.md only allows these 4 tiers) */
  --shadow-feather: 0 5px 9px rgba(0, 0, 0, 0.06);
  --shadow-tile:    0 5px 9px rgba(0, 0, 0, 0.08);
  --shadow-hover:   0 5px 9px rgba(0, 0, 0, 0.16);
  --shadow-hero:    0 5px 9px rgba(0, 0, 0, 0.8);
}

/* ============================================================
   Reset & body
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: "SST", "Helvetica Neue", "Helvetica", "Arial", sans-serif;
  font-weight: 400;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-wrap: pretty;
}
img { display: block; max-width: 100%; }
a { color: var(--ps-blue-link); text-decoration: none; }
a:hover { color: var(--link-hover); }
button { font-family: inherit; }

/* ============================================================
   Top nav — black, sticky, does NOT invert on light panels
   ============================================================ */
.topnav {
  position: sticky; top: 0; z-index: 50;
  background: var(--black);
  color: #fff;
  height: 64px;
  display: flex; align-items: center;
  padding: 0 32px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
/* Prototype mode: demo state bar occupies the top 36px (fixed, z-index 100).
   Push the sticky topnav below it so it doesn't disappear behind the demo bar
   when the user scrolls. Only prototype pages set body[data-state]; landing
   and index pages are unaffected. */
body[data-state] .topnav { top: 36px; }
.topnav__logo {
  font-weight: 500;
  letter-spacing: -0.2px;
  font-size: 18px;
  color: #fff;
  text-decoration: none;
}
.topnav__logo span { color: var(--ps-blue-air); }
.topnav__spacer { flex: 1; }
/* Center nav links with equal auto-margins on both sides, so the block
   sits in the middle between the left-aligned logo and the right-aligned
   user controls. Works without needing a spacer div on every page. */
.topnav__links {
  display: flex; gap: 28px;
  margin-left: auto; margin-right: auto;
}
.topnav__links a {
  color: #fff; font-size: 14px; font-weight: 500; letter-spacing: 0.1px;
  transition: color 180ms ease;
}
.topnav__links a:hover { color: var(--link-hover); }

/* Nav credits chip */
.nav-credits {
  display: inline-flex; align-items: center; gap: 8px;
  height: 32px; padding: 0 14px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  color: #fff;
  font-size: 14px; font-weight: 500;
  letter-spacing: 0.1px;
  transition: background 180ms ease;
  cursor: pointer;
  border: 0;
}
.nav-credits::before {
  content: "";
  display: inline-block;
  width: 8px; height: 8px;
  background: var(--ps-blue-air);
  border-radius: 999px;
}
.nav-credits:hover { background: rgba(255, 255, 255, 0.14); }

/* User avatar in nav */
.nav-avatar {
  width: 32px; height: 32px;
  border-radius: 999px;
  background: linear-gradient(135deg, #3a3a3a, #1a1a1a);
  border: 1px solid rgba(255, 255, 255, 0.2);
  margin-left: 16px;
  cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  color: #fff; font-size: 12px; font-weight: 600;
}

/* ============================================================
   Buttons — Signature hover: cyan fill + 2px white border
   + 2px blue outer ring + scale(1.2) transform
   ============================================================ */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 8px;
  height: 48px; padding: 0 24px;
  background: var(--ps-blue); color: #fff;
  border: 0; border-radius: 999px;
  font: 500 18px/1.25 inherit;
  letter-spacing: 0.4px;
  cursor: pointer;
  transition:
    background 180ms ease,
    transform 180ms ease,
    box-shadow 180ms ease,
    border-color 180ms ease;
  outline: none;
  text-decoration: none;
  white-space: nowrap;
}
.btn:hover, .btn:focus-visible {
  /* DESIGN.md specifies ps-cyan as the hover bg, but white on cyan =
     2.27:1, which fails WCAG AA (≥4.5:1). We use ps-blue-link instead,
     a slightly deeper blue that gives 5.8:1 white-on-blue. The
     outer white border + blue ring still give the signature
     "light-up" lift even without the cyan brightness. */
  background: var(--orange);
  color: #fff;
  border: 2px solid #fff;
  box-shadow: 0 0 0 2px var(--ps-blue);
  transform: scale(1.2);
}
.btn:active { opacity: 0.6; }
.btn:disabled,
.btn[aria-disabled="true"] {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none;
  background: var(--ps-blue);
  border: 0;
  box-shadow: none;
}

.btn--ghost {
  background: transparent; color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.4);
  height: 40px; padding: 0 18px; font-size: 14px; font-weight: 500;
  letter-spacing: 0.1px;
}
.btn--ghost:hover, .btn--ghost:focus-visible {
  background: var(--orange); color: #fff;
  border: 2px solid #fff;
  box-shadow: 0 0 0 2px var(--ps-blue);
  transform: scale(1.2);
}

.btn--ghost-dark {
  background: transparent; color: var(--ink);
  border: 1px solid #dedede;
  height: 40px; padding: 0 18px; font-size: 14px; font-weight: 500;
  letter-spacing: 0.1px;
}
.btn--ghost-dark:hover, .btn--ghost-dark:focus-visible {
  background: var(--orange); color: #fff;
  border: 2px solid #fff;
  box-shadow: 0 0 0 2px var(--ps-blue);
  transform: scale(1.2);
}

/* Commerce Orange — reserved for actual purchase CTAs */
.btn--commerce {
  background: var(--orange); color: #fff;
  font-weight: 700;
  letter-spacing: 0.45px;
}
.btn--commerce:active { background: var(--orange-active); }
.btn--commerce:hover, .btn--commerce:focus-visible {
  background: var(--orange);
  color: #fff;
  border: 2px solid #fff;
  box-shadow: 0 0 0 2px var(--ps-blue);
  transform: scale(1.2);
}

.btn--sm { height: 36px; padding: 0 18px; font-size: 14px; font-weight: 700; letter-spacing: 0.324px; }
.btn--lg { height: 56px; padding: 0 32px; font-size: 18px; }

/* Compact buttons in tight flex rows shouldn't use the full 1.2× lift —
   they squeeze their neighbors. Override to a gentler 1.05× for all
   `.btn--sm` regardless of color variant. Signature 1.2× stays on
   primary full-width CTAs. This must come after all the `.btn*:hover`
   rules above so it wins the cascade at equal specificity. */
.btn--sm:hover,
.btn--sm:focus-visible {
  transform: scale(1.05);
}

/* Icon circle (carousel / share) */
.btn-icon {
  width: 40px; height: 40px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.2);
  color: #fff;
  border: 0;
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: background 180ms ease, transform 180ms ease, box-shadow 180ms ease;
}
.btn-icon:hover {
  background: var(--orange);
  box-shadow: 0 0 0 2px var(--ps-blue);
  transform: scale(1.2);
}

/* ============================================================
   Panels
   ============================================================ */
.panel {
  padding: 96px 64px;
  background: linear-gradient(180deg, #fff 0%, var(--ice) 100%);
}
.panel--white { background: #fff; }
.panel--ice { background: var(--ice); }
.panel__inner { max-width: 1280px; margin: 0 auto; }
.panel__kicker {
  font-size: 14px; font-weight: 500; color: var(--body);
  letter-spacing: 0.14px; margin-bottom: 12px;
}
.panel__title {
  font-size: 35px; font-weight: 300; line-height: 1.25;
  margin: 0 0 48px; max-width: 720px;
}

/* ============================================================
   Footer
   ============================================================ */
.footer {
  background: var(--ps-blue);
  color: #fff;
  padding: 64px;
}
.footer__inner {
  max-width: 1280px; margin: 0 auto;
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 48px;
}
.footer__brand { font-size: 22px; font-weight: 300; letter-spacing: 0.1px; }
.footer__brand span {
  opacity: 0.7; display: block; font-size: 14px;
  margin-top: 12px; font-weight: 400;
}
.footer h4 {
  font-size: 14px; font-weight: 600; letter-spacing: 0.1px;
  margin: 0 0 16px; opacity: 0.85;
}
.footer ul { list-style: none; margin: 0; padding: 0; }
.footer li { margin-bottom: 10px; }
.footer a {
  color: #fff; font-size: 14px; font-weight: 400;
  opacity: 0.9; transition: opacity 180ms ease;
}
.footer a:hover { opacity: 1; color: #fff; }
.footer__legal {
  max-width: 1280px; margin: 48px auto 0; padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  display: flex; justify-content: space-between;
  font-size: 12px; opacity: 0.7;
}

/* ============================================================
   Cards (generic)
   ============================================================ */
.card {
  background: #fff;
  border-radius: 19px;
  padding: 32px 28px;
  box-shadow: var(--shadow-feather);
  transition: box-shadow 200ms ease, transform 200ms ease;
}
.card:hover { box-shadow: var(--shadow-hover); transform: translateY(-2px); }

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 1023px) {
  .panel { padding: 64px 32px; }
  .footer { padding: 48px 32px; }
  .footer__inner { grid-template-columns: 1fr 1fr; gap: 32px; }
}
@media (max-width: 599px) {
  .topnav { padding: 0 16px; }
  .topnav__links { display: none; }
  .panel { padding: 48px 16px; }
  .footer { padding: 40px 16px; }
  .footer__inner { grid-template-columns: 1fr; gap: 24px; }
  .footer__legal { flex-wrap: wrap; gap: 8px; justify-content: flex-start; }
}
