/* ================================================
   Fernando Rosso — Psicólogo · Estilos compartidos
   Agencia TRIWE · Mayo 2026
   ================================================ */

/* --- Variables --------------------------------- */
:root {
  --cream: #f4ede0;
  --cream-dark: #ebe2d0;
  --ink: #1f1a14;
  --ink-soft: #3d342a;
  --muted: #8b7e6a;
  --terracota: #b5704e;
  --terracota-dark: #9a5d3e;
  --line: rgba(31, 26, 20, 0.12);
  --whatsapp: #25d366;
  --whatsapp-dark: #1da851;
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

img {
  max-width: 100%;
  display: block;
}

/* --- Base -------------------------------------- */
body {
  background: var(--cream);
  color: var(--ink);
  font-family: 'Newsreader', Georgia, serif;
  font-weight: 400;
  font-size: 18px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4 {
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 400;
  letter-spacing: -0.02em;
}

em {
  font-style: italic;
  font-family: 'Fraunces', serif;
}

a {
  color: inherit;
  text-decoration: none;
}

strong {
  font-weight: 600;
}

p + p {
  margin-top: 16px;
}

::selection {
  background: var(--terracota);
  color: var(--cream);
}

/* --- Layout ------------------------------------ */
.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 48px;
}

/* ================================================
   HERO
   ================================================ */
.hero {
  padding: 100px 0 130px;
  overflow: hidden;
}

.hero-inner {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 80px;
  align-items: end;
}

.hero-eyebrow {
  font-size: 13px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--terracota);
  margin-bottom: 32px;
  font-weight: 500;
  font-family: 'Newsreader', serif;
  display: flex;
  align-items: center;
  gap: 16px;
  animation: rise 0.8s 0.1s both;
}

.hero-eyebrow::before {
  content: '';
  display: inline-block;
  width: 36px;
  height: 1px;
  background: var(--terracota);
  flex-shrink: 0;
}

.hero h1 {
  font-size: clamp(42px, 6vw, 80px);
  line-height: 1.05;
  letter-spacing: -0.035em;
  margin-bottom: 40px;
  max-width: 17ch;
  animation: rise 0.9s 0.25s both;
}

.hero h1 em {
  color: var(--terracota);
  font-style: italic;
}

.hero-subtitle {
  font-size: 20px;
  line-height: 1.6;
  color: var(--ink-soft);
  max-width: 56ch;
  margin-bottom: 44px;
  animation: rise 0.9s 0.4s both;
}

.hero-ctas {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  animation: rise 0.9s 0.5s both;
}

/* Foto */
.hero-photo {
  aspect-ratio: 4 / 5;
  border-radius: 4px;
  box-shadow: 0 30px 60px -30px rgba(31, 26, 20, 0.4);
  overflow: hidden;
  animation: rise 1s 0.3s both;
  position: relative;
}

.hero-photo img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 30% top;
  filter: contrast(0.95) saturate(0.9);
  display: block;
}

/* ================================================
   CREDENTIALS BAND
   ================================================ */
.credentials {
  background: var(--ink);
  color: var(--cream);
  padding: 22px 0;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-align: center;
  font-family: 'Newsreader', serif;
}

.credentials-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0 32px;
}

.credentials-item {
  position: relative;
  padding: 4px 0;
}

.credentials-item:not(:last-child)::after {
  content: '·';
  margin-left: 32px;
  color: var(--terracota);
}

/* ================================================
   SECTION BASE
   ================================================ */
section {
  padding: 110px 0;
}

.section-eyebrow {
  font-size: 12px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 500;
  margin-bottom: 36px;
  font-family: 'Newsreader', serif;
}

.section-title {
  font-size: clamp(32px, 5vw, 48px);
  line-height: 1.08;
  letter-spacing: -0.03em;
  margin-bottom: 60px;
  max-width: 18ch;
}

.section-title em {
  color: var(--terracota);
  font-style: italic;
}

.section-intro {
  font-size: 18px;
  color: var(--ink-soft);
  line-height: 1.6;
  max-width: 60ch;
  margin-bottom: 48px;
  margin-top: -36px;
}

/* ================================================
   WHEN LIST (¿Cuándo conviene?)
   ================================================ */
.when-section {
  background: var(--cream);
}

.when-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-top: 1px solid var(--line);
  margin-bottom: 48px;
}

.when-item {
  padding: 32px 0;
  display: grid;
  grid-template-columns: 52px 1fr;
  gap: 20px;
  align-items: baseline;
  border-bottom: 1px solid var(--line);
  transition: padding-left 0.3s ease;
}

.when-item:nth-child(odd) {
  padding-right: 36px;
  border-right: 1px solid var(--line);
}

.when-item:nth-child(even) {
  padding-left: 36px;
}

.when-item:hover {
  padding-left: 12px;
}

.when-item:nth-child(even):hover {
  padding-left: 48px;
}

.when-num {
  font-family: 'Fraunces', serif;
  font-style: italic;
  font-size: 15px;
  color: var(--terracota);
  padding-top: 4px;
}

.when-item h3 {
  font-size: 21px;
  line-height: 1.2;
  letter-spacing: -0.015em;
  margin-bottom: 8px;
}

.when-item p {
  font-size: 15px;
  color: var(--ink-soft);
  line-height: 1.5;
}

.when-closing {
  padding: 36px 0 0;
  border-top: 1px solid var(--line);
  color: var(--ink-soft);
  font-size: 17px;
  line-height: 1.6;
  max-width: 68ch;
}

.when-closing strong {
  color: var(--ink);
}

/* ================================================
   CTA INTERMEDIA
   ================================================ */
.cta-mid {
  background: var(--cream-dark);
  padding: 60px 0;
  text-align: center;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.cta-mid p {
  font-size: 17px;
  color: var(--ink-soft);
  margin-bottom: 28px;
  font-style: italic;
  font-family: 'Fraunces', serif;
}

/* ================================================
   HOW IT WORKS (Cómo funciona)
   ================================================ */
.how-section {
  background: var(--cream-dark);
}

.how-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
}

.how-card {
  padding-top: 28px;
  border-top: 1px solid var(--ink);
}

.how-card h3 {
  font-size: 23px;
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin-bottom: 14px;
}

.how-card p {
  font-size: 16px;
  color: var(--ink-soft);
  line-height: 1.55;
}

/* ================================================
   SOBRE FERNANDO
   ================================================ */
.about-section {
  background: var(--cream);
}

.about-block {
  background: var(--cream-dark);
  padding: 56px 56px;
  border-radius: 4px;
  border: 1px solid var(--line);
  max-width: 860px;
}

.about-block h3 {
  font-size: 26px;
  letter-spacing: -0.02em;
  margin-bottom: 24px;
  color: var(--ink);
}

.about-block p {
  font-size: 17px;
  color: var(--ink-soft);
  line-height: 1.65;
}

.about-block p + p {
  margin-top: 18px;
}

.about-block strong {
  color: var(--ink);
  font-weight: 500;
}

/* ================================================
   CONTACT FORM
   ================================================ */
.form-section {
  background: var(--cream-dark);
  border-top: 1px solid var(--line);
}

.form-section .section-title {
  max-width: 24ch;
}

.form-wrap {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: start;
}

.form-text {
  padding-top: 8px;
}

.form-text p {
  font-size: 17px;
  color: var(--ink-soft);
  line-height: 1.65;
}

.form-text p + p {
  margin-top: 16px;
}

.form-text .form-contact-alt {
  margin-top: 40px;
  padding-top: 32px;
  border-top: 1px solid var(--line);
}

.form-text .form-contact-alt h4 {
  font-size: 13px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  font-family: 'Newsreader', serif;
  font-weight: 500;
  margin-bottom: 16px;
}

.form-text .form-contact-alt a {
  color: var(--terracota);
  font-size: 16px;
  display: block;
  margin-bottom: 8px;
  transition: color 0.2s ease;
}

.form-text .form-contact-alt a:hover {
  color: var(--terracota-dark);
}

form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-group label {
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  font-family: 'Newsreader', serif;
  font-weight: 500;
}

.form-group input,
.form-group textarea,
.form-group select {
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 14px 18px;
  font-size: 16px;
  font-family: 'Newsreader', serif;
  color: var(--ink);
  outline: none;
  transition: border-color 0.2s ease;
  width: 100%;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--muted);
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--terracota);
}

.form-group textarea {
  resize: vertical;
  min-height: 100px;
  line-height: 1.5;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.form-submit {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  padding-top: 8px;
}

.form-note {
  font-size: 13px;
  color: var(--muted);
  font-style: italic;
}

/* ================================================
   CTA FINAL
   ================================================ */
.cta-final {
  background: var(--ink);
  padding: 140px 0;
  text-align: center;
}

.cta-final h2 {
  font-size: clamp(36px, 5.5vw, 68px);
  line-height: 1.06;
  letter-spacing: -0.03em;
  margin-bottom: 32px;
  max-width: 20ch;
  margin-left: auto;
  margin-right: auto;
  color: var(--cream);
}

.cta-final h2 em {
  color: var(--terracota);
  font-style: italic;
}

.cta-final .subhead {
  font-family: 'Fraunces', serif;
  font-style: italic;
  font-size: 21px;
  color: rgba(244, 237, 224, 0.7);
  margin-bottom: 52px;
}

/* ================================================
   BUTTONS
   ================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 15px 28px;
  border-radius: 100px;
  font-size: 15px;
  font-family: 'Newsreader', serif;
  font-weight: 500;
  border: none;
  cursor: pointer;
  transition: all 0.25s ease;
  text-decoration: none;
  white-space: nowrap;
}

.btn-primary {
  background: var(--ink);
  color: var(--cream);
}

.btn-primary:hover {
  background: var(--terracota-dark);
  transform: translateY(-1px);
  box-shadow: 0 8px 24px -8px rgba(31, 26, 20, 0.4);
}

.btn-primary-light {
  background: var(--cream);
  color: var(--ink);
}

.btn-primary-light:hover {
  background: var(--terracota);
  color: var(--cream);
  transform: translateY(-1px);
}

.btn-wa {
  background: var(--whatsapp);
  color: white;
  box-shadow: 0 8px 30px -8px rgba(37, 211, 102, 0.5);
}

.btn-wa:hover {
  background: var(--whatsapp-dark);
  transform: translateY(-1px);
  box-shadow: 0 12px 36px -8px rgba(37, 211, 102, 0.6);
}

.btn-lg {
  padding: 18px 36px;
  font-size: 16px;
}

/* ================================================
   FOOTER
   ================================================ */
footer {
  background: var(--ink);
  color: var(--cream);
  padding: 72px 0 36px;
  border-top: 1px solid rgba(244, 237, 224, 0.08);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 64px;
  margin-bottom: 56px;
}

.footer-brand {
  font-family: 'Fraunces', serif;
  font-size: 26px;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}

.footer-brand-sub {
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(244, 237, 224, 0.45);
  margin-bottom: 20px;
  font-family: 'Newsreader', serif;
}

.footer-desc {
  font-size: 14px;
  color: rgba(244, 237, 224, 0.65);
  line-height: 1.6;
  max-width: 36ch;
}

.footer-col h4 {
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--terracota);
  margin-bottom: 18px;
  font-weight: 500;
  font-family: 'Newsreader', serif;
}

.footer-col ul {
  list-style: none;
}

.footer-col li {
  margin-bottom: 10px;
}

.footer-col a {
  font-size: 14px;
  color: rgba(244, 237, 224, 0.65);
  transition: color 0.2s ease;
}

.footer-col a:hover {
  color: var(--terracota);
}

.footer-bottom {
  border-top: 1px solid rgba(244, 237, 224, 0.1);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 11px;
  color: rgba(244, 237, 224, 0.35);
  letter-spacing: 0.06em;
}

/* ================================================
   WHATSAPP FLOTANTE
   ================================================ */
.wa-float {
  position: fixed;
  bottom: 28px;
  right: 28px;
  background: var(--whatsapp);
  color: white;
  padding: 14px 22px 14px 16px;
  border-radius: 100px;
  display: flex;
  align-items: center;
  gap: 10px;
  z-index: 200;
  box-shadow: 0 14px 40px -10px rgba(37, 211, 102, 0.5);
  cursor: pointer;
  font-family: 'Newsreader', serif;
  font-size: 15px;
  font-weight: 500;
  transition: all 0.25s ease;
  text-decoration: none;
}

.wa-float:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 50px -10px rgba(37, 211, 102, 0.6);
  background: var(--whatsapp-dark);
}

.wa-float svg {
  width: 22px;
  height: 22px;
  fill: white;
  flex-shrink: 0;
}

/* ================================================
   ANIMATIONS
   ================================================ */
@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ================================================
   RESPONSIVE — TABLET
   ================================================ */
@media (max-width: 960px) {
  .hero-inner {
    grid-template-columns: 1fr;
  }

  .hero-photo {
    display: none;
  }

  .how-grid {
    grid-template-columns: 1fr 1fr;
  }

  .form-wrap {
    grid-template-columns: 1fr;
    gap: 48px;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 40px;
  }

  .footer-grid > :first-child {
    grid-column: 1 / -1;
  }
}

/* ================================================
   RESPONSIVE — MOBILE
   ================================================ */
@media (max-width: 768px) {
  .container {
    padding: 0 28px;
  }

  section {
    padding: 72px 0;
  }

  .hero {
    padding: 72px 0 88px;
  }

  .when-list {
    grid-template-columns: 1fr;
  }

  .when-item,
  .when-item:nth-child(odd),
  .when-item:nth-child(even) {
    padding: 28px 0;
    border-right: none;
    padding-left: 0;
    padding-right: 0;
  }

  .when-item:hover,
  .when-item:nth-child(even):hover {
    padding-left: 0;
  }

  .how-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .about-block {
    padding: 36px 32px;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

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

  .cta-final {
    padding: 96px 0;
  }

  .credentials-inner {
    gap: 0 16px;
    font-size: 12px;
  }
}

/* ================================================
   REDUCIR ANIMACIONES (accesibilidad)
   ================================================ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
