/* ==========================================================================
   1. MASTER SYSTEM VARIABLES & GLOBAL RESETS
   ========================================================================== */

:root {
  /* Core Brand Color Palette */
  --bg: #FDFbf7;           /* Soft, warm paper creme */
  --surface: #ffffff;      /* Crisp white for cards/bento items */
  --text-main: #2c2a29;    /* Deep charcoal for clean readability */
  --text-muted: #5e5b58;   /* Warm grey for secondary text descriptions */
  --accent: #4a6b53;       /* Elegant, muted sage green */
  --accent-hover: #364f3d; /* Darker sage for interaction depth */
  --border: #e6e2d8;       /* Subtle, warm card borders */
  --danger: #c94b4b;       /* Soft red for warnings/errors */

  /* Typography Infrastructure */
  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-heading: "Georgia", "Times New Roman", serif; /* Storybook editorial feel */
}

*, *::before, *::after {
  box-sizing: border-box; /* Normalizes padding behavior across grids and inputs */
}

body, html {
  margin: 0;
  padding: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  background-color: var(--bg);
  color: var(--text-main);
  font-size: 112.5% !important; /* Forces global 18px base execution for typography scales */
  line-height: 1.6;
  overflow-x: hidden;
}

h1, h2, h3, .brand-name, .testimonial, .testimonial-text {
  font-family: var(--font-heading);
  color: var(--text-main);
}

/* ==========================================================================
   2. CORE BENTO GRID ARCHITECTURE
   ========================================================================== */

.bento-container {
  display: grid;
  grid-template-columns: repeat(6, 1fr); /* 6-column granularity matrix */
  gap: 1.5rem;
  padding: 2rem;
  max-width: 1400px;
  margin: 0 auto;
}

.bento-item {
  background: var(--surface);
  border-radius: 12px;
  padding: 2.5rem;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04); /* Subdued light theme drop shadow */
  transition: all 0.2s ease;
}

.bento-item:hover {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
  border-color: var(--accent);
}

/* Section Matrix Rules */
.navbar {
  grid-column: span 6;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
}

.split-half {
  grid-column: span 3;
}

.testimonial {
  grid-column: span 6;
  border-left: 4px solid var(--accent);
  padding: 2.5rem;
  font-style: italic;
  font-size: 1.3rem;
}

/* ==========================================================================
   3. COMPONENT STYLING (HERO, NEWSLETTER, BUTTONS)
   ========================================================================== */

/* Hero Framework */
.hero-split {
  grid-column: span 6;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
  padding: 3rem 2rem;
}

.hero-text h1 {
  margin: 0 0 1rem 0;
  font-size: clamp(2.5rem, 6vw, 4rem);
  letter-spacing: -1.5px;
  line-height: 1.1;
}

.hero-image-container {
  position: relative;
  width: 100%;
  height: 450px;
  overflow: hidden;
  border-radius: 12px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.1);
}

.hero-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 1.5s ease-in-out;
}

.hero-image.active {
  opacity: 1;
}

/* Story Framing Split */
.story-section {
  grid-column: span 6;
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 2rem;
  align-items: center;
}

.story-section img {
  width: 100%;
  border-radius: 8px;
  height: 300px;
  object-fit: cover;
}

/* Newsletter Blocks */
.newsletter {
  grid-column: span 6;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.newsletter form {
  display: flex;
  width: 100%;
  max-width: 500px;
  gap: 1rem;
}

/* Master Component Buttons */
.btn {
  background: var(--accent);
  color: #ffffff;
  padding: 14px 24px;
  border-radius: 30px;
  font-weight: bold;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn:hover {
  filter: brightness(1.1);
  transform: translateY(-2px);
  background: var(--accent-hover);
}

.btn-secondary {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-muted);
  margin-top: 0.5rem;
}

.btn-secondary:hover {
  background: var(--border);
  color: var(--text-main);
  transform: translateY(-2px);
}

/* ==========================================================================
   4. COMPACT DATA INPUT FIELDS & COMPACT PAYID SELECTOR GROUP
   ========================================================================== */

/* Tightened up generic fields to sit neatly on small viewports */
input[type="text"],
input[type="email"],
input[type="tel"] {
  padding: 10px 12px; /* Reduced from 14px to save vertical real estate */
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--surface); 
  color: var(--text-main);    
  font-family: var(--font-body);
  font-size: 0.95rem; /* Marginally scaled down to stay proportioned */
  width: 100%;
  box-sizing: border-box;
  transition: border-color 0.2s, box-shadow 0.2s;
}

/* Compressed PayID Panel Layout Container */
.payid-selector-group {
  background: var(--surface); 
  border: 1px solid var(--border);
  padding: 0.85rem 1rem; /* Reduced padding from 1.25rem to pull content up */
  border-radius: 8px;
  margin: 0.25rem 0;     /* Kept structural margins minimal */
  display: flex;
  flex-direction: column;
  gap: 0.4rem;           /* Decreased from 0.75rem for ultra-dense item packing */
  text-align: left;
}

.payid-title {
  margin: 0 0 0.2rem 0;
  font-size: 0.85rem;   /* Crisp, compact header sizing */
  font-weight: bold;
  color: var(--text-main);
}

/* Highly Optimized Compact Label Rows */
.payid-label {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 12px;    /* Slashed padding from 12px/14px down to 6px/12px to save height */
  border: 1px solid var(--border);
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.88rem;   /* Legible yet spacesaving text matrix */
  color: var(--text-main);
  background-color: var(--bg);
  transition: all 0.2s ease;
}

.payid-label:hover {
  border-color: var(--accent);
  background-color: var(--surface);
}

/* Reduced size footprint of radio node elements */
.payid-label input[type="radio"] {
  accent-color: var(--accent);
  margin: 0;
  width: 15px;          /* Scaled down from 18px */
  height: 15px;         /* Scaled down from 18px */
}

.payid-label:has(input[type="radio"]:checked) {
  border-color: var(--accent);
  background-color: #f0f4f1; 
  font-weight: 600;
}

/* ==========================================================================
   5. SANITIZED INTERACTIVE MODAL CANVAS
   ========================================================================== */

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(44, 42, 41, 0.4); /* Elegant glass mask blur */
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  backdrop-filter: blur(6px);
}

.modal-content {
  position: relative;
  max-width: 480px;
  width: 95%;
  background-color: var(--bg);
  color: var(--text-main);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 2.5rem;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.08);
}

.modal-close-btn {
  position: absolute;
  top: 15px;
  right: 20px;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.75rem;
  cursor: pointer;
  transition: color 0.2s ease;
}

.modal-close-btn:hover {
  color: var(--danger);
}

.form-description {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-top: -0.5rem;
  margin-bottom: 1.5rem;
  text-align: left;
}

/* ==========================================================================
   6. GLOBAL FOOTER LAYOUT
   ========================================================================== */

.site-footer {
  grid-column: span 6;
  border-top: 1px solid var(--border);
  padding: 4rem 2rem 2rem 2rem; 
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 3rem;
  margin-top: 2rem;
  color: var(--text-muted);
}

.footer-logo-area img {
  height: 24px;
  filter: grayscale(100%);
  margin-right: 8px;
}

.footer-logo-area .brand-name {
  font-size: 1.2rem;
  color: var(--text-main);
}

.footer-column {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.footer-column h4 {
  color: var(--text-main);
  margin: 0 0 0.5rem 0;
  font-family: var(--font-body);
  text-transform: uppercase;
  font-size: 0.8rem;
  letter-spacing: 0.05rem;
}

.footer-column a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 1rem;
  transition: color 0.2s ease;
}

.footer-column a:hover {
  color: var(--accent);
}

.footer-tagline {
  font-size: 0.9rem;
  line-height: 1.6;
  max-width: 300px;
}

/* ==========================================================================
   7. STABLE RESPONSIVE CROSS-PLATFORM BREAKPOINTS
   ========================================================================== */

@media (max-width: 1024px) {
  .split-half {
    grid-column: span 6;
  }
}

@media (max-width: 768px) {
  .bento-container {
    grid-template-columns: 1fr;
    padding: 1rem;
  }

  .bento-item, .hero-split, .testimonial, .story-section, .newsletter, .navbar, .site-footer {
    grid-column: 1 / -1;
  }

  .hero-split {
    grid-template-columns: 1fr;
    text-align: center;
    padding: 2rem 1rem;
  }

  .hero-image-container {
    height: 300px;
    order: -1; /* Pushes emotional photography to the top on mobile phones */
  }

  .story-section {
    grid-template-columns: 1fr;
  }

  .newsletter {
    flex-direction: column;
    text-align: center;
  }

  .newsletter form {
    flex-direction: column;
  }

  .brand-name {
    display: none; /* Keeps structural footprint lean on mobile nav bars */
  }

  .hero-text h1 {
    font-size: 2.2rem;
  }

  .site-footer {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 2rem;
  }
  
  .footer-tagline {
    margin: 0 auto;
  }
  
  .footer-logo-area {
    justify-content: center;
  }
}