/* ==========================================================================
   JARC.CRAFT — stylesheet
   Índice:
   1. Variables      8. About
   2. Reset          9. Services
   3. Base          10. Portfolio
   4. Typography    11. Contact
   5. Layout        12. Footer
   6. Navbar        13. Animations
   7. Hero          14. Responsive
   ========================================================================== */

/* ===== 1. VARIABLES ===== */
:root {
  /* Colores — verde oscuro casi negro con acento menta, tomados de las capturas reales */
  --bg: #0a1512;
  --bg-alt: #0c1c17;
  --bg-card: rgba(255, 255, 255, 0.03);
  --border: rgba(255, 255, 255, 0.12);
  --border-soft: rgba(255, 255, 255, 0.08);

  --text-primary: #f3f1e9;
  --text-secondary: #a9b8ae;
  --text-muted: #728077;

  --accent: #8fcba6;
  --accent-soft: rgba(143, 203, 166, 0.14);
  --accent-dark: #0e2019;

  --font-serif: "Playfair Display", Georgia, "Times New Roman", serif;
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --max-width: 1280px;
  --gutter: clamp(1.5rem, 5vw, 6rem);

  --radius-sm: 4px;
  --radius-md: 10px;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ===== 2. RESET ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 90px; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }
input, select, textarea { font: inherit; color: inherit; }
ul, ol { list-style: none; }

/* ===== 3. BASE ===== */
html, body { height: 100%; }
body {
  background-color: var(--bg);
  background-image:
    linear-gradient(160deg, rgba(255,255,255,0.05) 0%, transparent 30%),
    radial-gradient(ellipse 90% 60% at 85% 0%, rgba(150, 210, 180, 0.10), transparent 60%),
    url("https://framerusercontent.com/images/kvTVANWMEnmhtcrowDrUDYg8.png?width=2752&height=1536");
  background-size: cover, cover, cover;
  background-attachment: fixed, fixed, fixed;
  background-position: center, center, center;
  background-blend-mode: normal, screen, overlay;
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

.skip-link {
  position: absolute; left: -999px; top: 0; z-index: 999;
  background: var(--accent); color: var(--accent-dark); padding: 0.75rem 1.25rem;
  border-radius: var(--radius-sm);
}
.skip-link:focus { left: 1rem; top: 1rem; }

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

/* ===== 4. TYPOGRAPHY ===== */
h1, h2, h3 { font-family: var(--font-serif); font-weight: 500; line-height: 1.1; letter-spacing: -0.01em; }
h1 em, h2 em, h3 em { font-style: italic; font-weight: 400; color: var(--accent); }

p { color: var(--text-secondary); }

.eyebrow {
  display: flex; align-items: center; gap: 0.9rem;
  font-size: 0.78rem; font-weight: 500; letter-spacing: 0.18em;
  color: var(--accent); text-transform: uppercase; margin-bottom: 1.25rem;
}
.eyebrow__line { width: 32px; height: 1px; background: var(--accent); display: inline-block; }

/* ===== 5. LAYOUT ===== */
section { position: relative; padding: clamp(4rem, 9vw, 8rem) var(--gutter); }
.hero__inner, .about__inner, .services__inner, .portfolio__inner, .contact__inner {
  max-width: var(--max-width); margin: 0 auto;
}

.btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.9rem 1.6rem; font-size: 0.85rem; font-weight: 600;
  letter-spacing: 0.06em; text-transform: uppercase;
  border-radius: var(--radius-sm); transition: transform 0.25s var(--ease), background 0.25s var(--ease), border-color .25s var(--ease);
  white-space: nowrap;
}
.btn--solid { background: var(--accent); color: var(--accent-dark); }
.btn--solid:hover { transform: translateY(-2px); background: #a3d6b8; }
.btn--outline { border: 1px solid var(--border); color: var(--text-primary); }
.btn--outline:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-2px); }
.btn--full { width: 100%; justify-content: center; }

/* ===== 6. NAVBAR ===== */
.navbar {
  position: sticky; top: 0; z-index: 100;
  background: rgba(10, 21, 18, 0.72);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-soft);
}
.navbar__inner {
  max-width: var(--max-width); margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.1rem var(--gutter);
}
.navbar__logo { display: flex; flex-direction: column; gap: 0.15rem; }
.navbar__logo-mark { font-family: var(--font-sans); font-weight: 600; font-size: 1.05rem; letter-spacing: 0.14em; }
.navbar__logo-dot { color: var(--accent); }
.navbar__logo-sub { font-size: 0.6rem; letter-spacing: 0.16em; color: var(--text-muted); }

.navbar__nav { display: flex; align-items: center; gap: 2.2rem; }
.navbar__link {
  font-size: 0.82rem; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--text-secondary); padding-bottom: 4px; border-bottom: 1px solid transparent;
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease);
}
.navbar__link:hover, .navbar__link.is-active { color: var(--text-primary); border-color: var(--accent); }
.navbar__link--cta { color: var(--accent); }

.navbar__status {
  display: flex; align-items: center; gap: 0.5rem;
  font-size: 0.78rem; color: var(--text-secondary);
}
.status-dot {
  width: 7px; height: 7px; border-radius: 50%; background: var(--accent);
  box-shadow: 0 0 0 0 rgba(143,203,166,0.6);
  animation: pulse 2.2s infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(143,203,166,0.55); }
  70% { box-shadow: 0 0 0 8px rgba(143,203,166,0); }
  100% { box-shadow: 0 0 0 0 rgba(143,203,166,0); }
}

.navbar__burger { display: none; flex-direction: column; gap: 5px; padding: 6px; }
.navbar__burger span { width: 22px; height: 1.5px; background: var(--text-primary); transition: transform .25s var(--ease), opacity .25s var(--ease); }
.navbar__burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.navbar__burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.navbar__burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

.mobile-nav {
  display: none; flex-direction: column;
  max-height: 0; overflow: hidden;
  transition: max-height 0.35s var(--ease);
  border-top: 1px solid var(--border-soft);
}
.mobile-nav.is-open { max-height: 400px; }
.mobile-nav__link {
  padding: 1rem var(--gutter); font-size: 0.95rem; letter-spacing: 0.06em;
  border-bottom: 1px solid var(--border-soft); color: var(--text-secondary);
}
.mobile-nav__link:hover { color: var(--accent); }

/* ===== 7. HERO ===== */
.hero {
  position: relative; overflow: hidden;
  min-height: 92vh; min-height: 92svh;
  display: flex; align-items: center;
  padding-top: clamp(6rem, 12vw, 9rem);
}

/* Foto real de fondo (escritorio + monitor + Jesús), a pantalla completa,
   con degradado oscuro encima para que el texto siempre sea legible —
   igual que en tus capturas de referencia. */
.hero__media { position: absolute; inset: 0; z-index: 0; }
.hero__media img {
  width: 100%; height: 100%; object-fit: cover;
  object-position: 78% 35%; /* desktop: deja ver su rostro y el monitor a la derecha */
}
.hero__media-overlay {
  position: absolute; inset: 0;
  background:
    linear-gradient(90deg, var(--bg) 0%, rgba(10,21,18,0.88) 30%, rgba(10,21,18,0.35) 58%, rgba(10,21,18,0.15) 100%),
    linear-gradient(0deg, var(--bg) 0%, transparent 18%, transparent 82%, rgba(10,21,18,0.5) 100%);
}

.hero__inner { position: relative; z-index: 1; width: 100%; }
.hero__content { max-width: 640px; }
.hero__title {
  font-size: clamp(2.4rem, 5.2vw, 4.4rem);
  margin-bottom: 1.5rem;
}
.hero__desc { max-width: 46ch; font-size: 1.05rem; margin-bottom: 2rem; }
.hero__actions { display: flex; gap: 1rem; flex-wrap: wrap; margin-bottom: 3rem; }
.hero__tags { display: flex; flex-direction: column; gap: 0.9rem; }
.hero__tags-rule { width: 100%; height: 1px; background: var(--border); display: block; max-width: 460px; }
.hero__tags p { font-size: 0.78rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-muted); }

/* ===== 8. ABOUT ===== */
.about { background: linear-gradient(180deg, transparent, rgba(0,0,0,0.18)); }
.about__inner {
  display: grid; grid-template-columns: 1.15fr 0.85fr; gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}
.about__title { font-size: clamp(2rem, 4.2vw, 3.4rem); margin-bottom: 1.6rem; }
.about__text p { max-width: 55ch; margin-bottom: 1.1rem; }

.about__media { border-radius: var(--radius-md); overflow: hidden; box-shadow: 0 30px 60px -20px rgba(0,0,0,0.5); }
.about__media img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 4/3; }

/* ===== 9. SERVICES ===== */
.services__title { font-size: clamp(2rem, 4.4vw, 3.6rem); margin-bottom: 1.2rem; }
.services__desc { max-width: 52ch; margin-bottom: 3rem; }

.services__grid {
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 1.1rem;
}
.service-card {
  border: 1px solid var(--border); border-radius: var(--radius-md);
  padding: 2rem 1.4rem; text-align: center;
  background: var(--bg-card);
  transition: border-color 0.3s var(--ease), transform 0.3s var(--ease);
}
.service-card:hover { border-color: var(--accent); transform: translateY(-4px); }
.service-card__icon {
  color: var(--accent); width: 64px; height: 64px; margin: 0 auto 1.4rem;
  display: flex; align-items: center; justify-content: center;
}
.service-card__icon img { width: 100%; height: 100%; object-fit: contain; }
.service-card h3 {
  font-family: var(--font-sans); font-size: 0.85rem; font-weight: 600;
  letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 0.8rem;
}
.service-card p { font-size: 0.88rem; }

/* ===== 10. PORTFOLIO ===== */
.portfolio__title { font-size: clamp(2rem, 4.4vw, 3.6rem); margin-bottom: 1.2rem; }
.portfolio__desc { max-width: 52ch; margin-bottom: 3.5rem; }

.portfolio__grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 2.4rem 1.8rem;
}
.project-card { display: flex; gap: 1.2rem; }
.project-card__thumb {
  position: relative; flex-shrink: 0; width: 130px; aspect-ratio: 9/16;
  border-radius: var(--radius-sm); overflow: hidden; border: 1px solid var(--border-soft);
}
.project-card__thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s var(--ease); }
.project-card:hover .project-card__thumb img { transform: scale(1.06); }
.project-card__play {
  position: absolute; left: 0.7rem; bottom: 0.7rem;
  width: 30px; height: 30px; border-radius: 50%;
  background: rgba(10,21,18,0.65); border: 1px solid var(--accent);
  color: var(--accent); display: flex; align-items: center; justify-content: center;
  font-size: 0.7rem;
}
.project-card__body { min-width: 0; }
.project-card__num { font-size: 0.72rem; letter-spacing: 0.12em; color: var(--accent); margin-bottom: 0.5rem; }
.project-card h3 { font-family: var(--font-sans); font-size: 1rem; font-weight: 600; color: var(--text-primary); margin-bottom: 0.7rem; line-height: 1.3; }
.project-card__label { font-size: 0.72rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-muted); margin-top: 0.7rem; margin-bottom: 0.25rem; }
.project-card p { font-size: 0.85rem; }
.project-card__link {
  display: inline-block; margin-top: 0.9rem; font-size: 0.78rem; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--accent); border-bottom: 1px solid var(--accent);
  padding-bottom: 2px; transition: opacity 0.2s;
}
.project-card__link:hover { opacity: 0.7; }

/* ===== 11. CONTACT ===== */
.contact { background: linear-gradient(180deg, rgba(0,0,0,0.18), transparent); }
.contact__inner {
  display: grid; grid-template-columns: 0.95fr 1.05fr; gap: clamp(2.5rem, 6vw, 5rem);
}
.contact__title { font-size: clamp(2.2rem, 4.6vw, 3.6rem); margin-bottom: 1.5rem; }
.contact__intro p { max-width: 44ch; margin-bottom: 0.6rem; }
.contact__rule { display: block; width: 90px; height: 1px; background: var(--border); margin: 2.5rem 0 2rem; }
.contact__signature { font-size: 0.85rem; letter-spacing: 0.06em; color: var(--text-primary); }
.contact__signature span.contact__signature-role { display: block; font-size: 0.68rem; color: var(--text-muted); letter-spacing: 0.12em; margin-top: 0.3rem; }

.contact__form { display: flex; flex-direction: column; gap: 1.3rem; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.3rem; }
.form-field { display: flex; flex-direction: column; gap: 0.55rem; }
.form-field label { font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-secondary); }
.form-field input, .form-field select, .form-field textarea {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 0.85rem 1rem; color: var(--text-primary); font-size: 0.92rem;
  transition: border-color 0.2s var(--ease);
}
.form-field input::placeholder, .form-field textarea::placeholder { color: var(--text-muted); }
.form-field input:focus, .form-field select:focus, .form-field textarea:focus { border-color: var(--accent); }
.form-field select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%238fcba6' stroke-width='1.5' fill='none'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 1rem center;
  /* Le dice al navegador que dibuje sus controles nativos (incluido el menú
     desplegable del <select>) en modo oscuro, en vez del blanco por defecto. */
  color-scheme: dark;
}
/* Refuerzo para navegadores que sí permiten colorear las opciones directamente
   (Chrome/Edge en Windows y Linux). Safari y Chrome en macOS ignoran esto y
   usan el estilo oscuro del sistema gracias a color-scheme de arriba. */
.form-field select option {
  background-color: #0f221b;
  color: #f3f1e9;
}
.form-field select option:checked,
.form-field select option:hover {
  background-color: #8fcba6;
  color: #0a1512;
}
.form-field textarea { resize: vertical; min-height: 120px; }
.form-error { font-size: 0.75rem; color: #e0a17a; min-height: 1em; }
.form-status { font-size: 0.85rem; color: var(--accent); min-height: 1.2em; }

/* ===== 12. FOOTER ===== */
.site-footer { border-top: 1px solid var(--border-soft); padding: 3rem var(--gutter) 1.5rem; }
.site-footer__inner {
  max-width: var(--max-width); margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 1.5rem;
  padding-bottom: 2.5rem;
}
.site-footer__logo { font-weight: 600; letter-spacing: 0.14em; font-size: 1rem; }
.site-footer__tag { font-size: 0.65rem; letter-spacing: 0.14em; color: var(--text-muted); margin-top: 0.3rem; }

.site-footer__nav { display: flex; gap: 1.6rem; flex-wrap: wrap; }
.site-footer__nav a { font-size: 0.8rem; letter-spacing: 0.06em; color: var(--text-secondary); }
.site-footer__nav a:hover { color: var(--accent); }

.site-footer__social { display: flex; align-items: center; gap: 1rem; }
.site-footer__social a { color: var(--text-secondary); transition: color 0.2s; }
.site-footer__social a:hover { color: var(--accent); }
.site-footer__email { display: flex; align-items: center; gap: 0.5rem; font-size: 0.82rem; }

.site-footer__bottom {
  max-width: var(--max-width); margin: 0 auto; padding-top: 2rem;
  border-top: 1px solid var(--border-soft);
  text-align: center; font-size: 0.78rem; color: var(--text-muted);
}
.site-footer__bottom strong { color: var(--text-secondary); font-weight: 600; }

/* ===== 13. ANIMATIONS ===== */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); }
.reveal.is-visible { opacity: 1; transform: translateY(0); }

.to-top {
  position: fixed; right: 1.5rem; bottom: 1.5rem; z-index: 90;
  width: 42px; height: 42px; border-radius: 50%;
  background: var(--accent); color: var(--accent-dark);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none; transform: translateY(10px);
  transition: opacity 0.3s var(--ease), transform 0.3s var(--ease);
}
.to-top.is-visible { opacity: 1; pointer-events: auto; transform: translateY(0); }

/* ===== VIDEO MODAL (LIGHTBOX DE VIMEO) ===== */
.video-modal { position: fixed; inset: 0; z-index: 200; display: flex; align-items: center; justify-content: center; padding: clamp(1rem, 4vw, 3rem); }
.video-modal[hidden] { display: none; }

.video-modal__backdrop { position: absolute; inset: 0; background: rgba(6, 12, 10, 0.88); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }

.video-modal__panel {
  position: relative; z-index: 1;
  display: flex; flex-direction: column; align-items: center; gap: 0.9rem;
  max-height: 92vh;
  animation: modal-in 0.28s var(--ease);
}
@keyframes modal-in { from { opacity: 0; transform: translateY(14px) scale(0.98); } to { opacity: 1; transform: translateY(0) scale(1); } }

.video-modal__close {
  position: absolute; top: -2.6rem; right: 0;
  width: 38px; height: 38px; border-radius: 50%;
  background: var(--bg-card); border: 1px solid var(--border);
  color: var(--text-primary); font-size: 0.95rem;
  display: flex; align-items: center; justify-content: center;
  transition: border-color 0.2s var(--ease), color 0.2s var(--ease);
}
.video-modal__close:hover { border-color: var(--accent); color: var(--accent); }

.video-modal__frame {
  position: relative;
  width: min(92vw, 460px);
  aspect-ratio: 9 / 16;
  max-height: 80vh;
  background: #000;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border);
}
.video-modal__frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

.video-modal__external {
  font-size: 0.78rem; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--accent); border-bottom: 1px solid var(--accent); padding-bottom: 2px;
}
.video-modal__external:hover { opacity: 0.75; }

body.video-modal-open { overflow: hidden; }

@media (max-width: 560px) {
  .video-modal__frame { width: 88vw; }
  .video-modal__close { top: -2.4rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

/* ===== 14. RESPONSIVE ===== */
@media (max-width: 1024px) {
  .services__grid { grid-template-columns: repeat(3, 1fr); }
  .portfolio__grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 900px) {
  .navbar__nav, .navbar__status { display: none; }
  .navbar__burger { display: flex; }
  .mobile-nav { display: flex; }

  .hero { min-height: auto; padding-bottom: 3.5rem; }
  .hero__media img { object-position: 62% 30%; }
  .hero__media-overlay {
    background:
      linear-gradient(180deg, rgba(10,21,18,0.55) 0%, rgba(10,21,18,0.72) 45%, var(--bg) 92%),
      linear-gradient(90deg, var(--bg) 0%, rgba(10,21,18,0.55) 55%, rgba(10,21,18,0.3) 100%);
  }
  .hero__content { max-width: 100%; }

  .about__inner { grid-template-columns: 1fr; }
  .about__media { order: -1; }
  .about__media img { aspect-ratio: 16/10; }

  .contact__inner { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .services__grid { grid-template-columns: repeat(2, 1fr); }
  .portfolio__grid { grid-template-columns: 1fr; }
  .project-card { max-width: 420px; }
}

@media (max-width: 560px) {
  section { padding: 3.5rem var(--gutter); }
  .services__grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .hero { min-height: 78vh; min-height: 78svh; padding-top: 6.5rem; }
  .hero__media img { object-position: 58% 28%; }
  .hero__media-overlay {
    background:
      linear-gradient(180deg, rgba(10,21,18,0.4) 0%, rgba(10,21,18,0.78) 55%, var(--bg) 95%),
      linear-gradient(90deg, var(--bg) 0%, rgba(10,21,18,0.65) 60%, rgba(10,21,18,0.4) 100%);
  }
  .hero__actions { flex-direction: column; align-items: stretch; }
  .hero__actions .btn { justify-content: center; }
  .project-card { flex-direction: column; }
  .project-card__thumb { width: 100%; max-width: 220px; }
  .site-footer__inner { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 380px) {
  :root { --gutter: 1.1rem; }
  .hero__title { font-size: 2.1rem; }
}
