/**
 * School Partnership Program — protected case study gate
 * Standalone module; pairs with Project_1.html. Tokens align with styles.css.
 */

.gate-body {
  margin: 0;
  min-height: 100vh;
  color: var(--color-text);
  background-color: #ffffff;
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: var(--leading-normal);
}

.gate-bg {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 0;
  background: #ffffff;
}

.gate-page {
  position: relative;
  z-index: 1;
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  width: 100%;
}

.gate-main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(48px, 10vw, 120px) var(--page-gutter-mobile) clamp(64px, 12vh, 100px);
}

@media (min-width: 769px) {
  .gate-main {
    padding-left: var(--page-gutter-tablet);
    padding-right: var(--page-gutter-tablet);
  }
}

@media (min-width: 1025px) {
  .gate-main {
    padding-left: var(--page-gutter);
    padding-right: var(--page-gutter);
  }
}

.gate-wrap {
  width: min(100%, 640px);
  margin: 0 auto;
  text-align: center;
  animation: gate-fade-in 720ms var(--motion-ease-soft) both;
}

@keyframes gate-fade-in {
  from {
    opacity: 0;
    transform: translateY(var(--motion-distance-sm));
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .gate-wrap {
    animation: none;
  }
}

.gate-mark {
  margin-bottom: clamp(20px, 4vw, 28px);
}

/* Figma node 525:232957 — disc fill #f1f1f4 on #fff page */
.gate-lock-circle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: clamp(72px, 14vw, 96px);
  height: clamp(72px, 14vw, 96px);
  border-radius: 50%;
  background: #f1f1f4;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.gate-lock-icon {
  display: block;
  width: 48px;
  height: 48px;
  object-fit: contain;
  object-position: center;
}

.gate-heading {
  margin: 0 0 clamp(20px, 3.5vw, 28px);
  font-family: var(--font-graphik-cond);
  font-weight: 700;
  font-size: clamp(3rem, 12vw, 6.25rem);
  line-height: 0.95;
  letter-spacing: -0.03em;
  text-transform: uppercase;
  color: var(--color-text);
}

.gate-heading-line {
  display: block;
}

.gate-lead {
  margin: 0 auto clamp(40px, 6vw, 56px);
  max-width: 34em;
  font-size: clamp(1rem, 2.2vw, 1.125rem);
  line-height: 1.55;
  color: var(--color-muted);
}

.gate-lead strong {
  font-weight: 600;
  color: var(--color-text);
}

.gate-form {
  width: 100%;
  max-width: 540px;
  margin: 0 auto clamp(40px, 6vw, 64px);
}

.gate-form-row {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: stretch;
}

.gate-input {
  display: block;
  flex: 1;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  min-height: 64px;
  height: 64px;
  padding: 0 20px;
  font-family: var(--font-sans);
  font-size: clamp(1rem, 1.8vw, 1.125rem);
  line-height: 1.2;
  font-weight: 400;
  color: var(--color-text);
  /* Figma password field + portfolio token — #f1f1f4 */
  background: var(--color-bg-light);
  border: 1px solid rgba(48, 50, 59, 0.06);
  border-radius: 10px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
  transition:
    border-color var(--motion-duration-fast) var(--motion-ease-standard),
    box-shadow var(--motion-duration-fast) var(--motion-ease-standard);
}

@media (max-width: 519px) {
  .gate-input {
    min-height: 58px;
    height: 58px;
    padding: 0 18px;
  }
}

.gate-input::placeholder {
  color: var(--color-footer-muted);
}

.gate-input:hover {
  border-color: rgba(48, 50, 59, 0.12);
}

.gate-input:focus {
  outline: none;
  border-color: rgba(48, 50, 59, 0.22);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06), 0 0 0 3px rgba(48, 50, 59, 0.08);
}

.gate-input--error {
  animation: gate-input-shake 420ms var(--motion-ease-standard);
}

@keyframes gate-input-shake {
  0%,
  100% {
    transform: translateX(0);
  }
  20% {
    transform: translateX(-6px);
  }
  40% {
    transform: translateX(6px);
  }
  60% {
    transform: translateX(-4px);
  }
  80% {
    transform: translateX(4px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .gate-input--error {
    animation: none;
  }
}

.gate-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 62px;
  padding: 0 28px;
  font-family: var(--font-sans);
  font-size: 1.125rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: #fff;
  background: var(--color-text);
  border: none;
  border-radius: 10px;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
  transition:
    transform var(--motion-duration-fast) var(--motion-ease-standard),
    background-color var(--motion-duration-fast) var(--motion-ease-standard),
    box-shadow var(--motion-duration-fast) var(--motion-ease-standard);
}

.gate-submit:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(48, 50, 59, 0.18);
}

.gate-submit:active {
  transform: translateY(0);
}

.gate-submit:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(48, 50, 59, 0.2), 0 4px 12px rgba(48, 50, 59, 0.15);
}

.gate-submit-icon {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
}

.gate-support {
  margin: 0;
  font-size: 0.9375rem;
  line-height: 1.5;
  color: var(--color-footer-muted);
}

.gate-support a {
  font-weight: 500;
  color: var(--color-text);
  text-decoration: underline;
  text-underline-offset: 0.15em;
  transition: opacity var(--motion-duration-fast) var(--motion-ease-standard);
}

.gate-support a:hover {
  opacity: 0.75;
}

.gate-copy-status {
  display: inline-block;
  margin-left: 8px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-text);
  opacity: 0;
  transform: translateY(1px);
  transition:
    opacity var(--motion-duration-fast) var(--motion-ease-standard),
    transform var(--motion-duration-fast) var(--motion-ease-standard);
}

.gate-copy-status.is-visible {
  opacity: 0.75;
  transform: translateY(0);
}

.gate-status {
  min-height: 0;
  margin: 12px 0 0;
  font-size: 0.875rem;
  color: #9a4d4d;
  text-align: center;
}

.gate-status:empty {
  margin: 0;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
