/* Seguridad Digital EC — Custom CSS */

@font-face {
  font-family: 'Titillium Web';
  src: url('/fonts/TitilliumWeb-ExtraLight.ttf') format('truetype');
  font-weight: 200;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Titillium Web';
  src: url('/fonts/TitilliumWeb-ExtraLightItalic.ttf') format('truetype');
  font-weight: 200;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: 'Titillium Web';
  src: url('/fonts/TitilliumWeb-Light.ttf') format('truetype');
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Titillium Web';
  src: url('/fonts/TitilliumWeb-LightItalic.ttf') format('truetype');
  font-weight: 300;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: 'Titillium Web';
  src: url('/fonts/TitilliumWeb-Regular.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Titillium Web';
  src: url('/fonts/TitilliumWeb-Italic.ttf') format('truetype');
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: 'Titillium Web';
  src: url('/fonts/TitilliumWeb-SemiBold.ttf') format('truetype');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Titillium Web';
  src: url('/fonts/TitilliumWeb-SemiBoldItalic.ttf') format('truetype');
  font-weight: 600;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: 'Titillium Web';
  src: url('/fonts/TitilliumWeb-Bold.ttf') format('truetype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Titillium Web';
  src: url('/fonts/TitilliumWeb-BoldItalic.ttf') format('truetype');
  font-weight: 700;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: 'Titillium Web';
  src: url('/fonts/TitilliumWeb-Black.ttf') format('truetype');
  font-weight: 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --navy-darkest: #070e25;
  --navy-dark:    #0d1a3e;
  --navy:         #0f1f4e;
  --navy-mid:     #1b3070;
  --blue:         #2348b0;
  --blue-accent:  #3b7dd8;
  --blue-light:   #6fa8f0;
  --text-white:   #ffffff;
  --text-muted:   #93b4e0;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

/* SVG partials have no width/height attributes — they always fill their sized parent */
svg:not([width]):not([height]) {
  display: block;
  width: 100%;
  height: 100%;
}

body {
  font-family: 'Titillium Web', sans-serif;
  background-color: var(--navy-darkest);
  color: var(--text-white);
  overflow-x: hidden;
  max-width: 100vw;
}

img, svg, video { max-width: 100%; }

/* Prevent long words/URLs in body copy from forcing horizontal scroll on mobile */
p, h1, h2, h3, h4, h5, h6, li, a, span, div {
  overflow-wrap: break-word;
  word-wrap: break-word;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Titillium Web', sans-serif;
}

.font-mono-display {
  font-family: 'Titillium Web', ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: -0.02em;
}

/* Display typography */
.display-xl {
  font-family: 'Titillium Web', sans-serif;
  font-weight: 600;
  font-size: clamp(2.25rem, 6vw, 5.25rem);
  line-height: 0.98;
  letter-spacing: -0.03em;
}
.display-l {
  font-family: 'Titillium Web', sans-serif;
  font-weight: 600;
  font-size: clamp(1.65rem, 4vw, 3.25rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
}
.eyebrow {
  font-family: 'Titillium Web', ui-monospace, monospace;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--blue-light);
}
.eyebrow .dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: 0.6rem;
  background: var(--blue-accent);
  vertical-align: middle;
  transform: translateY(-1px);
}

/* Nav link: slide-in underline */
.nav-link {
  position: relative;
  padding-bottom: 4px;
}
.nav-link::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 1px;
  background: var(--blue-accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s ease;
}
.nav-link:hover::after,
.nav-link:focus-visible::after {
  transform: scaleX(1);
}
.nav-link.active {
  color: #ffffff;
}
.nav-link.active::after {
  transform: scaleX(1);
  background: var(--blue-accent);
}

/* Legacy selector still works */
nav a.active {
  color: #ffffff;
}

/* Prose overrides for dark mode */
.prose {
  color: #93b4e0;
  line-height: 1.75;
  font-size: 1rem;
}
.prose h2 {
  color: #ffffff;
  font-family: 'Titillium Web', sans-serif;
  font-size: 1.75rem;
  font-weight: 600;
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid #1b3070;
  letter-spacing: -0.01em;
}
.prose h2:first-child {
  margin-top: 0;
}
.prose h3 {
  color: #ffffff;
  font-family: 'Titillium Web', sans-serif;
  font-size: 1.25rem;
  font-weight: 600;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
  letter-spacing: -0.01em;
}
.prose h3::before {
  content: '';
  display: inline-block;
  width: 4px;
  height: 1rem;
  background: var(--blue-accent);
  margin-right: 0.75rem;
  vertical-align: -2px;
}
.prose p {
  color: #93b4e0;
  margin-bottom: 1.25rem;
}
.prose strong {
  color: #ffffff;
  font-weight: 500;
}
.prose ul {
  list-style: none;
  padding-left: 0;
  margin-bottom: 1.5rem;
}
.prose ul li {
  color: #93b4e0;
  position: relative;
  padding-left: 1.5rem;
  margin-bottom: 0.75rem;
}
.prose ul li::before {
  content: '›';
  position: absolute;
  left: 0;
  top: 0;
  color: var(--blue-accent);
  font-weight: 600;
  font-size: 1.1rem;
  line-height: 1.5;
}
.prose ol {
  counter-reset: prose-ol;
  list-style: none;
  padding-left: 0;
  margin-bottom: 1.5rem;
}
.prose ol li {
  counter-increment: prose-ol;
  color: #93b4e0;
  position: relative;
  padding-left: 2.25rem;
  margin-bottom: 0.75rem;
}
.prose ol li::before {
  content: counter(prose-ol, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: 0;
  color: var(--blue-accent);
  font-family: 'Titillium Web', sans-serif;
  font-weight: 600;
  font-size: 0.875rem;
  letter-spacing: 0.05em;
}
.prose a {
  color: var(--blue-accent);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s;
}
.prose a:hover {
  border-bottom-color: var(--blue-accent);
}

/* Section dividers */
.section-rule {
  border: none;
  border-top: 1px solid #1b3070;
  margin: 3rem 0;
}

/* Subtle background-color sections reused in layouts */
.bg-navy-darkest { background-color: var(--navy-darkest); }
.bg-navy-dark    { background-color: var(--navy-dark); }
.bg-navy         { background-color: var(--navy); }
.bg-navy-mid     { background-color: var(--navy-mid); }

/* Card: neutral surface with a single-edge accent possibility */
.card-surface {
  background: var(--navy);
  border: 1px solid rgba(27, 48, 112, 0.9);
  transition: border-color 0.25s ease, transform 0.25s ease;
}
.card-surface:hover {
  border-color: var(--blue-accent);
}
.card-surface--flat {
  background: transparent;
  border: 1px solid rgba(27, 48, 112, 0.7);
}

/* Small decorative tag used in corners */
.tag-line {
  font-family: 'Titillium Web', ui-monospace, monospace;
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--blue-light);
  opacity: 0.7;
}

/* Utility for text-balance on headings */
.text-balance {
  text-wrap: balance;
}

/* Corner brackets wrapper */
.bracketed {
  position: relative;
}
.bracketed > .brackets {
  position: absolute;
  inset: 0;
  pointer-events: none;
  color: var(--blue-accent);
  opacity: 0.6;
}

/* Mobile-specific tweaks */
@media (max-width: 640px) {
  .prose { font-size: 0.95rem; line-height: 1.7; }
  .prose h2 { font-size: 1.45rem; margin-top: 2rem; }
  .prose h3 { font-size: 1.1rem; margin-top: 1.5rem; }

  /* Tighten letter-spacing for big display text so words don't overflow */
  .display-xl { letter-spacing: -0.02em; }
  .display-l  { letter-spacing: -0.015em; }
}

/* Breadcrumb nav: allow last segment to truncate instead of forcing horizontal scroll */
.tag-line a, .tag-line span { word-break: break-word; }
nav.tag-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0;
}
