/* ==========================================================================
   Pro Algorithm — Conference landing page
   ========================================================================== */

:root {
  --bg: #f7f7f7;
  --text: #000000;
  --text-body: #111111;
  --text-muted: #555a66;
  --primary: #4458f1;
  --primary-2: #6a33c5;
  --gradient: linear-gradient(90deg, var(--primary) 0%, var(--primary-2) 100%);
  --card-bg: #f9f9fb;
  --border: #e3e4ea;
  --radius: 12px;
  --shadow: 0 20px 50px rgba(68, 60, 160, 0.12);
  --font: "Inter", "Heebo", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  --container: 1200px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  line-height: 1.25;
  -webkit-font-smoothing: antialiased;
}

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

h1,
h2,
h3,
p,
ul,
ol,
figure {
  margin: 0;
  padding: 0;
}

ul,
ol {
  list-style: none;
}

.page {
  position: relative;
  overflow: hidden;
  padding-bottom: 120px;
}

.section-title {
  font-size: clamp(28px, 3vw, 40px);
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
  margin-bottom: 56px;
}

/* ---------- Corner decorations ---------- */

.deco {
  position: absolute;
  top: 0;
  z-index: 0;
  pointer-events: none;
}

.deco--top-left {
  left: 0;
  width: clamp(90px, 18vw, 260px);
}

.deco--top-right {
  right: 0;
  width: clamp(70px, 13vw, 190px);
}

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

.hero {
  position: relative;
  z-index: 1;
  max-width: var(--container);
  margin: 0 auto;
  padding: 80px 24px 0;
  text-align: center;
}

.hero__logo {
  width: min(921px, 64vw);
  margin: 0 auto;
}

.hero__title {
  margin-top: 110px;
  font-size: clamp(28px, 3vw, 40px);
  font-weight: 600;
  line-height: 1.2;
}

.hero__subtitle {
  max-width: 846px;
  margin: 24px auto 0;
  font-size: clamp(18px, 1.8vw, 24px);
  font-weight: 300;
  line-height: 1.25;
}

.details {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  max-width: 1000px;
  margin: 48px auto 0;
}

.details__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}

.details__icon {
  height: 150px;
  width: auto;
  object-fit: contain;
}

.details__text {
  max-width: 230px;
  font-size: clamp(18px, 1.7vw, 24px);
  font-weight: 700;
  line-height: 1.2;
}

/* ---------- Agenda ---------- */

.agenda {
  margin-top: 110px;
}

.agenda__list {
  display: flex;
  flex-direction: column;
}

.agenda__item {
  position: relative;
  width: 80vw;
  margin-right: 0;
  margin-left: auto;
  aspect-ratio: 1600 / 290;
}

.agenda__banner {
  position: absolute;
  inset: 0;
  background-position: center;
  background-size: 100% 100%;
  background-repeat: no-repeat;
}

.agenda__body {
  position: absolute;
  top: 50%;
  right: 16%;
  left: 12%;
  transform: translateY(-50%);
  text-align: right;
}

.agenda__title {
  font-size: clamp(18px, 1.7vw, 24px);
  font-weight: 600;
  line-height: 1.2;
  margin-bottom: 6px;
}

.agenda__text {
  font-size: clamp(16px, 1.6vw, 24px);
  font-weight: 300;
  line-height: 1.2;
}

/* ---------- Speakers ---------- */

.speakers {
  max-width: var(--container);
  margin: 110px auto 0;
  padding: 0 24px;
  display: flex;
  flex-direction: column;
  gap: 60px;
}

.speaker {
  display: grid;
  grid-template-columns: minmax(260px, 420px) 1fr;
  gap: 48px;
  align-items: center;
}

.speaker--image-left {
  grid-template-columns: 1fr minmax(260px, 420px);
}

.speaker--image-left .speaker__photo {
  order: 2;
}

.speaker__photo img {
  width: 100%;
  height: auto;
}

.speaker__info {
  text-align: right;
}

.speaker__name {
  font-size: clamp(28px, 3vw, 40px);
  font-weight: 600;
  line-height: 1.2;
}

.speaker__role {
  font-size: clamp(24px, 2.5vw, 34px);
  font-weight: 600;
  line-height: 1.2;
  margin-top: 4px;
}

.speaker__talk {
  margin-top: 16px;
  font-size: clamp(20px, 2vw, 28px);
  font-weight: 600;
  line-height: 1.25;
  color: var(--text-body);
}

.speaker__text {
  margin-top: 12px;
  font-size: clamp(16px, 1.6vw, 21px);
  font-weight: 400;
  line-height: 1.45;
  color: var(--text-body);
}

/* ---------- RSVP ---------- */

.rsvp {
  max-width: 1160px;
  margin: 110px auto 0;
  padding: 0 24px;
}

.card-wrap {
  position: relative;
}

.blob {
  position: absolute;
  z-index: 0;
  background: linear-gradient(160deg, #4f5ff2 0%, #6d3ec9 100%);
}

.blob--top {
  top: -40px;
  right: -20px;
  width: 170px;
  height: 150px;
  border-radius: 55% 45% 50% 50% / 60% 55% 45% 40%;
}

.blob--side {
  top: 32%;
  left: -50px;
  width: 110px;
  height: 150px;
  border-radius: 50%;
  opacity: 0.85;
}

.blob--bottom {
  bottom: -20px;
  right: -40px;
  width: 140px;
  height: 170px;
  border-radius: 50% 50% 45% 55%;
  opacity: 0.85;
}

.dots {
  position: absolute;
  z-index: 0;
  width: 60px;
  height: 52px;
  background-image: radial-gradient(circle, var(--primary) 3.5px, transparent 4px);
  background-size: 22px 22px;
}

.dots--card {
  top: -44px;
  left: 4px;
}

.card {
  position: relative;
  z-index: 1;
  background: var(--card-bg);
  border-radius: 20px;
  box-shadow: var(--shadow);
  padding: 56px 60px 64px;
}

.card__head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
}

.card__title {
  font-size: clamp(26px, 2.6vw, 34px);
  font-weight: 800;
  font-family: "Heebo", var(--font);
}

.card__subtitle {
  margin-top: 12px;
  font-size: 17px;
  color: var(--text-muted);
  line-height: 1.5;
}

.card__when {
  display: flex;
  gap: 28px;
  flex-shrink: 0;
  font-size: 20px;
  font-weight: 600;
  color: var(--primary);
  padding-top: 6px;
}

.card__divider {
  border: 0;
  border-top: 1px solid var(--border);
  margin: 56px 0 48px;
}

/* Form */

.rsvp-form {
  margin-top: 32px;
}

.toggle {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.toggle__btn {
  height: 60px;
  border-radius: 10px;
  border: 1.5px solid var(--border);
  background: #fff;
  color: var(--text);
  font: inherit;
  font-size: 18px;
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s, border-color 0.2s, box-shadow 0.2s;
}

.toggle__btn:hover {
  border-color: var(--primary);
}

.toggle__btn.is-active {
  background: var(--gradient);
  border-color: transparent;
  color: #fff;
  font-weight: 600;
  box-shadow: 0 8px 20px rgba(68, 88, 241, 0.25);
}

.fields {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-top: 18px;
}

.input {
  width: 100%;
  height: 60px;
  padding: 0 18px;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  background: #fff;
  font: inherit;
  font-size: 17px;
  color: var(--text);
  text-align: right;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.input::placeholder {
  color: #8d909a;
}

.input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(68, 88, 241, 0.15);
}

.input.is-invalid {
  border-color: #d93a3a;
}

.consent {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 36px;
  font-size: 16px;
  color: #3b3e46;
  cursor: pointer;
}

.consent input {
  width: 22px;
  height: 22px;
  margin: 0;
  accent-color: var(--primary);
  cursor: pointer;
  flex-shrink: 0;
}

.form-message {
  min-height: 24px;
  margin-top: 16px;
  text-align: center;
  font-size: 16px;
  font-weight: 600;
}

.form-message--success {
  color: #1d8a4e;
}

.form-message--error {
  color: #d93a3a;
}

.btn-primary {
  display: block;
  width: min(430px, 100%);
  height: 72px;
  margin: 12px auto 0;
  border: 0;
  border-radius: 12px;
  background: var(--gradient);
  color: #fff;
  font: inherit;
  font-family: "Heebo", var(--font);
  font-size: 22px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(68, 88, 241, 0.3);
  transition: transform 0.15s, box-shadow 0.15s, opacity 0.15s;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 28px rgba(68, 88, 241, 0.35);
}

.btn-primary:disabled {
  opacity: 0.6;
  cursor: wait;
  transform: none;
}

.toggle__btn:focus-visible,
.btn-primary:focus-visible,
.contact__item:focus-visible {
  outline: 3px solid rgba(68, 88, 241, 0.45);
  outline-offset: 2px;
}

/* Contact */

.contact {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 48px;
}

.contact__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 18px 16px 26px;
  border: 1.5px solid var(--border);
  border-radius: 14px;
  background: #fff;
  color: inherit;
  text-decoration: none;
  transition: border-color 0.2s, transform 0.2s;
}

.contact__item:hover {
  border-color: var(--primary);
  transform: translateY(-2px);
}

.contact__icon {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: var(--gradient);
  color: #fff;
}

.contact__icon svg {
  width: 26px;
  height: 26px;
}

.contact__label {
  margin-top: 6px;
  font-size: 19px;
  font-weight: 700;
}

.contact__value {
  font-size: 19px;
  color: #4a4d56;
}

/* ---------- Responsive ---------- */

@media (max-width: 900px) {
  .hero {
    padding-top: 110px;
  }

  .hero__logo {
    width: min(620px, 82vw);
  }

  .hero__title {
    margin-top: 64px;
  }

  .details__icon {
    height: 100px;
  }

  .agenda__item {
    width: 100%;
    aspect-ratio: auto;
    margin-bottom: 24px;
  }

  .agenda__banner {
    position: static;
    aspect-ratio: 1600 / 290;
  }

  .agenda__body {
    position: static;
    transform: none;
    padding: 12px 24px 0;
  }

  .speaker,
  .speaker--image-left {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .speaker--image-left .speaker__photo {
    order: 0;
  }

  .speaker__photo {
    width: min(360px, 90%);
    margin: 0 auto;
  }

  .card {
    padding: 40px 28px 44px;
  }

  .card__head {
    flex-direction: column-reverse;
  }

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

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

@media (max-width: 560px) {
  .page {
    padding-bottom: 80px;
  }

  .hero {
    padding: 100px 16px 0;
  }

  .deco--top-left {
    width: 80px;
  }

  .deco--top-right {
    width: 64px;
  }

  .details {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .details__item {
    gap: 12px;
  }

  .section-title {
    margin-bottom: 32px;
  }

  .agenda,
  .speakers,
  .rsvp {
    margin-top: 72px;
  }

  .speakers,
  .rsvp {
    padding: 0 16px;
  }

  .agenda__body {
    padding: 12px 16px 0;
  }

  .toggle {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .card {
    padding: 32px 20px 36px;
  }

  .card__when {
    font-size: 17px;
  }

  .blob--side {
    display: none;
  }

  .blob--top {
    width: 110px;
    height: 100px;
    right: -16px;
  }

  .blob--bottom {
    width: 90px;
    height: 110px;
    right: -16px;
  }
}
