/* ===== Tokens ===== */
:root{
  --ink:        #16231F;
  --teal-950:   #0F2A2E;
  --teal-900:   #193D42;
  --teal-800:   #204852;
  --teal-700:   #2C5D63;
  --teal-500:   #4B7F85;
  --detail:     #FFE6F1;
  --detail-700: #F5B8D2;
  --paper:      #F2F3EF;
  --paper-2:    #E9EBE4;
  --line:       #DADFD8;

  /* semantic theme tokens (dark/green default) */
  --bg:            var(--teal-900);
  --bg-2:          var(--teal-950);
  --surface:       var(--teal-800);
  --text:          var(--paper);
  --text-heading:  var(--paper);
  --text-muted:    #A9BFBC;
  --border:        rgba(242,243,239,0.14);
  --header-bg:     rgba(25,61,66,0.86);
  --hover-overlay: rgba(242,243,239,0.08);
  --contrast-bg:       var(--detail);
  --contrast-bg-hover: var(--detail-700);
  --contrast-text:     var(--teal-900);
  --text-accent:       #7FB3B8;

  --font-display: "Fraunces", Georgia, serif;
  --font-body: "Work Sans", -apple-system, BlinkMacSystemFont, sans-serif;

  --radius: 18px;
}

:root[data-theme="light"]{
  --bg:            var(--paper);
  --bg-2:          var(--paper-2);
  --surface:       #fff;
  --text:          var(--ink);
  --text-heading:  var(--teal-900);
  --text-muted:    #4A5A55;
  --border:        var(--line);
  --header-bg:     rgba(242,243,239,0.86);
  --hover-overlay: rgba(18,52,55,0.06);
  --contrast-bg:       var(--teal-900);
  --contrast-bg-hover: var(--teal-950);
  --contrast-text:     #fff;
  --text-accent:       var(--teal-700);
}

body{ transition: background 0.25s ease, color 0.25s ease; }

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

body{
  margin:0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

@media (prefers-reduced-motion: reduce){
  html{ scroll-behavior: auto; }
  *, *::before, *::after{ animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
}

h1,h2,h3{
  font-family: var(--font-display);
  color: var(--text-heading);
  margin: 0 0 0.4em;
  line-height: 1.12;
  font-weight: 600;
}
h1{ font-size: clamp(2.2rem, 4.5vw, 3.4rem); }
h2{ font-size: clamp(1.7rem, 3vw, 2.3rem); }
h3{ font-size: 1.15rem; margin-bottom: 0.3em; }
p{ margin: 0 0 1em; }

.wrap{
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 28px;
}

a{ color: inherit; }

/* subtle grain overlay for warmth */
.grain{
  position: fixed; inset: 0; pointer-events: none; z-index: 999;
  opacity: 0.035; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ===== Buttons ===== */
.btn{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 24px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
  border: 1.5px solid transparent;
  white-space: nowrap;
}
.btn:hover{ transform: translateY(-1px); }
.btn-primary{
  background: var(--contrast-bg);
  color: var(--contrast-text);
  box-shadow: 0 6px 18px rgba(25,61,66,0.28);
}
.btn-primary:hover{ background: var(--contrast-bg-hover); }
.btn-ghost{
  background: transparent;
  color: var(--text-heading);
  border-color: var(--text-heading);
}
.btn-ghost:hover{ background: var(--hover-overlay); }
.btn-outline{
  background: transparent;
  color: var(--paper);
  border-color: rgba(242,243,239,0.5);
}
.btn-outline:hover{ background: rgba(242,243,239,0.1); }
.turnos .btn-outline{ color: var(--paper); }
.instagram .btn-outline{ color: var(--text-heading); border-color: var(--text-heading); }
.instagram .btn-outline:hover{ background: var(--hover-overlay); }
.btn-small{ padding: 9px 18px; font-size: 0.85rem; }

/* ===== Header ===== */
.site-header{
  position: sticky; top: 0; z-index: 100;
  background: var(--header-bg);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.header-row{
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 28px;
  gap: 20px;
}
.brand{ display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand-text{ font-family: var(--font-display); font-size: 1.2rem; color: var(--text-heading); font-weight: 600; }
.brand-text em{ font-style: normal; color: var(--text-accent); }

.brand-mark{ position: relative; width: 30px; height: 30px; flex-shrink: 0; }
.ring{ position: absolute; border-radius: 50%; border: 2px solid var(--teal-700); inset: 0; }
.ring-b{ inset: 7px; border-color: var(--detail); }

.main-nav{ display: flex; gap: 30px; }
.main-nav a{
  text-decoration: none; color: var(--text-heading);
  font-weight: 500; font-size: 0.95rem;
  position: relative; padding: 4px 0;
}
.main-nav a::after{
  content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 2px;
  background: var(--teal-700); transform: scaleX(0); transform-origin: left;
  transition: transform 0.2s ease;
}
.main-nav a:hover::after{ transform: scaleX(1); }

.header-cta{ margin-left: auto; }
.nav-toggle{ display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 6px; }
.nav-toggle span{ width: 22px; height: 2px; background: var(--text-heading); display: block; }

/* ===== Theme switch ===== */
.theme-switch{
  background: none; border: none; cursor: pointer; padding: 2px;
  display: inline-flex; align-items: center; flex-shrink: 0;
}
.theme-switch-track{
  position: relative;
  width: 44px; height: 24px;
  border-radius: 999px;
  background: var(--border);
  transition: background 0.2s ease;
  display: block;
}
.theme-switch-thumb{
  position: absolute; top: 2px; left: 2px;
  width: 20px; height: 20px;
  border-radius: 50%;
  background: var(--teal-900);
  color: var(--detail);
  display: flex; align-items: center; justify-content: center;
  transition: transform 0.2s ease, background 0.2s ease;
  font-size: 11px; line-height: 1;
}
.theme-switch-thumb svg{ width: 12px; height: 12px; }
.theme-switch[aria-pressed="true"] .theme-switch-track{ background: var(--teal-700); }
.theme-switch[aria-pressed="true"] .theme-switch-thumb{
  transform: translateX(20px);
  background: var(--detail);
  color: var(--teal-900);
}

/* ===== Hero ===== */
.hero{ padding: 76px 0 60px; }
.hero-grid{
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 48px;
  align-items: center;
}
.eyebrow, .section-eyebrow{
  text-transform: uppercase;
  letter-spacing: 0.11em;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-accent);
  margin-bottom: 14px;
}
.section-eyebrow.light{ color: #E8C9C3; }
.lead{ font-size: 1.08rem; max-width: 46ch; color: var(--text-muted); }
.lead-hero{
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 2rem);
  line-height: 1.3;
  font-weight: 600;
  color: var(--text-heading);
  max-width: 20ch;
  margin-bottom: 0.35em;
}
.hero-actions{ display: flex; gap: 14px; flex-wrap: wrap; margin: 26px 0 40px; }
.hero-stats{ display: flex; gap: 34px; }
.hero-stats div{ display: flex; flex-direction: column; }
.hero-stats strong{ font-family: var(--font-display); font-size: 1.5rem; color: var(--text-heading); }
.hero-stats span{ font-size: 0.82rem; color: var(--text-muted); }

/* --- team photo signature element --- */
.hero-visual{ display: flex; align-items: center; justify-content: center; }
.breathing{
  position: relative;
  width: 320px; height: 320px;
  display: flex; align-items: center; justify-content: center;
}
.breath-ring{
  position: absolute; border-radius: 50%;
  border: 1.5px solid var(--teal-500);
  animation: breathe 4.5s ease-in-out infinite;
}
.r1{ width: 100%; height: 100%; opacity: 0.45; }
.r2{ width: 108%; height: 108%; opacity: 0.3; border-color: var(--detail); animation-delay: 0.6s; }
.team-photo{
  width: 84%; height: 84%;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid var(--surface);
  box-shadow: 0 12px 32px rgba(15,42,46,0.22);
  animation: breathe-photo 4.5s ease-in-out infinite;
}

@keyframes breathe{
  0%, 100%{ transform: scale(1); }
  50%{ transform: scale(1.08); }
}
@keyframes breathe-photo{
  0%, 100%{ transform: scale(1); }
  50%{ transform: scale(1.03); }
}

.breathing{ opacity: 0; transform: scale(0.96); transition: opacity 0.6s ease, transform 0.6s ease; }
.breathing.in-view{ opacity: 1; transform: scale(1); }
.breathing.in-view .breath-ring{ animation-play-state: running; }
.breathing.in-view .team-photo{ animation-play-state: running; }
.breath-ring, .team-photo{ animation-play-state: paused; }

.breath-cue{
  position: absolute; bottom: -6px; left: 50%; transform: translateX(-50%);
  font-size: 0.78rem; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--text-accent); font-weight: 600;
  display: inline-flex;
}
.breath-cue span{
  position: absolute; left: 0; top: 0; white-space: nowrap;
  opacity: 0; transform: translate(-50%, 4px);
}
.breathing.in-view .breath-cue span{ animation: cue-fade 4.5s ease-in-out infinite; }
.breathing.in-view .breath-cue span:first-child{ animation-delay: 0s; }
.breathing.in-view .breath-cue span:last-child{ animation-delay: 2.25s; }

@keyframes cue-fade{
  0%, 8%{ opacity: 0; transform: translate(-50%, 4px); }
  20%, 30%{ opacity: 1; transform: translate(-50%, 0); }
  42%, 100%{ opacity: 0; transform: translate(-50%, -4px); }
}

/* ===== Pillars ===== */
.pillars{ padding: 30px 0 70px; }
.pillar-grid{
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}
.pillar-card{
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 30px 26px;
}
.pillar-icon{ width: 44px; height: 44px; color: var(--text-accent); margin-bottom: 16px; }
.pillar-icon svg{ width: 100%; height: 100%; }
.pillar-card p{ color: var(--text-muted); font-size: 0.95rem; margin-bottom: 0; }
.pillar-list{ list-style: none; margin: 0; padding: 0; }
.pillar-list li{
  position: relative; padding-left: 16px;
  font-size: 0.95rem; color: var(--text-muted); margin-bottom: 8px;
}
.pillar-list li::before{ content: "—"; position: absolute; left: 0; color: var(--teal-500); }
.pillar-list li:last-child{ margin-bottom: 0; }

/* ===== Equipo ===== */
.equipo{ padding: 70px 0; background: var(--bg-2); }
.section-lead{ color: var(--text-muted); }
.team-grid{
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 22px;
  margin: 34px 0 26px;
}
.team-card{
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 28px;
}
.team-avatar{ position: relative; width: 46px; height: 46px; margin-bottom: 16px; }
.ring.small{ border-width: 1.5px; }
.team-role{ color: var(--text-accent); font-weight: 500; font-size: 0.88rem; margin-bottom: 10px; }
.team-bio{ list-style: none; margin: 0 0 16px; padding: 0; }
.team-bio li{
  position: relative; padding-left: 16px;
  font-size: 0.9rem; color: var(--text-muted); margin-bottom: 8px;
}
.team-bio li::before{ content: "—"; position: absolute; left: 0; color: var(--teal-500); }
.team-link{ font-size: 0.9rem; text-decoration: none; color: var(--text-accent); font-weight: 600; }
.team-link:hover{ text-decoration: underline; }

.staff-tabs{
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 8px; margin: 0 0 34px;
}
.staff-tablist{ display: flex; flex-wrap: wrap; gap: 6px; padding: 8px; }
.staff-tab{
  background: transparent; border: 1px solid transparent; cursor: pointer;
  padding: 8px 16px; border-radius: 999px;
  font-family: var(--font-body); font-size: 0.85rem; font-weight: 500;
  color: var(--text-muted); transition: background 0.15s ease, color 0.15s ease;
}
.staff-tab:hover{ background: var(--bg-2); }
.staff-tab.active{ background: var(--contrast-bg); color: var(--contrast-text); }

.staff-panels{ padding: 6px 20px 20px; min-height: 220px; }
.staff-panel{ display: none; }
.staff-panel.active{ display: block; }
.staff-panel-note{
  font-size: 0.85rem; color: var(--text-accent); font-weight: 500; margin: 0 0 14px;
}
.staff-panel ul{
  list-style: none; margin: 0; padding: 0;
  columns: 3; column-gap: 24px;
  border-top: 1px solid var(--border);
}
.staff-panel li{
  font-size: 0.92rem; color: var(--text-muted); padding: 8px 0;
  /*border-top: 1px solid var(--border);*/
  break-inside: avoid;
}
/* .staff-panel li:first-child{ border-top: none; padding-top: 0; }
 */
.highlight-chips{ display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.highlight-chips span{
  border: 1px solid var(--text-accent); color: var(--text-accent);
  border-radius: 999px; padding: 6px 16px; font-size: 0.82rem; font-weight: 500;
}
.fine-print{ font-size: 0.85rem; color: var(--text-muted); margin: 0; }

/* ===== Turnos ===== */
.turnos{ padding: 76px 0; background: var(--teal-950); color: var(--paper); }
.turnos h2{ color: var(--paper); }
.steps-grid{
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px;
  margin: 36px 0 40px;
}
.step{ border-top: 2px solid rgba(242,243,239,0.25); padding-top: 18px; }
.step-num{ font-family: var(--font-display); font-size: 1.4rem; color: var(--detail); display: block; margin-bottom: 8px; }
.step h3{ color: var(--paper); }
.step p{ color: rgba(242,243,239,0.75); font-size: 0.95rem; margin-bottom: 0; }
.turnos-actions{ display: flex; gap: 14px; flex-wrap: wrap; }

/* ===== Instagram ===== */
.instagram{ padding: 76px 0 90px; }
.ig-card{
  margin-top: 30px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 36px;
  max-width: 640px;
}
.ig-card-header{ display: flex; align-items: center; gap: 16px; margin-bottom: 18px; }
.ig-mark{
  width: 52px; height: 52px; flex-shrink: 0;
  object-fit: contain; border-radius: 10px;
  background: var(--bg-2);
  padding: 4px;
}
.ig-card-header h3{ margin: 0; }
.ig-card-header p{ margin: 0; color: var(--text-muted); font-size: 0.9rem; }
.ig-bio{ color: var(--text-muted); font-size: 0.95rem; }
.ig-stats{ display: flex; gap: 30px; margin: 22px 0 26px; }
.ig-stats strong{ display: block; font-family: var(--font-display); font-size: 1.3rem; color: var(--text-heading); }
.ig-stats span{ font-size: 0.8rem; color: var(--text-muted); }
.ig-actions{ display: flex; gap: 14px; flex-wrap: wrap; }

/* ===== Footer ===== */
.site-footer{ padding: 26px 0 40px; }
.footer-row{
  display: flex; justify-content: space-between; align-items: center;
  font-size: 0.85rem; color: var(--text-muted);
  flex-wrap: wrap; gap: 10px;
}
.footer-row a{ text-decoration: none; font-weight: 500; color: var(--text-accent); }

/* ===== Responsive ===== */
@media (max-width: 880px){
  .hero-grid{ grid-template-columns: 1fr; }
  .hero-visual{ order: -1; }
  .breathing{ width: 200px; height: 200px; }
  .pillar-grid{ grid-template-columns: 1fr; }
  .team-grid{ grid-template-columns: 1fr; }
  .steps-grid{ grid-template-columns: 1fr; }
}

@media (max-width: 560px){
  .staff-panel ul{ columns: 1; }
  .staff-tablist{ gap: 4px; }
  .staff-tab{ padding: 7px 12px; font-size: 0.8rem; }
}

@media (max-width: 760px){
  .main-nav{
    position: absolute; top: 100%; left: 0; right: 0;
    background: var(--bg); border-bottom: 1px solid var(--border);
    flex-direction: column; padding: 10px 28px 20px; gap: 4px;
    display: none;
  }
  .main-nav.open{ display: flex; }
  .main-nav a{ padding: 10px 0; }
  .nav-toggle{ display: flex; }
  .header-cta{ display: none; }
}

*:focus-visible{
  outline: 2px solid var(--teal-700);
  outline-offset: 2px;
}

:root[data-theme="light"] .turnos{ background: var(--teal-900); }
