/* ==========================================================================
   draarcas.com — Dra. Esperanza Arcas Navarrete
   Single stylesheet. Tokens first, then layout, then components.
   No web fonts, no CDN, no third-party anything: renders with the network off.
   ========================================================================== */

:root {
  /* Ink & surface */
  --ink:            #101a22;
  --ink-soft:       #3c5162;
  --ink-muted:      #5a7082;
  --paper:          #ffffff;
  --page:           #f8fafb;
  --line:           #e3ebef;
  --line-strong:    #cfdce3;

  /* Brand — a deep petrol blue, cool and clinical */
  --brand:          #12566e;
  --brand-deep:     #0b3c4e;
  --brand-bright:   #1f8fa8;
  --brand-wash:     #eaf3f6;
  --brand-line:     #cbe0e7;

  /* Type */
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;

  /* Rhythm */
  --wrap: 1140px;
  --gutter: clamp(1.25rem, 4vw, 2.5rem);
  --section-y: clamp(3.5rem, 8vw, 6.5rem);
  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 16px;

  --shadow-md: 0 4px 16px -6px rgba(16, 26, 34, .12), 0 1px 3px rgba(16, 26, 34, .05);
}

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

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

body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg { display: block; max-width: 100%; }
a { color: var(--brand); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--brand-deep); }

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -0.015em;
  margin: 0 0 .5em;
  text-wrap: balance;
}
h1 { font-size: clamp(2.4rem, 5.2vw, 3.9rem); }
h2 { font-size: clamp(1.8rem, 3.6vw, 2.6rem); }
h3 { font-size: 1.2rem; letter-spacing: -0.005em; }
p  { margin: 0 0 1.1em; text-wrap: pretty; }
p:last-child { margin-bottom: 0; }

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.skip {
  position: absolute; left: -9999px; top: 0;
  background: var(--ink); color: #fff; padding: .75rem 1rem; z-index: 100;
}
.skip:focus { left: 1rem; top: 1rem; }

:focus-visible {
  outline: 2px solid var(--brand-bright);
  outline-offset: 3px;
  border-radius: 2px;
}

/* ---------- Header ---------- */

.site-head {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, .9);
  backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.site-head .wrap {
  display: flex; align-items: center; gap: 1.25rem;
  min-height: 72px;
}

.brand {
  display: flex; align-items: center; gap: .7rem;
  text-decoration: none; color: var(--ink);
  margin-right: auto;
}
.brand-mark {
  width: 38px; height: 38px; flex: none;
  border: 1px solid var(--brand-line);
  background: var(--brand-wash);
  border-radius: 50%;
  display: grid; place-items: center;
  font-family: var(--serif); font-size: .92rem; font-weight: 600;
  color: var(--brand); letter-spacing: .02em;
}
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-name { font-family: var(--serif); font-size: 1.06rem; font-weight: 600; }
.brand-sub {
  font-size: .695rem; letter-spacing: .13em; text-transform: uppercase;
  color: var(--ink-muted); font-weight: 600;
}

.site-nav { display: flex; align-items: center; gap: 1.4rem; }
.site-nav a {
  font-size: .9rem; font-weight: 500; color: var(--ink-soft);
  text-decoration: none; padding-block: .35rem;
  border-bottom: 1px solid transparent;
}
.site-nav a:hover { color: var(--brand); border-bottom-color: var(--brand-line); }

.nav-toggle {
  display: none;
  align-items: center; gap: .5rem;
  background: none; border: 1px solid var(--line-strong); border-radius: var(--r-sm);
  padding: .45rem .7rem; color: var(--ink); font: inherit; font-size: .85rem;
  cursor: pointer;
}
.nav-toggle svg { width: 16px; height: 16px; }

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .72rem 1.15rem;
  border-radius: var(--r-sm);
  font-size: .93rem; font-weight: 600; line-height: 1.2;
  text-decoration: none; border: 1px solid transparent;
  transition: background-color .16s ease, color .16s ease, border-color .16s ease;
  white-space: nowrap;
}
.btn svg { width: 15px; height: 15px; flex: none; }
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-deep); color: #fff; }
.btn-ghost { background: transparent; color: var(--brand); border-color: var(--brand-line); }
.btn-ghost:hover { background: var(--brand-wash); color: var(--brand-deep); border-color: var(--brand); }
.btn-quiet { background: var(--paper); color: var(--ink); border-color: var(--line-strong); }
.btn-quiet:hover { border-color: var(--ink-muted); color: var(--ink); }

/* ---------- Hero ---------- */

.hero {
  position: relative;
  background:
    radial-gradient(1100px 520px at 78% -12%, var(--brand-wash) 0%, rgba(234, 243, 246, 0) 62%),
    linear-gradient(180deg, #fff 0%, var(--page) 62%);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.32fr) minmax(0, .82fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: start;
  padding-block: clamp(3rem, 6vw, 5.5rem) clamp(3rem, 6vw, 5rem);
}
.eyebrow {
  display: inline-flex; align-items: center; gap: .6rem;
  font-size: .72rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase;
  color: var(--brand); margin: 0 0 1.35rem;
}
.eyebrow::before {
  content: ""; width: 22px; height: 1px; background: var(--brand-bright);
}
.hero h1 { margin-bottom: 1.1rem; }
.lede {
  font-size: clamp(1.03rem, 1.35vw, 1.16rem);
  color: var(--ink-soft);
  max-width: 46ch;
  line-height: 1.62;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: .7rem; margin-top: 1.9rem; }

.hero-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-md);
  padding: 1.6rem 1.5rem 1.4rem;
}
.hero-card h2 {
  font-family: var(--sans); font-size: .7rem; font-weight: 700;
  letter-spacing: .15em; text-transform: uppercase; color: var(--ink-muted);
  margin: 0 0 1.1rem;
}
.cred-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .95rem; }
.cred-list li {
  display: grid; grid-template-columns: 26px 1fr; gap: .75rem;
  padding-bottom: .95rem; border-bottom: 1px solid var(--line);
  font-size: .9rem; color: var(--ink-soft); line-height: 1.45;
}
.cred-list li:last-child { border-bottom: 0; padding-bottom: 0; }
.cred-list svg { width: 20px; height: 20px; color: var(--brand-bright); margin-top: .1rem; }
.cred-list strong { display: block; color: var(--ink); font-weight: 600; font-size: .92rem; }
.cred-foot {
  margin-top: 1.15rem; padding-top: 1rem; border-top: 1px solid var(--line);
  font-size: .82rem; color: var(--ink-muted);
  display: flex; align-items: center; gap: .5rem;
}
.dot { width: 7px; height: 7px; border-radius: 50%; background: #2e9e6b; flex: none; }

/* ---------- Capability strip ---------- */

.strip { background: var(--brand-deep); color: #dceaf0; }
.strip .wrap {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px; background: rgba(255, 255, 255, .12);
  max-width: none; padding-inline: 0;
}
.strip-cell {
  background: var(--brand-deep); padding: 1.35rem clamp(1rem, 3vw, 2rem);
  text-align: center; font-size: .84rem; letter-spacing: .02em;
}
.strip-cell strong { display: block; color: #fff; font-size: .95rem; font-weight: 600; margin-bottom: .15rem; }

/* ---------- Section scaffolding ---------- */

.section { padding-block: var(--section-y); }
.section-alt { background: var(--paper); border-block: 1px solid var(--line); }
.section-head { max-width: 62ch; margin-bottom: clamp(2rem, 4vw, 3rem); }
.section-head .label {
  display: block; font-size: .72rem; font-weight: 700; letter-spacing: .16em;
  text-transform: uppercase; color: var(--brand); margin-bottom: .9rem;
}
.section-head p { color: var(--ink-soft); font-size: 1.02rem; }

/* ---------- Areas grid ---------- */

.grid-areas {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px; background: var(--line);
  border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden;
}
.area {
  background: var(--paper); padding: 1.6rem 1.5rem 1.5rem;
  display: flex; flex-direction: column; gap: .55rem;
}
.area-icon {
  width: 38px; height: 38px; border-radius: 50%;
  background: var(--brand-wash); color: var(--brand);
  display: grid; place-items: center; margin-bottom: .35rem;
}
.area-icon svg { width: 21px; height: 21px; }
.area h3 { font-family: var(--serif); font-size: 1.06rem; margin: 0; }
.area p { font-size: .89rem; color: var(--ink-muted); line-height: 1.55; margin: 0; }
.area-cta { background: var(--brand-wash); justify-content: center; align-items: flex-start; }
.area-cta h3 { color: var(--brand-deep); }
.area-cta .btn { margin-top: .6rem; }

/* ---------- Feature: endoscopy ---------- */

.feature-grid {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  gap: clamp(2rem, 5vw, 4rem); align-items: center;
}
.feature-figure {
  background: var(--brand-deep); border-radius: var(--r-lg);
  padding: 1.5rem; color: #a9c9d6; margin: 0;
}
.feature-figure svg { width: 100%; height: auto; }
.feature-figure figcaption {
  font-size: .78rem; margin-top: 1rem; color: #8fb3c3; line-height: 1.5;
}
.feature h2 { margin-bottom: 1rem; }
.feature p { color: var(--ink-soft); }
.check-list { list-style: none; padding: 0; margin: 1.5rem 0 0; display: grid; gap: .7rem; }
.check-list li {
  display: grid; grid-template-columns: 20px 1fr; gap: .7rem;
  font-size: .94rem; color: var(--ink-soft); align-items: start;
}
.check-list svg { width: 18px; height: 18px; color: var(--brand-bright); margin-top: .18rem; }

/* ---------- Second opinion band ---------- */

.band {
  background: var(--brand); color: #e7f1f5;
  border-radius: var(--r-lg);
  padding: clamp(2rem, 4.5vw, 3.2rem);
  display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, .9fr);
  gap: clamp(1.5rem, 4vw, 3rem); align-items: center;
}
.band h2 { color: #fff; margin-bottom: .8rem; }
.band p { color: #cfe3ea; font-size: 1rem; }
.band .label {
  display: block; font-size: .72rem; font-weight: 700; letter-spacing: .16em;
  text-transform: uppercase; color: #b6dbe6; margin-bottom: .9rem;
}
.band-actions { display: grid; gap: .7rem; }
.band .btn-primary { background: #fff; color: var(--brand-deep); }
.band .btn-primary:hover { background: #eaf3f6; }
.band .btn-ghost { color: #fff; border-color: rgba(255, 255, 255, .38); }
.band .btn-ghost:hover { background: rgba(255, 255, 255, .1); color: #fff; border-color: #fff; }
.band-note { font-size: .8rem; color: #a8ccd8; margin: .2rem 0 0; }

/* ---------- Trajectory ---------- */

.two-col {
  display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr);
  gap: clamp(2rem, 5vw, 4rem); align-items: start;
}
.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.timeline::before {
  content: ""; position: absolute; left: 5px; top: .55rem; bottom: .55rem;
  width: 1px; background: var(--line-strong);
}
.timeline li { position: relative; padding: 0 0 1.5rem 1.9rem; }
.timeline li:last-child { padding-bottom: 0; }
.timeline li::before {
  content: ""; position: absolute; left: 0; top: .48rem;
  width: 11px; height: 11px; border-radius: 50%;
  background: var(--paper); border: 1.5px solid var(--brand-bright);
}
.timeline li.now::before { background: var(--brand-bright); }
.timeline .when {
  display: block; font-family: var(--mono); font-size: .74rem; letter-spacing: .04em;
  color: var(--brand); margin-bottom: .2rem;
}
.timeline .what { font-weight: 600; font-size: .96rem; display: block; }
.timeline .where { font-size: .88rem; color: var(--ink-muted); }

.aside-panel {
  background: var(--paper); border: 1px solid var(--line);
  border-radius: var(--r-lg); padding: 1.5rem;
}
.aside-panel + .aside-panel { margin-top: 1rem; }
.aside-panel h3 {
  font-family: var(--sans); font-size: .71rem; font-weight: 700;
  letter-spacing: .15em; text-transform: uppercase; color: var(--ink-muted);
  margin: 0 0 .95rem;
}
.tag-list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .45rem; }
.tag-list li {
  font-size: .8rem; color: var(--brand-deep); background: var(--brand-wash);
  border: 1px solid var(--brand-line); border-radius: 999px;
  padding: .3rem .7rem; line-height: 1.35;
}
.pub-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .9rem; }
.pub-list li {
  font-size: .875rem; color: var(--ink-soft); line-height: 1.5;
  padding-bottom: .9rem; border-bottom: 1px solid var(--line);
}
.pub-list li:last-child { border-bottom: 0; padding-bottom: 0; }
.pub-list em { font-style: italic; color: var(--ink); }
.pub-list .journal { display: block; font-size: .78rem; color: var(--ink-muted); margin-top: .15rem; }

/* ---------- FAQ ---------- */

.faq { display: grid; gap: .55rem; max-width: 78ch; }
.faq details {
  background: var(--paper); border: 1px solid var(--line);
  border-radius: var(--r-md); padding: .1rem 1.15rem;
}
.faq details[open] { border-color: var(--brand-line); }
.faq summary {
  cursor: pointer; padding: .95rem 0; font-weight: 600; font-size: .96rem;
  list-style: none; display: flex; justify-content: space-between; gap: 1rem; align-items: center;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; font-family: var(--mono); color: var(--brand); font-size: 1.1rem; line-height: 1;
}
.faq details[open] summary::after { content: "–"; }
.faq .answer { padding: 0 0 1.05rem; font-size: .92rem; color: var(--ink-soft); }
.faq .answer p:last-child { margin-bottom: 0; }

/* ---------- Contact ---------- */

.contact-grid {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 1px; background: var(--line); border: 1px solid var(--line);
  border-radius: var(--r-lg); overflow: hidden;
}
.contact-col { background: var(--paper); padding: clamp(1.5rem, 3.5vw, 2.4rem); }
.contact-col h3 { font-family: var(--serif); font-size: 1.25rem; margin-bottom: 1.1rem; }
.detail-list { list-style: none; margin: 0 0 1.5rem; padding: 0; display: grid; gap: 1rem; }
.detail-list li { display: grid; grid-template-columns: 22px 1fr; gap: .8rem; font-size: .93rem; color: var(--ink-soft); }
.detail-list svg { width: 18px; height: 18px; color: var(--brand-bright); margin-top: .2rem; }
.detail-list a { color: var(--ink); text-decoration-color: var(--brand-line); }
.detail-list a:hover { color: var(--brand); }
.detail-list .meta { display: block; font-size: .79rem; color: var(--ink-muted); }
.steps { list-style: none; counter-reset: step; margin: 0 0 1.5rem; padding: 0; display: grid; gap: 1rem; }
.steps li { counter-increment: step; position: relative; padding-left: 2.1rem; font-size: .92rem; color: var(--ink-soft); }
.steps li::before {
  content: counter(step); position: absolute; left: 0; top: .05rem;
  width: 1.45rem; height: 1.45rem; border-radius: 50%;
  background: var(--brand-wash); color: var(--brand-deep);
  font-family: var(--mono); font-size: .75rem; font-weight: 600;
  display: grid; place-items: center;
}
.contact-actions { display: flex; flex-wrap: wrap; gap: .6rem; }

/* ---------- Footer ---------- */

.site-foot {
  background: var(--ink); color: #93a6b3;
  padding-block: 2.6rem 2rem;
  font-size: .85rem;
}
.foot-grid {
  display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) minmax(0, 1fr);
  gap: 2rem; padding-bottom: 1.8rem; border-bottom: 1px solid rgba(255, 255, 255, .1);
}
.site-foot .brand-name { color: #fff; }
.site-foot .brand-mark { background: rgba(255, 255, 255, .06); border-color: rgba(255, 255, 255, .16); color: #cfe3ea; }
.site-foot .brand-sub { color: #7d919e; }
.site-foot p { color: #93a6b3; max-width: 34ch; margin-top: 1rem; line-height: 1.6; }
.foot-col h4 {
  font-family: var(--sans); font-size: .7rem; font-weight: 700; letter-spacing: .15em;
  text-transform: uppercase; color: #c3d2db; margin: 0 0 .9rem;
}
.foot-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .55rem; }
.foot-col a { color: #93a6b3; text-decoration: none; }
.foot-col a:hover { color: #fff; text-decoration: underline; }
.foot-legal {
  display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; justify-content: space-between;
  padding-top: 1.4rem; font-size: .78rem; color: #8399a6;
}
.foot-legal .disclaimer { max-width: 62ch; }

/* ---------- Legal page ---------- */

.legal { padding-block: clamp(2.5rem, 5vw, 4rem); }
.legal-body { max-width: 74ch; }
.legal-body h2 { font-size: 1.5rem; margin-top: 2.5rem; }
.legal-body h3 { font-size: 1.05rem; margin-top: 1.6rem; font-family: var(--sans); font-weight: 700; }
.legal-body ul { padding-left: 1.2rem; color: var(--ink-soft); }
.legal-body li { margin-bottom: .4rem; }
.legal-meta { font-size: .82rem; color: var(--ink-muted); margin-bottom: 2rem; }
.back-link { display: inline-flex; align-items: center; gap: .45rem; font-size: .88rem; text-decoration: none; }
.back-link svg { width: 15px; height: 15px; }

/* ---------- Responsive ---------- */

@media (max-width: 1000px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-card { max-width: 520px; }
  .grid-areas { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .feature-grid, .two-col, .band, .contact-grid { grid-template-columns: 1fr; }
  .strip .wrap { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .foot-grid { grid-template-columns: 1fr 1fr; }
  .feature-figure { order: -1; }
}

@media (max-width: 820px) {
  .site-nav {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--paper); border-bottom: 1px solid var(--line);
    padding: .5rem var(--gutter) 1rem; box-shadow: var(--shadow-md);
  }
  .site-nav.open { display: flex; }
  .site-nav a { padding: .75rem 0; border-bottom: 1px solid var(--line); font-size: .95rem; }
  .site-nav a:last-child { border-bottom: 0; }
  .nav-toggle { display: inline-flex; }
  .site-head .wrap { position: relative; }
}

@media (max-width: 620px) {
  body { font-size: 16px; }
  .grid-areas { grid-template-columns: 1fr; }
  .strip .wrap { grid-template-columns: 1fr; }
  .strip-cell { text-align: left; display: flex; justify-content: space-between; gap: 1rem; align-items: baseline; }
  .strip-cell strong { margin: 0; }
  .foot-grid { grid-template-columns: 1fr; gap: 1.6rem; }
  .hero-actions .btn { flex: 1 1 auto; }
}

@media print {
  .site-head, .site-foot, .hero-actions, .band-actions { display: none; }
  body { background: #fff; font-size: 11pt; }
  .section { padding-block: 1.2rem; }
}

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