/* ═══════════════════════════════════════════════════════════════
   HardshipHelper360 — style.css
   MsDee360 Studio LLC · hardshiphelper360.org · 2026
   Aesthetic: Calm authority — soft blue/white, serif trustworthiness
═══════════════════════════════════════════════════════════════ */

/* ── Reset & Base ─────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  /* Colors */
  --navy:        #1B3A5C;
  --navy-deep:   #122943;
  --blue:        #2E6DA4;
  --blue-mid:    #3D82BF;
  --blue-light:  #EAF2FB;
  --blue-pale:   #F4F8FD;
  --teal-accent: #2A8FA8;
  --white:       #FFFFFF;
  --off-white:   #F8FAFC;
  --text-dark:   #1A2A3A;
  --text-mid:    #3D5269;
  --text-muted:  #6B829A;
  --border:      #D0DFEe;
  --border-light:#E8EFF7;
  --success:     #2E8B57;
  --error-bg:    #FFF4F4;
  --error-border:#E8A0A0;
  --error-text:  #8B2020;

  /* Typography */
  --font-display: 'Lora', Georgia, serif;
  --font-body:    'DM Sans', 'Helvetica Neue', sans-serif;

  /* Spacing */
  --space-xs:  0.5rem;
  --space-sm:  1rem;
  --space-md:  1.75rem;
  --space-lg:  3rem;
  --space-xl:  5rem;

  /* Layout */
  --max-w: 780px;
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;

  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(27,58,92,0.06);
  --shadow-md: 0 6px 24px rgba(27,58,92,0.10);
  --shadow-lg: 0 16px 48px rgba(27,58,92,0.13);
}

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: var(--font-body);
  color: var(--text-dark);
  background: var(--off-white);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── Container ────────────────────────────────────────────── */
.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--space-md);
}

/* ── Header ───────────────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,0.96);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border-light);
}

.header-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0.875rem var(--space-md);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  text-decoration: none;
}

.logo-icon {
  color: var(--teal-accent);
  font-size: 1.1rem;
  line-height: 1;
}

.logo-text {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--navy);
  letter-spacing: -0.01em;
}

.logo-360 {
  color: var(--teal-accent);
}

.header-nav a {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--blue);
  padding: 0.5rem 1.1rem;
  border: 1.5px solid var(--blue-mid);
  border-radius: 50px;
  transition: background 0.18s, color 0.18s;
}

.header-nav a:hover {
  background: var(--blue);
  color: var(--white);
  text-decoration: none;
}

/* ── Hero ─────────────────────────────────────────────────── */
.hero {
  position: relative;
  background: linear-gradient(160deg, var(--navy-deep) 0%, var(--navy) 55%, var(--blue) 100%);
  color: var(--white);
  padding: var(--space-xl) 0 calc(var(--space-xl) + 2rem);
  overflow: hidden;
  text-align: center;
}

.hero-bg-shape {
  position: absolute;
  top: -80px;
  right: -120px;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(42,143,168,0.25) 0%, transparent 70%);
  pointer-events: none;
}

.hero-badge {
  display: inline-block;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.25);
  color: rgba(255,255,255,0.9);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.35rem 1rem;
  border-radius: 50px;
  margin-bottom: 1.5rem;
}

.hero-headline {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 700;
  line-height: 1.18;
  letter-spacing: -0.02em;
  margin-bottom: 1.25rem;
  color: var(--white);
}

.hero-sub {
  font-size: clamp(1rem, 2vw, 1.125rem);
  line-height: 1.7;
  color: rgba(255,255,255,0.82);
  max-width: 580px;
  margin: 0 auto 2.25rem;
}

.trust-micro {
  margin-top: 0.875rem;
  font-size: 0.8rem;
  color: rgba(255,255,255,0.55);
  letter-spacing: 0.03em;
}

.hero-scroll-hint {
  position: absolute;
  bottom: 1.25rem;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255,255,255,0.35);
  font-size: 1.2rem;
  animation: bounce 2.5s ease-in-out infinite;
}

@keyframes bounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50%       { transform: translateX(-50%) translateY(6px); }
}

/* ── Buttons ──────────────────────────────────────────────── */
.btn-primary {
  display: inline-block;
  background: var(--teal-accent);
  color: var(--white);
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  padding: 0.875rem 2.25rem;
  border: none;
  border-radius: 50px;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
  box-shadow: 0 4px 16px rgba(42,143,168,0.35);
  text-decoration: none;
}

.btn-primary:hover {
  background: #218EA6;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(42,143,168,0.4);
  text-decoration: none;
  color: var(--white);
}

.btn-primary:active { transform: translateY(0); }

.btn-generate {
  font-size: 1.05rem;
  padding: 1rem 2.75rem;
  margin-top: 0.5rem;
}

.btn-action {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: var(--white);
  color: var(--navy);
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 500;
  padding: 0.7rem 1.35rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background 0.18s, border-color 0.18s, transform 0.12s;
}

.btn-action:hover {
  background: var(--blue-light);
  border-color: var(--blue-mid);
  transform: translateY(-1px);
}

.btn-icon { font-size: 1rem; }

/* ── Ad Slots ─────────────────────────────────────────────── */
.ad-slot {
  background: var(--white);
  border-top: 1px solid var(--border-light);
  border-bottom: 1px solid var(--border-light);
  padding: 1rem var(--space-md);
  text-align: center;
  min-height: 100px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

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

.ad-slot ins {
  min-height: 60px;
  width: 100%;
  max-width: 728px;
}

/* ── Section Shared ───────────────────────────────────────── */
.section-label {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--teal-accent);
  margin-bottom: 0.6rem;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3.5vw, 2rem);
  font-weight: 600;
  color: var(--navy);
  line-height: 1.25;
  letter-spacing: -0.015em;
  margin-bottom: 0.6rem;
}

.section-sub {
  font-size: 0.975rem;
  color: var(--text-mid);
  max-width: 560px;
  margin-bottom: 2rem;
}

/* ── Form Section ─────────────────────────────────────────── */
.form-section {
  background: var(--blue-pale);
  padding: var(--space-lg) 0;
}

.form-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: var(--space-lg) var(--space-md);
  border: 1px solid var(--border-light);
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}

.field-group { display: flex; flex-direction: column; gap: 0.45rem; }
.field-group--full { grid-column: 1 / -1; }
.field-group--half { grid-column: span 1; }

label {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-dark);
}

.required { color: var(--teal-accent); font-size: 0.8rem; }
.optional { color: var(--text-muted); font-weight: 400; font-size: 0.8rem; }

input[type="text"],
textarea,
select {
  width: 100%;
  padding: 0.75rem 1rem;
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--text-dark);
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  transition: border-color 0.18s, box-shadow 0.18s;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}

input[type="text"]:focus,
textarea:focus,
select:focus {
  border-color: var(--blue-mid);
  box-shadow: 0 0 0 3px rgba(46,109,164,0.12);
}

input::placeholder,
textarea::placeholder { color: var(--text-muted); font-size: 0.88rem; }

textarea { resize: vertical; min-height: 90px; line-height: 1.6; }

.select-wrapper { position: relative; }
.select-wrapper::after {
  content: '▾';
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.form-action {
  margin-top: 2rem;
  text-align: center;
}

/* ── Validation ───────────────────────────────────────────── */
.validation-msg {
  display: none;
  background: var(--error-bg);
  border: 1.5px solid var(--error-border);
  color: var(--error-text);
  border-radius: var(--radius-sm);
  padding: 0.85rem 1.1rem;
  font-size: 0.9rem;
  margin-bottom: 1.25rem;
}

.validation-msg.visible { display: block; }

/* ── Resource Box ─────────────────────────────────────────── */
.resource-section {
  background: var(--blue-pale);
  padding: 0 0 var(--space-lg);
}

.resource-box {
  background: var(--white);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-sm);
  padding: 1.5rem var(--space-md);
  transition: opacity 0.3s, transform 0.3s;
}

.resource-box--hidden {
  display: none;
}

.resource-inner {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1rem;
}

.resource-icon { font-size: 1.5rem; flex-shrink: 0; margin-top: 0.1rem; }

.resource-text strong {
  display: block;
  font-size: 0.95rem;
  color: var(--navy);
  margin-bottom: 0.3rem;
}

.resource-text p {
  font-size: 0.875rem;
  color: var(--text-mid);
  margin-bottom: 0.65rem;
}

.resource-link-btn {
  display: inline-block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--blue);
  border-bottom: 1.5px solid var(--blue-mid);
  padding-bottom: 1px;
}

.resource-link-btn:hover { color: var(--teal-accent); border-color: var(--teal-accent); text-decoration: none; }

.resource-disclaimer {
  font-size: 0.75rem;
  color: var(--text-muted);
  border-top: 1px solid var(--border-light);
  padding-top: 0.75rem;
  line-height: 1.5;
}

/* ── Output Section ───────────────────────────────────────── */
.output-section {
  background: var(--off-white);
  padding: var(--space-lg) 0;
}

.output-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  transition: opacity 0.4s, transform 0.4s;
}

.output-card--hidden { display: none; }

.output-header {
  background: linear-gradient(135deg, var(--navy) 0%, var(--blue) 100%);
  padding: 1.75rem var(--space-md);
}

.output-badge {
  display: inline-block;
  background: rgba(255,255,255,0.18);
  border: 1px solid rgba(255,255,255,0.3);
  color: rgba(255,255,255,0.9);
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 0.25rem 0.8rem;
  border-radius: 50px;
  margin-bottom: 0.65rem;
}

.output-title {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--white);
}

.output-body {
  padding: var(--space-md);
  border-bottom: 1px solid var(--border-light);
}

.letter-output {
  font-family: var(--font-display);
  font-size: 0.95rem;
  line-height: 1.85;
  color: var(--text-dark);
  white-space: pre-wrap;
  word-wrap: break-word;
  background: transparent;
  border: none;
  padding: 0;
}

.output-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  padding: 1.25rem var(--space-md);
  background: var(--blue-pale);
}

.copy-feedback {
  font-size: 0.82rem;
  color: var(--success);
  font-weight: 500;
  padding: 0 var(--space-md) 0.75rem;
  background: var(--blue-pale);
  min-height: 1.5rem;
}

/* ── Footer ───────────────────────────────────────────────── */
.site-footer {
  background: var(--navy-deep);
  color: rgba(255,255,255,0.7);
  padding: var(--space-lg) 0;
}

.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 1.25rem;
}

.footer-logo .logo-text {
  color: rgba(255,255,255,0.85);
}

.footer-logo .logo-icon { color: var(--teal-accent); }

.footer-text p {
  font-size: 0.85rem;
  line-height: 1.7;
  margin-bottom: 0.3rem;
}

.footer-text a {
  color: rgba(255,255,255,0.7);
  text-decoration: underline;
}

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

.footer-privacy {
  margin-top: 0.75rem;
  font-size: 0.8rem !important;
  color: rgba(255,255,255,0.5) !important;
  font-style: italic;
}

.footer-disclaimer {
  font-size: 0.78rem !important;
  color: rgba(255,255,255,0.4) !important;
  max-width: 540px;
  line-height: 1.6 !important;
}

/* ── Print Styles ─────────────────────────────────────────── */
.print-only { display: none; }

@media print {
  body * { visibility: hidden; }
  .print-only,
  .print-only * { visibility: visible; }
  .print-only {
    display: block;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 2cm;
  }
  #print-content {
    font-family: Georgia, serif;
    font-size: 11pt;
    line-height: 1.85;
    white-space: pre-wrap;
    word-wrap: break-word;
    color: #000;
  }
}

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 600px) {
  .form-grid { grid-template-columns: 1fr; }
  .field-group--half { grid-column: 1 / -1; }

  .hero { padding: 3.5rem 0 4.5rem; }
  .form-card { padding: var(--space-md) 1rem; }
  .output-actions { flex-direction: column; }
  .btn-action { justify-content: center; width: 100%; }

  .header-nav { display: none; }
}

@media (max-width: 400px) {
  .hero-headline { font-size: 1.75rem; }
  .btn-primary { font-size: 0.95rem; padding: 0.8rem 1.75rem; }
}

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

.output-card:not(.output-card--hidden) {
  animation: fadeInUp 0.4s ease both;
}

.resource-box:not(.resource-box--hidden) {
  animation: fadeInUp 0.3s ease both;
}
