:root {
  color-scheme: dark;
  --ink: #07131a;
  --ink-deep: #030b11;
  --ink-soft: #10232b;
  --cream: #fbf1e8;
  --cream-dark: #efdfd2;
  --wine: #67002e;
  --teal: #006e72;
  --aqua: #bbdeda;
  --text: #fffaf5;
  --muted: #b8c7c9;
  --line: rgba(255, 250, 245, 0.22);
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-synthesis: none;
  scroll-behavior: smooth;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--ink);
  color: var(--text);
  min-width: 320px;
  font-size: 16px;
  line-height: 1.5;
}

body::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 1050px;
  pointer-events: none;
  background:
    radial-gradient(circle at 18% 24%, rgba(187, 222, 218, 0.56) 0 1px, transparent 2px),
    radial-gradient(circle at 75% 35%, rgba(187, 222, 218, 0.48) 0 1px, transparent 2px),
    radial-gradient(circle at 65% 78%, rgba(187, 222, 218, 0.3) 0 1px, transparent 2px),
    radial-gradient(circle at 41% 72%, rgba(187, 222, 218, 0.4) 0 1px, transparent 2px),
    radial-gradient(ellipse at 83% 70%, rgba(19, 88, 112, 0.27), transparent 36%);
  opacity: 0.7;
}

a { color: inherit; text-decoration: none; }
button { font: inherit; }
img { display: block; max-width: 100%; }
::selection { color: var(--ink); background: var(--aqua); }

:focus-visible {
  outline: 3px solid #89d9d7;
  outline-offset: 4px;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: -100px;
  left: 18px;
  background: var(--cream);
  color: var(--ink);
  padding: 12px 16px;
  border-radius: 4px;
}
.skip-link:focus { top: 14px; }

.shell { width: min(100% - 9vw, 1440px); margin-inline: auto; }

.hero { position: relative; display: grid; grid-template-columns: 1.15fr 0.85fr; align-items: center; gap: 4vw; min-height: min(760px, 100svh); padding-block: 95px 118px; }
.hero-copy { position: relative; z-index: 1; }
.eyebrow { display: flex; align-items: center; gap: 14px; margin: 0 0 34px; color: var(--aqua); font-size: 13px; font-weight: 700; letter-spacing: 0.15em; line-height: 1.35; }
.eyebrow-line { width: 27px; height: 1px; background: currentColor; flex: 0 0 auto; }
.hero h1 { margin: 0; font-size: clamp(5.25rem, 9.6vw, 10.5rem); font-weight: 400; letter-spacing: -0.08em; line-height: 0.9; }
.hero h1 em { color: var(--aqua); font-family: Georgia, "Times New Roman", serif; font-weight: 400; letter-spacing: -0.07em; }
.hero-lead { max-width: 540px; margin: 44px 0 36px; color: #d5dfdf; font-size: clamp(19px, 1.6vw, 23px); line-height: 1.45; }
.primary-link { display: inline-flex; align-items: center; justify-content: center; min-height: 54px; padding: 0 25px; border: 1px solid var(--aqua); border-radius: 999px; color: var(--ink); background: var(--aqua); font-size: 15px; font-weight: 700; transition: background 180ms ease, transform 180ms ease; }
.primary-link:hover { background: var(--cream); transform: translateY(-2px); }
.link-chevron { display: none; }
.hero-logo-wrap { justify-self: end; max-width: 570px; transform: rotate(4deg); }
.hero-logo-surface { padding: 10px; background: var(--cream); box-shadow: 32px 36px 80px rgba(0, 0, 0, 0.34), 0 0 0 1px rgba(255,255,255,0.25); }
.hero-logo-surface img { width: 100%; height: auto; }
.hero-bottom { position: absolute; bottom: 29px; left: 0; right: 0; display: flex; justify-content: space-between; color: #91a9ab; font-size: 11px; font-weight: 700; letter-spacing: 0.16em; }

.portfolio-section { position: relative; padding: 112px 0 134px; background: linear-gradient(180deg, #07131a 0%, #08161e 60%, #0c1a24 100%); }
.portfolio-section::before { content: ""; position: absolute; inset: auto 15% 4% 15%; height: 330px; pointer-events: none; background: radial-gradient(ellipse, rgba(0, 110, 114, 0.19), transparent 65%); }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 60px; margin-bottom: 48px; }
.section-heading .eyebrow { margin-bottom: 22px; }
.section-heading h2 { margin: 0; font-size: clamp(5.6rem, 10.5vw, 10rem); font-weight: 400; letter-spacing: -0.085em; line-height: 0.95; }
.period { color: var(--aqua); }
.project-grid { position: relative; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.project-grid > .project-card:last-child { grid-column: span 2; }
.project-card { display: flex; flex-direction: column; justify-content: space-between; min-height: 410px; padding: 27px; border: 1px solid rgba(255,255,255,0.32); border-radius: 5px; background: var(--cream); color: var(--ink); text-align: left; cursor: pointer; box-shadow: 0 18px 40px rgba(0,0,0,0.12); transition: transform 220ms ease, background 220ms ease, box-shadow 220ms ease; }
.project-card:hover { transform: translateY(-7px); background: #fffaf5; box-shadow: 0 26px 55px rgba(0,0,0,0.22); }
.project-card:active { transform: translateY(-2px); }
.card-top, .card-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.card-index { color: #5c6262; font-size: 12px; font-weight: 700; letter-spacing: 0.12em; }
.card-body { display: flex; flex-direction: column; justify-content: end; min-height: 215px; }
.card-name { display: block; margin: 0 0 25px; color: var(--wine); font-size: clamp(2.55rem, 3.2vw, 4.25rem); font-weight: 500; letter-spacing: -0.06em; line-height: 0.96; overflow-wrap: anywhere; }
.card-desc { max-width: 330px; color: #344047; font-size: 16px; line-height: 1.4; }
.card-foot { margin-top: 27px; padding-top: 19px; border-top: 1px solid rgba(7,19,26,0.22); color: var(--teal); font-size: 14px; font-weight: 700; }
.card-plus { font-size: 30px; font-weight: 300; line-height: 0.7; transition: transform 220ms ease; }
.project-card:hover .card-plus { transform: rotate(90deg); }

.about-section { background: var(--cream); color: var(--ink); padding: 122px 0 130px; }
.about-grid { display: grid; grid-template-columns: 1.1fr 0.65fr; gap: 8vw; }
.eyebrow--dark { color: var(--teal); }
.about-grid h2 { margin: 0; font-size: clamp(3.5rem, 5.8vw, 6.8rem); font-weight: 400; letter-spacing: -0.075em; line-height: 1.02; }
.about-grid h2 em { color: var(--wine); font-family: Georgia, "Times New Roman", serif; font-weight: 400; }
.about-copy { padding-top: 86px; }
.about-copy p { margin: 0 0 23px; font-size: clamp(18px, 1.65vw, 22px); line-height: 1.45; }
.text-link { display: inline-flex; padding-bottom: 5px; border-bottom: 1px solid var(--teal); color: var(--teal); font-size: 16px; font-weight: 700; }
.text-link:hover { color: var(--wine); border-color: var(--wine); }

.explore-section { padding-block: 128px 150px; }
.explore-section h2 { margin: 0; font-size: clamp(3.8rem, 6.5vw, 7.7rem); font-weight: 400; letter-spacing: -0.08em; line-height: 1.05; }
.explore-section > p:not(.eyebrow) { max-width: 520px; color: var(--muted); font-size: 19px; margin: 26px 0 52px; }
.outbound-list { border-top: 1px solid var(--line); }
.outbound-list a { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 90px; padding: 16px 0; border-bottom: 1px solid var(--line); transition: color 180ms ease, padding 180ms ease; }
.outbound-list a:hover { color: var(--aqua); padding-inline: 12px; }
.outbound-list a span:first-child { font-size: clamp(25px, 3vw, 42px); letter-spacing: -0.05em; }
.outbound-list a span:last-child { flex: 0 0 auto; color: var(--aqua); font-size: 14px; }

.site-footer { background: var(--ink-deep); border-top: 1px solid var(--line); }
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 28px; min-height: 130px; }
.footer-brand { font-size: 28px; letter-spacing: -0.06em; }
.footer-inner p { margin: 0; color: var(--muted); }
.footer-inner > a:last-child { color: var(--aqua); font-size: 14px; }

.project-dialog { width: min(100% - 30px, 1050px); max-height: min(780px, calc(100dvh - 30px)); padding: 0; overflow: auto; border: 1px solid rgba(255,255,255,0.26); border-radius: 8px; background: var(--cream); color: var(--ink); box-shadow: 0 30px 100px rgba(0,0,0,0.55); }
.project-dialog::backdrop { background: rgba(0, 7, 12, 0.8); backdrop-filter: blur(8px); }
.dialog-layout { display: grid; grid-template-columns: 0.9fr 1.1fr; min-height: 560px; }
.dialog-art { position: relative; display: flex; align-items: end; min-height: 560px; padding: 35px; background: #08242b; color: var(--cream); overflow: hidden; }
.dialog-art::before { content: ""; position: absolute; width: 85%; aspect-ratio: 1; border: 1px solid rgba(255,255,255,0.26); border-radius: 50%; left: -23%; top: 7%; box-shadow: 0 0 0 70px rgba(255,255,255,0.025), 0 0 0 140px rgba(255,255,255,0.018); }
.dialog-art[data-project="alamanoremodela"] { background: #5b3d3e; }
.dialog-art[data-project="wineclub"] { background: #5a1230; }
.dialog-art[data-project="mitocomocho"] { background: #173f46; }
.dialog-art[data-project="alini"] { background: #35474c; }
.dialog-art-label { position: relative; z-index: 1; font-size: clamp(3.2rem, 5vw, 5.5rem); line-height: 0.95; letter-spacing: -0.075em; overflow-wrap: anywhere; }
.dialog-content { position: relative; display: flex; flex-direction: column; align-items: start; padding: 85px 58px 50px; }
.dialog-close { position: absolute; top: 26px; right: 26px; display: grid; place-items: center; width: 44px; height: 44px; border: 1px solid rgba(7,19,26,0.25); border-radius: 50%; background: transparent; color: var(--ink); font-size: 30px; font-weight: 300; cursor: pointer; }
.dialog-close:hover { background: var(--cream-dark); }
.dialog-eyebrow { margin: 0 0 25px; color: var(--teal); font-size: 13px; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; }
.dialog-content h2 { margin: 0 0 26px; color: var(--wine); font-size: clamp(3.5rem, 5vw, 5.5rem); line-height: 0.95; letter-spacing: -0.075em; font-weight: 400; }
.dialog-description { max-width: 470px; margin: 0 0 45px; font-size: 20px; line-height: 1.45; }
.dialog-meta { width: 100%; margin: auto 0 30px; border-top: 1px solid rgba(7,19,26,0.22); }
.dialog-meta div { display: grid; grid-template-columns: 110px 1fr; gap: 20px; padding: 14px 0; border-bottom: 1px solid rgba(7,19,26,0.22); }
.dialog-meta dt { color: #5a6869; font-size: 13px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; }
.dialog-meta dd { margin: 0; font-size: 16px; }
.dialog-visit { display: inline-flex; min-height: 48px; align-items: center; padding: 0 23px; border-radius: 999px; background: var(--wine); color: white; font-size: 15px; font-weight: 700; }
.dialog-visit:hover { background: var(--teal); }
.dialog-visit[hidden] { display: none; }

@media (max-width: 1100px) {
  .project-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero h1 { font-size: clamp(5.1rem, 9.4vw, 8.5rem); }
}

@media (max-width: 850px) {
  .hero { grid-template-columns: 1fr; padding-top: 80px; padding-bottom: 100px; }
  .hero-logo-wrap { justify-self: center; max-width: 510px; transform: rotate(3deg); margin-top: 25px; }
  .hero h1 { font-size: clamp(5rem, 12vw, 8rem); }
  .about-grid { grid-template-columns: 1fr; gap: 20px; }
  .about-copy { padding-top: 10px; max-width: 670px; }
}

@media (max-width: 640px) {
  .shell { width: min(100% - 38px, 1440px); }
  .hero { min-height: auto; padding-top: 75px; padding-bottom: 94px; }
  .eyebrow { font-size: 11px; letter-spacing: 0.12em; margin-bottom: 24px; }
  .hero h1 { font-size: clamp(4.2rem, 17vw, 6.6rem); }
  .hero-lead { margin: 29px 0 28px; font-size: 18px; }
  .hero-logo-wrap { margin-top: 45px; max-width: 390px; }
  .hero-bottom { bottom: 28px; font-size: 9px; }
  .portfolio-section { padding: 80px 0 95px; }
  .section-heading { display: block; margin-bottom: 38px; }
  .section-heading h2 { font-size: clamp(4.1rem, 16vw, 6rem); }
  .project-grid { grid-template-columns: 1fr; gap: 12px; }
  .project-grid > .project-card:last-child { grid-column: span 1; }
  .project-card { min-height: 360px; padding: 22px; }
  .card-name { font-size: clamp(3rem, 12vw, 4.5rem); }
  .about-section { padding: 85px 0 92px; }
  .about-grid h2 { font-size: clamp(3.25rem, 12vw, 5rem); }
  .about-copy p { font-size: 18px; }
  .explore-section { padding-block: 90px 105px; }
  .explore-section h2 { font-size: clamp(3.3rem, 11.3vw, 5rem); }
  .outbound-list a { min-height: 75px; }
  .outbound-list a span:first-child { font-size: 26px; }
  .outbound-list a span:last-child { font-size: 12px; }
  .footer-inner { min-height: 120px; flex-wrap: wrap; padding-block: 25px; }
  .footer-inner p { order: 3; flex-basis: 100%; }
  .dialog-layout { grid-template-columns: 1fr; }
  .dialog-art { min-height: 245px; padding: 25px; }
  .dialog-art-label { font-size: 3.6rem; }
  .dialog-content { padding: 65px 25px 35px; }
  .dialog-close { top: 14px; right: 14px; }
  .dialog-content h2 { font-size: 3.5rem; }
  .dialog-description { font-size: 18px; margin-bottom: 30px; }
  .dialog-visit { order: 1; margin-bottom: 22px; }
  .dialog-meta { order: 2; margin: 0; }
}

@media (prefers-reduced-motion: reduce) {
  :root { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
