:root {
  color-scheme: light;
  --background: #fcf7f3;
  --paper: #fffefa;
  --brown: #65422f;
  --brown-hover: #4e3021;
  --ink: #35281f;
  --muted: #80786f;
  --line: #e9dfd6;
  --input: #fcf1e9;
  --error: #ab4036;
  font-family: "Inter", "Segoe UI", Arial, sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

* {
  box-sizing: border-box;
}

html {
  height: 100%;
  overflow-x: hidden;
}

body {
  margin: 0;
  min-height: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  color: var(--ink);
  background: var(--background);
  overflow-x: hidden;
  max-width: 100vw;
}

main {
  flex: 1 0 auto;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.site-footer {
  margin-top: auto;
}

button,
input {
  font: inherit;
}

button,
a,
input {
  -webkit-tap-highlight-color: transparent;
}

button {
  cursor: pointer;
}

a {
  color: inherit;
}

button:focus-visible,
a:focus-visible,
input:focus-visible {
  outline: 2px solid var(--brown);
  outline-offset: 4px;
}

.icon-library {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.icon {
  width: 19px;
  height: 19px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.brand-name {
  display: inline-block;
  text-decoration: none;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 38px;
  font-weight: 700;
  letter-spacing: -1.9px;
  line-height: 1.2;
}

.primary-button {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--brown);
  border-radius: 5px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  background: var(--brown);
  color: #fffaf4;
  font-size: 14px;
  font-weight: 600;
  transition: background .18s, transform .18s;
}

.primary-button:hover {
  background: var(--brown-hover);
}

.primary-button:active {
  transform: translateY(1px);
}

.primary-button .icon {
  width: 16px;
  height: 16px;
}

/* Modales y diálogos nativos */
dialog:not([open]) {
  display: none !important;
}

dialog[open] {
  position: fixed;
  inset: 0;
  margin: auto;
  z-index: 1000;
}

dialog {
  width: min(430px, calc(100% - 32px));
  max-height: calc(100svh - 40px);
  overflow-y: auto;
  padding: 40px 32px 32px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--paper);
  color: var(--ink);
  box-shadow: 0 20px 100px #35281f20;
}

dialog::backdrop {
  background: #30231965;
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
}

.close-button {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--muted);
}

.close-button:hover {
  background: var(--input);
}

.eyebrow {
  display: block;
  color: var(--brown);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 2px;
  margin-bottom: 14px;
}

dialog h1 {
  font-size: 28px;
  line-height: 1.25;
  font-weight: 600;
  margin: 0 0 12px;
  letter-spacing: -.7px;
}

.dialog-description {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
  margin: 0 0 26px;
}

.prototype-note,
.dialog-feedback {
  font-size: 12px;
  line-height: 1.7;
  color: var(--muted);
  margin: 0 0 20px;
}

.dialog-feedback {
  margin: 16px 0 0;
}

.dialog-feedback:empty {
  display: none;
}

.welcome-icon {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  color: var(--brown);
  background: var(--input);
  margin-bottom: 24px;
}

.welcome-icon .icon {
  width: 26px;
  height: 26px;
}

body:has(dialog[open]) {
  overflow: hidden;
}

/* Ocultar footer en dispositivos móviles en todas las secciones */
@media (max-width: 640px) {
  .site-footer {
    display: none !important;
  }
}
