/* =========================================================================
   Dr. José Marçalo — Endocrinologista
   Design system + página única
   ========================================================================= */

:root {
  --c-ink:      #0F2C2E;
  --c-ink-soft: #2E4748;
  --c-muted:    #6B7F80;
  --c-bg:       #FAFAF7;
  --c-bg-alt:   #F1EFE8;
  --c-card:     #FFFFFF;
  --c-line:     #E5E2D8;

  --c-brand:    #1F5E5E;
  --c-brand-2:  #2A8786;
  --c-brand-3:  #C7E2DC;
  --c-accent:   #C97B4A;
  --c-accent-2: #F4D9C5;

  --c-success: #1E8449;
  --c-error:   #C0392B;

  --ff-sans:  'Inter', system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --ff-serif: 'Playfair Display', Georgia, serif;

  --sp-1: .5rem;
  --sp-2: 1rem;
  --sp-3: 1.5rem;
  --sp-4: 2rem;
  --sp-5: 3rem;
  --sp-6: 4.5rem;
  --sp-7: 6rem;

  --r-sm: 8px;
  --r-md: 14px;
  --r-lg: 22px;
  --shadow-sm: 0 1px 3px rgba(15,44,46,.06), 0 1px 2px rgba(15,44,46,.04);
  --shadow-md: 0 6px 24px rgba(15,44,46,.08), 0 2px 6px rgba(15,44,46,.04);
  --shadow-lg: 0 24px 60px rgba(15,44,46,.12), 0 8px 16px rgba(15,44,46,.06);

  --container: 1180px;
  --easing: cubic-bezier(.22,.61,.36,1);
}

*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--ff-sans);
  color: var(--c-ink);
  background: var(--c-bg);
  line-height: 1.6;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; display: block; }
a { color: var(--c-brand); text-decoration: none; transition: color .2s; }
a:hover { color: var(--c-brand-2); }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
input, textarea, select { font-family: inherit; font-size: inherit; }

.container {
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 4vw, 2.5rem);
}

.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--c-brand); color: #fff;
  padding: .5rem 1rem; border-radius: 0 0 var(--r-sm) 0;
  z-index: 1000;
}
.skip-link:focus { left: 0; }

h1, h2, h3 { font-family: var(--ff-serif); color: var(--c-ink); line-height: 1.15; font-weight: 600; }
.section-header h2 {
  font-size: clamp(1.75rem, 3vw, 2.75rem);
  letter-spacing: -.02em;
  margin-bottom: .5rem;
}
.eyebrow {
  display: inline-flex; align-items: center; gap: .5rem;
  font-family: var(--ff-sans);
  font-size: .8rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: .14em;
  color: var(--c-brand);
}
.eyebrow::before {
  content: ''; width: 28px; height: 1px;
  background: var(--c-brand);
}

.section-lead {
  max-width: 60ch;
  color: var(--c-ink-soft);
  margin-top: var(--sp-2);
  font-size: 1.05rem;
}
.section-lead.small { font-size: .95rem; margin-top: .5rem; }

/* ====== Navegação ====== */
.nav-bar {
  position: fixed; top: 0; left: 0; right: 0;
  z-index: 100;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  background: rgba(250, 250, 247, .85);
  border-bottom: 1px solid transparent;
  transition: background .3s, border-color .3s, padding .3s;
}
.nav-bar.scrolled {
  background: rgba(250, 250, 247, .95);
  border-bottom-color: var(--c-line);
}
.nav-inner {
  max-width: var(--container);
  margin-inline: auto;
  padding: 1rem clamp(1.25rem, 4vw, 2.5rem);
  display: flex; align-items: center; justify-content: space-between;
  gap: 1.5rem;
}
.nav-logo { display: flex; align-items: center; gap: .75rem; color: var(--c-ink); }
.logo-mark {
  display: inline-flex; align-items: center; justify-content: center;
  width: 42px; height: 42px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--c-brand) 0%, var(--c-brand-2) 100%);
  color: #fff;
  font-family: var(--ff-serif);
  font-weight: 700; font-size: 1.05rem;
  letter-spacing: .02em;
  box-shadow: 0 6px 16px rgba(31, 94, 94, .25);
}
.logo-text { display: flex; flex-direction: column; line-height: 1.1; }
.logo-name { font-family: var(--ff-serif); font-weight: 600; font-size: 1.05rem; }
.logo-sub  { font-size: .75rem; color: var(--c-muted); letter-spacing: .04em; }

.nav-links { display: flex; gap: 2rem; }
.nav-links a {
  color: var(--c-ink-soft);
  font-weight: 500; font-size: .95rem;
  position: relative;
}
.nav-links a::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: -6px;
  height: 2px; background: var(--c-brand);
  transform: scaleX(0); transform-origin: left;
  transition: transform .3s var(--easing);
}
.nav-links a:hover { color: var(--c-brand); }
.nav-links a:hover::after { transform: scaleX(1); }

.nav-toggle {
  display: none;
  width: 40px; height: 40px;
  flex-direction: column; justify-content: center; align-items: center;
  gap: 5px;
}
.nav-toggle span {
  display: block; width: 22px; height: 2px;
  background: var(--c-ink);
  transition: transform .3s var(--easing), opacity .2s;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 800px) {
  .nav-toggle { display: flex; }
  .nav-links {
    position: absolute; top: 100%; left: 0; right: 0;
    background: var(--c-bg);
    flex-direction: column; gap: 0;
    padding: 1rem clamp(1.25rem, 4vw, 2.5rem);
    border-bottom: 1px solid var(--c-line);
    transform: translateY(-10px); opacity: 0; pointer-events: none;
    transition: transform .3s var(--easing), opacity .2s;
  }
  .nav-links.open { transform: translateY(0); opacity: 1; pointer-events: auto; }
  .nav-links a { padding: .75rem 0; border-bottom: 1px solid var(--c-line); }
  .nav-links a:last-child { border-bottom: none; }
}

/* ====== Hero ====== */
.hero {
  position: relative; isolation: isolate;
  padding: 8rem 0 4rem;
  overflow: hidden;
}
.hero-bg {
  position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(180deg, var(--c-bg) 0%, var(--c-bg-alt) 100%);
}
.hero-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: .55;
  animation: blob 18s ease-in-out infinite;
}
.blob-1 {
  width: 480px; height: 480px;
  top: -100px; right: -120px;
  background: radial-gradient(circle, var(--c-brand-3) 0%, transparent 70%);
}
.blob-2 {
  width: 380px; height: 380px;
  bottom: -80px; left: -80px;
  background: radial-gradient(circle, var(--c-accent-2) 0%, transparent 70%);
  animation-delay: -6s;
}
.blob-3 {
  width: 320px; height: 320px;
  top: 30%; left: 40%;
  background: radial-gradient(circle, rgba(31, 94, 94, .08) 0%, transparent 70%);
  animation-delay: -12s;
}
@keyframes blob {
  0%,100% { transform: translate(0,0) scale(1); }
  33%     { transform: translate(30px,-20px) scale(1.05); }
  66%     { transform: translate(-20px,20px) scale(.95); }
}

.hero-inner {
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 4vw, 2.5rem);
  display: grid; grid-template-columns: 1.1fr .9fr;
  gap: clamp(2rem, 5vw, 5rem);
  align-items: center;
  min-height: calc(100vh - 8rem);
}
@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; min-height: auto; }
}

.hero-eyebrow {
  display: inline-block;
  font-size: .8rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: .16em;
  color: var(--c-brand);
  padding: .35rem .8rem;
  border: 1px solid var(--c-brand-3);
  border-radius: 100px;
  background: rgba(199, 226, 220, .35);
  margin-bottom: 1.5rem;
}

.hero-title {
  font-size: clamp(2.25rem, 5vw, 4rem);
  letter-spacing: -.025em;
  line-height: 1.05;
  margin-bottom: 1.5rem;
}
.hero-title .accent {
  color: var(--c-brand);
  font-style: italic;
  position: relative;
}
.hero-title .accent::after {
  content: '';
  position: absolute; left: 0; right: 0; bottom: 4px;
  height: 8px;
  background: var(--c-accent-2);
  z-index: -1;
  transform: scaleX(0); transform-origin: left;
  animation: underline 1s 1s var(--easing) forwards;
}
@keyframes underline { to { transform: scaleX(1); } }

.hero-lead {
  font-size: 1.125rem;
  color: var(--c-ink-soft);
  margin-bottom: 2rem;
  max-width: 50ch;
}

.hero-cta { display: flex; flex-wrap: wrap; gap: 1rem; margin-bottom: 3rem; }

.hero-stats { display: flex; gap: 2.5rem; flex-wrap: wrap; }
.stat { display: flex; flex-direction: column; }
.stat strong {
  font-family: var(--ff-serif);
  font-size: 2.25rem; font-weight: 700;
  color: var(--c-brand);
  line-height: 1;
}
.stat span { font-size: .85rem; color: var(--c-muted); margin-top: .25rem; }

.hero-brand {
  display: flex;
  justify-content: center;
  align-items: center;
}
.hero-brand-frame {
  position: relative;
  width: clamp(300px, 38vw, 500px);
  aspect-ratio: 931 / 526;
  padding: .45rem;
  background: #6f8068;
  border-radius: var(--r-md);
  box-shadow: var(--shadow-lg);
  overflow: visible;
}
.hero-brand-frame img {
  display: block;
  width: 100%; height: 100%; object-fit: cover;
  border-radius: calc(var(--r-md) - 6px);
  filter: saturate(1.04) contrast(1.03);
  position: relative; z-index: 2;
}
.hero-brand-frame::before {
  content: '';
  position: absolute; inset: -16px -16px auto auto;
  width: 62%; height: 70%;
  border: 2px solid var(--c-brand);
  border-radius: var(--r-md);
  z-index: 1;
}
.hero-scroll {
  position: absolute; bottom: 2rem; left: 50%;
  transform: translateX(-50%);
  width: 26px; height: 42px;
  border: 2px solid var(--c-brand);
  border-radius: 100px;
  display: flex; justify-content: center;
}
.hero-scroll span {
  width: 4px; height: 8px;
  background: var(--c-brand);
  border-radius: 100px;
  margin-top: 8px;
  animation: scrollDown 1.6s infinite var(--easing);
}
@keyframes scrollDown {
  0%   { transform: translateY(0); opacity: 1; }
  60%  { transform: translateY(14px); opacity: 0; }
  100% { transform: translateY(0); opacity: 1; }
}
@media (max-width: 900px) { .hero-scroll { display: none; } }

/* ====== Botões ====== */
.btn {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .85rem 1.4rem;
  border-radius: 100px;
  font-weight: 600; font-size: .95rem;
  letter-spacing: .01em;
  cursor: pointer;
  transition: transform .2s var(--easing), box-shadow .2s, background .2s, color .2s;
  white-space: nowrap;
}
.btn svg { width: 16px; height: 16px; transition: transform .2s; }
.btn-primary {
  background: var(--c-brand);
  color: #fff;
  box-shadow: 0 8px 18px rgba(31, 94, 94, .25);
}
.btn-primary:hover {
  background: var(--c-brand-2); color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 12px 24px rgba(31, 94, 94, .3);
}
.btn-primary:hover svg { transform: translateX(3px); }
.btn-ghost {
  background: transparent;
  color: var(--c-ink);
  border: 1.5px solid var(--c-line);
}
.btn-ghost:hover {
  background: var(--c-card);
  border-color: var(--c-brand);
  color: var(--c-brand);
}

/* ====== Secções genéricas ====== */
.section { padding: var(--sp-7) 0; }
.section-about    { background: var(--c-bg); }
.section-areas    { background: var(--c-bg-alt); }
.section-percurso { background: var(--c-bg); }
.section-locais   { background: var(--c-bg-alt); }
.section-contacto { background: var(--c-bg); }

.section-header { margin-bottom: var(--sp-5); max-width: 700px; }

/* ====== Sobre ====== */
.about-grid {
  display: grid; grid-template-columns: 1.3fr 1fr;
  gap: var(--sp-5); align-items: center;
}
@media (max-width: 800px) { .about-grid { grid-template-columns: 1fr; } }
.about-text p { color: var(--c-ink-soft); font-size: 1.05rem; margin-bottom: 1rem; }
.about-text strong { color: var(--c-ink); }

.languages {
  margin-top: 2rem;
  padding: 1.25rem 1.5rem;
  background: var(--c-bg-alt);
  border-radius: var(--r-sm);
  border-left: 3px solid var(--c-brand);
}
.lang-label {
  display: block;
  font-size: .8rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: .12em;
  color: var(--c-brand);
  margin-bottom: .5rem;
}
.lang-list {
  list-style: none;
  display: flex; flex-wrap: wrap; gap: .5rem;
}
.lang-list li {
  background: #fff;
  color: var(--c-ink);
  padding: .35rem .85rem;
  border-radius: 100px;
  font-size: .85rem;
  font-weight: 500;
  border: 1px solid var(--c-line);
}

.about-portrait {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.about-portrait img {
  width: 100%;
  border-radius: var(--r-md);
  box-shadow: var(--shadow-md);
  aspect-ratio: 4 / 5;
  object-fit: cover;
}

.credential-badge {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  margin-top: .9rem;
  background: var(--c-card);
  color: var(--c-ink);
  font-size: .82rem;
  font-weight: 500;
  padding: .6rem 1rem;
  border: 1px solid var(--c-line);
  border-radius: 100px;
  box-shadow: var(--shadow-sm);
  white-space: nowrap;
}

.credential-badge svg {
  width: 16px;
  height: 16px;
  color: var(--c-success);
  flex-shrink: 0;
}

/* ====== Áreas (cards expansíveis) ====== */
.areas-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.25rem;
}
.area-card {
  background: var(--c-card);
  padding: var(--sp-3);
  border-radius: var(--r-md);
  border: 1px solid var(--c-line);
  transition: transform .3s var(--easing), box-shadow .3s, border-color .3s;
  position: relative; overflow: hidden;
  cursor: pointer; outline: none;
}
.area-card::before {
  content: '';
  position: absolute; top: 0; left: 0; width: 0; height: 3px;
  background: linear-gradient(90deg, var(--c-brand), var(--c-brand-2));
  transition: width .4s var(--easing);
}
.area-card:hover, .area-card.expanded {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--c-brand-3);
}
.area-card:hover::before, .area-card.expanded::before { width: 100%; }
.area-card:focus-visible {
  border-color: var(--c-brand);
  box-shadow: 0 0 0 3px var(--c-brand-3);
}

.area-icon {
  width: 48px; height: 48px;
  border-radius: 12px;
  background: var(--c-brand-3);
  color: var(--c-brand);
  display: inline-flex; align-items: center; justify-content: center;
  margin-bottom: 1rem;
  transition: background .3s, color .3s, transform .3s var(--easing);
}
.area-icon svg { width: 24px; height: 24px; }
.area-card:hover .area-icon, .area-card.expanded .area-icon {
  background: var(--c-brand);
  color: #fff;
  transform: rotate(-6deg);
}
.area-card h3 { font-size: 1.2rem; margin-bottom: .5rem; }
.area-card .area-summary { color: var(--c-ink-soft); font-size: .95rem; margin-bottom: .25rem; }

/* Sub-conditions: hidden by default, revealed on hover/focus/expanded */
.area-conditions {
  list-style: none;
  display: flex; flex-wrap: wrap;
  gap: .35rem;
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  margin: 0;
  transition: max-height .45s var(--easing), opacity .3s ease, margin-top .3s ease;
}
.area-conditions li {
  font-size: .8rem;
  color: var(--c-brand);
  background: var(--c-brand-3);
  padding: .25rem .65rem;
  border-radius: 100px;
  font-weight: 500;
  border: 1px solid transparent;
  transition: background .2s, border-color .2s, color .2s;
}
.area-conditions li:hover {
  background: #fff;
  border-color: var(--c-brand);
  color: var(--c-brand);
}

.area-card .area-hint {
  display: inline-flex; align-items: center;
  margin-top: .85rem;
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .04em;
  color: var(--c-brand);
  opacity: .7;
  transition: opacity .25s;
}

.area-card:hover .area-conditions,
.area-card:focus-within .area-conditions,
.area-card.expanded .area-conditions {
  max-height: 360px;
  opacity: 1;
  margin-top: .85rem;
}
.area-card:hover .area-hint,
.area-card:focus-within .area-hint,
.area-card.expanded .area-hint {
  opacity: 0;
}

/* ====== Percurso (timeline) ====== */
.percurso-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-4);
}
@media (max-width: 800px) { .percurso-grid { grid-template-columns: 1fr; } }

.percurso-col {
  background: var(--c-card);
  border: 1px solid var(--c-line);
  border-radius: var(--r-md);
  padding: var(--sp-4);
}
.percurso-title {
  display: flex; align-items: center; gap: .65rem;
  font-family: var(--ff-sans);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--c-ink);
  text-transform: uppercase; letter-spacing: .08em;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--c-line);
}
.percurso-title svg {
  width: 22px; height: 22px;
  color: var(--c-brand);
  flex-shrink: 0;
}

.timeline {
  list-style: none;
  position: relative;
  padding-left: 1.25rem;
}
.timeline::before {
  content: '';
  position: absolute;
  left: 4px; top: 8px; bottom: 8px;
  width: 2px;
  background: linear-gradient(to bottom, var(--c-brand-3), transparent);
}
.timeline li {
  position: relative;
  padding-bottom: 1.5rem;
}
.timeline li:last-child { padding-bottom: 0; }
.timeline li::before {
  content: '';
  position: absolute;
  left: -1.25rem;
  top: .35rem;
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--c-brand);
  border: 2px solid var(--c-bg);
  box-shadow: 0 0 0 2px var(--c-brand-3);
}
.timeline .tl-year {
  display: block;
  font-weight: 600;
  font-size: .82rem;
  color: var(--c-brand);
  text-transform: uppercase;
  letter-spacing: .08em;
  margin-bottom: .25rem;
}
.timeline .tl-text {
  display: block;
  color: var(--c-ink-soft);
  font-size: .95rem;
  line-height: 1.5;
}
.timeline .tl-text strong { color: var(--c-ink); }

/* ====== Locais + Mapa ====== */
.locais-layout {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: var(--sp-4);
  align-items: stretch;
}
@media (max-width: 900px) { .locais-layout { grid-template-columns: 1fr; } }

.map-canvas {
  height: 540px;
  border-radius: var(--r-md);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--c-line);
}
.locais-list {
  display: flex; flex-direction: column;
  gap: .75rem;
  max-height: 540px;
  overflow-y: auto;
  padding-right: .25rem;
}
.locais-list::-webkit-scrollbar { width: 6px; }
.locais-list::-webkit-scrollbar-thumb { background: var(--c-line); border-radius: 3px; }

.local-card {
  background: var(--c-card);
  border: 1px solid var(--c-line);
  border-radius: var(--r-sm);
  padding: 1rem 1.25rem;
  transition: border-color .2s, box-shadow .2s, transform .2s;
  cursor: pointer;
}
.local-card:hover, .local-card.active {
  border-color: var(--c-brand);
  box-shadow: var(--shadow-sm);
  transform: translateX(2px);
}
.local-card header {
  display: flex; justify-content: space-between; align-items: baseline;
  gap: 1rem;
  margin-bottom: .35rem;
}
.local-card h3 {
  font-family: var(--ff-sans);
  font-size: 1rem; font-weight: 600;
  color: var(--c-ink);
}
.local-cidade {
  font-size: .75rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: .1em;
  color: var(--c-brand);
}
.local-card p { font-size: .88rem; color: var(--c-ink-soft); margin-bottom: .25rem; line-height: 1.4; }
.local-card .local-sub {
  font-size: .82rem; color: var(--c-muted);
  font-style: italic;
  margin-bottom: .35rem;
}
.local-card .local-morada {
  font-size: .85rem;
  color: var(--c-ink-soft);
  background: var(--c-bg-alt);
  padding: .55rem .75rem;
  border-radius: 6px;
  margin: .5rem 0 .75rem;
  border-left: 2px solid var(--c-brand-3);
}
.local-contactos {
  display: flex; flex-wrap: wrap;
  gap: .35rem .75rem;
  margin-top: .5rem;
}
.local-contactos a {
  display: inline-flex; align-items: center; gap: .35rem;
  font-size: .82rem;
  color: var(--c-ink-soft);
  background: rgba(199, 226, 220, .4);
  padding: .25rem .55rem;
  border-radius: 100px;
  transition: background .2s, color .2s;
  white-space: nowrap;
}
.local-contactos a:hover { background: var(--c-brand); color: #fff; }
.local-contactos a svg { width: 12px; height: 12px; flex-shrink: 0; }

/* Custom Leaflet markers */
.leaflet-marker-jm {
  background: var(--c-brand);
  width: 30px !important; height: 30px !important;
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
  border: 3px solid #fff;
  box-shadow: 0 3px 8px rgba(0,0,0,.2);
  display: flex; align-items: center; justify-content: center;
}
.leaflet-marker-jm::after {
  content: '';
  width: 8px; height: 8px;
  background: #fff;
  border-radius: 50%;
  transform: rotate(45deg);
}

/* ====== Contacto ====== */
.contact-form {
  max-width: 720px;
  background: var(--c-card);
  padding: var(--sp-4);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-md);
  border: 1px solid var(--c-line);
}
@media (max-width: 600px) { .contact-form { padding: var(--sp-3); } }

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 540px) { .form-row { grid-template-columns: 1fr; } }

.field { display: flex; flex-direction: column; margin-bottom: 1.25rem; }
.field span {
  font-size: .85rem; font-weight: 500;
  color: var(--c-ink-soft);
  margin-bottom: .35rem;
}
.field input, .field textarea, .field select {
  padding: .75rem 1rem;
  border: 1.5px solid var(--c-line);
  border-radius: var(--r-sm);
  background: var(--c-bg);
  color: var(--c-ink);
  font-size: .95rem;
  transition: border-color .2s, background .2s, box-shadow .2s;
  resize: vertical;
  font-family: inherit;
}
.field select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%231F5E5E' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-right: 2.5rem;
  cursor: pointer;
}
.field input:focus, .field textarea:focus, .field select:focus {
  outline: none;
  border-color: var(--c-brand);
  background: #fff;
  box-shadow: 0 0 0 3px var(--c-brand-3);
}
.req { color: var(--c-error); margin-left: 2px; }

.hp { position: absolute; left: -9999px; }

.form-actions {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; flex-wrap: wrap;
}
.form-note { font-size: .85rem; color: var(--c-muted); }

.form-feedback {
  margin-top: 1rem;
  padding: .75rem 1rem;
  border-radius: var(--r-sm);
  display: none;
  font-size: .9rem;
}
.form-feedback.show { display: block; }
.form-feedback.success {
  background: rgba(30, 132, 73, .1);
  color: var(--c-success);
  border-left: 3px solid var(--c-success);
}
.form-feedback.error {
  background: rgba(192, 57, 43, .1);
  color: var(--c-error);
  border-left: 3px solid var(--c-error);
}

/* ====== Footer ====== */
.site-footer {
  background: var(--c-ink);
  color: rgba(255,255,255,.85);
  padding: var(--sp-5) 0;
}
.footer-inner {
  display: flex; justify-content: space-between; align-items: center;
  gap: 2rem; flex-wrap: wrap;
}
.footer-brand { display: flex; align-items: center; gap: 1rem; }
.footer-brand strong { color: #fff; font-family: var(--ff-serif); font-size: 1.05rem; }
.footer-brand p { font-size: .85rem; color: rgba(255,255,255,.6); }
.footer-meta { text-align: right; font-size: .85rem; color: rgba(255,255,255,.7); }
.footer-disclaimer { font-size: .75rem; opacity: .7; margin-top: .25rem; }
.footer-resource { font-size: .85rem; margin-bottom: .5rem; }
.footer-resource a { color: var(--c-brand-3); font-weight: 500; text-decoration: underline; text-underline-offset: 2px; }
.footer-resource a:hover { color: #fff; }
@media (max-width: 600px) { .footer-meta { text-align: left; } }

/* ====== Reveal animations ====== */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .8s var(--easing), transform .8s var(--easing);
}
.reveal.in {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
  .reveal { opacity: 1; transform: none; }
}
