/* RomanDevel site — page layout and components, built on the Modernist tokens in modernist.css. */

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

/* Links: zero-weight :hover so component classes (.btn, cards, nav) keep their own colors. */
a { color: var(--color-accent-700); }
a:where(:hover) { color: var(--color-accent); }

/* Bilingual content: every translatable string ships as <span lang="es"> + <span lang="en">. */
html[lang="es"] body [lang="en"],
html[lang="en"] body [lang="es"] { display: none !important; }

[hidden] { display: none !important; }

.icon { display: block; flex: none; }

/* — layout — */
.page { display: flex; flex-direction: column; min-height: 100vh; }
.page > main { display: flex; flex-direction: column; flex: 1; }
.container {
  width: 100%; max-width: 1440px; margin: 0 auto;
  padding-left: clamp(20px, 5vw, 80px); padding-right: clamp(20px, 5vw, 80px);
}

/* — buttons (size variants on top of .btn) — */
.btn-md { min-height: 40px; padding: 0 16px; font-size: 15px; font-weight: 700; gap: 8px; }
.btn-lg { min-height: 48px; padding: 0 20px; font-size: 16px; font-weight: 700; gap: 10px; }
.btn-xl { min-height: 52px; padding: 0 22px; font-size: 17px; font-weight: 700; gap: 10px; }
.btn-ink { background: #201e1d; color: #fff; }
.btn-ink:hover { background: #000; color: #fff; }
.btn-outline-light { background: transparent; color: #fff; border: 2px solid #fff; }
.btn-outline-light:hover { background: rgba(255, 255, 255, 0.12); color: #fff; }
.actions { display: flex; flex-wrap: wrap; gap: var(--space-4); }

/* — logo (SVG files in assets/brand/logo) — */
.site-header__logo { height: 34px; width: auto; }
.site-footer__logo { height: 40px; width: auto; align-self: flex-start; }

/* — header — */
.site-header {
  position: sticky; top: 0; z-index: 10;
  background: var(--color-bg); border-bottom: 2px solid var(--color-text);
}
.site-header__inner {
  display: flex; flex-wrap: wrap; align-items: center;
  gap: var(--space-2) var(--space-8); min-height: 72px;
}
.site-header__brand { display: flex; margin-right: auto; padding: 16px 0; text-decoration: none; }
.site-header__right { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2) var(--space-8); }
.site-header__tools { display: flex; align-items: center; gap: var(--space-4); }
.site-nav { display: flex; flex-wrap: wrap; gap: 0 20px; }
.site-nav a {
  color: var(--color-text); text-decoration: none;
  font-size: 15px; font-weight: 600; padding: 26px 0 24px;
  border-bottom: 2px solid transparent;
}
.site-nav a:hover { color: var(--color-accent); }
.site-nav a[aria-current="page"] { border-bottom-color: var(--color-accent); }

.lang-switch { display: flex; border: 2px solid var(--color-text); }
.lang-switch button {
  font: inherit; font-size: 13px; font-weight: 700; padding: 8px 10px;
  border: 0; cursor: pointer; background: transparent; color: #201e1d;
}
.lang-switch button + button { border-left: 2px solid var(--color-text); }
.lang-switch button[aria-pressed="true"] { background: #201e1d; color: #f3f2f2; }

/* — shared section pieces — */
.eyebrow {
  font-size: 14px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.08em; color: var(--color-accent-700);
}
.section { border-top: 2px solid var(--color-text); }
.section--surface { background: var(--color-surface); }
.section__inner {
  padding-top: clamp(64px, 8vw, 120px); padding-bottom: clamp(64px, 8vw, 120px);
  display: flex; flex-direction: column; gap: 56px;
}
.section-head {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 360px), 1fr));
  gap: var(--space-8); align-items: end;
  padding-bottom: var(--space-8); border-bottom: 2px solid var(--color-text);
}
.section-head__text { display: flex; flex-direction: column; gap: var(--space-4); }
.section-head__aside { display: flex; flex-direction: column; gap: var(--space-6); align-items: flex-start; }
.section-title {
  margin: 0; font-size: clamp(36px, 4.5vw, 64px); font-weight: 800;
  letter-spacing: -0.03em; line-height: 1; text-wrap: balance;
}

/* Ruled grid: the grid draws top/left, every cell draws right/bottom. Set --min per grid. */
.cells {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, var(--min, 280px)), 1fr));
  border-left: 2px solid var(--color-text); border-top: 2px solid var(--color-text);
}
.cell {
  display: flex; flex-direction: column; gap: var(--space-4); padding: var(--space-8);
  border-right: 2px solid var(--color-text); border-bottom: 2px solid var(--color-text);
}
.cell__title { font-size: 24px; font-weight: 800; letter-spacing: -0.02em; }
.cell__text { margin: 0; font-size: 16px; line-height: 1.5; }
.cell__num { font-family: ui-monospace, monospace; font-size: 15px; font-weight: 700; color: var(--color-accent-700); }

/* — page titles — */
.page-title {
  margin: 0; font-size: clamp(44px, 7vw, 112px); font-weight: 800;
  letter-spacing: -0.045em; line-height: 0.92; text-wrap: balance;
}
.lead { margin: 0; font-size: clamp(18px, 1.6vw, 22px); line-height: 1.5; max-width: 680px; text-wrap: pretty; }
.overline { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; }
.overline--accent { color: var(--color-accent-700); }

/* Inner-page intro: eyebrow + title + lead. */
.intro {
  display: flex; flex-direction: column; gap: var(--space-8);
  padding-top: clamp(56px, 7vw, 112px); padding-bottom: clamp(48px, 6vw, 88px);
}

/* — hero (home) — */
.hero {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 520px), 1fr));
  gap: clamp(40px, 5vw, 80px); align-items: end;
  padding-top: clamp(56px, 7vw, 112px); padding-bottom: clamp(56px, 7vw, 112px);
}
.hero__copy { display: flex; flex-direction: column; gap: var(--space-8); }

.terminal {
  display: flex; flex-direction: column; min-height: 360px;
  background: var(--color-text); color: #f3f2f2; border: 2px solid var(--color-text);
}
.terminal__bar { display: flex; gap: 8px; align-items: center; padding: 12px 16px; border-bottom: 2px solid #5a5554; }
.terminal__dot { width: 10px; height: 10px; background: #5a5554; }
.terminal__dot--accent { background: #ec3013; }
.terminal__path { margin-left: auto; font-family: ui-monospace, monospace; font-size: 12px; color: var(--color-neutral-300); }
.terminal__code {
  flex: 1; margin: 0; padding: 28px 24px;
  font-family: ui-monospace, Menlo, Consolas, monospace; font-size: clamp(14px, 1.3vw, 18px);
  line-height: 1.6; white-space: pre-wrap;
}
.terminal__cursor { display: inline-block; width: 0.6em; height: 1.15em; vertical-align: text-bottom; background: #ec3013; }
.terminal__cursor.is-off { background: transparent; }

/* — case cards — */
.case-card {
  display: flex; flex-direction: column; color: var(--color-text); text-decoration: none;
  background: var(--color-bg);
  border-right: 2px solid var(--color-text); border-bottom: 2px solid var(--color-text);
}
a.case-card:hover { background: var(--color-surface); color: var(--color-text); }
.case-card__media { aspect-ratio: 4 / 3; border-bottom: 2px solid var(--color-text); }
.case-card__media img { width: 100%; height: 100%; object-fit: cover; }
.case-card__body { display: flex; flex-direction: column; gap: var(--space-3); padding: var(--space-6) var(--space-6) var(--space-8); }
.case-card__tags { display: flex; gap: var(--space-2); flex-wrap: wrap; }
.case-card__tags .tag-accent { font-weight: 700; }
.case-card__title { font-size: 24px; font-weight: 800; letter-spacing: -0.02em; line-height: 1.15; }
.case-card__client { font-size: 14px; font-weight: 600; color: var(--color-neutral-700); }
.case-card__text { margin: 0; font-size: 16px; line-height: 1.5; }
.case-card__result { display: flex; gap: 8px; align-items: center; font-size: 16px; font-weight: 700; color: var(--color-accent-700); }

/* Empty image slot — swap the whole element for an <img> when the photo exists. */
.media-placeholder {
  position: relative; width: 100%; height: 100%;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  padding: 12px; text-align: center;
  font: 500 13px/1.3 system-ui, -apple-system, sans-serif; letter-spacing: 0.01em;
  background: rgba(127, 127, 127, 0.08);
}
.media-placeholder::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  border: 1.5px dashed currentColor; opacity: 0.35;
}
.media-placeholder svg { opacity: 0.45; }
.media-placeholder span { max-width: 90%; opacity: 0.75; }

/* — testimonials — */
.quotes { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); gap: var(--space-8); }
.quote {
  margin: 0; display: flex; flex-direction: column; gap: var(--space-6);
  padding-top: var(--space-6); border-top: 2px solid var(--color-text);
}
.quote blockquote {
  margin: 0; font-size: clamp(22px, 2.2vw, 30px); font-weight: 600;
  letter-spacing: -0.015em; line-height: 1.3; text-wrap: pretty;
}
.quote figcaption { display: flex; flex-direction: column; gap: 2px; font-size: 15px; }
.quote figcaption .tag { align-self: flex-start; margin-top: 8px; }

/* — closing call to action — */
.cta { background: var(--color-accent); color: #fff; border-top: 2px solid var(--color-text); }
.cta__inner {
  display: flex; flex-direction: column; gap: var(--space-8);
  padding-top: clamp(72px, 9vw, 140px); padding-bottom: clamp(72px, 9vw, 140px);
}
.cta__title {
  margin: 0; max-width: 1100px; font-size: clamp(48px, 8vw, 128px); font-weight: 800;
  letter-spacing: -0.045em; line-height: 0.92; text-wrap: balance;
}
.cta__lead { margin: 0; max-width: 600px; font-size: 22px; line-height: 1.4; }

/* — closing band (inner pages) — */
.band { background: var(--color-text); color: #f3f2f2; border-top: 2px solid var(--color-text); }
.band__inner {
  display: flex; flex-wrap: wrap; gap: var(--space-8); align-items: center; justify-content: space-between;
  padding-top: 72px; padding-bottom: 72px;
}
.band__title { max-width: 760px; font-size: clamp(28px, 3.2vw, 44px); font-weight: 800; letter-spacing: -0.03em; line-height: 1.05; }

.section-head__note { margin: 0; max-width: 560px; font-size: 18px; line-height: 1.5; }
.cell__title--sm { font-size: 22px; line-height: 1.15; }
.cell__title--lg { font-size: 26px; }

/* — ruled rows (servicios, proceso) — */
.rows { display: flex; flex-direction: column; }
.row {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, var(--min, 280px)), 1fr));
  gap: var(--space-6) var(--space-8); align-items: start;
  padding: var(--space-8) 0; border-bottom: 2px solid var(--color-divider);
}
.row:last-child { border-bottom: 0; }
.row__head { display: flex; gap: var(--space-4); align-items: center; }
.row__num { width: 28px; font-family: ui-monospace, monospace; font-size: 15px; font-weight: 700; color: var(--color-accent-700); }
.row__title { font-size: clamp(24px, 2.4vw, 32px); font-weight: 800; letter-spacing: -0.02em; line-height: 1.1; }
.row__text { margin: 0; font-size: 18px; line-height: 1.5; }
.row__meta { display: flex; flex-direction: column; gap: 4px; }
.row__meta-text { font-size: 16px; line-height: 1.5; }

.row--step { --min: 260px; padding: clamp(32px, 4vw, 56px) 0; }
.step__num { font-size: clamp(64px, 8vw, 120px); font-weight: 800; letter-spacing: -0.05em; line-height: 0.85; color: var(--color-accent); }
.step__body { display: flex; flex-direction: column; gap: var(--space-3); }
.step__title { font-size: clamp(28px, 3vw, 40px); font-weight: 800; letter-spacing: -0.025em; line-height: 1.05; }
.step__deliverable {
  display: flex; flex-direction: column; gap: 6px; padding: var(--space-4);
  background: var(--color-surface); border-left: 2px solid var(--color-text);
}

.tech-list { display: flex; flex-direction: column; gap: var(--space-2); }
.tech-list span { font-family: ui-monospace, monospace; font-size: 17px; font-weight: 600; }

/* — casos — */
.case-list {
  display: flex; flex-direction: column; gap: var(--space-8);
  padding-top: var(--space-8); padding-bottom: clamp(64px, 8vw, 120px);
}
.filter { display: flex; flex-wrap: wrap; gap: var(--space-4); align-items: center; }
.filter__group { display: flex; flex-wrap: wrap; border: 2px solid var(--color-text); }
.filter__group button {
  font: inherit; font-size: 15px; font-weight: 700; padding: 10px 16px; cursor: pointer;
  border: 0; border-right: 2px solid var(--color-text); margin-right: -2px;
  background: transparent; color: #201e1d;
}
.filter__group button[aria-pressed="true"] { background: #201e1d; color: #f3f2f2; }
.empty-note { margin: 0; font-size: 18px; }

/* — sobre — */
.about {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr));
  gap: clamp(40px, 5vw, 80px); align-items: start;
  padding-top: clamp(56px, 7vw, 112px); padding-bottom: clamp(56px, 7vw, 112px);
}
.about__copy { display: flex; flex-direction: column; gap: var(--space-8); }
.portrait { margin: 0; display: flex; flex-direction: column; gap: var(--space-4); }
.portrait__media { aspect-ratio: 4 / 5; border: 2px solid var(--color-text); }
.portrait__media img { width: 100%; height: 100%; object-fit: cover; }
.portrait figcaption {
  display: flex; flex-direction: column; gap: 2px;
  border-top: 2px solid var(--color-text); padding-top: var(--space-3);
}
.portrait__name { font-size: 18px; }
.portrait__role { font-size: 15px; }

/* — contacto — */
.contact {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 400px), 1fr));
  gap: clamp(40px, 5vw, 80px); align-items: start;
  padding-top: clamp(48px, 6vw, 88px); padding-bottom: clamp(64px, 8vw, 120px);
}
.channels { display: flex; flex-direction: column; border-top: 2px solid var(--color-text); }
.channel {
  display: flex; flex-direction: column; gap: var(--space-3); padding: var(--space-8) 0;
  border-bottom: 2px solid var(--color-text); color: var(--color-text); text-decoration: none;
}
.channel:hover { color: var(--color-accent-700); }
.channel__head { display: flex; gap: var(--space-3); align-items: center; }
.channel__name { font-size: 28px; font-weight: 800; letter-spacing: -0.02em; }
.channel__text { font-size: 17px; color: var(--color-text); }
.channel__text--mono { font-family: ui-monospace, monospace; }
.channel__action { display: flex; gap: 8px; align-items: center; font-size: 16px; font-weight: 700; }

.form-panel {
  display: flex; flex-direction: column; gap: var(--space-6); padding: clamp(24px, 3vw, 40px);
  background: var(--color-surface); border: 2px solid var(--color-text);
}
.form { display: flex; flex-direction: column; gap: var(--space-6); }
.form__row { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); gap: var(--space-6); }
.form__field { display: flex; flex-direction: column; gap: 8px; }
.form__label { font-size: 14px; font-weight: 700; }
.form .input { font-size: 17px; min-height: 52px; padding: 12px 14px; border: 2px solid var(--color-text); background: #fff; }
.form textarea.input { min-height: 140px; resize: vertical; }
.form .seg { flex-wrap: wrap; border: 2px solid var(--color-text); align-self: flex-start; }
.form .seg-opt { font-size: 15px; font-weight: 600; padding: 10px 16px; }
.form__submit { align-self: flex-start; }
.form__trap { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.form__error { margin: 0; font-size: 16px; font-weight: 600; color: var(--color-accent-700); }
.form-sent { display: flex; flex-direction: column; gap: var(--space-4); padding: var(--space-6) 0; }
.form-sent__title { font-size: 32px; font-weight: 800; letter-spacing: -0.02em; }
.form-sent__text { margin: 0; font-size: 18px; line-height: 1.5; }
.form-sent .btn { align-self: flex-start; min-height: 44px; padding: 0 18px; font-size: 15px; font-weight: 700; border: 2px solid var(--color-text); }

/* FAQ: <details name="faq"> keeps one answer open at a time. */
.faq { display: flex; flex-direction: column; }
.faq__item { border-bottom: 2px solid var(--color-text); }
.faq__q {
  display: flex; gap: var(--space-6); justify-content: space-between; align-items: center;
  padding: var(--space-6) 0; cursor: pointer; list-style: none;
  font-size: clamp(20px, 2vw, 26px); font-weight: 700; letter-spacing: -0.015em;
}
.faq__q::-webkit-details-marker { display: none; }
.faq__q:hover { color: var(--color-accent-700); }
.faq__item:not([open]) .faq__icon-open,
.faq__item[open] .faq__icon-closed { display: none; }
.faq__a { margin: 0; padding: 0 0 var(--space-6); max-width: 760px; font-size: 18px; line-height: 1.55; }

/* — footer — */
.site-footer { background: var(--color-text); color: #f3f2f2; }
.site-footer__grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
  gap: 48px; padding-top: 72px; padding-bottom: 48px;
}
.site-footer__brand { display: flex; flex-direction: column; gap: var(--space-6); }
.site-footer__tagline { margin: 0; max-width: 320px; font-size: 22px; font-weight: 700; letter-spacing: -0.01em; line-height: 1.25; }
.site-footer__note { margin: 0; max-width: 320px; font-size: 15px; line-height: 1.5; color: var(--color-neutral-300); }
.site-footer__col { display: flex; flex-direction: column; gap: var(--space-3); }
.site-footer__heading { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: #ff9783; }
.site-footer a { color: #f3f2f2; text-decoration: none; font-size: 16px; }
.site-footer a:hover { color: #ff9783; }
.site-footer__icon-link { display: flex; gap: 10px; align-items: center; }
.site-footer__domain { font-family: ui-monospace, monospace; font-size: 14px; color: var(--color-neutral-300); }
.site-footer__legal {
  padding-top: 20px; padding-bottom: 20px; border-top: 2px solid #f3f2f2;
  font-size: 13px; color: var(--color-neutral-300);
}
