/* Hero Redesign - Modern Two-Column Layout */

/* Hero Section Base */
.hero-redesign {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 100px 24px 60px;
  overflow: hidden;
}

/* Noise Texture Overlay */
.hero-texture-overlay {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.03;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
}

[data-theme="dark"] .hero-texture-overlay {
  opacity: 0.05;
  mix-blend-mode: overlay;
}

/* Main Grid Layout */
.hero-redesign-grid {
  max-width: 1200px;
  width: 100%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
  position: relative;
  z-index: 10;
}

/* Left Column - Typography */
.hero-left-column {
  text-align: left;
}

/* Designer Badge */
.hero-designer-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  margin-bottom: 32px;
  border-radius: 100px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  border: 2px solid transparent;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(250, 250, 252, 0.85)) padding-box,
    linear-gradient(180deg, rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.03)) border-box;
  background-clip: padding-box, border-box;
  color: var(--text-muted, #666);
  animation: fadeInUp 0.6s ease-out;
  backdrop-filter: blur(12px) saturate(150%);
  -webkit-backdrop-filter: blur(12px) saturate(150%);
  box-shadow:
    0 2px 8px rgba(0, 0, 0, 0.04),
    inset 0 1px 0 rgba(255, 255, 255, 0.7),
    inset 0 -1px 0 rgba(0, 0, 0, 0.02);
}

.hero-designer-badge svg {
  width: 12px;
  height: 12px;
  opacity: 0.7;
}

[data-theme="dark"] .hero-designer-badge {
  border: 2px solid transparent;
  background:
    linear-gradient(180deg, rgba(15, 20, 35, 0.9), rgba(10, 14, 25, 0.95)) padding-box,
    linear-gradient(180deg, rgba(140, 182, 255, 0.3), rgba(140, 182, 255, 0.1)) border-box;
  background-clip: padding-box, border-box;
  color: rgba(196, 215, 255, 0.9);
  box-shadow:
    0 2px 8px rgba(0, 15, 40, 0.3),
    inset 0 1px 0 rgba(140, 182, 255, 0.1),
    inset 0 -1px 0 rgba(0, 0, 0, 0.15);
}

/* Main Headline */
.hero-main-headline {
  font-family: var(--font-display);
  font-size: var(--display-size-md);
  font-weight: var(--display-weight);
  line-height: var(--display-line-height);
  letter-spacing: var(--display-letter-spacing);
  margin-bottom: 32px;
  color: var(--text-display);
  animation: fadeInUp 0.6s ease-out 0.1s backwards;
}

.hero-main-headline .hero-gradient-text {
  display: inline;
  background: linear-gradient(135deg, #78716c 0%, #a8a29e 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-style: italic;
  padding-right: 4px;
}

/* Hero Description */
.hero-description {
  font-family: var(--font-body);
  font-size: var(--body-size-lg);
  font-weight: var(--body-weight);
  line-height: var(--body-line-height);
  color: var(--text-muted);
  max-width: 520px;
  animation: fadeInUp 0.6s ease-out 0.2s backwards;
}

.hero-description .hero-emphasis {
  color: var(--text-body);
  font-weight: var(--weight-medium);
}

/* Quick Stats */
.hero-quick-stats {
  display: flex;
  align-items: center;
  gap: 32px;
  margin-top: 40px;
  animation: fadeInUp 0.6s ease-out 0.4s backwards;
}

.hero-stat-item {
  text-align: left;
}

.hero-stat-value {
  font-family: var(--font-heading);
  font-size: var(--heading-size-lg);
  font-weight: var(--weight-bold);
  color: var(--text-heading);
  line-height: var(--heading-line-height);
}

.hero-stat-label {
  font-family: var(--font-body);
  font-size: var(--body-size-xs);
  font-weight: var(--weight-medium);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-subtle);
  margin-top: 4px;
}

.hero-stat-divider {
  width: 1px;
  height: 40px;
  background: var(--border-primary, #e5e5e5);
}

[data-theme="dark"] .hero-stat-value {
  color: #fff;
}

[data-theme="dark"] .hero-stat-label {
  color: rgba(255, 255, 255, 0.4);
}

[data-theme="dark"] .hero-stat-divider {
  background: rgba(255, 255, 255, 0.1);
}

/* Right Column - Interactive Letter */
.hero-right-column {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Interactive Letter Card */
.hero-letter-wrapper {
  position: relative;
  width: 100%;
  max-width: 420px;
  margin: 0 auto;
  perspective: 1000px;
}

/* Ambient Glow */
.hero-letter-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 120%;
  height: 120%;
  border-radius: var(--radius-pill);
  opacity: 0.4;
  pointer-events: none;
  transition: background 0.7s ease;
  filter: blur(80px);
  background: rgba(200, 200, 200, 0.4);
}

.hero-letter-wrapper.is-open .hero-letter-glow {
  background: rgba(255, 140, 66, 0.3);
}

[data-theme="dark"] .hero-letter-glow {
  background: rgba(50, 50, 50, 0.4);
}

[data-theme="dark"] .hero-letter-wrapper.is-open .hero-letter-glow {
  background: rgba(180, 100, 50, 0.3);
}

/* Letter Card Container */
.hero-letter-card {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  border: 1px solid var(--border-primary, #e5e5e5);
  background: var(--bg-primary, #fff);
  box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.1);
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  height: 340px;
  cursor: pointer;
}

@media (hover: hover) {
  .hero-letter-card:hover:not(.is-open) {
    transform: translateY(-4px) scale(1.01);
    box-shadow: 0 25px 50px -10px rgba(0, 0, 0, 0.15);
  }
}

.hero-letter-card.is-open {
  height: 520px;
  cursor: default;
}

[data-theme="dark"] .hero-letter-card {
  background: rgba(15, 22, 41, 0.8);
  border-color: rgba(100, 150, 255, 0.12);
  box-shadow: 0 20px 40px -10px rgba(0, 15, 40, 0.6);
}

/* Closed State - Envelope Cover */
.hero-letter-closed {
  position: absolute;
  inset: 0;
  z-index: 20;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 32px;
  text-align: center;
  transition: opacity 0.4s ease, visibility 0.4s ease;
}

.hero-letter-card.is-open .hero-letter-closed {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

/* Envelope Flap Hint */
.hero-envelope-flap {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 120px;
  opacity: 0.08;
  background: linear-gradient(to bottom, currentColor, transparent);
  clip-path: polygon(0 0, 100% 0, 50% 100%);
}

[data-theme="dark"] .hero-envelope-flap {
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0.15), transparent);
}

/* Wax Seal Button */
.hero-wax-seal {
  position: relative;
  width: 80px;
  height: 80px;
  border-radius: var(--radius-pill);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
  background: linear-gradient(135deg, #78716c 0%, #57534e 100%);
  box-shadow: 0 8px 24px rgba(120, 113, 108, 0.3);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  cursor: pointer;
}

@media (hover: hover) {
  .hero-wax-seal:hover {
    transform: scale(1.1);
    box-shadow: 0 12px 32px rgba(120, 113, 108, 0.4);
  }
}

.hero-wax-seal:active {
  transform: scale(0.95);
}

.hero-wax-seal svg {
  width: 32px;
  height: 32px;
  color: rgba(255, 255, 255, 0.9);
}

/* Bluish wax seal in dark mode */
[data-theme="dark"] .hero-wax-seal {
  background: linear-gradient(135deg, #5a6a8a 0%, #3d4a66 100%);
  box-shadow: 0 8px 24px rgba(60, 80, 120, 0.4);
}

@media (hover: hover) {
  [data-theme="dark"] .hero-wax-seal:hover {
    box-shadow: 0 12px 32px rgba(80, 110, 160, 0.5);
  }
}

[data-theme="dark"] .hero-wax-seal svg {
  color: rgba(255, 255, 255, 0.9);
}

/* Pulse Ring Animation */
.hero-seal-pulse {
  position: absolute;
  inset: 0;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(255, 255, 255, 0.3);
  animation: sealPulse 2s ease-out infinite;
}

@keyframes sealPulse {
  0% {
    transform: scale(1);
    opacity: 0.4;
  }
  100% {
    transform: scale(1.5);
    opacity: 0;
  }
}

/* Closed State Text */
.hero-letter-title-closed {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-style: italic;
  color: var(--text-secondary, #333);
  margin-bottom: 8px;
}

.hero-letter-subtitle-closed {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-weight: 700;
  opacity: 0.5;
  color: var(--text-muted, #666);
}

[data-theme="dark"] .hero-letter-title-closed {
  color: rgba(255, 255, 255, 0.85);
}

[data-theme="dark"] .hero-letter-subtitle-closed {
  color: rgba(255, 255, 255, 0.4);
}

[data-theme="dark"] .hero-seal-pulse {
  border-color: rgba(100, 150, 255, 0.3);
}

/* Open State - Letter Content */
.hero-letter-open {
  position: relative;
  z-index: 10;
  padding: 32px;
  height: 100%;
  display: flex;
  flex-direction: column;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.5s ease 0.1s, visibility 0.5s ease 0.1s;
}

.hero-letter-card.is-open .hero-letter-open {
  opacity: 1;
  visibility: visible;
}

/* Letter Header */
.hero-letter-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 28px;
}

.hero-letter-location {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 100px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  background: var(--bg-secondary, #f5f5f5);
  border: 1px solid var(--border-primary, #e5e5e5);
  color: var(--text-muted, #666);
}

.hero-letter-location svg {
  width: 12px;
  height: 12px;
}

[data-theme="dark"] .hero-letter-location {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.5);
}

/* Close Button */
.hero-letter-close {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-pill);
  border: none;
  background: transparent;
  color: var(--text-muted, #666);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease, transform 0.2s ease;
}

@media (hover: hover) {
  .hero-letter-close:hover {
    background: var(--bg-secondary, #f5f5f5);
  }
}

.hero-letter-close svg {
  width: 20px;
  height: 20px;
}

[data-theme="dark"] .hero-letter-close {
  color: rgba(255, 255, 255, 0.5);
}

@media (hover: hover) {
  [data-theme="dark"] .hero-letter-close:hover {
    background: rgba(255, 255, 255, 0.1);
  }
}

/* Letter Body */
.hero-letter-body {
  flex: 1;
  font-family: var(--font-display);
  font-size: 1.1rem;
  line-height: 1.75;
  color: var(--text-secondary, #444);
}

.hero-letter-body p {
  margin-bottom: 16px;
}

.hero-letter-body .hero-quote-mark {
  font-size: 2.5rem;
  float: left;
  margin-right: 8px;
  margin-top: -6px;
  color: #a3a3a3; /* Solid color instead of opacity */
  line-height: 1;
}

:root[data-theme="dark"] .hero-letter-body .hero-quote-mark {
  color: #6b6b6b;
}

.hero-letter-body .hero-highlight {
  font-style: italic;
  color: #78716c;
}

[data-theme="dark"] .hero-letter-body {
  color: #b3b3b3; /* Solid color - 8:1 contrast ratio */
}

/* Letter Footer / Signature */
.hero-letter-footer {
  margin-top: auto;
  padding-top: 24px;
  border-top: 1px dashed var(--border-primary, #e5e5e5);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.hero-letter-signature {
  font-family: var(--font-heading);
  font-style: italic;
  font-size: 1.5rem;
  color: var(--text-primary, #1a1a1a);
  transform: rotate(-2deg);
}

[data-theme="dark"] .hero-letter-signature {
  color: #fff;
}

[data-theme="dark"] .hero-letter-footer {
  border-color: rgba(255, 255, 255, 0.1);
}

/* Read Full Story Button */
.hero-letter-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: 100px;
  font-size: 0.85rem;
  font-weight: 700;
  background: var(--text-primary, #1a1a1a);
  color: #fff;
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

@media (hover: hover) {
  .hero-letter-cta:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
  }
}

.hero-letter-cta svg {
  width: 14px;
  height: 14px;
}

[data-theme="dark"] .hero-letter-cta {
  background: #fff;
  color: #1a1a1a;
}

/* Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Responsive Design */
@media (max-width: 1024px) {
  .hero-redesign-grid {
    gap: 48px;
  }

  .hero-main-headline {
    font-size: clamp(2rem, 4vw, 3rem);
  }
}

@media (max-width: 768px) {
  .hero-redesign {
    padding: 120px 20px 60px;
  }

  .hero-redesign-grid {
    grid-template-columns: 1fr;
    gap: 48px;
    text-align: center;
  }

  .hero-left-column {
    text-align: center;
  }

  .hero-description {
    max-width: 100%;
    margin: 0 auto;
  }

  .hero-quick-stats {
    justify-content: center;
  }

  .hero-letter-card {
    max-width: 360px;
    margin: 0 auto;
  }

  .hero-letter-card.is-open {
    height: 480px;
  }
}

@media (max-width: 480px) {
  .hero-redesign {
    padding: 100px 16px 40px;
  }

  .hero-main-headline {
    font-size: 2rem;
  }

  .hero-description {
    font-size: 1rem;
  }

  .hero-quick-stats {
    gap: 20px;
  }

  .hero-stat-value {
    font-size: 1.5rem;
  }

  .hero-letter-card {
    height: 300px;
  }

  .hero-letter-card.is-open {
    height: 440px;
  }

  .hero-letter-open {
    padding: 24px;
  }

  .hero-letter-body {
    font-size: 1rem;
  }

  .hero-wax-seal {
    width: 64px;
    height: 64px;
  }

  .hero-wax-seal svg {
    width: 24px;
    height: 24px;
  }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  .hero-designer-badge,
  .hero-main-headline,
  .hero-description,
  .hero-quick-stats,
  .hero-letter-card,
  .hero-wax-seal,
  .hero-letter-closed,
  .hero-letter-open {
    animation: none !important;
    transition: none !important;
  }

  .hero-seal-pulse {
    animation: none !important;
  }
}

/* About Page Hero Overrides */
.about-hero-redesign.hero-redesign {
  min-height: auto;
  height: 600px;
  padding: 80px 24px 40px;
}

@media (max-width: 768px) {
  .about-hero-redesign.hero-redesign {
    height: auto;
    min-height: auto;
    padding: 80px 20px 40px;
  }
}

@media (max-width: 480px) {
  .about-hero-redesign.hero-redesign {
    padding: 70px 16px 30px;
  }
}
