/* ─────────────────────────────────────────────────────────
   Redes de Apoyo × Kords — shared stylesheet
   Fonts: Overused Grotesk (UI) · Lora (letter text)
───────────────────────────────────────────────────────── */

/* ── Fonts ───────────────────────────────────────────────── */

@font-face {
  font-family: 'Overused Grotesk';
  src: url('assets/fonts/variable/OverusedGroteskRoman-VF.woff2') format('woff2'),
       url('assets/fonts/variable/OverusedGroteskRoman-VF.woff') format('woff');
  font-weight: 300 900;
  font-style: normal;
  font-display: swap;
}

/* ── Custom Properties ──────────────────────────────────── */

:root {
  --color-lila:     #BC8AF8;
  --color-azul:     #76B3D0;
  --color-verde:    #11A253;
  --color-amarillo: #FFE100;
  --color-text:     #111111;
  --color-bg:       #ffffff;
  --color-white:    #ffffff;
}

/* ── Reset ──────────────────────────────────────────────── */

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

/* ── Base ───────────────────────────────────────────────── */

body {
  background: var(--color-bg);
  color: var(--color-text);
  font-family: 'Overused Grotesk', sans-serif;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ── Site Header ─────────────────────────────────────────── */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--color-white);
  transition: box-shadow 0.25s ease;
}

.site-header.scrolled {
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.08);
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  height: 64px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
}

/* Logo */

.header-logo {
  grid-column: 2;
  grid-row: 1;
  text-decoration: none;
  display: flex;
  align-items: center;
}

.logo-img {
  height: 20px;
  width: auto;
  display: block;
}

/* Primary nav */

.header-nav {
  grid-column: 1;
  grid-row: 1;
}

.nav-list {
  list-style: none;
  display: flex;
  align-items: center;
}

.nav-item {
  position: relative;
}

.header-nav .nav-link {
  font-family: 'Overused Grotesk', sans-serif;
  font-size: 0.9rem;
  font-weight: 400;
  color: var(--color-text);
  text-decoration: none;
  padding: 0.45rem 0.85rem;
  display: block;
  border-radius: 6px;
  transition: background 0.15s;
  white-space: nowrap;
}

.header-nav .nav-link:hover {
  opacity: 0.55;
}

/* Active: lila dot indicator */

.header-nav .nav-link--active {
  font-weight: 500;
  color: var(--color-lila);
  position: relative;
}

.header-nav .nav-link--active::after {
  content: '';
  position: absolute;
  bottom: 1px;
  left: 50%;
  transform: translateX(-50%);
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--color-lila);
}

/* Dropdown */

.nav-item.has-dropdown:hover .dropdown,
.nav-item.has-dropdown:focus-within .dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  background: var(--color-white);
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  padding: 6px;
  list-style: none;
  min-width: 200px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
  z-index: 200;
}

.dropdown li a {
  display: block;
  padding: 0.5rem 0.875rem;
  font-family: 'Overused Grotesk', sans-serif;
  font-size: 0.875rem;
  font-weight: 400;
  color: var(--color-text);
  text-decoration: none;
  border-radius: 8px;
  transition: background 0.15s;
  white-space: nowrap;
}

.dropdown li a:hover {
  background: rgba(0, 0, 0, 0.04);
}

/* Header action icons (search / account / cart) */

.header-actions {
  grid-column: 3;
  grid-row: 1;
  display: flex;
  align-items: center;
  gap: 4px;
  justify-self: end;
}

.header-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  color: var(--color-text);
  text-decoration: none;
  transition: background 0.15s;
}

.header-icon:hover {
  opacity: 0.55;
}

.header-icon svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ── Main ───────────────────────────────────────────────── */

main {
  flex: 1;
  max-width: 680px;
  margin: 0 auto;
  width: 100%;
  padding: 4rem 1.5rem 3rem;
  display: flex;
  flex-direction: column;
}

/* ── Footer ─────────────────────────────────────────────── */

footer {
  background: var(--color-white);
  border-top: 1px solid rgba(0, 0, 0, 0.07);
  margin-top: auto;
}

.footer-inner {
  max-width: 680px;
  margin: 0 auto;
  padding: 2rem 1.5rem 2.5rem;
}

.footer-message {
  font-family: 'Overused Grotesk', sans-serif;
  font-size: 0.9375rem;
  color: var(--color-text);
  line-height: 1.65;
  margin-bottom: 1.25rem;
}

.disclaimer {
  font-family: 'Overused Grotesk', sans-serif;
  font-size: 0.6875rem;
  color: #999;
  line-height: 1.6;
  max-width: 500px;
}

/* ─────────────────────────────────────────────────────────
   index.html — Letters feed
───────────────────────────────────────────────────────── */

.letters-section {
  display: flex;
  flex-direction: column;
}

/* ── Hamburger toggle ────────────────────────────────────── */

.menu-toggle {
  display: none;
  background: none;
  border: none;
  padding: 0.25rem;
  cursor: pointer;
  color: var(--color-text);
  align-items: center;
  justify-content: center;
  transition: opacity 0.15s;
}

.menu-toggle:hover { opacity: 0.55; }

.menu-toggle svg {
  width: 22px;
  height: 22px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.75;
  stroke-linecap: round;
  display: block;
}

.menu-toggle .icon-x   { display: none; }
.menu-toggle.is-open .icon-ham { display: none; }
.menu-toggle.is-open .icon-x   { display: block; }

/* ── Mobile menu ─────────────────────────────────────────── */

.mobile-menu {
  position: fixed;
  top: 64px;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--color-white);
  z-index: 99;
  overflow-y: auto;
  transform: translateX(-100%);
  visibility: hidden;
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1),
              visibility 0.3s;
}

.mobile-menu.is-open {
  transform: translateX(0);
  visibility: visible;
}

.mobile-menu-inner {
  padding: 1.5rem 1.5rem 3rem;
}

.mobile-nav-list {
  list-style: none;
}

.mobile-nav-list li {
  border-bottom: 1px solid rgba(17, 17, 17, 0.07);
}

.mobile-nav-list a {
  display: block;
  padding: 1rem 0;
  font-family: 'Overused Grotesk', sans-serif;
  font-size: 1rem;
  font-weight: 400;
  color: var(--color-text);
  text-decoration: none;
  transition: opacity 0.15s;
}

.mobile-nav-list a:hover { opacity: 0.55; }

.mobile-nav-list a.is-active {
  font-weight: 500;
  color: var(--color-lila);
}

.mobile-menu-secondary {
  display: flex;
  gap: 1.5rem;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(17, 17, 17, 0.07);
}

.mobile-menu-secondary a {
  font-family: 'Overused Grotesk', sans-serif;
  font-size: 0.875rem;
  color: #888;
  text-decoration: none;
  transition: color 0.15s;
}

.mobile-menu-secondary a:hover { color: var(--color-text); }

/* ── Intro ───────────────────────────────────────────────── */

.intro-block {
  margin-bottom: 2.5rem;
}

.intro-text {
  font-family: 'Overused Grotesk', sans-serif;
  font-size: 1.125rem;
  line-height: 1.95;
  color: #444;
  margin-bottom: 1.75rem;
}

.intro-block .btn-outline {
  display: block;
  width: fit-content;
  margin: 0 auto;
}

.btn-outline {
  font-family: 'Overused Grotesk', sans-serif;
  font-size: 0.9375rem;
  font-weight: 600;
  padding: 0.7rem 1.75rem;
  background: var(--color-text);
  color: #fff;
  border: none;
  border-radius: 50px;
  text-decoration: none;
  display: inline-block;
  transition: background 0.15s, color 0.15s, transform 0.12s;
}

.btn-outline:hover {
  background: var(--color-amarillo);
  color: var(--color-text);
  transform: translateY(-1px);
}

/* Letter card — paper on beige, no decoration */

@keyframes cardReveal {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

.letter-card {
  background: var(--color-white);
  border-radius: 12px;
  box-shadow: 0 2px 24px rgba(0, 0, 0, 0.09);
  border: 1px solid rgba(0, 0, 0, 0.05);
  padding: 3rem 3rem 2.5rem;
  margin-bottom: 2.5rem;
  transition: opacity 0.22s ease, transform 0.22s ease;
}

.letter-card.fading {
  opacity: 0;
  transform: translateY(6px);
}

.letter-card.revealed {
  animation: cardReveal 0.6s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

#letter-body {
  font-family: 'Lora', serif;
  font-size: 1.125rem;
  line-height: 2;
  color: var(--color-text);
  white-space: pre-line;
  margin-bottom: 2.5rem;
}

#letter-from {
  font-family: 'Lora', serif;
  font-size: 0.9375rem;
  font-style: italic;
  color: var(--color-text);
}

/* Primary action — centered below card */

.letter-actions {
  display: flex;
  justify-content: center;
  align-items: center;
}

#btn-next {
  font-family: 'Overused Grotesk', sans-serif;
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  padding: 0.75rem 2.25rem;
  background: var(--color-text);
  color: #fff;
  border: none;
  border-radius: 50px;
  cursor: pointer;
  transition: background 0.15s, transform 0.12s;
}

#btn-next:hover {
  background: var(--color-amarillo);
  color: var(--color-text);
  transform: translateY(-1px);
}

/* Letter count */

.letter-count {
  font-family: 'Overused Grotesk', sans-serif;
  font-size: 0.6875rem;
  color: #c8bfb5;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-align: center;
  margin-top: 1.25rem;
}

/* Write invite — quiet text link, not a box */

.write-invite {
  font-family: 'Overused Grotesk', sans-serif;
  font-size: 1rem;
  color: #999;
  text-align: center;
  margin-top: 4rem;
  padding-top: 2.5rem;
  border-top: 1px solid rgba(17, 17, 17, 0.07);
  line-height: 1.7;
}

.write-invite a {
  font-family: 'Overused Grotesk', sans-serif;
  font-style: normal;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-lila);
  text-decoration: underline;
  text-underline-offset: 3px;
  margin-left: 0.25rem;
  transition: color 0.15s;
}

.write-invite a:hover {
  color: var(--color-text);
}

#error-msg {
  display: none;
  font-family: 'Overused Grotesk', sans-serif;
  font-size: 0.875rem;
  color: #777;
  line-height: 1.7;
  margin-bottom: 2rem;
}

/* ─────────────────────────────────────────────────────────
   write.html — Submission form
───────────────────────────────────────────────────────── */

.page-intro {
  margin-bottom: 1.25rem;
}

.page-intro p {
  font-family: 'Overused Grotesk', sans-serif;
  font-size: 1.125rem;
  line-height: 1.7;
  color: var(--color-text);
}

.form-tagline {
  font-family: 'Overused Grotesk', sans-serif;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--color-azul);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  margin-bottom: 1.5rem;
}

.form-card {
  background: var(--color-white);
  border-radius: 16px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.07);
  padding: 2.5rem 2.25rem;
}

/* Form groups */

.form-group {
  margin-bottom: 1.75rem;
}

label {
  display: block;
  font-family: 'Overused Grotesk', sans-serif;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--color-text);
  margin-bottom: 0.625rem;
}

.label-note {
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
  font-size: 0.75rem;
  color: #888;
  margin-left: 0.4rem;
}

/* Select */

.select-wrap {
  position: relative;
}

.select-wrap::after {
  content: '';
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid var(--color-text);
  pointer-events: none;
}

select {
  width: 100%;
  padding: 0.75rem 2.5rem 0.75rem 0.875rem;
  font-family: 'Overused Grotesk', sans-serif;
  font-size: 0.9375rem;
  color: var(--color-text);
  background: var(--color-white);
  border: 1.5px solid #ddd;
  border-radius: 8px;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s;
}

select:focus {
  outline: none;
  border-color: var(--color-lila);
  box-shadow: 0 0 0 3px rgba(188, 138, 248, 0.18);
}

/* Textarea */

textarea {
  width: 100%;
  min-height: 360px;
  padding: 1.25rem;
  font-family: 'Overused Grotesk', sans-serif;
  font-size: 1.0625rem;
  line-height: 1.85;
  color: var(--color-text);
  background: var(--color-white);
  border: 1.5px solid #ddd;
  border-radius: 8px;
  resize: vertical;
  transition: border-color 0.15s, box-shadow 0.15s;
}

textarea:focus {
  outline: none;
  border-color: var(--color-lila);
  box-shadow: 0 0 0 3px rgba(188, 138, 248, 0.18);
}

textarea::placeholder {
  color: #aaa;
  font-style: italic;
}

.textarea-note {
  min-height: 90px;
  font-family: 'Overused Grotesk', sans-serif;
  font-size: 0.9375rem;
  line-height: 1.65;
}

/* Submit row */

.form-footer {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

#submit-btn {
  font-family: 'Overused Grotesk', sans-serif;
  font-size: 0.9375rem;
  font-weight: 700;
  padding: 0.7rem 2rem;
  background: var(--color-text);
  color: #fff;
  border: none;
  border-radius: 50px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, transform 0.1s;
}

#submit-btn:hover:not(:disabled) {
  background: var(--color-amarillo);
  color: var(--color-text);
  transform: translateY(-1px);
}

#submit-btn:disabled {
  opacity: 0.45;
  cursor: default;
}

#form-error {
  display: none;
  font-family: 'Overused Grotesk', sans-serif;
  font-size: 0.8125rem;
  color: #555;
}

/* Thank-you state */

#thank-you {
  display: none;
  padding: 0.5rem 0 0;
}

#thank-you p {
  font-family: 'Overused Grotesk', sans-serif;
  font-size: 1.125rem;
  line-height: 1.8;
  color: var(--color-text);
  margin-bottom: 2rem;
}

#thank-you a {
  font-family: 'Overused Grotesk', sans-serif;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-lila);
  text-decoration: underline;
  text-underline-offset: 3px;
}

#thank-you a:hover {
  color: var(--color-text);
}

/* ── Mobile ─────────────────────────────────────────────── */

@media (max-width: 768px) {
  .header-inner {
    display: flex;
    padding: 0 1.25rem;
    position: relative;
  }

  .header-logo {
    grid-column: unset;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
  }

  .header-nav     { display: none; }
  .header-actions { display: none; }
  .menu-toggle    { display: flex; }
}

@media (max-width: 480px) {
  main            { padding: 2.5rem 1.25rem 2.5rem; }
  .footer-inner   { padding: 1.75rem 1.25rem 2rem; }
  #letter-body    { font-size: 1rem; line-height: 1.85; }
  .intro-text     { font-size: 1.0625rem; line-height: 1.85; }
  .intro-block    { margin-bottom: 3rem; }
  textarea        { min-height: 260px; }
  .letter-card    { padding: 2rem 1.5rem; }
  .form-card      { padding: 1.75rem 1.5rem; }
  .write-invite   { margin-top: 3rem; padding-top: 2rem; }
}
