/* Launcher styles reused from pin-ai-drafting/app/public/css/style.css. */
/* PIN Updated Brand Color Guidelines, March 2026, slides 3–6.
   These eight named colors are the exact brand palette. */
:root {
  /* Primary colors */
  --blueberry: #1c4c62;
  --dusty-blue: #86cacd;
  --ocean: #00829b;
  --sunny-yellow: #ffc50e;
  --light-blue: #c7e6f4;
  --soft-white: #faf8f5;

  /* Approved accents */
  --vibrant-periwinkle-3: #8d9fef;
  --chartreuse: #d9e53d;

  /* Neutral surfaces and UI roles, derived from the palette. */
  --white: #ffffff;
  --ink: var(--blueberry);
  --muted: color-mix(in srgb, var(--blueberry) 80%, var(--white));
  --border: color-mix(in srgb, var(--blueberry) 28%, var(--white));
  --border-subtle: color-mix(in srgb, var(--blueberry) 12%, var(--white));
  --surface-muted: color-mix(in srgb, var(--light-blue) 25%, var(--white));
  --surface-hover: color-mix(in srgb, var(--dusty-blue) 20%, var(--white));
  --surface-selected: color-mix(in srgb, var(--dusty-blue) 30%, var(--white));
  --accent-background: color-mix(in srgb, var(--vibrant-periwinkle-3) 15%, var(--white));
  --focus-ring: var(--ocean);
  --shadow: 0 18px 50px color-mix(in srgb, var(--blueberry) 12%, transparent);
  --brand-gradient-stops:
    var(--ocean), var(--dusty-blue), var(--vibrant-periwinkle-3), var(--sunny-yellow), var(--ocean);
  --primary-action: var(--chartreuse);
  --primary-action-hover: color-mix(in srgb, var(--chartreuse) 85%, var(--blueberry));

  /* Functional status colors, not additional PIN brand colors.
     Error and success states retain distinct, readable red and green cues. */
  --critical: #a61b1b;
  --critical-hover: #861515;
  --critical-border: #db8d8d;
  --critical-background: #fff0f0;
  --success: #23663b;
  --success-border: #79b78e;
  --success-background: #eef9f1;
  --review: color-mix(in srgb, var(--sunny-yellow) 30%, var(--blueberry));
  --review-border: var(--sunny-yellow);
  --review-background: color-mix(in srgb, var(--sunny-yellow) 14%, var(--white));
}

body.launcher-page {
  display: flex;
  min-height: 100vh;
  flex-direction: column;
  color: var(--ink);
  background: var(--soft-white);
  font:
    16px/1.5 'Open Sans',
    Arial,
    sans-serif;
}
.launcher-page h1,
.launcher-page h2,
.launcher-page h3 {
  /* Use the reference's fallback consistently; an installed Black-only Brandon
     family otherwise substitutes a much heavier face for these bold headings. */
  font-family: 'Trebuchet MS', sans-serif;
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: normal;
}
.site-header {
  color: var(--white);
  background: var(--blueberry);
  border-bottom: 3px solid var(--vibrant-periwinkle-3);
  border-image: linear-gradient(90deg, var(--brand-gradient-stops)) 1;
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 18px;
  width: min(1120px, calc(100% - 40px));
  min-height: 68px;
  margin: 0 auto;
  padding: 8px 0;
}

.brand-logo {
  width: 155px;
  height: 77px;
  object-fit: contain;
}

.brand-link {
  display: flex;
  flex: 0 0 auto;
  border-radius: 4px;
}

.header-title {
  min-width: 0;
}
.header-title .eyebrow {
  display: none;
}
.site-header .header-title h1 {
  font-size: 1.5rem;
}

.account-actions {
  display: flex;
  align-items: center;
  gap: 13px;
  margin-left: auto;
}

.logout-button {
  min-height: 44px;
  padding: 10px 0;
  border: 0;
  border-radius: 0;
  color: var(--white);
  background: transparent;
  font-size: 0.8rem;
  font-weight: 400;
  white-space: nowrap;
}

.logout-button:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}
.logout-button:focus-visible {
  outline: 2px solid var(--white);
  outline-offset: 4px;
}

.header-inner {
  max-width: none;
}
.header-title {
  display: flex;
  align-items: center;
  font-size: inherit;
}
.logout-button {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}
.launcher-page .page-shell {
  width: min(1060px, calc(100% - 32px));
  max-width: none;
  min-height: 0;
  margin: 0 auto;
  padding: 24px 0 48px;
  flex: 1;
}
.launcher-page .nav-inner {
  width: min(1060px, calc(100% - 32px));
  max-width: none;
  padding: 0;
}
.launcher-intro {
  align-items: flex-end;
  gap: 24px;
  margin-bottom: 32px;
}
.launcher-intro .eyebrow {
  margin: 0 0 5px;
  color: var(--ocean);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.launcher-intro h2 {
  margin: 8px 0 12px;
  font-size: clamp(1.75rem, 3.5vw, 2.25rem);
}
.launcher-intro p:last-child {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}
.launcher-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}
@property --card-gradient-angle {
  syntax: '<angle>';
  inherits: false;
  initial-value: 110deg;
}

@keyframes card-gradient-turn {
  from {
    --card-gradient-angle: 110deg;
  }
  to {
    --card-gradient-angle: 470deg;
  }
}

.launcher-card {
  --card-accent: var(--ocean);
  --icon-color: var(--ocean);
  --icon-background: var(--surface-hover);
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  padding: 24px;
  color: var(--ink);
  text-decoration: none;
  border: 1px solid var(--border);
  border-top: 4px solid var(--card-accent);
  border-radius: 12px;
  background: var(--white);
  box-shadow: 0 5px 18px color-mix(in srgb, var(--blueberry) 4%, transparent);
  transition: border-color 180ms ease;
}

.launcher-card::after {
  content: '';
  position: absolute;
  z-index: -1;
  inset: -4px -1px -1px;
  border-radius: 12px;
  background: var(--soft-white);
  pointer-events: none;
  opacity: 0;
  transition:
    inset 180ms ease,
    opacity 180ms ease;
}

.launcher-card::before {
  content: '';
  position: absolute;
  inset: -4px -1px -1px;
  padding: 2px;
  border-radius: 12px;
  pointer-events: none;
  background: conic-gradient(from var(--card-gradient-angle), var(--brand-gradient-stops));
  -webkit-mask:
    linear-gradient(var(--white) 0 0) content-box,
    linear-gradient(var(--white) 0 0);
  -webkit-mask-composite: xor;
  mask:
    linear-gradient(var(--white) 0 0) content-box,
    linear-gradient(var(--white) 0 0);
  mask-composite: exclude;
  opacity: 0;
  transition:
    inset 180ms ease,
    opacity 180ms ease;
}

@media (hover: hover) and (pointer: fine) {
  .launcher-card:hover {
    border-color: transparent;
  }
  .launcher-card:hover::before,
  .launcher-card:hover::after {
    inset: -5px -2px -2px;
    opacity: 1;
  }
  .launcher-card:hover::before {
    opacity: 1;
    animation: card-gradient-turn 1400ms ease-in-out 1;
  }
}

.launcher-card:focus-visible {
  border-color: transparent;
  outline: 3px solid var(--ocean);
  outline-offset: 4px;
}

.launcher-card:focus-visible::before {
  opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
  .launcher-card,
  .launcher-card::before,
  .launcher-card::after {
    transition: none;
  }
  .launcher-card:hover::before,
  .launcher-card:hover::after {
    inset: -4px -1px -1px;
  }
  .launcher-card:hover::before {
    animation: none;
  }
}

.accent-1 {
  --card-accent: var(--vibrant-periwinkle-3);
  --icon-color: var(--blueberry);
  --icon-background: var(--accent-background);
}
.accent-2 {
  --card-accent: var(--sunny-yellow);
  --icon-color: var(--blueberry);
  --icon-background: var(--review-background);
}
.accent-3 {
  --card-accent: var(--dusty-blue);
  --icon-color: var(--blueberry);
  --icon-background: var(--surface-hover);
}
.launcher-card-body {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  min-width: 0;
  gap: 20px;
  flex: 1;
}
.launcher-icon {
  display: grid;
  width: 58px;
  height: 58px;
  border-radius: 14px;
  background: var(--icon-background);
  color: var(--icon-color);
  place-items: center;
}
.launcher-icon svg {
  width: 30px;
  height: 30px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.launcher-card h3 {
  margin-bottom: 12px;
  font-size: 1.35rem;
}
.launcher-description {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.65;
}

.launcher-empty {
  padding: 24px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 12px;
}
.launcher-empty h3 {
  font-size: 1.35rem;
  margin-bottom: 12px;
}
.launcher-empty p {
  color: var(--muted);
  font-size: 0.86rem;
}
.launcher-page .site-footer {
  border: 0;
  color: var(--muted);
  font-size: 0.78rem;
}
.launcher-page .site-footer > div {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  width: min(1060px, calc(100% - 32px));
  max-width: none;
  margin: 0 auto;
  padding: 8px 0 32px;
}
@media (max-width: 680px) {
  .header-inner {
    gap: 12px;
    width: calc(100% - 32px);
    min-height: 68px;
    padding: 8px 0;
  }
  .brand-logo {
    width: 100px;
    height: 50px;
  }
  .header-title {
    flex: 1;
  }
  .site-header .header-title h1 {
    font-size: 1rem;
    line-height: 1.2;
    overflow-wrap: anywhere;
  }
  .account-actions {
    flex-shrink: 0;
  }
  .launcher-page .page-shell {
    padding-top: 20px;
  }
  .launcher-page .nav-inner {
    gap: 20px;
    flex-wrap: wrap;
  }
  .launcher-page .local-badge {
    margin: 0 0 8px;
  }
  .launcher-intro {
    align-items: flex-start;
    flex-direction: column;
    margin-bottom: 24px;
  }
  .launcher-card {
    padding: 22px;
  }
  .launcher-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .launcher-card-body {
    grid-template-columns: 48px minmax(0, 1fr);
    gap: 16px;
  }
  .launcher-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
  }
  .launcher-page .site-footer > div {
    flex-wrap: wrap;
    gap: 4px 12px;
  }
  .launcher-page .site-footer span:last-child {
    margin-left: 0;
  }
}
