/* 
   Engineering Induction Wishlist - Mobile-First Editorial CSS
   Style: Modern Magazine / Premium Journal.
   Focus: High-quality typography, generous whitespace, mobile-first layouts, bottom-drawer mobile modals, touch-optimized interactions.
*/

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600&family=Playfair+Display:ital,wght@0,400;0,500;0,600;0,700;1,400&display=swap');

:root {
  /* Colors */
  --color-bg: #ffffff;
  --color-bg-alt: #faf9f6; /* Warm alabaster/off-white */
  --color-text-primary: #111111; /* Rich charcoal */
  --color-text-secondary: #333333; /* Soft charcoal */
  --color-text-muted: #767676; /* Neutral grey */
  
  --color-brand-orange: #ff8c00;
  --color-brand-orange-hover: #e07b00;
  --color-brand-orange-light: #fff5e6;
  --color-border: #e0ded9; /* Subtle warm border */
  --color-border-dark: #111111;
  --color-overlay: rgba(17, 17, 17, 0.45);

  /* Fonts */
  --font-serif: 'Playfair Display', Georgia, Cambria, serif;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  
  /* Reading Limits & Layout widths */
  --reading-width: 65ch;
  --container-width: 1140px;
}

/* ==========================================================================
   Base Mobile Styles (default for phone screens)
   ========================================================================== */

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
  background-color: var(--color-bg);
}

body {
  font-family: var(--font-sans);
  color: var(--color-text-secondary);
  background-color: var(--color-bg);
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  padding: 0;
  /* Prevent horizontal scroll issues on mobile */
  overflow-x: hidden;
}

/* Typography Defaults on Mobile */
h1, h2, h3, h4 {
  color: var(--color-text-primary);
  font-family: var(--font-serif);
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

h1 { font-size: 2.25rem; }
h2 { font-size: 1.85rem; }
h3 { font-size: 1.55rem; }

p {
  font-size: 1.05rem;
  font-weight: 400;
  margin-bottom: 1.25rem;
}

a {
  color: var(--color-text-primary);
  text-decoration: underline;
  text-underline-offset: 4px;
  transition: all 0.2s ease;
}

a:hover {
  color: var(--color-brand-orange);
}

/* Hero Section (Mobile Base Stack) */
.hero {
  padding: 3rem 1.25rem;
  background-color: #ffffff;
}

.hero-spread {
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
}

/* 4:5 Aspect Ratio Editorial Portrait Wrapper */
.portrait-container {
  width: 100%;
}

.portrait-wrapper {
  width: 100%;
  aspect-ratio: 4 / 5;
  background-color: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  overflow: hidden;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.portrait-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.portrait-fallback {
  width: 100%;
  height: 100%;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  text-align: center;
  background: linear-gradient(135deg, #ffffff 0%, var(--color-bg-alt) 100%);
  border: 1px dashed var(--color-border);
}

.fallback-label {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  color: var(--color-text-primary);
  margin-bottom: 0.5rem;
}

.fallback-sub {
  font-family: monospace;
  font-size: 0.75rem;
  color: var(--color-text-muted);
}

/* Hero Typography Columns */
.hero-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.hero-name {
  font-family: var(--font-serif);
  font-size: 2.5rem;
  font-weight: 400;
  line-height: 1.15;
  color: var(--color-text-primary);
  margin-bottom: 0.25rem;
  letter-spacing: -0.03em;
}

.hero-title {
  font-family: var(--font-serif);
  font-size: 1.6rem;
  font-style: italic;
  font-weight: 400;
  color: var(--color-text-muted);
  margin-bottom: 1.25rem;
  line-height: 1.2;
}

.hero-socials {
  margin-bottom: 2rem;
  display: flex;
  gap: 0.25rem;
  align-items: center;
  font-family: var(--font-sans);
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.hero-socials a {
  color: var(--color-text-primary);
  text-decoration: none;
  border-bottom: 1px solid var(--color-border);
  padding: 8px 12px; /* Large tap targets on mobile */
  transition: all 0.2s ease;
}

.hero-socials a:hover {
  color: var(--color-brand-orange);
  border-bottom-color: var(--color-brand-orange);
}

.socials-sep {
  color: var(--color-text-muted);
  padding: 0 4px;
}

.hero-message {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  line-height: 1.6;
  color: var(--color-text-primary);
  border-left: 2px solid var(--color-border-dark);
  padding-left: 1.25rem;
  margin-top: 0.5rem;
}

/* Wishlist Section (Mobile Stack) */
.wishlist-section {
  padding: 3rem 0 5rem;
  border-top: 1px solid var(--color-border);
}

.section-header {
  padding: 0 1.25rem;
  margin-bottom: 3.5rem;
  text-align: center;
}

.section-header h2 {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

.section-header p {
  color: var(--color-text-muted);
  font-size: 1.05rem;
}

/* Wish Item Mobile Stack */
.wish-item {
  width: 100%;
  padding: 4rem 1.25rem;
}

.wish-item:nth-child(even) {
  background-color: var(--color-bg-alt);
}

.wish-container {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

/* Base Mobile order (Image top, text bottom always) */
.wish-image-container {
  width: 100%;
  order: -1;
}

.wish-content {
  width: 100%;
}

.wish-meta {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--color-brand-orange);
  font-weight: 600;
  margin-bottom: 0.5rem;
  display: block;
}

.wish-title {
  font-size: 1.85rem;
  margin-bottom: 1rem;
  color: var(--color-text-primary);
  font-weight: 500;
  letter-spacing: -0.02em;
}

.wish-description {
  color: var(--color-text-secondary);
  font-size: 1.05rem;
  line-height: 1.75;
  margin-bottom: 2rem;
}

/* Aspect Ratio 4:3 Wishlist Images Placeholders */
.wish-image-wrapper {
  width: 100%;
  aspect-ratio: 4 / 3;
  background-color: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  overflow: hidden;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.wish-image-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.wish-fallback {
  width: 100%;
  height: 100%;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  text-align: center;
  background: radial-gradient(circle at center, #ffffff 0%, var(--color-bg-alt) 100%);
  border: 1px dashed var(--color-border);
}

.wish-fallback-icon {
  font-size: 2rem;
  margin-bottom: 0.5rem;
  opacity: 0.75;
}

.wish-fallback-title {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  color: var(--color-text-primary);
  margin-bottom: 0.25rem;
}

.wish-fallback-path {
  font-family: monospace;
  font-size: 0.7rem;
  color: var(--color-text-muted);
}

/* Mobile-optimized Action Buttons */
.btn-group {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 1.15rem 1.5rem; /* Tall padding for easy mobile touch */
  border-radius: 0px; /* Sharp corners */
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
  width: 100%; /* Full width on mobile to make pressing extremely easy */
  min-height: 48px; /* Android accessibility standard */
}

.btn-primary {
  background-color: var(--color-border-dark);
  color: #ffffff;
  border: 1px solid var(--color-border-dark);
}

.btn-primary:hover, .btn-primary:active {
  background-color: var(--color-brand-orange);
  border-color: var(--color-brand-orange);
  color: #ffffff;
}

.btn-secondary {
  background-color: transparent;
  color: var(--color-text-primary);
  border: 1px solid var(--color-border);
}

.btn-secondary:hover, .btn-secondary:active {
  border-color: var(--color-border-dark);
  background-color: rgba(0, 0, 0, 0.02);
}

/* Editorial Footer (Mobile Stack) */
.site-footer {
  padding: 4rem 1.25rem;
  border-top: 1px solid var(--color-border);
  background-color: #ffffff;
  text-align: center;
}

.footer-logo {
  font-family: var(--font-serif);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--color-text-primary);
  margin-bottom: 1.25rem;
}

.footer-text {
  color: var(--color-text-muted);
  font-size: 0.95rem;
  margin-bottom: 2rem;
}

.footer-nav {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  margin-bottom: 2.5rem;
  align-items: center;
}

.footer-nav a {
  text-decoration: none;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-text-muted);
  padding: 6px 12px; /* Larger touch targets */
}

.footer-nav a:hover {
  color: var(--color-text-primary);
}

.footer-credits {
  font-size: 0.8rem;
  color: var(--color-text-muted);
  letter-spacing: 0.02em;
}

/* ==========================================================================
   Mobile Bottom-Drawer Modal Style (Android/iOS optimized)
   ========================================================================== */

.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1000;
  display: flex;
  align-items: flex-end; /* Align to bottom for drawer feel on mobile */
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease-out;
}

.modal.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: var(--color-overlay);
  backdrop-filter: blur(3px);
}

.modal-container {
  position: relative;
  background-color: #ffffff;
  width: 100%;
  max-height: 85vh; /* Keep screen space visible */
  overflow-y: auto;
  border-radius: 16px 16px 0 0; /* Rounded top corners for drawer style */
  border: 1px solid var(--color-border);
  border-bottom: none;
  padding: 2.5rem 1.5rem 3rem;
  z-index: 1001;
  transform: translateY(100%); /* Slide up animation */
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1);
  margin: 0;
}

.modal.active .modal-container {
  transform: translateY(0);
}

.modal-close {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  background: none;
  border: none;
  font-size: 1.75rem;
  cursor: pointer;
  color: var(--color-text-muted);
  line-height: 1;
  padding: 0.5rem; /* Larger touch hitbox */
}

.modal-close:hover {
  color: var(--color-text-primary);
}

.modal-header {
  margin-bottom: 1.75rem;
  text-align: left;
}

.modal-title {
  font-size: 1.65rem;
  font-weight: 500;
  color: var(--color-text-primary);
  margin-bottom: 0.5rem;
}

.modal-desc {
  color: var(--color-text-muted);
  font-size: 0.95rem;
  line-height: 1.5;
}

/* Bank Account Card Styling */
.editorial-bank-details {
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
  padding: 1.25rem 0;
  margin-bottom: 1.75rem;
}

.detail-row {
  display: flex;
  flex-direction: column; /* Stack details on mobile */
  gap: 0.25rem;
  padding: 0.75rem 0;
  border-bottom: 1px dashed var(--color-border);
}

.detail-row:last-child {
  border-bottom: none;
}

.detail-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-text-muted);
}

.detail-val {
  font-family: monospace;
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--color-text-primary);
  display: flex;
  align-items: center;
  justify-content: space-between; /* Space out value and copy btn */
  width: 100%;
}

.inline-copy-btn {
  background: none;
  border: 1px solid var(--color-border);
  padding: 0.4rem 0.8rem; /* Large touch targets */
  font-family: var(--font-sans);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  cursor: pointer;
  transition: all 0.15s ease;
  min-height: 38px;
}

.inline-copy-btn:hover, .inline-copy-btn:active {
  border-color: var(--color-border-dark);
}

/* Contact Info layout */
.minimal-info-box {
  margin-bottom: 1.75rem;
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
  padding: 1.25rem 0;
}

.info-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-text-muted);
  margin-bottom: 0.25rem;
}

.info-val {
  font-family: monospace;
  font-size: 1.35rem;
  color: var(--color-text-primary);
  font-weight: 500;
}

.whatsapp-action-block {
  margin-top: 1.75rem;
}


/* ==========================================================================
   Responsive Scaling / Desktop Escalation (Screen width >= 768px)
   ========================================================================== */

@media (min-width: 768px) {
  h1 { font-size: 3.5rem; }
  h2 { font-size: 2.5rem; }
  h3 { font-size: 2.25rem; }
  
  p {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
  }

  /* Hero Desktop Layout grid */
  .hero {
    padding: 6rem 2rem;
  }

  .hero-spread {
    max-width: var(--container-width);
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    gap: 5rem;
    align-items: center;
  }

  .portrait-container {
    order: 0;
  }

  .hero-name {
    font-size: 3.5rem;
    margin-bottom: 0.5rem;
  }

  .hero-title {
    font-size: 2.25rem;
    margin-bottom: 1.5rem;
  }

  .hero-socials {
    margin-bottom: 2.5rem;
    font-size: 0.85rem;
  }

  .hero-socials a {
    padding: 2px 0;
  }

  .hero-message {
    font-size: 1.45rem;
    padding-left: 1.75rem;
    margin-top: 1rem;
  }

  /* Wishlist Section Layout */
  .wishlist-section {
    padding: 4rem 0 8rem;
  }

  .section-header {
    max-width: var(--reading-width);
    margin: 0 auto 6rem;
    padding: 0 2rem;
  }

  /* Wishlist Alternating Grid */
  .wish-item {
    padding: 6rem 2rem;
  }

  .wish-container {
    max-width: var(--container-width);
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    gap: 6rem;
    align-items: center;
  }

  /* Image position restoration */
  .wish-image-container {
    order: unset; /* Normal grid placement */
  }

  .wish-item.layout-right .wish-container {
    direction: rtl; /* Alternating visual flow */
  }

  .wish-item.layout-right .wish-content,
  .wish-item.layout-right .wish-image-container {
    direction: ltr; /* Reset content direction */
  }

  .wish-title {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
  }

  .wish-description {
    font-size: 1.15rem;
    margin-bottom: 2.5rem;
  }

  /* Button alignment on desktop */
  .btn-group {
    flex-direction: row;
    gap: 1.25rem;
  }

  .btn {
    width: auto;
  }

  /* Footer Layout on desktop */
  .site-footer {
    padding: 6rem 2rem;
  }

  .footer-logo {
    font-size: 1.5rem;
  }

  .footer-nav {
    flex-direction: row;
    justify-content: center;
    gap: 2.5rem;
    margin-bottom: 3rem;
  }

  .footer-nav a {
    padding: 0;
  }

  /* Standard Centered Modals for Desktop */
  .modal {
    align-items: center; /* Center vertically */
  }

  .modal-container {
    max-width: 480px;
    border-radius: 0px; /* Sharp editorial border */
    border: 1px solid var(--color-border-dark);
    padding: 3rem 2.5rem;
    transform: translateY(10px);
    margin: 1rem;
    border-bottom: 1px solid var(--color-border-dark);
  }

  /* Horizontal details inside bank card on desktop */
  .detail-row {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }

  .detail-val {
    justify-content: flex-end;
    width: auto;
  }

  .inline-copy-btn {
    padding: 0.2rem 0.5rem;
  }

  .minimal-info-box {
    border-top: none;
    border-bottom: none;
    padding: 0;
  }
}
