/* P3F Seguros � Premium Heritage Modern (DESIGN.md) */

:root {
  --primary: #001f46;
  --primary-container: #133463;
  --on-primary: #ffffff;
  --secondary: #c9a13b;
  --secondary-deep: #775a00;
  --on-secondary: #ffffff;
  --secondary-container: #fed266;
  --background: #f9f9ff;
  --surface: #ffffff;
  --surface-alt: #f4f7fa;
  --surface-container-low: #f0f3ff;
  --surface-variant: #d8e3fa;
  --on-surface: #111c2c;
  --muted: #43474f;
  --outline: #747780;
  --outline-variant: #c4c6d0;
  --border: #e2e8f0;
  --error: #ba1a1a;
  --on-error: #ffffff;
  --error-container: #ffdad6;
  --success: #067647;

  --gold: var(--secondary);
  --gold-hover: #a8872a;
  --gold-soft: rgba(201, 161, 59, 0.14);
  --navy: var(--primary);
  --navy-soft: var(--primary-container);
  --bg: var(--background);
  --text: var(--on-surface);

  --radius: 0.5rem;
  --radius-md: 0.75rem;
  --radius-lg: 1rem;
  --radius-full: 9999px;

  --shadow: 0 12px 40px rgba(19, 52, 99, 0.08);
  --shadow-soft: 0 4px 16px rgba(19, 52, 99, 0.06);
  --shadow-lift: 0 8px 24px rgba(19, 52, 99, 0.12);

  --font-display: "Montserrat", system-ui, sans-serif;
  --font-body: "Inter", system-ui, sans-serif;
  --max: 1440px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--on-surface);
  background: var(--background);
  -webkit-font-smoothing: antialiased;
  padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
}

main {
  flex: 1;
}

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

a {
  color: var(--primary);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:hover {
  color: var(--gold-hover);
}

:focus-visible {
  outline: 2px solid var(--secondary);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -100px;
  z-index: 100;
  background: var(--primary);
  color: var(--on-primary);
  padding: 8px 16px;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-weight: 600;
}

.skip-link:focus {
  top: 16px;
}

.container {
  width: min(100% - 32px, var(--max));
  margin-inline: auto;
}

@media (min-width: 600px) {
  .container {
    width: min(100% - 64px, var(--max));
  }
}

@media (min-width: 1024px) {
  .container {
    width: min(100% - 128px, var(--max));
  }
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 12px 24px;
  border-radius: var(--radius);
  border: 2px solid transparent;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-decoration: none;
  cursor: pointer;
  transition:
    background 0.2s ease,
    color 0.2s ease,
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    transform 0.2s ease;
}

.btn:active {
  transform: translateY(1px);
}

.btn-primary {
  background: var(--primary);
  color: var(--on-primary);
  border-color: var(--primary);
  box-shadow: var(--shadow-soft);
}

.btn-primary:hover {
  background: var(--primary-container);
  border-color: var(--primary-container);
  color: var(--on-primary);
  box-shadow: var(--shadow-lift);
}

.btn-secondary {
  background: transparent;
  color: var(--secondary);
  border: 2px solid var(--secondary);
}

.btn-secondary:hover {
  background: var(--gold-soft);
  color: var(--secondary-deep);
  border-color: var(--secondary-deep);
}

.btn-block {
  width: 100%;
}

.btn:disabled {
  opacity: 0.65;
  cursor: not-allowed;
  box-shadow: none;
}

.hero {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: center;
  min-height: min(100vh, 920px);
  padding: 80px 0 64px;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(ellipse 70% 55% at 78% 8%, rgba(201, 161, 59, 0.16), transparent 58%),
    radial-gradient(ellipse 55% 45% at 12% 88%, rgba(19, 52, 99, 0.06), transparent 55%),
    linear-gradient(180deg, #ffffff 0%, var(--surface-container-low) 45%, var(--background) 100%);
}

.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.28;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.45'/%3E%3C/svg%3E");
  background-size: 180px 180px;
  mix-blend-mode: soft-light;
}

.hero-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 16px;
  width: 100%;
}

.eyebrow {
  margin: 0;
  display: inline-flex;
  padding: 8px 16px;
  border-radius: var(--radius-full);
  background: var(--gold-soft);
  color: var(--primary);
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  line-height: 1;
}

.hero-logo-wrap {
  width: min(240px, 52vw);
  aspect-ratio: 1;
  border-radius: 50%;
  overflow: hidden;
  background: #0a1f44;
  box-shadow: var(--shadow);
  margin-block: 8px;
}

.hero-logo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.hero-lead {
  margin: 8px 0 0;
  max-width: 36rem;
  color: var(--muted);
  font-family: var(--font-body);
  font-size: 18px;
  font-weight: 400;
  line-height: 1.6;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 16px;
}

.reveal {
  opacity: 0;
  transform: translateY(16px);
  animation: rise 0.8s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.reveal:nth-child(1) { animation-delay: 0.06s; }
.reveal:nth-child(2) { animation-delay: 0.16s; }
.reveal:nth-child(3) { animation-delay: 0.26s; }
.reveal:nth-child(4) { animation-delay: 0.36s; }
.reveal:nth-child(5) { animation-delay: 0.46s; }

@keyframes rise {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal {
    opacity: 1;
    transform: none;
    animation: none;
  }
}

.section {
  padding: 64px 0 80px;
}

.section h2 {
  margin: 0 0 12px;
  font-family: var(--font-display);
  font-size: clamp(28px, 4vw, 32px);
  font-weight: 600;
  line-height: 1.3;
  color: var(--primary);
  letter-spacing: -0.01em;
}

.section-lead {
  margin: 0 0 24px;
  color: var(--muted);
  max-width: 28rem;
  font-size: 16px;
  line-height: 1.6;
}

.contact {
  background: var(--surface-alt);
  border-top: 1px solid var(--border);
  position: relative;
}

.contact::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--secondary), transparent);
}

.contact-grid {
  display: grid;
  gap: 40px;
}

@media (min-width: 860px) {
  .contact-grid {
    grid-template-columns: 0.9fr 1.15fr;
    gap: 64px;
    align-items: start;
  }
}

.contact-channels {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 12px;
}

.contact-channels a {
  font-weight: 500;
  font-size: 16px;
  text-decoration: none;
  color: var(--primary);
}

.contact-channels a:hover {
  color: var(--gold-hover);
  text-decoration: underline;
  text-decoration-color: var(--secondary);
}

.contact-channels .meta {
  font-weight: 500;
  font-size: 15px;
  color: var(--muted);
}

.footer-legal {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}


.contact-form {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: box-shadow 0.25s ease, border-color 0.25s ease;
}

.form-accent {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--secondary);
}

@media (min-width: 600px) {
  .contact-form {
    padding: 32px;
  }
}

.contact-form.is-success {
  border-color: rgba(6, 118, 71, 0.35);
}

.contact-form.is-error {
  border-color: rgba(186, 26, 26, 0.35);
}

.hp {
  position: absolute;
  left: -9999px;
  height: 0;
  overflow: hidden;
}

.field {
  display: grid;
  gap: 8px;
  margin-bottom: 16px;
}

.field label {
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0.02em;
  color: var(--muted);
}

.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 48px;
  padding: 12px 16px;
  border: 1px solid var(--outline-variant);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--on-surface);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.field textarea {
  min-height: 144px;
  resize: vertical;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border: 2px solid var(--primary);
  padding: 11px 15px;
  box-shadow: none;
}

.field input.is-invalid,
.field select.is-invalid,
.field textarea.is-invalid {
  border-color: var(--error);
}

.form-status {
  margin: 0 0 16px;
  padding: 12px 16px;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 500;
}

.form-status[data-type="success"] {
  background: rgba(6, 118, 71, 0.1);
  color: var(--success);
}

.form-status[data-type="error"] {
  background: var(--error-container);
  color: var(--error);
}

.form-privacy {
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.form-privacy a {
  font-weight: 500;
  color: var(--primary);
  text-decoration: none;
}

.form-privacy a:hover {
  color: var(--gold-hover);
  text-decoration: underline;
  text-decoration-color: var(--secondary);
}

.site-footer {
  padding: 32px 0 calc(40px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--border);
  background: var(--surface-alt);
}

.footer-inner {
  display: grid;
  gap: 24px;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.footer-logo-wrap {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  overflow: hidden;
  background: #0a1f44;
  flex-shrink: 0;
}

.footer-logo-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.footer-brand strong {
  display: block;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 14px;
  color: var(--primary);
}

.footer-brand span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.footer-meta {
  display: grid;
  gap: 4px;
  justify-items: start;
  text-align: left;
}

.footer-note,
.footer-credit {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.footer-credit a {
  font-weight: 600;
  color: var(--primary);
  text-decoration: none;
}

.footer-credit a:hover {
  color: var(--gold-hover);
  text-decoration: underline;
  text-decoration-color: var(--secondary);
}

.footer-links {
  display: flex;
  gap: 24px;
}

.footer-links:empty {
  display: none;
}

.footer-links a {
  font-weight: 600;
  font-size: 14px;
  text-decoration: none;
  color: var(--primary);
}

.footer-links a:hover {
  color: var(--gold-hover);
}

@media (min-width: 800px) {
  .footer-inner {
    grid-template-columns: 1.2fr 1.4fr auto;
    align-items: center;
  }

  .footer-inner:has(.footer-links:empty) {
    grid-template-columns: 1.2fr 1fr;
  }

  .footer-meta {
    justify-items: center;
    text-align: center;
  }
}

.whatsapp-float {
  position: fixed;
  right: max(1.25rem, env(safe-area-inset-right));
  bottom: max(1.25rem, env(safe-area-inset-bottom));
  z-index: 200;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: var(--radius-full);
  background: #25d366;
  color: #ffffff;
  box-shadow: var(--shadow-lift);
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.whatsapp-float:hover {
  transform: scale(1.06);
  box-shadow: var(--shadow);
  color: #ffffff;
}

.whatsapp-float:focus-visible {
  outline: 2px solid var(--secondary);
  outline-offset: 3px;
}

.whatsapp-float svg {
  display: block;
  width: 28px;
  height: 28px;
}
