@import url('./shared.css');

/* ══════════════════════════════════════════════════════
   WELCOME — Boardroom Journal
   Dark editorial. Precision is the interface.
   Strategy emerges from focus. Text floats.
   ══════════════════════════════════════════════════════ */

/* ── Page shell ── */
.welcome {
  display: flex;
  flex-direction: column;
}

/* ── Controls ── */
.welcome-controls {
  position: fixed;
  top: var(--space-md);
  right: var(--space-md);
  z-index: var(--z-overlay);
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.welcome .welcome-controls .theme-toggle,
.welcome .theme-toggle {
  position: static;
  z-index: auto;
  background: color-mix(in srgb, var(--color-background) 70%, transparent);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-color: color-mix(in srgb, var(--color-primary) 30%, transparent);
  width: 44px;
  height: 44px;
  font-size: var(--text-lg);
}

/* ══════════════════════════════════════════════════════
   HERO — Full-viewport with subtle gold glow
   ══════════════════════════════════════════════════════ */
.welcome-hero {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: var(--color-background);
}

/* Subtle gold radial glow */
.welcome-hero::before {
  content: '';
  position: absolute;
  top: 30%;
  left: 50%;
  transform: translateX(-50%);
  width: 80%;
  height: 60%;
  background: radial-gradient(
    ellipse 50% 50% at center,
    color-mix(in srgb, var(--color-primary) 6%, transparent),
    transparent 70%
  );
  pointer-events: none;
  z-index: 0;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    color-mix(in srgb, var(--color-background) 30%, transparent) 0%,
    transparent 40%,
    color-mix(in srgb, var(--color-background) 60%, transparent) 100%
  );
  z-index: 1;
}

/* Hero text — floats on ink */
.hero-text {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: var(--space-2xl) var(--space-xl);
  max-width: 56rem;
}

.hero-text h1 {
  font-family: var(--font-heading);
  font-size: var(--text-4xl);
  font-weight: var(--font-weight-bold);
  color: var(--color-primary);
  letter-spacing: -0.04em;
  text-transform: uppercase;
  line-height: var(--line-height-tight);
  margin-bottom: var(--space-lg);
  text-shadow: 0 2px 24px color-mix(in srgb, var(--color-background) 80%, transparent);
}

.hero-text .welcome-subtitle {
  font-family: var(--font-heading);
  font-size: var(--text-lg);
  font-style: italic;
  color: var(--color-text);
  max-width: 38ch;
  margin: 0 auto;
  line-height: 1.9;
  opacity: 0.9;
}

/* Scroll cue */
.hero-scroll-cue {
  position: absolute;
  bottom: var(--space-xl);
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-xs);
  color: var(--color-text-secondary);
  font-size: var(--text-xs);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  animation: cue-fade 2s ease-in-out 1.5s both;
}

.hero-scroll-cue::after {
  content: '';
  display: block;
  width: 1px;
  height: 2.5rem;
  background: linear-gradient(to bottom, var(--color-primary), transparent);
  animation: cue-drop 2s ease-in-out 1.5s infinite;
}

@keyframes cue-fade {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes cue-drop {
  0%, 100% { transform: scaleY(1); opacity: 0.6; }
  50%       { transform: scaleY(1.4); opacity: 1; }
}

/* ══════════════════════════════════════════════════════
   EDITORIAL CONTENT SECTIONS
   ══════════════════════════════════════════════════════ */
.welcome-section {
  max-width: 52rem;
  margin: 0 auto;
  padding: var(--space-3xl) var(--space-xl);
  width: 100%;
}

.welcome-section > h2 {
  font-family: var(--font-heading);
  font-size: var(--text-2xl);
  font-weight: var(--font-weight-normal);
  color: var(--color-heading);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: var(--space-xl);
  padding-top: var(--space-lg);
  position: relative;
}

.welcome-section > h2::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 3rem;
  height: 0.5px;
  background: var(--color-primary);
  opacity: 0.8;
}

.welcome-section p {
  font-size: var(--text-base);
  color: var(--color-text);
  line-height: 1.9;
  max-width: 38ch;
  margin-bottom: var(--space-lg);
}

.welcome-section p:last-child { margin-bottom: 0; }

.section-intro {
  font-family: var(--font-heading);
  font-size: var(--text-md);
  font-style: italic;
  color: var(--color-text-secondary);
  max-width: 42ch;
  line-height: 1.85;
  margin-bottom: var(--space-2xl);
}

/* ══════════════════════════════════════════════════════
   WHAT WE FOUND — Image + floating text
   ══════════════════════════════════════════════════════ */
.section-found {
  padding: var(--space-3xl) var(--space-xl);
  max-width: 56rem;
  margin: 0 auto;
  width: 100%;
}

.found-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-3xl);
  align-items: start;
}

@media (max-width: 680px) {
  .found-layout {
    grid-template-columns: 1fr;
    gap: var(--space-2xl);
  }
}

.found-image-wrap {
  position: relative;
}

.found-image-wrap img {
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  display: block;
  box-shadow:
    12px 20px 60px color-mix(in srgb, var(--color-background) 70%, transparent),
    0 4px 12px color-mix(in srgb, var(--color-primary) 10%, transparent);
}

.found-body h2 {
  font-family: var(--font-heading);
  font-size: var(--text-2xl);
  font-weight: var(--font-weight-normal);
  color: var(--color-heading);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: var(--space-xl);
  padding-top: var(--space-lg);
  position: relative;
}

.found-body h2::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 3rem;
  height: 0.5px;
  background: var(--color-primary);
  opacity: 0.8;
}

.found-body p {
  font-size: var(--text-base);
  color: var(--color-text);
  line-height: 1.9;
  max-width: 38ch;
  margin-bottom: var(--space-lg);
}

.found-body p:last-child { margin-bottom: 0; }

.found-body strong {
  color: var(--color-heading);
  font-weight: var(--font-weight-bold);
}

/* ══════════════════════════════════════════════════════
   QUOTE — Full-viewport centred
   ══════════════════════════════════════════════════════ */
.section-quote {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-3xl) var(--space-xl);
  background: radial-gradient(
    ellipse 60% 60% at center,
    color-mix(in srgb, var(--color-primary) 4%, transparent),
    transparent
  );
}

.quote-inner {
  max-width: 44rem;
  text-align: center;
}

.quote-rule {
  display: block;
  width: 3rem;
  height: 0.5px;
  background: var(--color-primary);
  margin: 0 auto var(--space-2xl);
  opacity: 0.8;
}

.section-quote blockquote {
  margin: 0;
}

.section-quote blockquote p {
  font-family: var(--font-heading);
  font-size: var(--text-2xl);
  font-style: italic;
  color: var(--color-text);
  line-height: 1.6;
  letter-spacing: 0.01em;
  margin-bottom: var(--space-xl);
}

.section-quote blockquote footer {
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-style: normal;
  color: var(--color-text-secondary);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.quote-response {
  font-family: var(--font-body);
  font-size: var(--text-base);
  color: var(--color-text);
  margin-top: var(--space-2xl);
  max-width: 38ch;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.8;
}

@media (max-height: 600px) {
  .section-quote {
    min-height: auto;
    padding: var(--space-3xl) var(--space-xl);
  }
}

/* ══════════════════════════════════════════════════════
   LINK STACK — Editorial stacked list
   ══════════════════════════════════════════════════════ */
.welcome-link-stack {
  display: flex;
  flex-direction: column;
  gap: 0;
  border-left: 0.5px solid color-mix(in srgb, var(--color-primary) 35%, transparent);
  margin-top: var(--space-xl);
}

.welcome-link-card {
  display: block;
  padding: var(--space-xl) var(--space-2xl);
  text-decoration: none;
  color: var(--color-text);
  border-bottom: 0.5px solid color-mix(in srgb, var(--color-border) 60%, transparent);
  transition:
    background var(--transition-fast),
    padding-left var(--transition-fast);
  position: relative;
}

.welcome-link-card:last-child {
  border-bottom: none;
}

.welcome-link-card::before {
  content: '';
  position: absolute;
  left: -0.5px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--color-primary);
  opacity: 0;
  transition: opacity var(--transition-fast);
}

.welcome-link-card:hover {
  background: color-mix(in srgb, var(--color-primary) 5%, transparent);
}

.welcome-link-card:hover::before {
  opacity: 1;
}

.welcome-link-card:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: -2px;
}

.welcome-link-card strong {
  display: block;
  font-family: var(--font-heading);
  font-size: var(--text-lg);
  font-weight: var(--font-weight-bold);
  color: var(--color-heading);
  margin-bottom: var(--space-sm);
  letter-spacing: 0.01em;
  transition: color var(--transition-fast);
}

.welcome-link-card:hover strong {
  color: var(--color-link);
}

.welcome-link-card span {
  display: block;
  font-size: var(--text-base);
  color: var(--color-text-secondary);
  line-height: 1.8;
  max-width: 52ch;
}

/* ══════════════════════════════════════════════════════
   ACCESSIBILITY LIST
   ══════════════════════════════════════════════════════ */
.a11y-list {
  list-style: none;
  padding: 0;
  margin: var(--space-lg) 0;
}

.a11y-list li {
  padding: var(--space-md) 0 var(--space-md) var(--space-2xl);
  position: relative;
  font-size: var(--text-base);
  color: var(--color-text);
  line-height: 1.8;
  border-bottom: 0.5px solid color-mix(in srgb, var(--color-border) 50%, transparent);
}

.a11y-list li:last-child { border-bottom: none; }

.a11y-list li::before {
  content: '\2713';
  position: absolute;
  left: 0;
  top: var(--space-md);
  color: var(--color-primary);
  font-family: var(--font-heading);
  font-weight: var(--font-weight-bold);
}

/* ══════════════════════════════════════════════════════
   NEXT STEPS
   ══════════════════════════════════════════════════════ */
.next-steps {
  list-style: none;
  padding: 0;
  counter-reset: step;
  margin-top: var(--space-xl);
}

.next-steps li {
  padding: var(--space-xl) 0 var(--space-xl) calc(var(--space-3xl));
  position: relative;
  font-size: var(--text-base);
  color: var(--color-text);
  line-height: 1.9;
  max-width: 46ch;
  counter-increment: step;
  border-bottom: 0.5px solid color-mix(in srgb, var(--color-border) 50%, transparent);
}

.next-steps li:last-child { border-bottom: none; }

.next-steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: var(--space-xl);
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  color: var(--color-link);
  border: 0.5px solid color-mix(in srgb, var(--color-primary) 50%, transparent);
  font-family: var(--font-heading);
  font-size: var(--text-sm);
  font-style: italic;
  flex-shrink: 0;
}

.next-steps li strong {
  display: block;
  color: var(--color-heading);
  font-family: var(--font-heading);
  margin-bottom: var(--space-xs);
}

/* ══════════════════════════════════════════════════════
   CONTACT
   ══════════════════════════════════════════════════════ */
.contact-options {
  display: flex;
  gap: var(--space-md);
  margin: var(--space-xl) 0;
  flex-wrap: wrap;
}

.contact-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: var(--space-sm) var(--space-2xl);
  background: var(--color-btn-fill);
  color: #FAF8F5;
  text-decoration: none;
  font-size: var(--text-base);
  font-weight: var(--font-weight-bold);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  transition:
    background var(--transition-fast),
    transform var(--transition-fast),
    box-shadow var(--transition-fast);
}

.contact-link:hover {
  background: var(--color-btn-fill-hover);
  color: #FAF8F5;
  transform: translateY(-2px);
  box-shadow: 0 6px 24px color-mix(in srgb, var(--color-primary) 35%, transparent);
}

.contact-link:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

.contact-link:nth-child(2) {
  background: transparent;
  color: var(--color-link);
  border: 0.5px solid var(--color-primary);
}

.contact-link:nth-child(2):hover {
  background: var(--color-btn-fill);
  color: #FAF8F5;
}

.contact-note {
  font-family: var(--font-heading);
  font-size: var(--text-base);
  font-style: italic;
  color: var(--color-text-secondary);
  line-height: 1.8;
  max-width: 42ch;
}

/* ══════════════════════════════════════════════════════
   FOOTER
   ══════════════════════════════════════════════════════ */
.welcome-footer {
  text-align: center;
  padding: var(--space-3xl) var(--space-lg);
  border-top: 0.5px solid color-mix(in srgb, var(--color-border) 40%, transparent);
}

.footer-copyright {
  margin-top: var(--space-lg);
  font-family: var(--font-heading);
  font-size: var(--text-xs);
  font-style: italic;
  color: var(--color-text-light);
  letter-spacing: 0.08em;
}

.footer-copyright a {
  color: var(--color-text-secondary);
  text-decoration: none;
  transition: color var(--transition-fast);
  display: inline-block;
  min-height: 44px;
  padding: 4px 0;
  line-height: 1.6;
}

.footer-copyright a:hover { color: var(--color-link); }

.footer-copyright a:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
  color: var(--color-link);
}

.footer-hub-link {
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  text-decoration: none;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transition: color var(--transition-fast);
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 10px var(--space-lg);
}

.footer-hub-link:hover { color: var(--color-link); }

.footer-hub-link:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 4px;
}

/* ══════════════════════════════════════════════════════
   REDUCED MOTION
   ══════════════════════════════════════════════════════ */
@media (prefers-reduced-motion: reduce) {
  .hero-scroll-cue,
  .hero-scroll-cue::after {
    animation: none !important;
    opacity: 0.6;
  }
}

/* ══════════════════════════════════════════════════════
   LIGHT THEME
   ══════════════════════════════════════════════════════ */
[data-theme="light"] .welcome-link-card:hover {
  background: color-mix(in srgb, var(--color-primary) 6%, var(--color-background));
}

[data-theme="light"] .section-quote {
  background: radial-gradient(
    ellipse 60% 60% at center,
    color-mix(in srgb, var(--color-primary) 5%, transparent),
    transparent
  );
}

/* ══════════════════════════════════════════════════════
   FORCED COLORS
   ══════════════════════════════════════════════════════ */
@media (forced-colors: active) {
  .welcome-link-card,
  .next-step {
    border: 1px solid ButtonText;
    background: ButtonFace;
    color: ButtonText;
    forced-color-adjust: none;
  }

  .contact-link {
    background: ButtonFace;
    color: ButtonText;
    border: 2px solid ButtonText;
    forced-color-adjust: none;
  }

  .section-quote blockquote::before,
  .section-quote blockquote::after {
    color: ButtonText;
  }
}