/* ============================================================
   TOC Málaga — calm, professional therapy microsite
   ============================================================ */

:root {
  --paper: #f7f3ee;
  --paper-2: #eef2ec;
  --card: #ffffff;
  --ink: #22332e;
  --ink-soft: #4a5b54;
  --green: #3a6b5e;
  --green-deep: #2b5249;
  --sage: #e4ece2;
  --sage-line: #c7d6c8;
  --clay: #cf8462;
  --clay-deep: #b96e4d;
  --line: #e2ddd3;

  --serif: "Newsreader", Georgia, "Times New Roman", serif;
  --sans: "Mulish", system-ui, -apple-system, Segoe UI, sans-serif;

  --maxw: 1120px;
  --radius: 18px;
  --shadow: 0 22px 50px -30px rgba(34, 51, 46, 0.4);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: var(--sans);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.65;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { font-family: var(--serif); font-weight: 500; line-height: 1.15; color: var(--ink); }
h1 em, h2 em { font-style: italic; color: var(--green); }
p { margin: 0 0 1rem; color: var(--ink-soft); }
p:last-child { margin-bottom: 0; }
a { color: var(--green); text-decoration: none; }
strong { color: var(--ink); font-weight: 700; }
em { font-style: italic; }
ul { list-style: none; }

.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: clamp(1.25rem, 5vw, 2.5rem); }
.wrap-narrow { max-width: 760px; }

.skip { position: absolute; left: -999px; }
.skip:focus { left: 1rem; top: 1rem; background: var(--ink); color: #fff; padding: .6rem 1rem; border-radius: 8px; z-index: 100; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  font-family: var(--sans); font-weight: 700; font-size: 1rem;
  padding: .9rem 1.6rem; border-radius: 999px; cursor: pointer;
  border: 2px solid transparent; transition: transform .18s ease, background .2s, color .2s, box-shadow .2s;
}
.btn:hover { transform: translateY(-2px); }
.btn-sm { padding: .55rem 1.1rem; font-size: .92rem; }
.btn-primary { background: var(--green); color: #fff; box-shadow: 0 12px 24px -14px var(--green); }
.btn-primary:hover { background: var(--green-deep); }
.btn-soft { background: var(--sage); color: var(--green-deep); }
.btn-soft:hover { background: #d8e4d6; }
.btn-outline { border-color: var(--green); color: var(--green); }
.btn-outline:hover { background: var(--green); color: #fff; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(247, 243, 238, 0.85);
  backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid transparent; transition: border-color .2s, box-shadow .2s;
}
.site-header.is-scrolled { border-color: var(--line); box-shadow: 0 8px 24px -22px rgba(34,51,46,.5); }
.header-inner { display: flex; align-items: center; gap: 1.25rem; height: 74px; }
.brand { display: inline-flex; align-items: center; gap: .6rem; color: var(--green); }
.brand-text { font-family: var(--serif); font-size: 1.35rem; color: var(--ink); font-weight: 500; }
.brand-text b { color: var(--green); font-weight: 600; }
.brand-mark { display: inline-flex; }
.nav { display: flex; gap: 1.6rem; margin-left: auto; }
.nav a { color: var(--ink-soft); font-weight: 600; font-size: .95rem; position: relative; }
.nav a::after { content: ""; position: absolute; left: 0; bottom: -5px; width: 0; height: 2px; background: var(--clay); transition: width .2s; }
.nav a:hover { color: var(--ink); }
.nav a:hover::after { width: 100%; }
.menu-toggle { display: none; flex-direction: column; gap: 5px; background: none; border: 0; cursor: pointer; padding: 8px; margin-left: auto; }
.menu-toggle span { width: 24px; height: 2px; background: var(--ink); border-radius: 2px; }

/* ---------- Hero ---------- */
.hero { padding: clamp(3rem, 8vw, 6rem) 0 clamp(3rem, 7vw, 5.5rem); }
.hero-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(2rem, 6vw, 4rem); align-items: center; }
.eyebrow { text-transform: uppercase; letter-spacing: .18em; font-size: .8rem; font-weight: 700; color: var(--clay); margin-bottom: 1.1rem; }
.hero h1 { font-size: clamp(2.4rem, 5.6vw, 4rem); margin-bottom: 1.4rem; }
.lead { font-size: clamp(1.1rem, 2vw, 1.3rem); color: var(--ink-soft); max-width: 42ch; }
.hero-cta { display: flex; flex-wrap: wrap; gap: .9rem; margin: 2rem 0 1rem; }
.hero-note { font-size: .95rem; color: var(--ink-soft); display: flex; align-items: center; gap: .5rem; }
.hero-note::before { content: "✓"; color: var(--green); font-weight: 800; }

/* breathing visual */
.hero-visual { display: grid; place-items: center; }
.breathe { position: relative; width: min(360px, 80vw); aspect-ratio: 1; display: grid; place-items: center; }
.breathe .ring { position: absolute; inset: 0; margin: auto; border-radius: 50%; border: 2px solid var(--sage-line); }
.ring-1 { width: 100%; height: 100%; background: radial-gradient(circle, rgba(58,107,94,.10), transparent 70%); animation: breathe 8s ease-in-out infinite; }
.ring-2 { width: 70%; height: 70%; border-color: var(--green); opacity: .4; animation: breathe 8s ease-in-out infinite .4s; }
.ring-3 { width: 42%; height: 42%; background: var(--sage); border-color: var(--clay); animation: breathe 8s ease-in-out infinite .8s; }
.breathe-core { position: relative; font-family: var(--serif); font-style: italic; font-size: 1.2rem; color: var(--green-deep); }
@keyframes breathe { 0%, 100% { transform: scale(.92); } 50% { transform: scale(1.06); } }

/* ---------- Sections ---------- */
.section { padding: clamp(3.5rem, 8vw, 6rem) 0; }
.section-alt { background: var(--paper-2); }
.section-tag { text-transform: uppercase; letter-spacing: .16em; font-size: .78rem; font-weight: 700; color: var(--clay); margin-bottom: .8rem; }
h2 { font-size: clamp(1.8rem, 4vw, 2.7rem); margin-bottom: 1.1rem; }
.section-head { max-width: 640px; margin: 0 auto 2.75rem; text-align: center; }
.section-sub { font-size: 1.1rem; color: var(--ink-soft); }

.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 6vw, 4rem); align-items: center; }
.two-col-reverse .about-card { order: 0; }

/* cycle diagram */
.cycle-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.5rem; box-shadow: var(--shadow); }
.cycle { width: 100%; height: auto; }
.cycle .cyc-node text { font-family: var(--sans); font-weight: 700; font-size: 13px; fill: var(--ink); text-anchor: middle; }
.cycle .cyc-sub { font-weight: 500; font-size: 9.5px; fill: var(--ink-soft); }
.cycle .cyc-center { font-family: var(--serif); font-style: italic; font-size: 16px; fill: var(--green); text-anchor: middle; }
.cyc-arc path { stroke-dasharray: 0; animation: none; }

/* symptom cards */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.6rem; transition: transform .2s, box-shadow .2s; }
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.card h3 { font-size: 1.25rem; margin-bottom: .5rem; }
.card p { font-size: .98rem; margin: 0; }
.note-line { text-align: center; max-width: 640px; margin: 2.5rem auto 0; font-size: 1.05rem; color: var(--ink-soft); }

/* steps */
.steps { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.5rem; counter-reset: s; }
.step { display: flex; gap: 1.1rem; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.6rem; }
.step-n { flex: none; width: 42px; height: 42px; display: grid; place-items: center; border-radius: 50%; background: var(--sage); color: var(--green-deep); font-family: var(--serif); font-size: 1.3rem; font-weight: 600; }
.step h3 { font-size: 1.2rem; margin-bottom: .35rem; }
.step p { font-size: .98rem; margin: 0; }

/* about */
.about-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 2.25rem; text-align: center; box-shadow: var(--shadow); }
.about-avatar { width: 90px; height: 90px; margin: 0 auto 1rem; border-radius: 50%; background: linear-gradient(150deg, var(--green), var(--green-deep)); color: #fff; display: grid; place-items: center; font-family: var(--serif); font-size: 2rem; }
.about-name { font-family: var(--serif); font-size: 1.4rem; color: var(--ink); margin-bottom: .2rem; }
.about-role { color: var(--ink-soft); font-size: .95rem; margin-bottom: 1rem; }
.about-link { font-weight: 700; color: var(--clay); }
.about-link:hover { color: var(--clay-deep); }
.ticks { margin-top: 1.2rem; display: grid; gap: .6rem; }
.ticks li { position: relative; padding-left: 1.8rem; color: var(--ink-soft); }
.ticks li::before { content: ""; position: absolute; left: 0; top: .5em; width: 12px; height: 12px; border-radius: 50%; background: var(--sage); box-shadow: inset 0 0 0 3px var(--green); }

/* faq */
.faq { display: grid; gap: .8rem; }
.faq details { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: .3rem 1.3rem; transition: box-shadow .2s; }
.faq details[open] { box-shadow: var(--shadow); }
.faq summary { list-style: none; cursor: pointer; padding: 1rem 0; font-family: var(--serif); font-size: 1.15rem; color: var(--ink); display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--clay); font-size: 1.5rem; font-weight: 300; transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { padding-bottom: 1.1rem; margin: 0; }

/* CTA */
.section-cta { background: linear-gradient(160deg, var(--green), var(--green-deep)); color: #eef3ef; padding: clamp(3.5rem, 8vw, 6rem) 0; text-align: center; }
.cta-inner { max-width: 640px; margin-inline: auto; }
.section-cta h2 { color: #fff; }
.section-cta p { color: rgba(238, 243, 239, .82); font-size: 1.15rem; }
.cta-buttons { display: flex; flex-wrap: wrap; gap: .9rem; justify-content: center; margin: 2rem 0 1.75rem; }
.section-cta .btn-outline { border-color: rgba(255,255,255,.6); color: #fff; }
.section-cta .btn-outline:hover { background: #fff; color: var(--green-deep); }
.cta-meta { display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; justify-content: center; font-size: .92rem; color: rgba(238,243,239,.75); }
.cta-meta li { display: flex; align-items: center; gap: .4rem; }
.cta-meta li:not(:first-child)::before { content: "·"; margin-right: 1rem; }

/* footer */
.site-footer { background: var(--ink); color: #c7d2cc; padding: 2.5rem 0; font-size: .9rem; }
.footer-crisis { color: #a9b6b0; max-width: 720px; margin: 0 auto 1.5rem; text-align: center; line-height: 1.6; }
.footer-crisis strong { color: #fff; }
.footer-bottom { display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; justify-content: space-between; border-top: 1px solid rgba(255,255,255,.1); padding-top: 1.5rem; }
.footer-credit { color: #c7d2cc; }
.footer-credit:hover { color: #fff; }

/* reveal */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in { opacity: 1; transform: none; }

/* responsive */
@media (max-width: 900px) {
  .hero-grid, .two-col { grid-template-columns: 1fr; }
  .two-col-reverse .about-card { max-width: 380px; margin-inline: auto; }
  .cards { grid-template-columns: 1fr 1fr; }
  .steps { grid-template-columns: 1fr; }
  .hero-visual { order: -1; }
}
@media (max-width: 680px) {
  .nav { display: none; }
  .nav.open { display: flex; flex-direction: column; position: absolute; top: 74px; left: 0; right: 0; background: var(--paper); padding: 1.25rem clamp(1.25rem,5vw,2.5rem) 1.75rem; border-bottom: 1px solid var(--line); gap: 1.1rem; }
  .header-inner .btn-sm { display: none; }
  .menu-toggle { display: flex; }
  .cards { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; }
}
