/* =========================================================
   STUDIO HUNUC HUAR
   CASE STUDY — DISTRIBUTION ASSESSMENT
   ========================================================= */


/* =========================================================
   VARIABLES
   ========================================================= */

:root {
  --navy: #0b1d33;
  --navy-soft: #132b49;
  --blue: #1f5f9c;
  --blue-light: #e9f1f8;

  --white: #ffffff;
  --off-white: #f7f9fb;

  --text: #182536;
  --muted: #607083;
  --border: #d9e1e8;

  --header-height: 80px;
  --max-width: 1180px;
}


/* =========================================================
   RESET
   ========================================================= */

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scroll-snap-type: y mandatory;
}

body {
  font-family: Arial, Helvetica, sans-serif;
  color: var(--text);
  background: var(--white);
  line-height: 1.5;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font-family: inherit;
}


/* =========================================================
   GLOBAL CONTAINER
   ========================================================= */

.container {
  width: min(100% - 48px, var(--max-width));
  margin: 0 auto;
}


/* =========================================================
   HEADER
   ========================================================= */

.site-header {
  position: fixed;
  height: var(--header-height);
  top: 0;
  left: 0;
  right: 0;
  z-index: 200;
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(8px);
}

.nav {
  min-height: 82px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 13px;
}

.brand-mark {
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  clip-path: none;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.05;
}

.brand-kicker {
  font-size: 8px;
  letter-spacing: 1.2px;
  color: var(--muted);
  margin-bottom: 5px;
}

.brand-name {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--navy);
}

.brand-area {
  display: flex;
  align-items: center;
  gap: 24px;
}


/* =========================================================
   LANGUAGE SELECTOR
   ========================================================= */

.nav-links {
  display: flex;
  align-items: center;
}

.language-selector {
  display: flex;
  align-items: center;
  gap: 7px;
  padding-left: 18px;
  border-left: 1px solid var(--border);
}

.language-button {
  width: 34px;
  height: 34px;

  border: 1px solid transparent;
  border-radius: 50%;

  background: transparent;

  cursor: pointer;

  font-size: 18px;

  display: flex;
  align-items: center;
  justify-content: center;

  transition:
    background 0.2s ease,
    border-color 0.2s ease,
    transform 0.2s ease;
}

.language-button:hover {
  background: var(--blue-light);
  transform: translateY(-1px);
}

.language-button.active {
  border-color: var(--border);
  background: var(--blue-light);
}


/* =========================================================
   MOBILE MENU BUTTON
   ========================================================= */

.nav-toggle {
  display: none;

  width: 42px;
  height: 42px;

  border: 0;
  background: transparent;

  cursor: pointer;
}

.nav-toggle span {
  display: block;

  width: 22px;
  height: 2px;

  margin: 5px auto;

  background: var(--navy);
}


/* =========================================================
   SECTION INDICATORS
   ========================================================= */

.section-indicators {
  position: fixed;

  right: 28px;
  top: 50%;

  transform: translateY(-50%);

  display: flex;
  flex-direction: column;
  gap: 11px;

  z-index: 900;
}

.section-indicator {
  width: 8px;
  height: 8px;

  border-radius: 50%;

  background: #c5ced8;

  transition:
    transform 0.25s ease,
    background 0.25s ease;
}

.section-indicator:hover {
  transform: scale(1.35);
}

.section-indicator.active {
  background: var(--blue);
  transform: scale(1.4);
}


/* =========================================================
   PAGE SECTIONS
   ========================================================= */

.page-section {
  position: relative;

  min-height: 100vh;
  min-height: 100svh;

  display: flex;
  align-items: center;

  scroll-snap-align: start;
  scroll-snap-stop: normal;
}


/* =========================================================
   GENERAL SECTION STRUCTURE
   ========================================================= */

.section {
  padding: 80px 0;
}

.intro {
  background: var(--white);
}

.intro:nth-of-type(even) {
  background: var(--off-white);
}

.intro-grid {
  width: min(100% - 48px, var(--max-width));
}

.intro-text {
  width: 100%;
  max-width: 1050px;
  margin: 0 auto;
}

.discovery {
  background: #071525;
}

.discovery .eyebrow {
  color: #8db9df;
}

.discovery .intro-text h2 {
  color: var(--white);
}

.discovery .intro-text p {
  color: #c7d3df;
}


/* =========================================================
   HERO
   ========================================================= */

.hero {
  background:
    linear-gradient(
      135deg,
      var(--off-white) 0%,
      var(--white) 60%,
      var(--blue-light) 100%
    );

  padding-top: var(--header-height);
}

.hero-grid {
  width: min(100% - 48px, var(--max-width));
}

.hero-copy {
  max-width: 850px;
}

.eyebrow {
  margin-bottom: 18px;

  font-size: 12px;
  font-weight: 700;

  letter-spacing: 2.5px;

  color: var(--blue);
}

.hero h1 {
  max-width: 900px;

  margin-bottom: 28px;

  font-size: clamp(42px, 5vw, 72px);
  line-height: 1.02;

  letter-spacing: -2px;

  color: var(--navy);
}

.hero h1 span {
  display: block;
}

.hero h1 span:last-child {
  margin-top: 8px;

  color: var(--blue);

  font-size: 0.65em;
  letter-spacing: -0.5px;
}

.hero-description {
  max-width: 780px;

  color: var(--muted);

  font-size: 18px;
  line-height: 1.75;
}


/* =========================================================
   GENERAL HEADINGS
   ========================================================= */

.intro-text h2 {
  max-width: 850px;

  margin-bottom: 22px;

  color: var(--navy);

  font-size: clamp(32px, 4vw, 48px);
  line-height: 1.08;

  letter-spacing: -1.2px;
}

.section-description {
  max-width: 850px;

  margin-bottom: 42px;

  color: var(--muted);

  font-size: 17px;
  line-height: 1.7;
}


/* =========================================================
   ARCHITECTURE DIAGRAMS
   ========================================================= */

.architecture-diagram {
  width: 100%;
  max-width: 850px;

  margin: 35px auto 0;

  display: flex;
  flex-direction: column;
  align-items: center;
}


/* ---------- Nodes ---------- */

.architecture-layer {
  width: 100%;

  display: flex;
  justify-content: center;
}

.architecture-node {
  width: min(100%, 300px);

  min-height: 150px;
  padding: 20px 22px;

  background: var(--white);

  border: 2px solid var(--blue);

  border-radius: 6px;

  box-shadow: 0 8px 24px rgba(11, 29, 51, 0.06);

  display: flex;
  flex-direction: column;
  justify-content: center;

  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease;
}

.architecture-node:hover {
  transform: translateY(-2px);

  box-shadow: 0 12px 30px rgba(11, 29, 51, 0.1);
}

.architecture-node-type {
  margin-bottom: 5px;

  color: var(--blue);

  font-size: 10px;
  font-weight: 700;

  letter-spacing: 1.8px;
}

.architecture-node strong {
  margin-bottom: 4px;

  color: var(--navy);

  font-size: 19px;
}

.architecture-node small {
  color: var(--muted);

  font-size: 13px;
  line-height: 1.4;
}


/* ---------- Connectors ---------- */

.architecture-connector {
  height: 45px;

  display: flex;
  align-items: center;
  justify-content: center;
}

.architecture-connector span {
  position: relative;

  display: block;

  width: 1px;
  height: 100%;

  background: #b9c6d3;
}

.architecture-connector span::after {
  content: "";

  position: absolute;

  bottom: 0;
  left: 50%;

  width: 7px;
  height: 7px;

  border-right: 1px solid var(--blue);
  border-bottom: 1px solid var(--blue);

  transform: translateX(-50%) rotate(45deg);
}


/* =========================================================
   PROPOSED ARCHITECTURE
   ========================================================= */

.architecture-diagram-proposed {
  max-width: 1050px;
}


/* ---------- Branch ---------- */

.architecture-branch {
   width: 100%;

  display: grid;
  grid-template-columns: repeat(3, 1fr);

  gap: 35px;

  position: relative;

  margin-top: 0;
}

.architecture-branch::before {
  content: "";

  position: absolute;

  top: 0;
  left: calc(16.666% + 10px);
  right: calc(16.666% + 10px);

  height: 1px;

  background: #b9c6d3;
}

.architecture-branch::after {
  content: "";

  position: absolute;

  bottom: -18px;
  left: calc(16.666% + 10px);
  right: calc(16.666% + 10px);

  height: 1px;

  background: #b9c6d3;
}

.architecture-branch-item {
  min-width: 0;

  display: flex;
  flex-direction: column;
  align-items: center;

  position: relative;
}

.architecture-branch-item::after {
  content: "";

  position: absolute;

  bottom: -18px;
  left: 50%;

  width: 1px;
  height: 18px;

  background: #b9c6d3;

  transform: translateX(-50%);
}

.architecture-connector-branch {
  height: 30px;

  margin-top: 0;
}

.architecture-branch-item .architecture-node {
  width: min(100%, 300px);
}


/* Proposed core */

.architecture-branch-item:first-child .architecture-node:first-of-type {
  border-left-color: var(--navy);
}


/* Proposed reports */

.architecture-branch-item:last-child .architecture-node:first-of-type {
  border-left-color: var(--blue);
}


/* =========================================================
   ARCHITECTURE NOTE
   ========================================================= */

.architecture-note {
  max-width: 850px;

  margin: 32px auto 0;
  padding: 18px 22px;

  border-left: 3px solid var(--blue);

  background: var(--blue-light);

  color: var(--navy);

  font-size: 14px;
  line-height: 1.6;
}


/* =========================================================
   FINDINGS
   ========================================================= */

.findings-list {
  max-width: 950px;

  display: flex;
  flex-direction: column;

  border-top: 1px solid var(--border);
}

.finding {
  display: grid;
  grid-template-columns: 70px 1fr;

  gap: 25px;

  padding: 25px 0;

  border-bottom: 1px solid var(--border);
}

.finding-number {
  color: var(--blue);

  font-size: 27px;
  font-weight: 700;

  letter-spacing: -1px;
}

.finding-content h3 {
  margin-bottom: 7px;

  color: var(--navy);

  font-size: 19px;
  line-height: 1.3;
}

.finding-content p {
  max-width: 800px;

  color: var(--muted);

  font-size: 15px;
  line-height: 1.6;
}


/* =========================================================
   TECHNICAL ANALYSIS
   ========================================================= */

.analysis-list {
  max-width: 950px;

  display: flex;
  flex-direction: column;

  border-top: 1px solid var(--border);
}

.analysis-step {
  display: grid;
  grid-template-columns: 70px 1fr;

  gap: 25px;

  padding: 25px 0;

  border-bottom: 1px solid var(--border);
}

.analysis-number {
  color: var(--blue);

  font-size: 27px;
  font-weight: 700;

  letter-spacing: -1px;
}

.analysis-content h3 {
  margin-bottom: 7px;

  color: var(--navy);

  font-size: 19px;
  line-height: 1.3;
}

.analysis-content p {
  max-width: 800px;

  color: var(--muted);

  font-size: 15px;
  line-height: 1.6;
}


/* =========================================================
   ROADMAP
   ========================================================= */

.roadmap {
  max-width: 900px;

  position: relative;

  margin-top: 15px;
}

.roadmap::before {
  content: "";

  position: absolute;

  top: 12px;
  bottom: 12px;
  left: 20px;

  width: 1px;

  background: var(--border);
}

.roadmap-step {
  position: relative;

  display: grid;
  grid-template-columns: 42px 1fr;

  gap: 22px;

  padding-bottom: 28px;
}

.roadmap-step:last-child {
  padding-bottom: 0;
}

.roadmap-marker {
  position: relative;

  z-index: 1;

  width: 42px;
  height: 42px;

  border: 1px solid var(--border);
  border-radius: 50%;

  background: var(--white);

  display: flex;
  align-items: center;
  justify-content: center;
}

.roadmap-marker span {
  color: var(--blue);

  font-size: 12px;
  font-weight: 700;
}

.roadmap-content {
  padding-top: 3px;
}

.roadmap-phase {
  display: block;

  margin-bottom: 4px;

  color: var(--blue);

  font-size: 10px;
  font-weight: 700;

  letter-spacing: 1.8px;
}

.roadmap-content h3 {
  margin-bottom: 6px;

  color: var(--navy);

  font-size: 20px;
}

.roadmap-content p {
  max-width: 760px;

  color: var(--muted);

  font-size: 15px;
  line-height: 1.6;
}


/* =========================================================
   FOOTER
   ========================================================= */

.footer {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  color: #b9c7d5;
  background: #071525;
  padding: 22px 0;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 30px;
}

.footer strong,
.footer span {
  display: block;
}

.footer strong {
  color: var(--white);
  font-size: 13px;
  letter-spacing: 1px;
}

.footer span,
.footer p {
  margin: 5px 0 0;
  font-size: 11px;
}

.footer-social {
  display: flex;
  align-items: center;
  gap: 10px;
}

.footer-social-link {
  width: 34px;
  height: 34px;

  display: flex;
  align-items: center;
  justify-content: center;

  color: #b9c7d5;

  border: 1px solid rgba(185, 199, 213, 0.35);
  border-radius: 50%;

  transition:
    color 0.2s ease,
    border-color 0.2s ease,
    background 0.2s ease,
    transform 0.2s ease;
}

.footer-social-link:hover {
  color: var(--white);
  border-color: var(--white);
  background: rgba(255, 255, 255, 0.08);
  transform: translateY(-2px);
}

.footer-social-link svg {
  width: 17px;
  height: 17px;
  display: block;
}


/* =========================================================
   RESPONSIVE — TABLET
   ========================================================= */

@media (max-width: 900px) {

  .section-indicators {
    right: 18px;
  }

  .architecture-branch {
    gap: 20px;
  }

  .footer-inner {
    padding-right: 20px;
  }
}


/* =========================================================
   RESPONSIVE — MOBILE
   ========================================================= */

@media (max-width: 680px) {

  /* ---------- Global ---------- */

  html {
    scroll-snap-type: y mandatory;
  }

  .container,
  .hero-grid,
  .intro-grid {
    width: min(100% - 32px, var(--max-width));
  }

  .page-section {
    min-height: calc(100vh - 70px);
    min-height: calc(100svh - 70px);

    scroll-margin-top: 70px;

    align-items: flex-start;
  }

  .section {
    padding: 55px 0 45px;
  }


  /* ---------- Header ---------- */

  .site-header {
    height: 70px;
  }

  .brand {
    gap: 9px;
  }

  .brand-mark {
    width: 42px;
    height: 42px;
  }

  .brand-kicker {
    font-size: 7px;
    letter-spacing: 1px;
  }

  .brand-name {
    font-size: 12px;
    letter-spacing: 0.7px;
  }

  .nav-toggle {
    display: block;
  }

  .nav-links {
    display:none;
  }

  .nav-links.open {
    display:flex !important;
    position:absolute;
    top:70px;
    left:0;
    right:0;
    padding:18px 16px 24px;
    flex-direction:column;
    align-items:stretch;
    gap:4px;
    background:var(--white);
    border-bottom:1px solid var(--border);
  }

  .nav-links.open .language-selector {
    justify-content:center;
  }


  /* ---------- Indicators ---------- */

  .section-indicators {
    right: 9px;

    gap: 8px;
  }

  .section-indicator {
    width: 6px;
    height: 6px;
  }


  /* ---------- Hero ---------- */

  .hero {
    min-height: calc(100vh - 70px);
    min-height: calc(100svh - 70px);

    padding-top: 100px;
    padding-bottom: 120px;
  }

  .hero-copy {
    max-width: 100%;
  }

  .eyebrow {
    margin-bottom: 12px;

    font-size: 9px;

    letter-spacing: 1.8px;
  }

  .hero h1 {
    margin-bottom: 100px;

    font-size: clamp(35px, 11vw, 52px);

    letter-spacing: -1.5px;
  }

  .hero h1 span:last-child {
    margin-top: 5px;

    font-size: 0.62em;
  }

  .hero-description {
    font-size: 15px;
    line-height: 1.6;
  }


  /* ---------- General text ---------- */

  .intro-text h2 {
    margin-bottom: 16px;

    font-size: clamp(28px, 8vw, 40px);

    letter-spacing: -0.8px;
  }

  .section-description {
    margin-bottom: 28px;

    font-size: 14px;
    line-height: 1.6;
  }


  /* ---------- Architecture ---------- */

  .architecture-diagram {
    margin-top: 25px;
  }

  .architecture-node {
    width: min(100%, 180px);
    min-height: 90px;
    padding: 12px 14px;
  }

  .architecture-branch-item .architecture-node {
    width: 180px;
  }

  .architecture-node-type {
    font-size: 8px;

    letter-spacing: 1.4px;
  }

  .architecture-node strong {
    font-size: 16px;
  }

  .architecture-node small {
    font-size: 11px;
  }

  .architecture-connector {
    height: 28px;
  }


  /* ---------- Proposed architecture ---------- */

  .architecture-branch {
    grid-template-columns: repeat(3, 1fr);

    gap: 20px;
  }

  .architecture-branch::before {
    display: block;
  }

  .architecture-branch::after {
    display: block;
  }

  .architecture-connector-branch {
    height: 25px;

    margin-top: 0;
  }

  .architecture-note {
    margin-top: 24px;
    padding: 14px 16px;

    font-size: 12px;
    line-height: 1.5;
  }


  /* ---------- Findings ---------- */

  .findings-list {
    margin-top: 10px;
  }

  .finding {
    grid-template-columns: 42px 1fr;

    gap: 12px;

    padding: 17px 0;
  }

  .finding-number {
    font-size: 21px;
  }

  .finding-content h3 {
    margin-bottom: 5px;

    font-size: 16px;
  }

  .finding-content p {
    font-size: 12px;
    line-height: 1.45;
  }


  /* ---------- Analysis ---------- */

  .analysis-list {
    margin-top: 10px;
  }

  .analysis-step {
    grid-template-columns: 42px 1fr;

    gap: 12px;

    padding: 17px 0;
  }

  .analysis-number {
    font-size: 21px;
  }

  .analysis-content h3 {
    margin-bottom: 5px;

    font-size: 16px;
  }

  .analysis-content p {
    font-size: 12px;
    line-height: 1.45;
  }


  /* ---------- Roadmap ---------- */

  .roadmap {
    margin-top: 8px;
    padding-bottom: 120px;
  }

  .roadmap::before {
    left: 16px;
  }

  .roadmap-step {
    grid-template-columns: 34px 1fr;

    gap: 14px;

    padding-bottom: 22px;
  }

  .roadmap-marker {
    width: 34px;
    height: 34px;
  }

  .roadmap-marker span {
    font-size: 10px;
  }

  .roadmap-content {
    padding-top: 0;
  }

  .roadmap-phase {
    font-size: 8px;

    letter-spacing: 1.4px;
  }

  .roadmap-content h3 {
    font-size: 16px;
  }

  .roadmap-content p {
    font-size: 12px;
    line-height: 1.45;
  }


  /* ---------- Footer ---------- */

  .footer {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;

    margin-top: 0;

    padding: 16px 0;
  }

  .footer-inner {
    flex-direction: column;

    align-items: flex-start;

    gap: 12px;

    padding-right: 0;
  }

  .footer-inner > p {
    text-align: left;

    font-size: 10px;
  }
}

/* =========================================================
   FOOTER — PANTALLAS DE POCA ALTURA
   ========================================================= */

@media (max-height: 800px) {

  .footer {
    padding: 10px 0;
  }

  .footer-inner {
    gap: 15px;
  }

  .footer-inner a {
    margin-bottom: 3px;
    font-size: 11px;
  }

  .footer-inner strong {
    font-size: 11px;
  }

  .footer-inner span {
    font-size: 10px;
  }

  .footer-inner > p {
    font-size: 9px;
  }
}