/* --- */

:root {
  /* Color */
  --bg:          #FFFFFF;
  --bg-soft:     #F5F5F5;
  --border:      #E5E5E5;
  --muted:       #888888;
  --ink-soft:    #1A1A1A;
  --ink:         #0A0A0A;
  --accent:      #7B61FF;
  --accent-soft: #EEEAFF;
  --accent-deep: #5A42E0;

  /* Tipografía */
  --font-display: 'Ubuntu', system-ui, sans-serif;
  --font-body:    'Ubuntu', system-ui, sans-serif;
  --font-mono:    'Roboto Mono', ui-monospace, monospace;

  /* Layout */
  --container:   1200px;
  --radius-sm:   4px;
  --radius:      4px;
  --radius-lg:   4px;
  --section-y:   clamp(48px, 8vw, 96px);
}

[data-theme="dark"] {
  --bg:          #0A0A0A;
  --bg-soft:     #141414;
  --border:      #222222;
  --muted:       #888888;
  --ink-soft:    #E5E5E5;
  --ink:         #FFFFFF;
  --accent-soft: #1F1936;
}

/* --- */
* { box-sizing: border-box; }

/* Removido: scroll-behavior: smooth causa reflows forzados (PageSpeed issue) */
html { }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

a { color: var(--ink); text-decoration: none; }
a:hover { color: var(--accent); }

::selection { background: var(--accent); color: #FFF; }

/* --- */
.display, h1, h2, h3, h4, h5 {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin: 0;
}

h1, .h1 { font-size: clamp(40px, 6vw, 64px); line-height: 0.98; letter-spacing: -0.03em; }
h2, .h2 { font-size: clamp(28px, 4vw, 40px); line-height: 1.05; }
h3, .h3 { font-size: 20px; line-height: 1.2; }
h4, .h4 { font-size: 16px; line-height: 1.3; }

.mono { font-family: var(--font-mono); }
.eyebrow {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  display: inline-block;
}
.eyebrow--accent { color: var(--accent); }

.accent { color: var(--accent); }
.muted  { color: var(--muted); }

/* --- */
.ds-container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 clamp(24px, 4vw, 64px);
}

.ds-section { border-top: 0.5px solid var(--border); }
.ds-section:first-of-type { border-top: none; }
.ds-section--soft { background: var(--bg-soft); }
.ds-section--accent {
  background: var(--accent-soft);
  color: var(--ink);
}
[data-theme="dark"] .ds-section--accent {
  background: #0F0D1A;
}

/* --- */
.ds-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 0.5px solid var(--border);
}
[data-theme="dark"] .ds-nav { background: rgba(10,10,10,0.85); }


/* Logo: </drake studio> — corchetes Space Mono violeta + wordmark Space Grotesk */
.ds-logo {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
}
.ds-logo__bracket {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 15px;
  color: var(--accent);
  letter-spacing: -0.02em;
}
.ds-logo__name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 17px;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.ds-logo:hover .ds-logo__bracket { color: var(--accent-deep); }

.ds-nav__links {
  display: flex;
  gap: 28px;
  font-size: 13px;
  font-weight: 500;
  font-family: var(--font-display);
}
.ds-nav__links a {
  color: var(--muted);
  transition: color .15s;
}
.ds-nav__links a:hover,
.ds-nav__links a.is-active { color: var(--ink); }

.ds-nav__toggle {
  display: none;
  background: none;
  border: 0.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 6px 10px;
  color: var(--ink);
  cursor: pointer;
  font-family: var(--font-mono);
  font-size: 11px;
}

@media (max-width: 800px) {
  .ds-nav__links {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%; left: 0; right: 0;
    background: var(--bg);
    padding: 16px 24px 24px;
    border-bottom: 0.5px solid var(--border);
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height .3s, opacity .3s;
    pointer-events: none;
  }
  .ds-nav.is-open .ds-nav__links {
    max-height: 500px;
    opacity: 1;
    pointer-events: auto;
  }
  .ds-nav__toggle { display: inline-block; }
}

/* --- */
.ds-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 18px;
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 500;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .1s, background .15s, color .15s, border-color .15s;
  text-decoration: none;
  white-space: nowrap;
}
.ds-btn:active { transform: scale(.98); }
.ds-btn--primary { background: var(--accent); color: #FFF; }
.ds-btn--primary:hover { background: var(--accent-deep); color: #FFF; }
.ds-btn--ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--border);
}
.ds-btn--ghost:hover { border-color: var(--ink); }
.ds-btn--lg { padding: 14px 24px; font-size: 14px; }
.ds-btn--block { width: 100%; justify-content: center; }

/* --- */
.ds-hero__title { max-width: 14ch; }
.ds-hero__lead { font-size: 17px; line-height: 1.55; color: var(--muted); max-width: 56ch; }
.ds-hero__stats {
  border-top: 0.5px solid var(--border);
  border-bottom: 0.5px solid var(--border);
}
.ds-stat__value { font-family: var(--font-display); font-size: 28px; font-weight: 600; line-height: 1; }
.ds-stat__value--accent { color: var(--accent); }
.ds-stat__label { font-family: var(--font-mono); font-size: 10px; color: var(--muted); letter-spacing: 0.08em; }


/* --- */
.ds-stack {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 28px 36px;
}
.ds-stack__item {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-align: center;
  cursor: default;
  color: var(--muted);
  transition: color .2s, transform .2s;
}
.ds-stack__item i {
  font-size: 32px;
  line-height: 1;
  display: block;
}
.ds-stack__item:hover {
  color: var(--accent);
  transform: translateY(-2px);
}
.ds-stack__label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  color: inherit;
  text-transform: uppercase;
}
.ds-stack__item:hover .ds-stack__label { color: var(--ink); }

@media (max-width: 700px) {
  .ds-stack { gap: 24px 20px; }
  .ds-stack__item i { font-size: 28px; }
}

/* --- */
.ds-section__head h2 { max-width: 20ch; }
.ds-section__link {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--accent);
  white-space: nowrap;
}

/* --- */
.ds-card {
  background: var(--bg-soft);
  border: 0.5px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: border-color .15s, transform .15s;
  text-decoration: none;
}
.ds-card:hover { border-color: var(--accent); }

.ds-card__head { margin-bottom: 12px; }
.ds-card__num { font-family: var(--font-mono); font-size: 11px; color: var(--muted); }
.ds-card__dot { width: 6px; height: 6px; background: var(--accent); border-radius: 50%; }
.ds-card__icon {
  font-size: 28px;
  color: var(--accent);
  line-height: 1;
  transition: transform .2s;
}
.ds-card:hover .ds-card__icon { transform: translateY(-2px); }
.ds-card__title { font-size: 20px; font-weight: 600; }
.ds-card__lead {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.6;
  margin: 0;
}
.ds-card__meta {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted);
  margin-top: 8px;
}


/* --- */
.ds-portfolio__item { display: block; color: inherit; }
.ds-portfolio__cover {
  aspect-ratio: 16/10;
  border-radius: var(--radius);
  border: 0.5px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 500;
  letter-spacing: -0.02em;
  transition: transform .2s;
  overflow: hidden;
}
.ds-portfolio__item:hover .ds-portfolio__cover { transform: translateY(-2px); }
.ds-portfolio__cover img { width: 100%; height: 100%; object-fit: cover; }
.ds-portfolio__title { font-weight: 500; font-size: 14px; }
.ds-portfolio__row i { font-size: 16px; }
.ds-portfolio__meta {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted);
  margin-top: 2px;
}

/* --- */
.ds-process__step {
  padding: 0 20px;
  border-right: 0.5px solid var(--border);
}
.ds-process__step:first-child { padding-left: 0; }
.ds-process__step:last-child  { padding-right: 0; border-right: none; }
.ds-process__num {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--accent);
  margin-bottom: 8px;
}
.ds-process__icon {
  font-size: 24px;
  color: var(--ink);
  display: block;
  margin-bottom: 14px;
  transition: color .2s, transform .2s;
}
.ds-process__step:hover .ds-process__icon {
  color: var(--accent);
  transform: translateY(-2px);
}
.ds-process__title { font-size: 16px; font-weight: 600; margin-bottom: 6px; }
.ds-process__lead { font-size: 13px; color: var(--muted); line-height: 1.6; margin: 0; }

@media (max-width: 800px) {
  .ds-process__step { border-right: none; padding: 0; border-top: 0.5px solid var(--border); padding-top: 24px; }
  .ds-process__step:first-child { border-top: none; padding-top: 0; }
}

/* --- */
.ds-quote { max-width: 60ch; }
.ds-quote__mark { font-size: 56px; line-height: 1; color: var(--accent); opacity: 0.6; }
.ds-quote__text {
  font-family: var(--font-display);
  font-size: clamp(20px, 2.5vw, 26px);
  font-weight: 500;
  line-height: 1.35;
  letter-spacing: -0.01em;
}
.ds-quote__author {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.05em;
}

/* --- */
.ds-tipo {
  padding: 16px;
  border: 0.5px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  transition: border-color .15s, transform .15s;
}
.ds-tipo:hover { border-color: var(--accent); }
.ds-tipo:hover .ds-tipo__icon { color: var(--accent); }
.ds-tipo__icon {
  font-size: 22px;
  color: var(--muted);
  transition: color .2s;
}
.ds-tipo__cat {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--accent);
  margin-bottom: 6px;
  letter-spacing: 0.05em;
}
.ds-tipo__title { font-size: 14px; font-weight: 500; }

/* --- */
.ds-cta h2 { font-size: clamp(36px, 5vw, 56px); line-height: 1; }

/* --- */
/* --- */

/* --- */
.ds-theme-toggle {
  background: none;
  border: 0.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 6px 10px;
  cursor: pointer;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted);
  transition: color .15s, border-color .15s;
}
.ds-theme-toggle:hover { color: var(--ink); border-color: var(--ink); }

/* --- */
.ds-page-lead { max-width: 60ch; color: var(--muted); }

/* --- */
.ds-section--prose { max-width: 720px; }
.ds-section--prose .ds-prose-footer { font-size: 12px; }

/* --- */
.ds-back { font-size: 12px; }

/* --- */
.ds-blog-list { display: flex; flex-direction: column; gap: 4px; }
.ds-blog-item { display: block; text-decoration: none; padding: 24px 0; border-top: 0.5px solid var(--border); }
.ds-blog-item__inner { display: flex; align-items: baseline; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.ds-blog-item__body { flex: 1; min-width: 280px; }
.ds-blog-item__meta { font-size: 11px; letter-spacing: 0.05em; text-transform: uppercase; }
.ds-blog-item p { margin: 0; }

/* --- */
.ds-article__meta { font-size: 11px; letter-spacing: 0.05em; text-transform: uppercase; }
.ds-article__lead { font-size: 18px; color: var(--muted); }
.ds-article__body { font-size: 16px; line-height: 1.8; }
.ds-article__cta { padding-top: 32px; border-top: 0.5px solid var(--border); }

/* --- */
.ds-section--404 { padding-top: 120px; padding-bottom: 120px; }
.ds-section--404 h1 { font-size: clamp(48px, 8vw, 96px); }
.ds-404__label { font-size: 13px; }

/* --- */
.ds-list { padding-left: 18px; line-height: 1.8; }
.ds-list--loose { padding-left: 18px; line-height: 1.9; }

/* --- */

/* --- */
.ds-servicio__icon { font-size: 0.7em; color: var(--accent); }
.ds-servicio__lead { font-size: 18px; max-width: 60ch; }
.ds-servicio__stack { font-size: 12px; }

/* --- */
.ds-portfolio-hero { aspect-ratio: 16/8; }
.ds-portfolio-hero--text { font-size: 48px; }
.ds-card__lead--ink { font-size: 15px; color: var(--ink); }

/* --- */
/* Use Bootstrap: d-flex, gap-2, gap-3, mt-4, text-center, visually-hidden */

/* Contact form + alerts (shared style layer) */
.ds-form { max-width: 560px; }
.ds-form__label {
  display: block;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.05em;
  color: var(--muted);
  margin-bottom: 6px;
  text-transform: uppercase;
}
.ds-form__input,
.ds-form__select,
.ds-form__textarea {
  width: 100%;
  background: var(--bg-soft);
  border: 0.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--ink);
  transition: border-color .15s;
}
.ds-form__input:focus,
.ds-form__select:focus,
.ds-form__textarea:focus {
  outline: none;
  border-color: var(--accent);
}
.ds-form__textarea { min-height: 140px; resize: vertical; }
.ds-form__hint { font-size: 12px; color: var(--muted); margin-top: 6px; }
.ds-form__honeypot { position: absolute; left: -9999px; opacity: 0; pointer-events: none; }

.ds-alert {
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  margin-bottom: 16px;
  border: 0.5px solid;
}
.ds-alert--success { border-color: #2EBD85; color: #2EBD85; background: rgba(46,189,133,0.06); }
.ds-alert--error   { border-color: #FF5C5C; color: #FF5C5C; background: rgba(255,92,92,0.06); }
.ds-alert ul { margin: 6px 0 0; padding-left: 20px; }