/* ==========================================================================
   Julia Bucci – Traductora literaria y audiovisual
   Hoja de estilos única. Mobile-first; el layout de desktop (≥1025px) replica
   las medidas del sitio original (Elementor) y mobile mejora lo funcional.
   Metodología: BEM + custom properties.
   ========================================================================== */

/* ---------- 1. Tokens ---------------------------------------------------- */
:root {
  --color-bg: #f7edde;
  --color-ink: #464547;
  --color-accent: #ff413e;          /* idioma activo / pestaña activa */
  --color-line: #474648;            /* líneas verticales decorativas */
  --color-muted: #888888;           /* links de contacto */
  --color-control: #69727d;         /* botón y bordes de formulario */
  --color-control-hover: #4f5762;
  --color-field-text: #1f2124;
  --color-card-back: rgba(255, 255, 255, 0.87);

  --font-display: "PT Sans Narrow", "Arial Narrow", sans-serif;
  --font-body: "Jost", system-ui, -apple-system, "Segoe UI", sans-serif;

  --fs-body: 15px;                  /* 14px en desktop */
  --lh-body: 1.55;
  --fs-title: 22px;                 /* 24px en desktop */
  --fs-nav: 15px;

  --gutter: clamp(22px, 6vw, 54px);
  --container: 1140px;
  --section-gap: clamp(90px, 15vw, 200px);
  --line-h: 160px;
  --tap: 44px;                      /* tamaño mínimo táctil */
}

@media (min-width: 1025px) {
  :root {
    --fs-body: 14px;
    --lh-body: 1.4;
    --fs-title: 24px;
    --fs-nav: 14px;
    --gutter: 10px;
  }
}

/* ---------- 2. Base ------------------------------------------------------ */
*,
*::before,
*::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  background: var(--color-bg);
}

body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-ink);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--color-accent); }
ul { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, p, figure { margin: 0; }
strong, b { font-weight: 700; }
button { font: inherit; color: inherit; }

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

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

.skip {
  position: absolute;
  left: 12px; top: -60px;
  z-index: 100;
  padding: 10px 14px;
  background: var(--color-ink);
  color: #fff;
  border-radius: 3px;
}
.skip:focus { top: 12px; color: #fff; }

[hidden] { display: none !important; }

/* ---------- 3. Layout helpers -------------------------------------------- */
.container {
  width: 100%;
  max-width: calc(var(--container) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section { margin-top: var(--section-gap); }

.vline {
  display: block;
  width: 12px;
  height: var(--line-h);
  margin-inline: auto;
  overflow: visible;
}
.vline line {
  stroke: var(--color-line);
  stroke-width: 1.2px;
  vector-effect: non-scaling-stroke;
}

.title {
  font-family: var(--font-display);
  font-size: var(--fs-title);
  line-height: 1.5;
  letter-spacing: 1px;
  font-weight: 400;
  text-transform: none;
}

.prose p + p { margin-top: 1em; }
.prose strong { font-weight: 700; }

/* Dos columnas del original: texto en la columna derecha (≈45% desde la izquierda) */
@media (min-width: 1025px) {
  .split {
    display: grid;
    grid-template-columns: 44.9% 55.1%;
  }
  .split > .split__main { grid-column: 2; }
}

/* ---------- 4. Cabecera -------------------------------------------------- */
.site-header {
  position: relative;
  z-index: 30;
  min-height: 150px;
  padding-top: 28px;
}

.site-header__bar {
  display: grid;
  grid-template-columns: 56px 1fr 56px;
  align-items: start;
}

.logo { justify-self: center; display: block; }
.logo img {
  width: clamp(140px, 38vw, 230px);
  height: auto;
}

.menu-toggle {
  position: relative;
  width: var(--tap); height: var(--tap);
  margin-top: 6px;
  border: 0; background: none; cursor: pointer;
  display: grid; place-items: center;
}
.menu-toggle__bars,
.menu-toggle__bars::before,
.menu-toggle__bars::after {
  content: "";
  display: block;
  width: 26px; height: 3px;
  background: var(--color-ink);
  border-radius: 2px;
  transition: transform .25s ease, opacity .2s ease, background-color .2s;
}
.menu-toggle__bars { position: relative; }
.menu-toggle__bars::before { position: absolute; top: -8px; }
.menu-toggle__bars::after  { position: absolute; top:  8px; }
.menu-toggle[aria-expanded="true"] .menu-toggle__bars { background: transparent; }
.menu-toggle[aria-expanded="true"] .menu-toggle__bars::before { transform: translateY(8px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] .menu-toggle__bars::after  { transform: translateY(-8px) rotate(-45deg); }

/* Menú principal: panel desplegable en mobile/tablet */
.site-nav {
  position: absolute;
  left: 0; right: 0; top: 100%;
  background: var(--color-bg);
  border-bottom: 1px solid rgba(70, 69, 71, .18);
  box-shadow: 0 14px 18px -16px rgba(70, 69, 71, .45);
  visibility: hidden;
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity .25s ease, transform .25s ease, visibility 0s linear .25s;
}
.site-nav.is-open {
  visibility: visible; opacity: 1; transform: none;
  transition: opacity .25s ease, transform .25s ease;
}
.site-nav__inner {
  width: 100%;
  max-width: calc(var(--container) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.site-nav a {
  display: flex; align-items: center;
  min-height: 52px;
  font-family: var(--font-display);
  font-size: 20px;
  letter-spacing: .5px;
}

/* Selector de idioma */
.lang { justify-self: end; display: flex; flex-direction: column; align-items: flex-end; }
.lang a {
  display: flex; align-items: center; justify-content: flex-end;
  min-width: var(--tap); min-height: 36px;
  padding: 0 4px;
  font-family: var(--font-display);
  font-size: var(--fs-nav);
}
.lang a[aria-current="true"] { color: var(--color-accent); }

@media (min-width: 1025px) {
  .site-header { min-height: 190px; padding-top: 60px; }
  .site-header__bar { grid-template-columns: 1fr auto 1fr; }
  .logo img { width: 127px; margin-top: 16px; }
  .menu-toggle { display: none; }

  .site-nav {
    position: static; visibility: visible; opacity: 1; transform: none;
    background: none; border: 0; box-shadow: none;
    grid-column: 1; grid-row: 1;
    justify-self: start;
  }
  .site-nav__inner { padding: 0; }
  .site-nav ul { display: flex; flex-direction: column; }
  .site-nav a {
    min-height: 30px;
    padding: 5px 20px;
    font-size: var(--fs-nav);
    letter-spacing: 0;
  }
  .logo { grid-column: 2; grid-row: 1; }
  .lang { grid-column: 3; grid-row: 1; margin-top: 15px; }
  .lang a { min-height: 30px; min-width: 47px; padding: 0; justify-content: center; }
}

/* ---------- 5. Hero ------------------------------------------------------ */
.hero { margin-top: 28px; }
.hero__line { margin-bottom: 26px; }

.hero__h1 {
  font-family: var(--font-display);
  font-size: clamp(16px, 4.6vw, 18px);
  font-weight: 400;
  line-height: 1.5;
  letter-spacing: 1px;
}

.intro { margin-top: clamp(90px, 20vw, 250px); }
.intro__hello {
  font-family: var(--font-display);
  font-size: var(--fs-title);
  line-height: 2;
  letter-spacing: 1px;
}
.intro__text { margin-top: 6px; }

.link-cta {
  display: inline-block;
  margin-top: clamp(34px, 5vw, 58px);
  padding: 8px 0;
  min-height: var(--tap);
  font-size: var(--fs-body);
}
.link-cta:hover { color: var(--color-accent); }

@media (min-width: 1025px) {
  .hero { margin-top: 61px; }
  .hero__h1 { font-size: 18px; }
  .link-cta { min-height: 0; padding: 0; }
}

/* ---------- 6. Sobre mí -------------------------------------------------- */
.about__layout { display: flex; flex-direction: column; }
.about__title { margin-top: 26px; }
.about__body { margin-top: 20px; }
.about__photo { order: -1; margin-top: 30px; max-width: 360px; }
.about__photo img { width: 100%; height: auto; }
.about__h { font-weight: 700; font-size: var(--fs-body); margin-top: 1.4em; }
.about__h:first-child { margin-top: 0; }
.about__h + p { margin-top: .8em; }

@media (min-width: 1025px) {
  .about__layout { display: grid; grid-template-columns: 44.9% 55.1%; }
  .about__photo { order: 0; margin: 82px 0 0 32px; max-width: none; width: 360px; }
  .about__text { grid-column: 2; grid-row: 1; }
  .about__photo { grid-column: 1; grid-row: 1; }
  .about__title { margin-top: 26px; }
}

/* ---------- 7. Portfolio ------------------------------------------------- */
.portfolio__title { margin-top: 26px; }

.tabs { margin-top: 38px; }

.tabs__list {
  display: flex; flex-wrap: wrap;
  gap: 0 6px;
  margin-bottom: 8px;
}
.tabs__tab {
  min-height: var(--tap);
  padding: 12px 18px;
  background: none; border: 0; border-bottom: 3px solid transparent;
  cursor: pointer;
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: 1.2;
  text-align: left;
  color: var(--color-ink);        /* El original las dejaba invisibles (mismo color que el fondo): acá se leen siempre */
  transition: color .2s, border-color .2s;
}
.tabs__tab:hover { color: var(--color-accent); }
.tabs__tab[aria-selected="true"] {
  color: var(--color-accent);
  border-bottom-color: var(--color-accent);
}
@media (min-width: 1025px) {
  /* Los 3 links arrancan en la columna del texto (centro) y siguen hacia la derecha */
  .tabs__list { margin-left: 44.9%; }
  .tabs__tab { padding: 20px 22px; min-height: 0; }
  .tabs__tab:first-child { padding-left: 0; }
}

.tabs__panel { padding-top: 20px; }
.tabs__panel:focus { outline: none; }

.panel-intro { margin-bottom: 36px; }
@media (min-width: 1025px) {
  .panel-intro { margin-left: 44.9%; margin-bottom: 40px; max-width: 545px; }
  .panel-intro--aud { max-width: 522px; }
}

/* Grilla de fichas (tapas / pósters) */
.cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  content-visibility: auto;
  contain-intrinsic-size: auto 1200px;
}
@media (min-width: 600px) { .cards { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; } }
@media (min-width: 1025px) {
  .cards {
    grid-template-columns: repeat(4, 217px);
    justify-content: center;
    gap: 20px 20px;
    padding-inline: 0;
  }
}

.card {
  position: relative;
  aspect-ratio: 217 / 300;
  background: rgba(70, 69, 71, .06);
}
.card__front,
.card__back {
  position: absolute; inset: 0;
  transition: opacity .6s ease-in-out;
}
.card__front {
  display: block; width: 100%; height: 100%;
  padding: 0; border: 0; background: none; cursor: pointer;
  z-index: 1;
}
.card__front img { width: 100%; height: 100%; object-fit: cover; }

.card__back {
  z-index: 2;
  display: flex; flex-direction: column; justify-content: center;
  padding: 14px;
  overflow-y: auto;
  scrollbar-width: none;
  text-align: center;
  background: var(--color-card-back);
  opacity: 0;
  pointer-events: none;
  cursor: pointer;
}
.card__back::-webkit-scrollbar { display: none; }

.card__title {
  margin: 0 0 14px;
  font-family: var(--font-body);
  font-size: 12.5px;
  line-height: 1.2;
  font-weight: 400;
  overflow-wrap: anywhere;
}
.card__author,
.card__note { font-size: 12px; line-height: 1.15; letter-spacing: -.1px; }
.card__sep {
  width: 5.2em; height: 0;
  margin: 8px auto;
  border-top: 1px solid currentColor;
  opacity: .8;
}
.card__meta { font-size: 12px; line-height: 1.15; letter-spacing: -.1px; margin-top: 10px; }

.card.is-flipped .card__back { opacity: 1; pointer-events: auto; }
.card.is-flipped .card__front { opacity: 0; }
/* Teclado: al enfocar la ficha se muestra el detalle */
.card:has(.card__front:focus-visible) .card__back { opacity: 1; pointer-events: auto; }
.card:has(.card__front:focus-visible) .card__front { opacity: 1; }

@media (hover: hover) and (pointer: fine) {
  .card:hover .card__back { opacity: 1; pointer-events: auto; }
  .card:hover .card__front { opacity: 0; }
}

@media (min-width: 1025px) {
  .card__back { padding: 35px; }
  .card__title { font-size: 12px; margin-bottom: 20px; }
  .card__author, .card__note, .card__meta { font-size: 11px; line-height: 1.1; }
}

/* Experiencia */
.exp { max-width: 545px; }
.exp__lead { margin-bottom: 2em; }
.exp__h {
  margin: 2.2em 0 0;
  padding-bottom: .9em;
  border-bottom: 1px solid #000;
  font-family: var(--font-body);
  font-size: var(--fs-body);
  font-weight: 400;
  line-height: 1.4;
}
.exp__h:first-of-type { margin-top: 0; }
.exp__h + p,
.exp__h + ul { margin-top: 1.3em; }
.exp p + p { margin-top: 1.5em; }
.exp__list { margin-top: 1em; }
.exp__list li { line-height: 1.6; }
@media (min-width: 1025px) {
  .exp { margin-left: 44.9%; }
}

/* ---------- 8. Clientes (carrusel) -------------------------------------- */
.clients__title { margin-top: 26px; }
.clients__carousel { position: relative; margin-top: 30px; }

.carousel {
  --per-view: 3;
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
}
.carousel::-webkit-scrollbar { display: none; }
.carousel__slide {
  flex: 0 0 calc(100% / var(--per-view));
  scroll-snap-align: start;
  padding: 0 4px;
}
.carousel__slide img { width: 100%; height: auto; aspect-ratio: 200 / 130; object-fit: contain; }
@media (min-width: 768px) { .carousel { --per-view: 5; } }
@media (min-width: 1025px) {
  .carousel { --per-view: 6; }
  .carousel__slide { padding: 0; }
  .clients__carousel { padding-inline: 30px; }
}

.carousel__btn {
  position: absolute; top: 50%;
  width: var(--tap); height: var(--tap);
  margin-top: calc(var(--tap) / -2);
  display: grid; place-items: center;
  border: 0; border-radius: 50%;
  background: rgba(247, 237, 222, .85);
  color: var(--color-ink);
  cursor: pointer;
  z-index: 2;
  opacity: .75;
  transition: opacity .2s, color .2s;
}
.carousel__btn:hover { opacity: 1; color: var(--color-accent); }
.carousel__btn--prev { left: -6px; }
.carousel__btn--next { right: -6px; }
.carousel__btn svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2; }
@media (min-width: 1025px) {
  .carousel__btn--prev { left: -4px; }
  .carousel__btn--next { right: -4px; }
}

/* ---------- 9. Contacto -------------------------------------------------- */
.contact__layout { display: grid; gap: 40px; }
.contact__info { order: 2; }
.contact__form-wrap { order: 1; }
.contact__title { font-family: var(--font-body); font-size: var(--fs-body); font-weight: 400; }

.contact__layout { margin-top: 26px; }
.contact__label { font-weight: 700; }
.contact__value { margin-top: 4px; }
.contact__value a { color: var(--color-muted); display: inline-block; padding: 8px 0; }
.contact__value a:hover { color: var(--color-accent); }
.contact__item + .contact__item { margin-top: 18px; }

@media (min-width: 1025px) {
  .contact__layout { grid-template-columns: 51% 49%; gap: 0; }
  .contact__info { order: 0; grid-column: 1; grid-row: 1; }
  .contact__form-wrap { order: 0; grid-column: 2; grid-row: 1; }
  .contact__value a { padding: 0; }
}

.form { margin-top: 20px; }
.field { display: block; }
.field + .field { margin-top: -1px; }
.field__label {
  position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0);
}
.field__control {
  display: block; width: 100%;
  min-height: 46px;
  padding: 10px 16px;
  background: transparent;
  color: var(--color-field-text);
  border: 1px solid var(--color-control);
  border-radius: 3px;
  font-family: var(--font-body);
  font-size: 16px;                 /* ≥16px evita el zoom automático de iOS al enfocar */
  line-height: 1.4;
  appearance: none;
  -webkit-appearance: none;
}
textarea.field__control { min-height: 130px; resize: vertical; }
.field__control::placeholder { color: #000; opacity: .65; }
.field__control:focus { outline: none; border-color: var(--color-accent); position: relative; z-index: 1; }
.field__control[aria-invalid="true"] { border-color: #c0302d; }
@media (min-width: 1025px) {
  .field__control { min-height: 40px; padding: 8px 16px; font-size: 15px; }
  textarea.field__control { min-height: 96px; }
}

.field--trap {
  position: absolute !important;
  left: -9999px; width: 1px; height: 1px; overflow: hidden;
}

.form__actions { display: flex; justify-content: flex-end; margin-top: 16px; }
.btn {
  min-height: var(--tap);
  padding: 0 24px;
  background: var(--color-control);
  color: #fff;
  border: 0; border-radius: 3px;
  font-family: var(--font-body);
  font-size: 15px;
  cursor: pointer;
  transition: background-color .2s;
}
.btn:hover { background: var(--color-control-hover); color: #fff; }
.btn[disabled] { opacity: .6; cursor: progress; }
@media (min-width: 1025px) { .btn { min-height: 40px; } }

.form__turnstile { margin-top: 12px; }
.form__status { margin-top: 14px; min-height: 1.5em; font-size: var(--fs-body); }
.form__status[data-state="ok"] { color: #2f6b3a; }
.form__status[data-state="error"] { color: #b3261e; }

/* ---------- 10. Pie ------------------------------------------------------ */
.monogram { margin-top: var(--section-gap); }
.monogram__img {
  width: min(5vw, 485px);
  height: auto;
}

.footnav { margin-top: 34px; max-width: 485px; }
.footnav a {
  display: flex; align-items: center;
  min-height: 46px;
  font-size: var(--fs-body);
}

.footer { margin-top: 40px; padding-bottom: 60px; }
.footer__grid { display: grid; gap: 24px; }
.footer__memberships-label { font-size: var(--fs-body); }
.footer__logos { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; }
.footer__logos a { display: block; }
.footer__logos img { height: 62px; width: auto; }
@media (min-width: 1025px) {
  .footer__grid { grid-template-columns: repeat(3, 1fr); gap: 0 54px; align-items: start; }
  .footer__memberships-label { grid-column: 1; }
  .footer__logos { grid-column: 2; gap: 0 4px; }
  .footer__logos img { height: 86px; }
  .footer__contact { grid-column: 3; }
}
.footer .contact__item + .contact__item { margin-top: 12px; }

/* ---------- 11. Volver arriba ------------------------------------------- */
.to-top {
  position: fixed; right: 16px; bottom: 16px; z-index: 40;
  width: var(--tap); height: var(--tap);
  display: grid; place-items: center;
  border: 0; border-radius: 50%;
  background: var(--color-ink); color: var(--color-bg);
  cursor: pointer;
  opacity: 0; visibility: hidden; transform: translateY(8px);
  transition: opacity .25s, transform .25s, visibility 0s linear .25s;
}
.to-top.is-visible { opacity: .9; visibility: visible; transform: none; transition: opacity .25s, transform .25s; }
.to-top:hover { background: var(--color-accent); color: #fff; }
.to-top svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; }

/* ---------- 12. Preferencias del usuario -------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}

@media print {
  .site-nav, .menu-toggle, .to-top, .carousel__btn, .form, .tabs__list { display: none !important; }
  .tabs__panel[hidden] { display: block !important; }
}

/* ---------- 12. Página 404 ---------------------------------------------- */
.notfound { padding-block: 60px; text-align: left; }
.notfound__logo img { width: min(60vw, 260px); height: auto; }
.notfound__title { font-family: var(--font-display); font-size: 64px; font-weight: 400; margin: 28px 0 12px; }
.notfound__links { margin-top: 18px; }
.notfound__links a { color: var(--color-accent); padding: 8px 4px; display: inline-block; }
