:root {
  --color-base: #f6f6f6;
  --color-white: #ffffff;
  --color-purple: #2b1047;
  --color-teal: #217a88;
  --color-orange: #c83a1d;
  --color-text: #121212;
  --color-muted: #666666;
  --color-line: #ded9e7;
  --shadow-soft: 0 22px 60px rgba(43, 16, 71, 0.11);
  --shadow-orange: 0 18px 36px rgba(200, 58, 29, 0.22);
  --radius-card: 8px;
  --max-width: 1220px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  margin: 0;
  padding-top: 86px;
  background: var(--color-base);
  color: var(--color-text);
  font-family: Montserrat, Poppins, Arial, Helvetica, sans-serif;
  line-height: 1.45;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 14px;
  z-index: -1;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(255, 255, 255, 0.88));
  border-radius: 22px;
  box-shadow: 0 22px 80px rgba(18, 18, 18, 0.08);
}

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

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

button,
input,
textarea {
  font: inherit;
}

.section-shell {
  width: min(var(--max-width), calc(100% - 88px));
  margin: 0 auto;
  scroll-margin-top: 106px;
}

.site-header {
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  z-index: 20;
  background: rgba(246, 246, 246, 0.9);
  border-bottom: 1px solid rgba(43, 16, 71, 0.08);
  backdrop-filter: blur(16px);
  box-shadow: 0 12px 34px rgba(43, 16, 71, 0.06);
}

.navbar {
  width: min(var(--max-width), calc(100% - 88px));
  min-height: 86px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 240px 1fr auto;
  align-items: center;
  gap: 22px;
}

.brand,
.footer-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-symbol {
  width: 42px;
  height: 42px;
  object-fit: contain;
}

.brand-word {
  width: 188px;
  height: 46px;
  object-fit: contain;
  object-position: left center;
}

.nav-menu {
  justify-self: center;
  display: flex;
  align-items: center;
  gap: 30px;
  color: var(--color-text);
  font-size: 0.92rem;
  font-weight: 800;
}

.nav-menu a {
  position: relative;
  padding: 8px 0;
}

.nav-menu a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 2px;
  background: var(--color-purple);
  transition: width 0.2s ease;
}

.nav-menu a:hover::after,
.nav-menu a:focus-visible::after,
.nav-menu a.is-active::after {
  width: 100%;
}

.nav-menu a:hover,
.nav-menu a:focus-visible,
.nav-menu a.is-active {
  color: var(--color-purple);
}

.button {
  min-height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 1px solid transparent;
  border-radius: var(--radius-card);
  padding: 0 25px;
  cursor: pointer;
  font-weight: 900;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.button:hover,
.button:focus-visible {
  transform: translateY(-2px);
}

.button-primary {
  color: var(--color-white);
  background: var(--color-orange);
  box-shadow: var(--shadow-orange);
}

.button-outline {
  min-width: 198px;
  color: var(--color-purple);
  background: rgba(255, 255, 255, 0.78);
  border-color: rgba(43, 16, 71, 0.26);
}

.button-icon {
  width: 28px;
  height: 28px;
  display: inline-grid;
  place-items: center;
  background: var(--color-white);
  border-radius: 6px;
  line-height: 1;
  overflow: hidden;
}

.button-icon img {
  width: 20px;
  height: 20px;
  object-fit: contain;
}

.button-line-icon {
  width: 24px;
  height: 24px;
  display: inline-grid;
  place-items: center;
  color: var(--color-purple);
}

.button-line-icon svg,
.info-icon svg,
.track-icon svg {
  width: 100%;
  height: 100%;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.menu-toggle {
  width: 44px;
  height: 44px;
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: var(--color-white);
  border: 1px solid rgba(43, 16, 71, 0.22);
  border-radius: var(--radius-card);
  box-shadow: 0 8px 20px rgba(43, 16, 71, 0.08);
}

.menu-toggle span {
  width: 22px;
  height: 2px;
  margin: 0 auto;
  background: var(--color-purple);
}

.hero {
  position: relative;
  min-height: 498px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 470px;
  align-items: center;
  gap: 42px;
  padding: 54px 0 34px;
  background-image: url("../assets/hero-hacktitud-bg-web.png");
  background-repeat: no-repeat;
  background-position: center right;
  background-size: min(100%, 1220px) auto;
}

.hero-content {
  position: relative;
  z-index: 3;
}

.eyebrow,
.section-kicker {
  width: fit-content;
  margin: 0 0 16px;
  color: var(--color-purple);
  background: rgba(43, 16, 71, 0.08);
  border-radius: 999px;
  padding: 7px 14px;
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.section-kicker {
  color: var(--color-teal);
  background: transparent;
  padding: 0;
  margin-bottom: 8px;
}

.hero h1 {
  max-width: 760px;
  margin: 0;
  color: var(--color-purple);
  font-size: clamp(4.6rem, 7.1vw, 6.6rem);
  line-height: 0.92;
  letter-spacing: 0;
  white-space: nowrap;
}

.hero-year {
  color: var(--color-orange);
}

.hero-copy {
  max-width: 600px;
  margin: 22px 0 28px;
  color: #57515e;
  font-size: clamp(1.15rem, 1.7vw, 1.32rem);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.hero-visual {
  position: relative;
  min-height: 408px;
  display: grid;
  place-items: center;
  overflow: visible;
}

@media (min-width: 861px) {
  .hero-visual {
    visibility: hidden;
  }
}

.hero-visual::before {
  content: "";
  position: absolute;
  width: 155px;
  height: 300px;
  left: 52px;
  top: 48px;
  background: linear-gradient(160deg, rgba(43, 16, 71, 0.16), rgba(43, 16, 71, 0.04));
  clip-path: polygon(0 18%, 100% 0, 100% 100%, 0 82%);
}

.hero-visual img {
  position: absolute;
  z-index: 2;
  right: -34px;
  bottom: -22px;
  width: 525px;
  max-width: none;
  filter: drop-shadow(0 24px 28px rgba(43, 16, 71, 0.2));
}

.hero-mark {
  position: absolute;
  z-index: 1;
  left: 22px;
  top: 8px;
  color: rgba(43, 16, 71, 0.08);
  font-size: 320px;
  font-weight: 900;
  line-height: 1;
}

.quick-info {
  position: relative;
  z-index: 5;
  margin-top: -20px;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--color-line);
  border-radius: var(--radius-card);
  box-shadow: 0 18px 46px rgba(43, 16, 71, 0.08);
}

.info-card {
  min-height: 78px;
  display: flex;
  gap: 14px;
  align-items: center;
  padding: 16px 20px;
  border-right: 1px solid var(--color-line);
}

.info-card:last-child {
  border-right: 0;
}

.info-icon {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  color: var(--color-purple);
}

.info-icon svg {
  width: 28px;
  height: 28px;
  stroke-width: 2.4;
}

.info-card h2 {
  margin: 0 0 3px;
  color: var(--color-purple);
  font-size: 0.75rem;
  text-transform: uppercase;
}

.info-card p,
.section-intro p,
.track-card p,
.prize-card p,
.timeline-item p,
.faq-answer p {
  margin: 0;
  color: var(--color-muted);
}

.tracks,
.prizes,
.agenda,
.faq,
.contact {
  padding-top: 42px;
}

.tracks,
.prizes,
.agenda {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  gap: 28px;
  align-items: start;
}

.section-intro {
  max-width: 420px;
  margin: 0;
}

.section-intro h2 {
  margin: 0 0 10px;
  color: var(--color-purple);
  font-size: clamp(2rem, 3.2vw, 2.55rem);
  line-height: 0.98;
}

.track-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.track-card {
  position: relative;
  min-height: 150px;
  display: grid;
  grid-template-columns: 72px 1fr;
  grid-template-areas:
    "icon title"
    "icon copy";
  column-gap: 18px;
  align-items: center;
  padding: 22px 22px 24px;
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid var(--color-line);
  border-radius: var(--radius-card);
  box-shadow: 0 12px 34px rgba(18, 18, 18, 0.04);
  overflow: hidden;
}

.track-card::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 7px;
  background: var(--track-color);
}

.track-icon {
  grid-area: icon;
  width: 66px;
  height: 66px;
  display: grid;
  place-items: center;
  align-self: start;
  color: var(--color-white);
  background: var(--track-color);
  clip-path: polygon(50% 2%, 92% 25%, 92% 75%, 50% 98%, 8% 75%, 8% 25%);
  filter: drop-shadow(0 9px 10px rgba(43, 16, 71, 0.16));
}

.track-icon svg {
  width: 32px;
  height: 32px;
}

.track-card h3,
.prize-card h3,
.timeline-item h3 {
  margin: 0;
  color: var(--color-purple);
  text-transform: uppercase;
  font-size: 0.9rem;
}

.track-card h3 {
  grid-area: title;
  align-self: end;
}

.track-card p {
  grid-area: copy;
  align-self: start;
  font-size: 0.85rem;
}

.teal-line {
  --track-color: var(--color-teal);
}

.purple-line {
  --track-color: var(--color-purple);
}

.orange-line {
  --track-color: var(--color-orange);
}

.prize-carousel {
  position: relative;
  min-width: 0;
}

.prize-panel {
  display: flex;
  gap: 0;
  min-width: 0;
  background: linear-gradient(90deg, rgba(43, 16, 71, 0.08), rgba(255, 255, 255, 0.96));
  border: 1px solid var(--color-line);
  border-radius: var(--radius-card);
  overflow-x: auto;
  overflow-y: hidden;
  scroll-behavior: smooth;
  scroll-snap-type: x mandatory;
  scrollbar-width: thin;
}

.prize-card {
  flex: 0 0 285px;
  min-height: 132px;
  display: grid;
  grid-template-columns: 112px 1fr;
  align-items: center;
  gap: 18px;
  padding: 18px 22px;
  border-right: 1px solid var(--color-line);
  scroll-snap-align: start;
}

.prize-card:last-child {
  border-right: 0;
}

.prize-card img {
  width: 108px;
  height: 106px;
  object-fit: contain;
  filter: drop-shadow(0 10px 12px rgba(43, 16, 71, 0.16));
}

.prize-card p,
.timeline-item p {
  font-size: 0.88rem;
}

.carousel-button {
  position: absolute;
  top: 50%;
  z-index: 3;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(43, 16, 71, 0.16);
  border-radius: 50%;
  color: var(--color-purple);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 12px 26px rgba(43, 16, 71, 0.14);
  cursor: pointer;
  font-size: 1.8rem;
  font-weight: 900;
  line-height: 1;
  transform: translateY(-50%);
}

.carousel-prev {
  left: -18px;
}

.carousel-next {
  right: -18px;
}

.agenda {
  border-top: 1px solid var(--color-line);
  margin-top: 14px;
  padding-top: 28px;
}

.timeline {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  padding-top: 10px;
}

.timeline::before {
  content: "";
  position: absolute;
  top: 34px;
  right: 16%;
  left: 16%;
  height: 2px;
  background: var(--color-line);
}

.timeline-item {
  position: relative;
  z-index: 1;
  min-height: 92px;
  display: grid;
  grid-template-columns: 58px 1fr;
  gap: 14px;
  align-items: center;
  background: transparent;
}

.timeline-dot {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  color: var(--color-white);
  background: var(--color-teal);
  border-radius: 50%;
  font-weight: 900;
}

.timeline-dot.accent {
  background: var(--color-orange);
}

.faq,
.contact {
  padding-top: 58px;
}

.faq .section-intro,
.contact .section-intro {
  margin-bottom: 24px;
}

.faq-list {
  display: grid;
  gap: 12px;
}

.faq-item {
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--color-line);
  border-radius: var(--radius-card);
  overflow: hidden;
}

.faq-question {
  width: 100%;
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 22px;
  color: var(--color-purple);
  background: transparent;
  border: 0;
  cursor: pointer;
  font-weight: 900;
  text-align: left;
}

.faq-question::after {
  content: "+";
  color: var(--color-orange);
  font-size: 1.5rem;
}

.faq-item.is-open .faq-question::after {
  content: "-";
}

.faq-answer {
  display: none;
  padding: 0 22px 20px;
}

.faq-item.is-open .faq-answer {
  display: block;
}

.registration-form {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
  padding: 28px;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid var(--color-line);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-soft);
}

.registration-form label {
  display: grid;
  gap: 8px;
  color: var(--color-purple);
  font-weight: 900;
}

.registration-form input,
.registration-form textarea {
  width: 100%;
  border: 1px solid var(--color-line);
  border-radius: var(--radius-card);
  padding: 13px 14px;
  color: var(--color-text);
  background: var(--color-base);
}

.registration-form input:focus,
.registration-form textarea:focus {
  outline: 3px solid rgba(33, 122, 136, 0.18);
  border-color: var(--color-teal);
}

.full-field {
  grid-column: 1 / -1;
}

.form-message {
  min-height: 24px;
  color: var(--color-teal);
  font-weight: 800;
}

.form-message.error {
  color: var(--color-orange);
}

.site-footer {
  margin-top: 64px;
  border-top: 1px solid var(--color-line);
  background: rgba(255, 255, 255, 0.92);
}

.footer-inner {
  min-height: 82px;
  display: grid;
  grid-template-columns: 150px 1fr auto auto;
  align-items: center;
  gap: 28px;
  color: var(--color-muted);
  font-size: 0.86rem;
}

.footer-brand .brand-symbol {
  width: 30px;
  height: 30px;
}

.footer-brand .brand-word {
  width: 104px;
  height: 28px;
}

.footer-links,
.social-links {
  display: flex;
  gap: 18px;
  align-items: center;
}

.social-links span {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  color: var(--color-purple);
  border: 1px solid var(--color-line);
  border-radius: 50%;
  font-size: 0.75rem;
  font-weight: 900;
}

@media (max-width: 1120px) {
  .section-shell,
  .navbar {
    width: min(var(--max-width), calc(100% - 48px));
  }

  .navbar {
    grid-template-columns: 210px 1fr auto;
  }

  .brand-word {
    width: 164px;
  }

  .hero {
    grid-template-columns: minmax(0, 1fr) 390px;
  }

  .hero h1 {
    white-space: normal;
  }

  .hero-visual img {
    right: -58px;
    width: 490px;
  }

  .tracks,
  .prizes,
  .agenda {
    grid-template-columns: 1fr;
  }

  .track-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 860px) {
  body {
    padding-top: 74px;
  }

  body::before {
    inset: 0;
    border-radius: 0;
  }

  .navbar {
    min-height: 74px;
    grid-template-columns: 1fr auto;
    width: min(calc(100% - 40px), var(--max-width));
  }

  .brand {
    min-width: 0;
  }

  .brand-symbol {
    width: 34px;
    height: 34px;
  }

  .brand-word {
    width: min(150px, 42vw);
  }

  .menu-toggle {
    display: flex;
    justify-self: end;
    position: fixed;
    top: 15px;
    right: 20px;
    z-index: 40;
    background: rgba(255, 255, 255, 0.98);
    border-color: rgba(43, 16, 71, 0.55);
  }

  .nav-menu {
    position: absolute;
    top: 74px;
    right: 24px;
    left: 24px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 16px;
    background: var(--color-white);
    border: 1px solid var(--color-line);
    border-radius: var(--radius-card);
    box-shadow: var(--shadow-soft);
  }

  .nav-menu.is-open {
    display: flex;
  }

  .nav-menu a {
    padding: 14px 8px;
  }

  .header-cta {
    display: none;
  }

  .hero {
    grid-template-columns: 1fr;
    min-height: 620px;
    gap: 18px;
    padding-top: 30px;
    padding-bottom: 0;
    background-image: url("../assets/hero-hacktitud-bg-web.png");
    background-position: 58% bottom;
    background-size: auto 100%;
    overflow: hidden;
  }

  .hero::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(
      90deg,
      rgba(255, 255, 255, 0.98) 0%,
      rgba(255, 255, 255, 0.9) 48%,
      rgba(255, 255, 255, 0.16) 76%,
      rgba(255, 255, 255, 0) 100%
    );
    pointer-events: none;
  }

  .hero h1 {
    max-width: 305px;
    font-size: clamp(3.1rem, 15vw, 4.35rem);
    line-height: 0.95;
    white-space: normal;
  }

  .hero-name {
    display: block;
  }

  .hero-year {
    display: block;
  }

  .hero-copy {
    max-width: 270px;
    margin: 18px 0 22px;
    font-size: 1.05rem;
  }

  .hero-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    max-width: 330px;
  }

  .hero-actions .button {
    width: 100%;
    min-height: 50px;
    padding-inline: 14px;
    white-space: nowrap;
  }

  .hero-visual {
    display: none;
  }

  .quick-info,
  .timeline {
    grid-template-columns: repeat(2, 1fr);
  }

  .quick-info {
    margin-top: 0;
  }

  .info-card:nth-child(2n) {
    border-right: 0;
  }

  .timeline::before {
    display: none;
  }

  .footer-inner {
    grid-template-columns: 1fr;
    justify-items: start;
    padding: 26px 0;
  }

  .carousel-prev {
    left: 8px;
  }

  .carousel-next {
    right: 8px;
  }
}

@media (max-width: 640px) {
  .section-shell,
  .navbar {
    width: min(calc(100% - 40px), var(--max-width));
  }

  .eyebrow {
    max-width: 100%;
    font-size: 0.68rem;
    line-height: 1.2;
    white-space: normal;
  }

  .hero h1 {
    font-size: clamp(2.85rem, 14.6vw, 3.55rem);
  }

  .hero-copy {
    max-width: 100%;
    font-size: 1rem;
  }

  .hero-actions {
    grid-template-columns: 1fr;
  }

  .hero-actions .button {
    max-width: 100%;
  }

  .button-outline {
    min-width: 0;
  }

  .quick-info,
  .track-grid,
  .timeline,
  .registration-form {
    grid-template-columns: 1fr;
  }

  .info-card,
  .info-card:nth-child(2n),
  .prize-card {
    border-right: 0;
    border-bottom: 1px solid var(--color-line);
  }

  .info-card:last-child,
  .prize-card:last-child {
    border-bottom: 0;
  }

  .track-card {
    min-height: 170px;
    grid-template-columns: 72px 1fr;
    padding: 20px 18px 24px;
  }

  .prize-card {
    grid-template-columns: 98px 1fr;
    padding: 18px;
    flex-basis: min(86vw, 330px);
  }

  .prize-card img {
    width: 94px;
    height: 94px;
  }

  .hero {
    min-height: 650px;
    background-position: 58% bottom;
  }

  .registration-form {
    padding: 20px;
  }

  .footer-links {
    flex-wrap: wrap;
  }
}
