/* Exacto Books — shared styles */
:root {
  --cream: #F7F3EB;
  --ink: #0B1F2A;
  --sage: #5C7A6A;
  --border: #E5DFD4;
  --terracotta: #C4795A;
  --ink-muted: rgba(11, 31, 42, 0.62);
  --ink-soft: rgba(11, 31, 42, 0.45);
  --sage-soft: rgba(92, 122, 106, 0.12);
  --header-h: 4.25rem;
  --max: 1080px;
  --narrow: 720px;
}

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

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

body {
  background: var(--cream);
  color: var(--ink);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

h1, h2, h3, h4, .serif, .brand-word {
  font-family: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
  font-weight: 400;
  letter-spacing: -0.015em;
  line-height: 1.22;
}

a {
  color: var(--sage);
  text-decoration: none;
  transition: color 0.15s ease;
}
a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
a:focus-visible, button:focus-visible, .lang-toggle button:focus-visible, .btn:focus-visible,
input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--sage);
  outline-offset: 3px;
}

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

.topbar {
  height: 3px;
  background: var(--sage);
  flex-shrink: 0;
}

/* —— Header —— */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(247, 243, 235, 0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  width: min(var(--max), calc(100% - 2.5rem));
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: var(--header-h);
  padding: 0.65rem 0;
}

.logo-link {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
  color: var(--ink);
  flex-shrink: 0;
}
.logo-link:hover { text-decoration: none; color: var(--ink); }
.logo-link img {
  height: 44px;
  width: auto;
}
.brand-word {
  font-size: 1.05rem;
  letter-spacing: -0.02em;
}
.brand-word span { color: var(--sage); }

.nav-main {
  display: flex;
  align-items: center;
  gap: 0.15rem 1.35rem;
  list-style: none;
}
.nav-main a {
  color: var(--ink-muted);
  font-size: 0.9375rem;
  text-decoration: none;
  padding: 0.25rem 0;
  border-bottom: 1.5px solid transparent;
}
.nav-main a:hover,
.nav-main a[aria-current="page"] {
  color: var(--ink);
  text-decoration: none;
  border-bottom-color: var(--sage);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  flex-shrink: 0;
}

.lang-toggle {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 999px;
  overflow: hidden;
  background: #fff;
}
.lang-toggle button {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--ink-soft);
  font: inherit;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  padding: 0.35rem 0.65rem;
  cursor: pointer;
  line-height: 1;
}
.lang-toggle button[aria-pressed="true"] {
  background: var(--ink);
  color: var(--cream);
}
.lang-toggle button:hover:not([aria-pressed="true"]) {
  color: var(--ink);
}

.nav-toggle {
  display: none;
  appearance: none;
  border: 1px solid var(--border);
  background: #fff;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 8px;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  padding: 0;
}
.nav-toggle span {
  display: block;
  width: 16px;
  height: 1.5px;
  background: var(--ink);
}

/* —— Layout —— */
main { flex: 1; }

.wrap {
  width: min(var(--max), calc(100% - 2.5rem));
  margin: 0 auto;
}
.wrap-narrow {
  width: min(var(--narrow), calc(100% - 2.5rem));
  margin: 0 auto;
}

.section { padding: 4.5rem 0; }
.section-sm { padding: 3rem 0; }
.section-divider { border-top: 1px solid var(--border); }

.eyebrow {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--sage);
  margin-bottom: 0.85rem;
}

.lead {
  font-size: 1.2rem;
  color: var(--ink-muted);
  max-width: 38rem;
  line-height: 1.7;
}

.muted { color: var(--ink-muted); }
.soft { color: var(--ink-soft); }

/* —— Buttons —— */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  font: inherit;
  font-size: 0.9375rem;
  font-weight: 500;
  padding: 0.7rem 1.35rem;
  border-radius: 999px;
  border: 1.5px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
  line-height: 1.2;
}
.btn:hover { text-decoration: none; }
.btn-primary {
  background: var(--terracotta);
  color: #fff;
  border-color: var(--terracotta);
}
.btn-primary:hover {
  background: #b36a4d;
  border-color: #b36a4d;
  color: #fff;
}
.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--border);
}
.btn-ghost:hover {
  border-color: var(--ink);
  color: var(--ink);
}
.btn-sage {
  background: var(--sage);
  color: #fff;
  border-color: var(--sage);
}
.btn-sage:hover {
  background: #4d6a5a;
  border-color: #4d6a5a;
  color: #fff;
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.75rem;
}

/* —— Hero —— */
.hero { padding: 4.75rem 0 3.5rem; }
.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 3rem;
  align-items: center;
}
.hero h1 {
  font-size: clamp(2.35rem, 4.5vw, 3.35rem);
  margin-bottom: 1.1rem;
  max-width: 14ch;
}
.hero .tagline {
  font-family: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  font-size: 1.35rem;
  color: var(--sage);
  margin-bottom: 1.25rem;
}
.hero-panel {
  background: linear-gradient(160deg, var(--sage-soft), transparent 70%);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 2rem 1.75rem;
  min-height: 220px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 0.5rem;
}
.hero-panel .panel-label {
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--sage);
  font-weight: 600;
}
.hero-panel p {
  font-family: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  font-size: 1.35rem;
  line-height: 1.35;
  color: var(--ink);
}

/* —— Cards —— */
.card-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
  margin-top: 2rem;
}
.card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.6rem 1.5rem 1.5rem;
  text-decoration: none;
  color: inherit;
  display: block;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
a.card:hover {
  text-decoration: none;
  border-color: var(--sage);
  box-shadow: 0 8px 28px rgba(11, 31, 42, 0.06);
  color: inherit;
}
.card h3 {
  font-size: 1.25rem;
  margin-bottom: 0.55rem;
}
.card p {
  color: var(--ink-muted);
  font-size: 0.975rem;
  margin-bottom: 0.85rem;
}
.card .card-link {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--sage);
}

.service-block {
  padding: 2.25rem 0;
  border-top: 1px solid var(--border);
}
.service-block:first-of-type { border-top: 0; padding-top: 0; }
.service-block h2 {
  font-size: 1.75rem;
  margin-bottom: 0.65rem;
}
.service-block p + p { margin-top: 0.85rem; }

/* —— Steps —— */
.steps {
  list-style: none;
  margin-top: 2rem;
  display: flex;
  flex-direction: column;
  gap: 0;
}
.steps li {
  display: grid;
  grid-template-columns: 3.5rem 1fr;
  gap: 1.25rem;
  padding: 1.65rem 0;
  border-top: 1px solid var(--border);
}
.steps li:last-child { border-bottom: 1px solid var(--border); }
.step-num {
  font-family: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  font-size: 1.65rem;
  color: var(--sage);
  line-height: 1;
  padding-top: 0.15rem;
}
.steps h3 {
  font-size: 1.2rem;
  margin-bottom: 0.4rem;
}
.steps p { color: var(--ink-muted); max-width: 40rem; }

/* —— Two-col —— */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem 3rem;
  align-items: start;
}
.split-list {
  list-style: none;
  margin-top: 1rem;
}
.split-list li {
  padding: 0.65rem 0;
  border-bottom: 1px solid var(--border);
  color: var(--ink-muted);
  padding-left: 1.1rem;
  position: relative;
}
.split-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 1.15rem;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--sage);
}

.photo-frame {
  aspect-ratio: 4 / 5;
  max-width: 320px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background:
    linear-gradient(145deg, rgba(92, 122, 106, 0.18), transparent 55%),
    linear-gradient(0deg, var(--cream), #ebe4d8);
  display: flex;
  align-items: flex-end;
  padding: 1.25rem;
  position: relative;
}
.photo-frame::after {
  content: "";
  position: absolute;
  inset: 10px;
  border: 1px solid rgba(92, 122, 106, 0.25);
  border-radius: 8px;
  pointer-events: none;
}
.photo-frame .caption {
  font-size: 0.8rem;
  color: var(--ink-soft);
  position: relative;
  z-index: 1;
}

.mission-band {
  background: var(--ink);
  color: var(--cream);
  padding: 3.5rem 0;
  margin-top: 1rem;
}
.mission-band h2 {
  font-size: clamp(1.6rem, 3vw, 2rem);
  margin-bottom: 0.85rem;
  max-width: 22ch;
}
.mission-band p {
  color: rgba(247, 243, 235, 0.72);
  max-width: 36rem;
}

/* —— Contact —— */
.contact-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 2.5rem;
  align-items: start;
}
.contact-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.75rem;
}
.contact-card h2 {
  font-size: 1.35rem;
  margin-bottom: 0.5rem;
}
.email-link {
  font-family: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  font-size: 1.25rem;
  color: var(--sage);
  display: inline-block;
  margin: 0.75rem 0 1rem;
}
.form-stack {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--ink-muted);
  margin-bottom: 0.35rem;
}
input, select, textarea {
  width: 100%;
  font: inherit;
  font-size: 1rem;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.7rem 0.85rem;
  transition: border-color 0.15s ease;
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--sage);
  box-shadow: 0 0 0 3px var(--sage-soft);
}
textarea { min-height: 140px; resize: vertical; }
.form-note {
  font-size: 0.8125rem;
  color: var(--ink-soft);
  margin-top: 0.35rem;
}

/* —— CTA band —— */
.cta-band {
  padding: 3.5rem 0;
  text-align: center;
}
.cta-band h2 {
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  margin-bottom: 0.65rem;
}
.cta-band p {
  color: var(--ink-muted);
  max-width: 32rem;
  margin: 0 auto 1.5rem;
}

/* —— Footer —— */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 2.75rem 0 2rem;
  margin-top: auto;
}
.footer-inner {
  width: min(var(--max), calc(100% - 2.5rem));
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 2rem;
}
.footer-brand .brand-word {
  font-size: 1.15rem;
  margin-bottom: 0.4rem;
}
.footer-brand p {
  color: var(--ink-soft);
  font-size: 0.9rem;
  max-width: 22ch;
}
.footer-col h4 {
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 0.85rem;
}
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 0.45rem; }
.footer-col a {
  color: var(--ink-muted);
  font-size: 0.9375rem;
}
.footer-bottom {
  width: min(var(--max), calc(100% - 2.5rem));
  margin: 2rem auto 0;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  font-size: 0.8125rem;
  color: var(--ink-soft);
}
.footer-tagline {
  font-family: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  font-style: italic;
}

/* —— i18n: hide the inactive language —— */
[data-lang-es] { display: none !important; }
html[lang="es"] [data-lang-en] { display: none !important; }
html[lang="es"] [data-lang-es] { display: revert !important; }
html[lang="es"] span[data-lang-es],
html[lang="es"] a[data-lang-es] { display: inline !important; }
html[lang="es"] .btn[data-lang-es],
html[lang="es"] .btn span[data-lang-es] { display: inline-flex !important; }
html[lang="es"] p[data-lang-es],
html[lang="es"] h1[data-lang-es],
html[lang="es"] h2[data-lang-es],
html[lang="es"] h3[data-lang-es],
html[lang="es"] h4[data-lang-es],
html[lang="es"] li[data-lang-es],
html[lang="es"] label[data-lang-es],
html[lang="es"] option[data-lang-es],
html[lang="es"] div[data-lang-es],
html[lang="es"] article[data-lang-es] { display: block !important; }
html[lang="es"] .card-link[data-lang-es],
html[lang="es"] .panel-label[data-lang-es],
html[lang="es"] .caption[data-lang-es],
html[lang="es"] .eyebrow span[data-lang-es],
html[lang="es"] .form-note[data-lang-es] { display: inline !important; }
html[lang="es"] .eyebrow[data-lang-es] { display: block !important; }

/* —— Responsive —— */
@media (max-width: 860px) {
  .hero-grid,
  .split,
  .contact-grid,
  .footer-inner {
    grid-template-columns: 1fr;
  }
  .card-grid { grid-template-columns: 1fr; }
  .nav-toggle { display: flex; }
  .nav-main {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--cream);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    align-items: stretch;
    padding: 0.75rem 1.25rem 1.25rem;
    gap: 0;
  }
  .site-header.nav-open .nav-main { display: flex; }
  .nav-main a {
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border);
  }
  .nav-main a[aria-current="page"] { border-bottom-color: var(--border); }
  .header-inner { position: relative; flex-wrap: wrap; }
  .header-actions { margin-left: auto; }
  .brand-word { display: none; }
  .hero { padding-top: 3rem; }
  .form-row { grid-template-columns: 1fr; }
  .photo-frame { max-width: 100%; }
}

@media (max-width: 480px) {
  .wrap, .wrap-narrow, .header-inner, .footer-inner, .footer-bottom {
    width: calc(100% - 1.75rem);
  }
  .section { padding: 3.25rem 0; }
}
