/* RESET */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* TOKENS */
:root {
  --bg:   #F7F6F2;
  --card: #EEECEA;
  --bd:   #E0DED9;
  --ink:  #111111;
  --dim:  #888880;
  --red:  #E8321E;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

html { height: 100%; }
body {
  height: 100%;
  overflow: hidden;
  background: #F7F6F2;
  color: #111111;
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  display: flex;      /* sidebar + main side by side */
}

::-webkit-scrollbar { width: 3px; }
::-webkit-scrollbar-thumb { background: #E0DED9; }

/* ── SIDEBAR ──────────────────────────── */
#sidebar {
  width: 200px;
  flex-shrink: 0;
  height: 100vh;
  background: #F7F6F2;
  border-right: 1px solid #E0DED9;
  display: flex;
  flex-direction: column;
  padding: 32px 24px 28px;
  position: relative;
  z-index: 10;
}

.sb-logo {
  font-family: 'Syne', sans-serif;
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #111111;
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
  padding: 0;
  margin-bottom: 44px;
}
.sb-logo span { color: #E8321E; }

.sb-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
}
.sb-nav button {
  background: none;
  border: none;
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 500;
  color: #888880;
  text-align: left;
  padding: 9px 10px 9px 14px;
  border-radius: 6px;
  cursor: pointer;
  transition: color 0.2s, background 0.2s;
  position: relative;
}
.sb-nav button::before {
  content: '';
  position: absolute;
  left: 3px;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 0;
  background: #E8321E;
  border-radius: 2px;
  transition: height 0.25s cubic-bezier(0.22, 1, 0.36, 1);
}
.sb-nav button:hover { color: #111111; background: #EEECEA; }
.sb-nav button.active-nav { color: #111111; }
.sb-nav button.active-nav::before { height: 18px; }

.sb-foot {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 11px;
  color: #888880;
}

/* ── MAIN AREA ────────────────────────── */
#main {
  flex: 1;
  position: relative;
  overflow: hidden;
  height: 100vh;
}

/* ── SECTIONS ─────────────────────────── */
.page {
  position: absolute;
  inset: 0;
  background: #F7F6F2;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s cubic-bezier(0.22, 1, 0.36, 1);
  overflow-y: auto;
  overflow-x: hidden;
}
.page.active {
  opacity: 1;
  pointer-events: auto;
  z-index: 5;
}

/* ── HOME ─────────────────────────────── */
.home-wrap {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: calc(100vh - 60px); /* leave room for ticker */
  padding: 52px 60px 40px;
  gap: 24px;
}

.home-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #888880;
}
.pulse {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #E8321E;
  flex-shrink: 0;
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.3; transform: scale(0.6); }
}

.home-h1 {
  font-family: 'Syne', sans-serif;
  font-size: clamp(52px, 7vw, 96px);
  font-weight: 800;
  line-height: 0.97;
  letter-spacing: -0.04em;
}
.line { display: block; overflow: hidden; padding-bottom: 0.06em; }
.li { display: block; transform: translateY(112%); transition: transform 0.85s cubic-bezier(0.22, 1, 0.36, 1); }
.li.in { transform: translateY(0); }
.red-w { color: #E8321E; }

.home-sub {
  font-size: 15px;
  line-height: 1.72;
  color: #888880;
  max-width: 400px;
}

.home-btns { display: flex; gap: 10px; flex-wrap: wrap; }

.btn-dark {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #111111;
  color: #F7F6F2;
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 500;
  padding: 11px 22px;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  transition: background 0.2s, transform 0.2s;
}
.btn-dark:hover { background: #333; transform: translateY(-2px); }

.btn-line {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  color: #111111;
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 500;
  padding: 10px 22px;
  border-radius: 6px;
  border: 1px solid #E0DED9;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s, transform 0.2s;
}
.btn-line:hover { border-color: #111111; background: #EEECEA; transform: translateY(-2px); }

.home-stats {
  display: flex;
  align-items: center;
  gap: 28px;
}
.hs {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.hs strong {
  font-family: 'Syne', sans-serif;
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1;
  color: #111111;
}
.hs span { font-size: 11px; color: #888880; letter-spacing: 0.06em; text-transform: uppercase; }
.hs-sep { width: 1px; height: 32px; background: #E0DED9; }

.home-ticker {
  border-top: 1px solid #E0DED9;
  padding: 16px 0;
  overflow: hidden;
}
.ticker-inner {
  display: inline-block;
  white-space: nowrap;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #888880;
  animation: ticker 24s linear infinite;
}
@keyframes ticker { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ── COMMON PAGE WRAPPER ──────────────── */
.page-wrap {
  padding: 52px 60px 60px;
  min-height: 100%;
  display: flex;
  flex-direction: column;
}

.page-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #E8321E;
  margin-bottom: 36px;
}

/* ── SERVICES ─────────────────────────── */
.svc-list { display: flex; flex-direction: column; flex: 1; }

.svc-row {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 26px 12px;
  border-top: 1px solid #E0DED9;
  border-radius: 8px;
  transition: background 0.2s;
  position: relative;
  overflow: hidden;
  cursor: default;
}
.svc-list .svc-row:last-child { border-bottom: 1px solid #E0DED9; }

.svc-row::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: #E8321E;
  border-radius: 2px;
  transform: scaleY(0);
  transform-origin: bottom;
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}
.svc-row:hover::before { transform: scaleY(1); }
.svc-row:hover { background: #EEECEA; }

.sr-num {
  font-family: 'Syne', sans-serif;
  font-size: 11px;
  font-weight: 700;
  color: #888880;
  width: 24px;
  flex-shrink: 0;
  letter-spacing: 0.06em;
  transition: color 0.2s;
}
.svc-row:hover .sr-num { color: #E8321E; }

.sr-body { flex: 1; }
.sr-body h3 {
  font-family: 'Syne', sans-serif;
  font-size: clamp(18px, 2.4vw, 28px);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 3px;
  transition: color 0.2s;
}
.sr-body p { font-size: 13px; color: #888880; line-height: 1.6; max-width: 420px; }

.sr-badge {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #888880;
  background: #EEECEA;
  border: 1px solid #E0DED9;
  padding: 5px 10px;
  border-radius: 4px;
  flex-shrink: 0;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}
.svc-row:hover .sr-badge { background: #E8321E; border-color: #E8321E; color: #fff; }

/* ── PROJECTS ─────────────────────────── */
#cursor-thumb {
  position: fixed;
  z-index: 999;
  pointer-events: none;
  width: 260px;
  height: 162px;
  border-radius: 10px;
  overflow: hidden;
  opacity: 0;
  transform: scale(0.88) rotate(-2deg);
  transition: opacity 0.3s ease, transform 0.35s ease;
  box-shadow: 0 16px 40px rgba(0,0,0,0.15);
}
#cursor-thumb.show { opacity: 1; transform: scale(1) rotate(-2deg); }
#ct-inner { width: 100%; height: 100%; }

.ct-bali {
  background: linear-gradient(135deg, #2C1810, #5a3a28);
  position: relative;
}
.ct-bali::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 32px; background: #2C1810; }
.ct-bali::after { content: ''; position: absolute; top: 48px; left: 22px; width: 88px; height: 8px; border-radius: 5px; background: #C8A97E; box-shadow: 0 16px 0 rgba(200,169,126,0.4), 0 28px 0 rgba(200,169,126,0.2); }

.ct-fix {
  background: linear-gradient(135deg, #070f1e, #0d1f3c);
  position: relative;
}
.ct-fix::before { content: ''; position: absolute; top: 24px; left: 20px; width: 42%; height: 10px; border-radius: 6px; background: rgba(200,255,71,0.75); }
.ct-fix::after { content: ''; position: absolute; top: 46px; left: 20px; right: 20px; height: 3px; background: rgba(255,255,255,0.1); border-radius: 2px; box-shadow: 0 12px 0 rgba(255,255,255,0.07), 0 22px 0 rgba(255,255,255,0.04); }

.proj-list { display: flex; flex-direction: column; flex: 1; }

.proj-row {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  padding: 30px 12px;
  border-top: 1px solid #E0DED9;
  border-radius: 8px;
  transition: background 0.2s;
  cursor: default;
}
.proj-list .proj-row:last-child { border-bottom: 1px solid #E0DED9; }
.proj-row:hover { background: #EEECEA; }

.pr-num {
  font-family: 'Syne', sans-serif;
  font-size: 11px;
  font-weight: 700;
  color: #888880;
  width: 24px;
  flex-shrink: 0;
  margin-top: 4px;
  transition: color 0.2s;
}
.proj-row:hover .pr-num { color: #E8321E; }

.pr-body { flex: 1; }
.pr-body h3 {
  font-family: 'Syne', sans-serif;
  font-size: clamp(22px, 3vw, 38px);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.05;
  margin-bottom: 6px;
  transition: color 0.2s;
}
.pr-body p { font-size: 13px; color: #888880; line-height: 1.65; max-width: 440px; margin-bottom: 10px; }
.pr-tags { display: flex; gap: 5px; flex-wrap: wrap; }
.pr-tags span { font-size: 10px; color: #888880; background: #F7F6F2; border: 1px solid #E0DED9; padding: 3px 8px; border-radius: 4px; }
.proj-row:hover .pr-tags span { background: #fff; }

.pr-meta { display: flex; flex-direction: column; align-items: flex-end; gap: 5px; flex-shrink: 0; padding-top: 3px; }
.pr-year { font-size: 12px; color: #888880; }
.pr-year.wip { background: #E8321E; color: #fff; font-size: 10px; font-weight: 500; padding: 3px 8px; border-radius: 4px; }
.pr-cat { font-size: 10px; color: #888880; letter-spacing: 0.1em; text-transform: uppercase; text-align: right; }

.pr-arr { font-size: 18px; color: #888880; flex-shrink: 0; margin-top: 3px; transition: transform 0.3s ease, color 0.2s; }
.proj-row:hover .pr-arr { transform: translate(3px,-3px); color: #E8321E; }

/* ── NOSOTROS ─────────────────────────── */
.about-wrap {
  flex-direction: row !important;
  gap: 60px;
  align-items: flex-start;
}
.about-left { flex: 1; }
.about-h2 {
  font-family: 'Syne', sans-serif;
  font-size: clamp(28px, 3.5vw, 48px);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.06;
  margin: 10px 0 22px;
}
.about-h2 em { font-style: italic; color: #E8321E; }
.about-p { font-size: 14px; line-height: 1.8; color: #888880; margin-bottom: 12px; }

.about-right { flex: 0 0 300px; display: flex; flex-direction: column; gap: 12px; }

.team-card {
  background: #EEECEA;
  border: 1px solid #E0DED9;
  border-radius: 12px;
  padding: 18px;
  display: flex;
  gap: 14px;
  align-items: flex-start;
  transition: transform 0.2s, box-shadow 0.2s;
}
.team-card:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0,0,0,0.06); }
.tc-av {
  width: 42px; height: 42px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-family: 'Syne', sans-serif; font-size: 12px; font-weight: 700;
  flex-shrink: 0;
}
.av-v { background: #E8321E; color: #fff; }
.av-f { background: #111111; color: #F7F6F2; }
.tc-info strong { display: block; font-family: 'Syne', sans-serif; font-size: 14px; font-weight: 700; margin-bottom: 2px; }
.tc-info em { display: block; font-style: normal; font-size: 11px; letter-spacing: 0.07em; text-transform: uppercase; color: #E8321E; margin-bottom: 5px; }
.tc-info p { font-size: 13px; color: #888880; line-height: 1.5; }

.values { background: #EEECEA; border: 1px solid #E0DED9; border-radius: 12px; padding: 4px 16px; }
.val { display: flex; gap: 10px; align-items: center; font-size: 13px; color: #888880; padding: 11px 0; border-bottom: 1px solid #E0DED9; transition: color 0.2s; }
.val:last-child { border-bottom: none; }
.val:hover { color: #111111; }
.val span { color: #E8321E; font-weight: 600; }

/* ── CONTACTO ─────────────────────────── */
.contact-wrap {
  display: flex;
  min-height: 100%;
}
.contact-left {
  flex: 0 0 42%;
  background: #111111;
  padding: 60px 52px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  justify-content: center;
  position: sticky;
  top: 0;
  height: 100vh;
}
.cs-label { font-size: 11px; font-weight: 500; letter-spacing: 0.16em; text-transform: uppercase; color: #E8321E; }
.cs-h2 {
  font-family: 'Syne', sans-serif;
  font-size: clamp(44px, 6vw, 76px);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 0.95;
  color: #fff;
}
.cs-sub { font-size: 14px; line-height: 1.72; color: rgba(255,255,255,0.5); max-width: 280px; }
.cs-divider { width: 28px; height: 2px; background: #E8321E; border-radius: 1px; }
.cs-email {
  font-family: 'Syne', sans-serif;
  font-size: 15px;
  font-weight: 600;
  color: #F7F6F2;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: color 0.2s;
}
.cs-email::after { content: '↗\FE0E'; color: #E8321E; font-size: 13px; font-family: 'Inter', sans-serif; }
.cs-email:hover { color: #E8321E; }
.cs-loc { font-size: 12px; color: rgba(255,255,255,0.3); }

.contact-right { flex: 1; background: #F7F6F2; padding: 60px 52px; overflow-y: auto; display: flex; align-items: flex-start; }
.cf { width: 100%; max-width: 480px; display: flex; flex-direction: column; gap: 12px; }
.cf-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.cf-f { display: flex; flex-direction: column; gap: 5px; }
.cf-f label { font-size: 10px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: #888880; }
.cf-f input, .cf-f select, .cf-f textarea {
  background: #fff;
  border: 1px solid #E0DED9;
  border-radius: 8px;
  padding: 11px 14px;
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  color: #111111;
  outline: none;
  width: 100%;
  -webkit-appearance: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.cf-f input:focus, .cf-f select:focus, .cf-f textarea:focus {
  border-color: #E8321E;
  box-shadow: 0 0 0 3px rgba(232,50,30,0.08);
}
.cf-f input::placeholder, .cf-f textarea::placeholder { color: #C0BDB7; }
.cf-f select { cursor: pointer; }
.cf-f select option { background: #fff; color: #111111; }
.cf-f textarea { resize: none; height: 108px; }

/* Submit row */
.cf-submit {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 4px;
  border-top: 1px solid #E0DED9;
  margin-top: 4px;
}
.cf-submit-hint {
  font-size: 12px;
  color: #888880;
  line-height: 1.4;
}
.cf-submit-hint strong {
  display: block;
  color: #111111;
  font-weight: 500;
}
.btn-submit {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: #111111;
  color: #F7F6F2;
  font-family: 'Syne', sans-serif;
  font-size: 14px;
  font-weight: 700;
  padding: 13px 24px;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.2s, transform 0.2s;
  flex-shrink: 0;
}
.btn-submit:hover { background: #E8321E; transform: translateY(-2px); }
.btn-submit .sarr { font-size: 16px; transition: transform 0.2s; }
.btn-submit:hover .sarr { transform: translate(3px, -3px); }

/* ── ANIMATIONS ───────────────────────── */
.anim { opacity: 0; transform: translateY(18px); transition: opacity 0.65s cubic-bezier(0.22, 1, 0.36, 1), transform 0.65s cubic-bezier(0.22, 1, 0.36, 1); }
.anim.in { opacity: 1; transform: translateY(0); }

/* ── MOBILE ───────────────────────────── */
.mob-btn { display: none; position: fixed; top: 16px; right: 16px; z-index: 300; width: 38px; height: 38px; background: #111111; border: none; border-radius: 50%; cursor: pointer; flex-direction: column; align-items: center; justify-content: center; gap: 5px; }
.mob-btn span { display: block; width: 15px; height: 1.5px; background: #F7F6F2; border-radius: 1px; transition: all 0.3s ease; transform-origin: center; }
.mob-btn.open span:first-child { transform: rotate(45deg) translate(4.5px,4.5px); }
.mob-btn.open span:last-child  { transform: rotate(-45deg) translate(4.5px,-4.5px); }

.mob-menu { display: none; position: fixed; inset: 0; background: #F7F6F2; z-index: 250; flex-direction: column; align-items: center; justify-content: center; gap: 6px; opacity: 0; pointer-events: none; transition: opacity 0.3s ease; }
.mob-menu.open { opacity: 1; pointer-events: auto; }
.mob-menu button { background: none; border: none; font-family: 'Syne', sans-serif; font-size: 30px; font-weight: 800; letter-spacing: -0.02em; color: #111111; cursor: pointer; padding: 8px 20px; transition: color 0.2s; }
.mob-menu button:hover { color: #E8321E; }

/* ── Mac 13" y pantallas bajas (≤ 820px alto) ── */
@media (max-height: 820px) {
  .home-wrap { padding: 36px 52px 28px; gap: 18px; }
  .home-h1   { font-size: clamp(42px, 5.6vw, 72px); }
  .home-sub  { font-size: 14px; }
  .hs strong { font-size: 24px; }
  .home-stats { gap: 22px; }
  .home-ticker { padding: 12px 0; }
  .page-wrap { padding: 36px 52px 40px; }
  .about-wrap { padding: 36px 52px 40px; }
  .svc-row { padding: 20px 12px; }
  .sr-body h3 { font-size: clamp(16px, 2vw, 22px); }
  .proj-row { padding: 22px 12px; }
  .pr-body h3 { font-size: clamp(20px, 2.4vw, 30px); }
}

/* ── Tablets y pantallas medianas (≤ 1024px ancho) ── */
@media (max-width: 1024px) {
  .home-wrap { padding: 44px 44px 32px; gap: 20px; }
  .page-wrap { padding: 44px 44px 44px; }
  .about-wrap { padding: 44px 44px 44px; gap: 40px; }
  .about-right { flex: 0 0 260px; }
  .contact-left { padding: 48px 40px; }
  .contact-right { padding: 48px 36px; }
}

/* ── Móvil (≤ 768px ancho) ── */
@media (max-width: 768px) {
  #sidebar { display: none; }
  .mob-btn  { display: flex; }
  .mob-menu { display: flex; }

  /* Home */
  .home-wrap {
    padding: 80px 24px 28px;
    gap: 20px;
    min-height: 0;
    justify-content: flex-start;
  }
  .home-h1   { font-size: clamp(44px, 11vw, 68px); }
  .home-sub  { font-size: 14px; max-width: 100%; }
  .home-stats { gap: 18px; flex-wrap: wrap; }
  .hs strong { font-size: 24px; }
  .home-ticker { padding: 12px 0; }

  /* Sections */
  .page-wrap  { padding: 72px 24px 40px; }
  .about-wrap { padding: 72px 24px 40px; flex-direction: column !important; gap: 32px; }
  .about-right { flex: none; width: 100%; }

  /* Services */
  .svc-row  { padding: 18px 8px; gap: 12px; }
  .sr-body h3 { font-size: 18px; }
  .sr-badge { display: none; }

  /* Projects */
  .proj-row { flex-wrap: wrap; padding: 20px 8px; gap: 12px; }
  .pr-meta  { display: none; }
  .pr-body h3 { font-size: clamp(22px, 6vw, 32px); }

  /* Contact — sin split en móvil */
  .contact-wrap { flex-direction: column !important; }

  .contact-left {
    position: static !important;
    height: auto !important;
    flex: none !important;
    background: #F7F6F2 !important;
    padding: 80px 24px 32px !important;
    justify-content: flex-start !important;
  }
  .cs-label { color: #E8321E !important; }
  .cs-h2 {
    color: #111111 !important;
    font-size: clamp(32px, 9vw, 48px) !important;
    white-space: normal !important;
  }
  .cs-sub  { color: #888880 !important; max-width: 100% !important; }
  .cs-divider { background: #E8321E !important; }
  .cs-email { color: #111111 !important; }
  .cs-email::after { color: #E8321E !important; font-family: 'Inter', sans-serif !important; }
  .cs-loc  { color: #888880 !important; }

  .contact-right {
    padding: 0 24px 60px !important;
    flex: none !important;
    background: #F7F6F2 !important;
  }

  .cf-row { grid-template-columns: 1fr; }
  .cf-submit { flex-direction: column; align-items: stretch; gap: 12px; }
  .cf-submit-hint { text-align: center; }
  .btn-submit { width: 100%; justify-content: center; }
}

/* ── Teléfono horizontal (landscape) ── */
@media (max-height: 500px) and (orientation: landscape) {
  .home-wrap  { padding: 20px 32px; gap: 12px; min-height: 0; justify-content: flex-start; }
  .home-h1    { font-size: clamp(28px, 7vw, 44px); }
  .home-stats { gap: 14px; }
  .home-ticker { padding: 8px 0; }
  .page-wrap  { padding: 20px 32px 24px; }
  .svc-row    { padding: 12px 8px; }
  .sr-body h3 { font-size: 16px; }
  .proj-row   { padding: 14px 8px; }
  .contact-left { padding: 20px 32px; }
  .contact-right { padding: 20px 32px; }
}
