/*
Theme Name: IINN
Author: Instituto Interdisciplinario de Neurología y Neurociencias
Description: Tema institucional para IINN, con portada de una página, diseño clínico sobrio y datos de contacto editables.
Version: 1.0.0
Requires at least: 6.4
Requires PHP: 7.4
Text Domain: iinn
*/

:root {
  --iinn-ivory: #f8f6f1;
  --iinn-paper: #fffdf9;
  --iinn-sand: #b09a79;
  --iinn-sand-light: #d8cab7;
  --iinn-sand-pale: #ece5da;
  --iinn-ink: #252922;
  --iinn-olive: #3e493e;
  --iinn-muted: #697066;
  --iinn-line: rgba(62, 73, 62, 0.16);
  --iinn-serif: Georgia, "Times New Roman", serif;
  --iinn-sans: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--iinn-ivory);
  color: var(--iinn-ink);
  font-family: var(--iinn-sans);
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body.menu-open {
  overflow: hidden;
}

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

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

button,
input,
textarea {
  font: inherit;
}

button,
summary,
a {
  -webkit-tap-highlight-color: transparent;
}

:focus-visible {
  outline: 3px solid #8f6c32;
  outline-offset: 4px;
}

.screen-reader-text {
  clip: rect(1px, 1px, 1px, 1px);
  clip-path: inset(50%);
  height: 1px;
  overflow: hidden;
  position: absolute !important;
  width: 1px;
  word-wrap: normal !important;
}

.screen-reader-text:focus {
  clip: auto !important;
  clip-path: none;
  display: block;
  height: auto;
  left: 16px;
  padding: 12px 16px;
  top: 16px;
  width: auto;
  z-index: 100000;
  background: #fff;
  color: var(--iinn-ink);
}

.iinn-container {
  margin-inline: auto;
  width: min(1180px, calc(100% - 48px));
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(248, 246, 241, 0.94);
  border-bottom: 1px solid var(--iinn-line);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
}

.admin-bar .site-header {
  top: 32px;
}

.nav-wrap {
  align-items: center;
  display: flex;
  gap: 30px;
  min-height: 82px;
}

.brand {
  align-items: center;
  color: #a8906f;
  display: flex;
  flex: 0 1 auto;
  gap: 11px;
  min-width: 0;
}

.brand-logo {
  flex: 0 0 auto;
  height: 60px;
  overflow: hidden;
  width: 60px;
}

.brand-logo img {
  height: 100%;
  object-fit: contain;
  width: 100%;
}

.brand-divider {
  background: rgba(168, 144, 111, 0.35);
  flex: 0 0 auto;
  height: 43px;
  width: 1px;
}

.brand-title {
  color: #927b5d;
  display: flex;
  flex-direction: column;
  gap: 4px;
  line-height: 1.05;
  min-width: 0;
  white-space: nowrap;
}

.brand-title span {
  font-size: 0.72rem;
  font-weight: 400;
  letter-spacing: 0.01em;
}

.brand-title strong {
  font-size: 0.96rem;
  font-weight: 700;
  letter-spacing: -0.018em;
}

.site-nav {
  margin-left: auto;
}

.site-nav ul {
  align-items: center;
  display: flex;
  gap: 24px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-nav a {
  color: #4e554d;
  font-size: 0.82rem;
  transition: color 0.2s ease;
}

.site-nav a:hover {
  color: var(--iinn-sand);
}

.menu-toggle {
  align-items: center;
  background: transparent;
  border: 0;
  color: var(--iinn-olive);
  cursor: pointer;
  display: none;
  height: 44px;
  justify-content: center;
  margin-left: auto;
  padding: 0;
  width: 44px;
}

.menu-toggle-lines,
.menu-toggle-lines::before,
.menu-toggle-lines::after {
  background: currentColor;
  display: block;
  height: 1px;
  position: relative;
  transition: transform 0.2s ease, opacity 0.2s ease;
  width: 24px;
}

.menu-toggle-lines::before,
.menu-toggle-lines::after {
  content: "";
  left: 0;
  position: absolute;
}

.menu-toggle-lines::before { top: -7px; }
.menu-toggle-lines::after { top: 7px; }
.menu-toggle[aria-expanded="true"] .menu-toggle-lines { background: transparent; }
.menu-toggle[aria-expanded="true"] .menu-toggle-lines::before { top: 0; transform: rotate(45deg); }
.menu-toggle[aria-expanded="true"] .menu-toggle-lines::after { top: 0; transform: rotate(-45deg); }

.iinn-button {
  align-items: center;
  background: var(--iinn-olive);
  border: 1px solid var(--iinn-olive);
  color: #fff;
  cursor: pointer;
  display: inline-flex;
  font-size: 0.82rem;
  font-weight: 650;
  gap: 28px;
  justify-content: center;
  letter-spacing: 0.02em;
  min-height: 54px;
  padding: 0 24px;
  transition: background 0.2s ease, transform 0.2s ease;
}

.iinn-button:hover {
  background: #2f382f;
  transform: translateY(-2px);
}

.iinn-button-small {
  flex: 0 0 auto;
  gap: 13px;
  min-height: 43px;
  padding: 0 19px;
}

.iinn-text-link {
  align-items: center;
  border-bottom: 1px solid var(--iinn-sand);
  color: #4d574d;
  display: inline-flex;
  font-size: 0.82rem;
  font-weight: 650;
  gap: 18px;
  padding-bottom: 7px;
}

.hero {
  background: radial-gradient(circle at 88% 0%, #eee7dc 0, transparent 31%), var(--iinn-ivory);
  overflow: hidden;
  padding: 78px 0 30px;
  position: relative;
}

.hero::before {
  background-image: linear-gradient(rgba(176, 154, 121, 0.14) 1px, transparent 1px), linear-gradient(90deg, rgba(176, 154, 121, 0.14) 1px, transparent 1px);
  background-size: 44px 44px;
  content: "";
  inset: 0;
  -webkit-mask-image: linear-gradient(to right, transparent 0%, #000 72%, #000 100%);
  mask-image: linear-gradient(to right, transparent 0%, #000 72%, #000 100%);
  opacity: 0.22;
  pointer-events: none;
  position: absolute;
}

.hero-grid {
  align-items: center;
  display: grid;
  gap: 60px;
  grid-template-columns: 1.08fr 0.92fr;
  min-height: 610px;
  position: relative;
  z-index: 1;
}

.hero-copy {
  padding-bottom: 32px;
}

.eyebrow {
  align-items: center;
  color: #766347;
  display: flex;
  font-size: 0.72rem;
  font-weight: 700;
  gap: 10px;
  letter-spacing: 0.15em;
  margin: 0 0 23px;
  text-transform: uppercase;
}

.eyebrow > span {
  background: var(--iinn-sand);
  display: inline-block;
  height: 1px;
  width: 26px;
}

.hero h1,
.iinn-section h2,
.quote-section blockquote p {
  font-family: var(--iinn-serif);
  font-weight: 400;
  letter-spacing: -0.035em;
}

.hero h1 {
  color: #30382f;
  font-size: clamp(3.35rem, 5.25vw, 4.875rem);
  line-height: 0.99;
  margin: 0;
  max-width: 720px;
}

.hero-lead {
  color: var(--iinn-muted);
  font-size: 1.125rem;
  line-height: 1.65;
  margin: 30px 0 34px;
  max-width: 610px;
}

.hero-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 31px;
}

.hero-notes {
  color: #656b64;
  display: flex;
  flex-wrap: wrap;
  font-size: 0.72rem;
  gap: 0;
  letter-spacing: 0.03em;
  margin-top: 53px;
}

.hero-notes span {
  border-right: 1px solid var(--iinn-sand-light);
  padding: 0 18px;
}

.hero-notes span:first-child { padding-left: 0; }
.hero-notes span:last-child { border: 0; }

.hero-visual {
  display: grid;
  min-height: 555px;
  place-items: center;
  position: relative;
}

.logo-panel {
  aspect-ratio: 1;
  background: rgba(255, 255, 255, 0.84);
  border: 1px solid rgba(176, 154, 121, 0.2);
  border-radius: 50% 50% 47% 53% / 44% 54% 46% 56%;
  box-shadow: 0 30px 90px rgba(81, 72, 56, 0.13);
  overflow: hidden;
  position: relative;
  width: min(430px, 90%);
  z-index: 2;
}

.logo-panel img {
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.orb {
  border: 1px solid rgba(176, 154, 121, 0.36);
  border-radius: 50%;
  position: absolute;
}

.orb-one { height: 495px; width: 495px; }
.orb-two { border-style: dashed; height: 555px; opacity: 0.48; width: 555px; }

.hero-rule {
  align-items: center;
  color: #8d806c;
  display: flex;
  font-family: var(--iinn-serif);
  font-size: 0.875rem;
  font-style: italic;
  gap: 20px;
  position: relative;
  z-index: 2;
}

.hero-rule i {
  background: var(--iinn-sand-light);
  flex: 1;
  height: 1px;
}

.iinn-section {
  padding: 122px 0;
}

.intro {
  background: var(--iinn-paper);
}

.intro-grid {
  display: grid;
  gap: 110px;
  grid-template-columns: 1fr 1fr;
}

.iinn-section h2 {
  color: #333b32;
  font-size: clamp(2.5rem, 4.2vw, 3.7rem);
  line-height: 1.08;
  margin: 0;
}

.intro-copy {
  max-width: 525px;
  padding-top: 39px;
}

.intro-copy p {
  color: var(--iinn-muted);
  font-size: 0.94rem;
  line-height: 1.85;
}

.intro-copy .large-copy {
  color: #434b42;
  font-family: var(--iinn-serif);
  font-size: 1.44rem;
  line-height: 1.52;
}

.intro-copy .iinn-text-link { margin-top: 16px; }

.areas {
  background: var(--iinn-olive);
  color: #fff;
}

.section-heading {
  align-items: end;
  display: grid;
  gap: 80px;
  grid-template-columns: 1.35fr 0.65fr;
  margin-bottom: 63px;
}

.eyebrow-light { color: #cfbea6; }
.areas h2 { color: #fff; max-width: 720px; }

.section-heading > p {
  color: rgba(255, 255, 255, 0.62);
  font-size: 0.875rem;
  line-height: 1.7;
}

.area-grid {
  border-left: 1px solid rgba(255, 255, 255, 0.15);
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
}

.area-card {
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
  border-right: 1px solid rgba(255, 255, 255, 0.15);
  min-height: 315px;
  padding: 30px 31px;
  transition: background 0.25s ease, transform 0.25s ease;
}

.area-card:hover {
  background: rgba(255, 255, 255, 0.06);
  transform: translateY(-3px);
}

.area-number {
  color: #cdbb9f;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
}

.area-card h3 {
  font-family: var(--iinn-serif);
  font-size: 1.56rem;
  font-weight: 400;
  margin: 49px 0 14px;
}

.area-card p {
  color: rgba(255, 255, 255, 0.64);
  font-size: 0.82rem;
  line-height: 1.7;
  margin: 0 0 24px;
  min-height: 91px;
}

.area-card a {
  color: #d7c5a9;
  font-size: 0.75rem;
  font-weight: 650;
}

.area-card a span { float: right; }

.approach {
  background: #f1ede5;
}

.approach-intro {
  margin-bottom: 72px;
  max-width: 720px;
}

.approach-intro > p:last-child {
  color: var(--iinn-muted);
  line-height: 1.75;
  margin: 23px 0 0;
  max-width: 565px;
}

.steps {
  border-top: 1px solid var(--iinn-sand-light);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}

.step {
  padding: 30px 34px 10px 0;
  position: relative;
}

.step:not(:last-child)::after {
  border-right: 1px solid var(--iinn-sand);
  border-top: 1px solid var(--iinn-sand);
  content: "";
  height: 8px;
  position: absolute;
  right: 24px;
  top: -4px;
  transform: rotate(45deg);
  width: 8px;
}

.step > span {
  color: #9b835e;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
}

.step h3 {
  color: #3d453c;
  font-family: var(--iinn-serif);
  font-size: 1.38rem;
  font-weight: 400;
  margin: 28px 0 13px;
}

.step p {
  color: #70766e;
  font-size: 0.82rem;
  line-height: 1.7;
}

.quote-section {
  background: var(--iinn-paper);
  padding: 85px 0;
}

.quote-grid {
  align-items: center;
  display: grid;
  gap: 40px;
  grid-template-columns: 100px 1fr 230px;
}

.quote-mark {
  color: var(--iinn-sand-light);
  font-family: var(--iinn-serif);
  font-size: 8.1rem;
  line-height: 0.7;
}

.quote-section blockquote { margin: 0; }

.quote-section blockquote p {
  color: #394138;
  font-size: clamp(1.94rem, 3.4vw, 2.82rem);
  line-height: 1.24;
  margin: 0;
  max-width: 760px;
}

.quote-section blockquote footer {
  color: #9a886c;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.13em;
  margin-top: 25px;
  text-transform: uppercase;
}

.quote-logo {
  border-radius: 50%;
  filter: grayscale(0.4);
  height: 210px;
  opacity: 0.32;
  overflow: hidden;
  width: 210px;
}

.quote-logo img {
  height: 100%;
  object-fit: contain;
  width: 100%;
}

.faq {
  background: var(--iinn-ivory);
}

.faq-grid {
  display: grid;
  gap: 100px;
  grid-template-columns: 0.8fr 1.2fr;
}

.faq-lead {
  color: var(--iinn-muted);
  line-height: 1.7;
  max-width: 340px;
}

.faq-list {
  border-top: 1px solid var(--iinn-sand-light);
}

.faq-list details {
  border-bottom: 1px solid var(--iinn-sand-light);
}

.faq-list summary {
  align-items: center;
  color: #3e463d;
  cursor: pointer;
  display: flex;
  font-family: var(--iinn-serif);
  font-size: 1.19rem;
  gap: 25px;
  justify-content: space-between;
  list-style: none;
  padding: 25px 0;
}

.faq-list summary::-webkit-details-marker { display: none; }

.faq-list summary span {
  color: #9b835e;
  font-family: var(--iinn-sans);
  font-size: 1.38rem;
  font-weight: 300;
  transition: transform 0.2s ease;
}

.faq-list details[open] summary span { transform: rotate(45deg); }

.faq-list details p {
  color: var(--iinn-muted);
  font-size: 0.82rem;
  line-height: 1.75;
  margin: -5px 38px 25px 0;
  max-width: 650px;
}

.contact {
  background: var(--iinn-ivory);
  padding: 0 0 70px;
}

.contact-card {
  background: #8f7b5e;
  box-shadow: 0 20px 60px rgba(74, 61, 45, 0.12);
  color: #fff;
  display: grid;
  gap: 80px;
  grid-template-columns: 0.82fr 1.18fr;
  padding: 67px 72px;
}

.contact-card h2 {
  color: #fff;
  font-size: clamp(2.38rem, 3.7vw, 3.2rem);
}

.contact-copy > p:last-of-type {
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.875rem;
  line-height: 1.7;
}

.contact-details {
  display: grid;
  gap: 8px;
  margin-top: 28px;
}

.contact-details a,
.contact-details span {
  color: #fff;
  font-size: 0.88rem;
  line-height: 1.5;
}

.contact-form {
  align-content: start;
  display: grid;
  gap: 26px 22px;
  grid-template-columns: 1fr 1fr;
}

.contact-form label {
  display: grid;
  gap: 10px;
}

.contact-form label span {
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.72rem;
  font-weight: 650;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.contact-form input,
.contact-form textarea {
  background: transparent;
  border: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 0;
  color: #fff;
  outline: 0;
  padding: 12px 0;
  resize: vertical;
  width: 100%;
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
  color: rgba(255, 255, 255, 0.54);
}

.contact-form input:focus,
.contact-form textarea:focus {
  border-color: #fff;
}

.full-field {
  grid-column: 1 / -1;
}

.form-footer {
  align-items: center;
  display: flex;
  gap: 24px;
  justify-content: space-between;
}

.form-footer small {
  color: rgba(255, 255, 255, 0.68);
  line-height: 1.55;
  max-width: 290px;
}

.iinn-button-light {
  background: #fff;
  border-color: #fff;
  color: #6c5a40;
  white-space: nowrap;
}

.iinn-button-light:hover {
  background: #f5f0e8;
}

.form-feedback {
  color: #fff;
  font-size: 0.82rem;
  margin: 0;
}

.site-footer {
  background: #30382f;
  color: rgba(255, 255, 255, 0.72);
  padding: 68px 0 28px;
}

.footer-grid {
  display: grid;
  gap: 70px;
  grid-template-columns: 1.2fr 0.6fr 0.7fr;
}

.footer-brand {
  align-items: center;
  display: flex;
  gap: 17px;
}

.footer-mark {
  background: #faf8f4;
  border: 1px solid var(--iinn-sand-pale);
  border-radius: 14px;
  flex: 0 0 auto;
  height: 58px;
  overflow: hidden;
  width: 58px;
}

.footer-mark img {
  height: 100%;
  object-fit: contain;
  width: 100%;
}

.footer-brand p {
  font-size: 0.72rem;
  line-height: 1.5;
  margin: 0;
}

.footer-nav {
  display: grid;
  font-size: 0.75rem;
  gap: 13px;
}

.footer-note p {
  font-family: var(--iinn-serif);
  font-size: 1.06rem;
  line-height: 1.5;
  margin-top: 0;
  max-width: 230px;
}

.footer-note a {
  color: #d6c3a7;
  font-size: 0.72rem;
  font-weight: 650;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  display: flex;
  font-size: 0.7rem;
  justify-content: space-between;
  margin-top: 58px;
  padding-top: 24px;
}

.content-shell {
  background: var(--iinn-paper);
  min-height: 60vh;
  padding: 96px 0 120px;
}

.content-shell article,
.content-shell .archive-header,
.not-found {
  margin-inline: auto;
  max-width: 820px;
}

.entry-title,
.archive-title,
.not-found h1 {
  color: #30382f;
  font-family: var(--iinn-serif);
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 400;
  line-height: 1.05;
  margin: 0 0 32px;
}

.entry-content {
  color: #4e554d;
  line-height: 1.8;
}

.entry-content a {
  color: #766347;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.post-card {
  border-bottom: 1px solid var(--iinn-sand-light);
  padding: 34px 0;
}

.post-card h2 {
  font-family: var(--iinn-serif);
  font-size: 2rem;
  font-weight: 400;
  margin: 0 0 12px;
}

.post-meta {
  color: var(--iinn-muted);
  font-size: 0.78rem;
  margin-bottom: 16px;
}

.nav-links {
  display: flex;
  gap: 24px;
  justify-content: space-between;
  margin-top: 48px;
}

@media (max-width: 1080px) {
  .site-nav { display: none; }
  .menu-toggle { display: inline-flex; }
  .site-nav.is-open {
    background: var(--iinn-ivory);
    border-bottom: 1px solid var(--iinn-line);
    display: block;
    left: 0;
    margin: 0;
    padding: 22px 24px 32px;
    position: absolute;
    right: 0;
    top: 100%;
  }
  .site-nav.is-open ul {
    align-items: stretch;
    flex-direction: column;
    gap: 0;
  }
  .site-nav.is-open a {
    border-bottom: 1px solid var(--iinn-line);
    display: block;
    font-size: 1rem;
    padding: 16px 0;
  }
  .hero-grid { grid-template-columns: 1fr; min-height: auto; }
  .hero-copy { padding-bottom: 0; }
  .hero-visual { min-height: 480px; }
  .intro-grid,
  .faq-grid { gap: 55px; }
  .area-grid { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); row-gap: 35px; }
  .step:nth-child(2)::after { display: none; }
  .quote-grid { grid-template-columns: 70px 1fr; }
  .quote-logo { display: none; }
  .contact-card { gap: 45px; grid-template-columns: 1fr; }
}

@media (max-width: 782px) {
  .admin-bar .site-header { top: 46px; }
}

@media (max-width: 720px) {
  .iinn-container { width: min(100% - 32px, 1180px); }
  .nav-wrap { gap: 9px; min-height: 70px; }
  .brand { gap: 6px; }
  .brand-logo { height: 45px; width: 45px; }
  .brand-divider { height: 34px; margin-inline: 1px; }
  .brand-title { gap: 2px; }
  .brand-title span { font-size: 0.52rem; }
  .brand-title strong { font-size: 0.65rem; }
  .header-appointment { display: none; }
  .hero { padding-top: 58px; }
  .hero-grid { gap: 15px; }
  .hero h1 { font-size: clamp(2.85rem, 13vw, 3.45rem); }
  .hero-lead { font-size: 1rem; }
  .hero-actions { align-items: flex-start; flex-direction: column; }
  .hero-notes { line-height: 2.3; }
  .hero-notes span { padding: 0 10px; }
  .hero-visual { min-height: 410px; }
  .logo-panel { width: min(335px, 92%); }
  .orb-one { height: 370px; width: 370px; }
  .orb-two { height: 410px; width: 410px; }
  .hero-rule { font-size: 0.72rem; gap: 10px; }
  .iinn-section { padding: 84px 0; }
  .intro-grid,
  .section-heading,
  .faq-grid { gap: 32px; grid-template-columns: 1fr; }
  .intro-copy { padding-top: 0; }
  .section-heading { margin-bottom: 42px; }
  .area-grid { grid-template-columns: 1fr; }
  .area-card { min-height: auto; }
  .area-card p { min-height: auto; }
  .steps { grid-template-columns: 1fr; }
  .step::after { display: none !important; }
  .quote-grid { gap: 10px; grid-template-columns: 1fr; }
  .quote-mark { height: 60px; }
  .contact { padding-bottom: 30px; }
  .contact-card { padding: 58px 25px; width: 100%; }
  .contact-form { grid-template-columns: 1fr; }
  .contact-form label { grid-column: 1; }
  .form-footer { align-items: stretch; flex-direction: column; }
  .form-footer small { max-width: none; }
  .footer-grid { gap: 38px; grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; gap: 10px; }
  .content-shell { padding: 70px 0 90px; }
}

@media (max-width: 390px) {
  .brand-title { white-space: normal; }
  .brand-title span { font-size: 0.46rem; }
  .brand-title strong { font-size: 0.57rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}
