/*
 * CSS: Styles for the SkillCrane Challenge Website
 * Version: 2.2 (Updated for CSS shapes, FAQ accordion, and testimonial carousel)
 * Approach: Mobile-first, with media queries for larger screens.
 * Uses CSS variables for easy theming.
*/

@font-face {
  font-family: "Inter";
  src: url("fonts/Inter18pt-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Inter";
  src: url("fonts/Inter_18pt-Medium.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Playfair Display";
  src: url("fonts/PlayfairDisplay-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  --scc-primary-color: #4a90e2;
  --scc-secondary-color: #f5a623;
  --scc-dark-color: #2c3e50;
  --scc-light-color: #f8f9fa;
  --scc-text-color: #34495e;
  --scc-success-color: #2ecc71;
  --scc-error-color: #e74c3c;
  --scc-font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    Helvetica, Arial, sans-serif;
}

*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--scc-font-family);
  color: var(--scc-text-color);
  background-color: var(--scc-light-color);
  line-height: 1.7;
  font-size: 1rem;
  overflow-x: hidden;
}

body.no-scroll {
  overflow: hidden;
}

.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;
}

.scc-container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1rem;
}

.scc-section {
  padding: clamp(2.5rem, 5vw, 4rem) 0;
}

.scc-section:nth-of-type(even) {
  background-color: #ffffff;
}

.scc-btn {
  display: inline-block;
  padding: 0.75rem 1.75rem;
  background-color: var(--scc-primary-color);
  color: #fff;
  text-decoration: none;
  border-radius: 5px;
  font-weight: bold;
  transition: background-color 0.3s ease, transform 0.2s ease;
  border: none;
  cursor: pointer;
  text-align: center;
}

.scc-btn:hover,
.scc-btn:focus-visible {
  background-color: #357abd;
  transform: translateY(-2px);
  outline: 2px solid var(--scc-primary-color);
  outline-offset: 2px;
}

.scc-btn-secondary {
  background-color: var(--scc-secondary-color);
}

.scc-btn-secondary:hover,
.scc-btn-secondary:focus-visible {
  background-color: #d98e1a;
  outline-color: var(--scc-secondary-color);
}

h1,
h2,
h3 {
  color: var(--scc-dark-color);
  margin-bottom: 1.25rem;
  line-height: 1.2;
  font-weight: 700;
}

h1 {
  font-size: clamp(2rem, 6vw, 2.8rem);
}

h2 {
  font-size: clamp(1.8rem, 5vw, 2.2rem);
  text-align: center;
}

h3 {
  font-size: clamp(1.2rem, 4vw, 1.4rem);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
  border-radius: 8px;
}

.scc-header {
  background: #fff;
  padding: 1rem 0;
  position: sticky;
  top: 0;
  z-index: 1010;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

.scc-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.scc-logo {
  font-size: 1.8rem;
  font-weight: bold;
  color: var(--scc-primary-color);
  text-decoration: none;
  z-index: 1011;
}

.scc-desktop-nav {
  display: none;
}

.scc-nav-links {
  list-style: none;
  display: flex;
  gap: 1.5rem;
}

.scc-nav-links a {
  text-decoration: none;
  color: var(--scc-text-color);
  font-weight: bold;
  transition: color 0.3s;
  padding: 0.5rem;
  position: relative;
}

.scc-nav-links a::after {
  content: "";
  position: absolute;
  width: 0;
  height: 2px;
  bottom: 0;
  left: 50%;
  background-color: var(--scc-primary-color);
  transition: all 0.3s ease;
}

.scc-nav-links a:hover::after,
.scc-nav-links a:focus-visible::after {
  width: 100%;
  left: 0;
}

.scc-nav-links a:hover,
.scc-nav-links a:focus-visible {
  color: var(--scc-primary-color);
  outline: none;
}

.scc-burger-menu {
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  width: 2rem;
  height: 2rem;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  z-index: 1011;
}

.scc-burger-menu span {
  width: 2rem;
  height: 0.25rem;
  background-color: var(--scc-text-color);
  border-radius: 2px;
  transition: all 0.3s ease;
}

.scc-burger-menu[aria-expanded="true"] span:nth-child(1) {
  transform: rotate(45deg) translate(7px, 7px);
}

.scc-burger-menu[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.scc-burger-menu[aria-expanded="true"] span:nth-child(3) {
  transform: rotate(-45deg) translate(7px, -7px);
}

.scc-mobile-nav {
  position: fixed;
  top: 0;
  right: -100%;
  width: 75%;
  max-width: 300px;
  height: 100%;
  background: #fff;
  box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 5rem;
  z-index: 10;
  transition: right 0.3s ease;
}

.scc-mobile-nav.active {
  right: 0;
}

.scc-mobile-nav-link {
  display: block;
  width: 100%;
  text-align: center;
  padding: 1rem;
  text-decoration: none;
  color: var(--scc-text-color);
  font-weight: bold;
  font-size: 1.1rem;
  transition: background-color 0.3s;
}

.scc-mobile-nav-link:hover,
.scc-mobile-nav-link:focus-visible {
  background-color: var(--scc-light-color);
  color: var(--scc-primary-color);
}

.scc-hero-content {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: 70vh;
  background: linear-gradient(rgba(74, 144, 226, 0.9), rgba(245, 166, 35, 0.9));
  color: #fff;
  padding: 2rem 1rem;
}

.scc-hero-content h1 {
  color: #fff;
  margin-bottom: 1rem;
}

.scc-hero-content p {
  font-size: 1.2rem;
  margin-bottom: 2rem;
  max-width: 600px;
}

.scc-game-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.scc-game-container {
  position: relative;
  width: 100%;
  max-width: 500px;
  height: 300px;
  background: linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0.1),
    rgba(74, 144, 226, 0.2)
  );
  border: 2px solid var(--scc-dark-color);
  border-radius: 10px;
  overflow: hidden;
  cursor: pointer;
  user-select: none;
}

.scc-game-container:focus-visible {
  outline: 2px solid var(--scc-primary-color);
  outline-offset: 2px;
}

.scc-crane {
  position: absolute;
  top: 0;
  left: 50%;
  width: 50px;
  height: 50px;
  transform: translateX(-50%);
  transition: left 0.1s linear;
}

.scc-claw {
  position: absolute;
  bottom: 0;
  width: 100%;
  height: 30px;
  background: linear-gradient(to bottom, #666, #333);
  clip-path: polygon(20% 0%, 80% 0%, 100% 100%, 0% 100%);
}

.scc-claw::before {
  content: "";
  position: absolute;
  width: 2px;
  height: 50px;
  background-color: #333;
  top: -50px;
  left: 50%;
  transform: translateX(-50%);
}

.scc-claw.dropping {
  animation: drop 0.5s ease-in-out forwards;
}

.scc-claw.grabbing {
  animation: grab 0.8s ease-in-out forwards;
}

@keyframes drop {
  0% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(200px);
  }
  100% {
    transform: translateY(200px);
  }
}

@keyframes grab {
  0% {
    transform: translateY(200px) scale(1);
  }
  50% {
    transform: translateY(200px) scale(0.8);
  }
  100% {
    transform: translateY(0) scale(1);
  }
}

.scc-prize {
  position: absolute;
  bottom: 20px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: radial-gradient(circle, #ffd700, #ff8c00);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
  transition: transform 0.8s ease-in-out, opacity 0.8s ease-in-out;
}

.scc-prize.won {
  transform: translateY(-250px);
  opacity: 0;
}

.scc-game-instructions {
  text-align: center;
  font-size: 0.9rem;
  color: var(--scc-text-color);
  max-width: 300px;
}

.scc-mobile-controls {
  display: flex;
  gap: 1rem;
}

.scc-control-btn {
  width: 40px;
  height: 40px;
  font-size: 1.5rem;
  background-color: var(--scc-primary-color);
  color: #fff;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.scc-control-btn:hover,
.scc-control-btn:focus-visible {
  background-color: #357abd;
  outline: 2px solid var(--scc-primary-color);
  outline-offset: 2px;
}

.scc-game-controls {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
}

.scc-tries-counter {
  font-size: 1rem;
  color: var(--scc-text-color);
}

.scc-game-message {
  font-size: 1rem;
  font-weight: bold;
  color: var(--scc-success-color);
  text-align: center;
}

.scc-steps-container {
  display: grid;
  gap: 2rem;
  margin: 2rem 0;
}

.scc-step {
  text-align: center;
}

.scc-step-icon {
  width: 3rem;
  height: 3rem;
  margin: 0 auto 1rem;
  color: var(--scc-primary-color);
}

.content-section {
  background-color: var(--scc-light-color);
}

.content-grid {
  display: grid;
  gap: 2rem;
  align-items: center;
}

.content-section-reverse .content-grid {
  display: flex;
  flex-direction: column-reverse;
}

.content-text {
  flex: 1;
}

.content-image {
  flex: 1;
}

.scc-comparison-table {
  width: 100%;
  border-collapse: collapse;
  margin: 2rem 0;
  background-color: #fff;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.scc-comparison-table th,
.scc-comparison-table td {
  padding: 0.1rem;
  text-align: left;
  border-bottom: 1px solid #eee;
}

.scc-comparison-table th {
  background-color: var(--scc-primary-color);
  color: #fff;
}

.scc-comparison-table tr:nth-child(even) {
  background-color: #f9f9f9;
}

.scc-seo-text {
  font-size: 0.9rem;
  color: var(--scc-text-color);
  max-width: 600px;
  margin: 0 auto;
}

.scc-prize-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 2rem;
  margin: 2rem 0;
}

.scc-prize-card {
  background-color: #fff;
  padding: 1rem;
  border-radius: 8px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  text-align: center;
}

.scc-prize-card img {
  width: 100%;
  height: 150px;
  object-fit: cover;
}

.scc-prize-caption {
  text-align: center;
  font-size: 0.9rem;
  color: var(--scc-text-color);
}

.scc-testimonial-container {
  position: relative;
  overflow: hidden;
  margin: 2rem 0;
}

.scc-testimonial-item {
  display: none;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 2rem;
  background-color: #fff;
  border-radius: 10px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  min-height: 200px;
}

.scc-testimonial-item.active {
  display: flex;
}

.scc-testimonial-avatar {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  margin-bottom: 1rem;
}

.scc-testimonial-item p {
  font-size: 0.9rem;
  margin-bottom: 1rem;
  color: var(--scc-text-color);
}

.scc-testimonial-item cite {
  font-size: 0.8rem;
  color: var(--scc-dark-color);
  font-style: normal;
}

.scc-testimonial-prev,
.scc-testimonial-next {
  display: none;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  background-color: var(--scc-primary-color);
  color: #fff;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.2rem;
  transition: background-color 0.3s ease;
}

.scc-testimonial-prev {
  left: -20px;
}

.scc-testimonial-next {
  right: -20px;
}

.scc-testimonial-prev:hover,
.scc-testimonial-next:hover,
.scc-testimonial-prev:focus-visible,
.scc-testimonial-next:focus-visible {
  background-color: #357abd;
}

.scc-faq-container {
  max-width: 800px;
  margin: 2rem auto;
}

.scc-faq-item {
  margin-bottom: 1rem;
  border: 1px solid #ddd;
  border-radius: 8px;
  overflow: hidden;
}

.scc-faq-question {
  width: 100%;
  text-align: left;
  padding: 1rem;
  background-color: #f9f9f9;
  border: none;
  font-size: 1rem;
  font-weight: bold;
  color: var(--scc-dark-color);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: background-color 0.3s ease;
}

.scc-faq-question::after {
  content: "+";
  font-size: 1.2rem;
  color: var(--scc-primary-color);
}

.scc-faq-question[aria-expanded="true"]::after {
  content: "−";
}

.scc-faq-question:hover,
.scc-faq-question:focus-visible {
  background-color: #e0e0e0;
  outline: none;
}

.scc-faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s ease;
  padding: 0 1rem;
}

.scc-faq-answer.active {
  max-height: 200px;
  padding: 1rem;
}

.scc-faq-answer p {
  font-size: 0.9rem;
  color: var(--scc-text-color);
}

.scc-final-cta-buttons {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-top: 2rem;
}

.scc-footer {
  background-color: var(--scc-dark-color);
  color: #fff;
  padding: 2rem 0;
}

.scc-footer .scc-logo {
  color: #fff;
  margin-bottom: 1rem;
}

.scc-footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1rem;
}

.scc-footer-nav a {
  color: #fff;
  text-decoration: none;
  transition: color 0.3s ease;
}

.scc-footer-nav a:hover,
.scc-footer-nav a:focus-visible {
  color: var(--scc-primary-color);
}

.scc-footer-legal {
  font-size: 0.8rem;
  opacity: 0.8;
  margin-bottom: 1rem;
}

.scc-copyright {
  font-size: 0.8rem;
  text-align: center;
}

.scc-modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 1020;
  justify-content: center;
  align-items: center;
}

.scc-modal-overlay.active {
  display: flex;
}

.scc-modal-container {
  background-color: #fff;
  padding: 2rem;
  border-radius: 10px;
  max-width: 500px;
  width: 90%;
  position: relative;
}

.scc-modal-close {
  position: absolute;
  top: 10px;
  right: 10px;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--scc-text-color);
}

.scc-modal-close:hover,
.scc-modal-close:focus-visible {
  color: var(--scc-primary-color);
}

.scc-modal-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.scc-form-group {
  display: flex;
  flex-direction: column;
}

.scc-form-input {
  padding: 0.75rem;
  border: 1px solid #ddd;
  border-radius: 5px;
  font-size: 1rem;
}

.scc-form-input:focus-visible {
  border-color: var(--scc-primary-color);
  outline: none;
}

.scc-form-feedback {
  font-size: 0.9rem;
  color: var(--scc-success-color);
}

.scc-form-feedback.error {
  color: var(--scc-error-color);
}

@media (min-width: 768px) {
  .scc-desktop-nav {
    display: block;
  }

  .scc-burger-menu {
    display: none;
  }

  .scc-mobile-nav {
    display: none;
  }

  .scc-steps-container {
    grid-template-columns: repeat(3, 1fr);
  }

  .content-grid {
    grid-template-columns: 1fr 1fr;
  }

  .content-section-reverse .content-grid {
    flex-direction: row;
  }

  .scc-game-instructions {
    max-width: 500px;
  }

  .scc-testimonial-prev {
    left: 0;
  }

  .scc-testimonial-next {
    right: 0;
  }
}

@media (min-width: 1024px) {
  .scc-hero-content {
    padding: 4rem 2rem;
  }

  .scc-hero-content h1 {
    font-size: clamp(2.5rem, 7vw, 3.5rem);
  }

  .scc-hero-content p {
    font-size: 1.5rem;
  }
}

.contact {
  padding: clamp(2.5rem, 5vw, 4rem) 0;
  background-color: var(--scc-light-color);
}

.container {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 1rem;
}

.contact h2 {
  font-size: clamp(1.8rem, 5vw, 2.2rem);
  color: var(--scc-dark-color);
  text-align: center;
  margin-bottom: 2rem;
}

.contact form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  max-width: 600px;
  margin: 0 auto;
}

.contact label {
  font-size: 1rem;
  font-weight: bold;
  color: var(--scc-text-color);
  margin-bottom: 0.5rem;
  display: block;
}

.contact input[type="text"],
.contact input[type="email"],
.contact textarea {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid #ddd;
  border-radius: 5px;
  font-size: 1rem;
  color: var(--scc-text-color);
  background-color: #fff;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.contact input[type="text"]:focus,
.contact input[type="email"]:focus,
.contact textarea:focus {
  border-color: var(--scc-primary-color);
  box-shadow: 0 0 5px rgba(74, 144, 226, 0.3);
  outline: none;
}

.contact textarea {
  min-height: 150px;
  resize: vertical;
}

.contact .checkbox-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: normal;
  font-size: 0.9rem;
}

.contact input[type="checkbox"] {
  width: 1rem;
  height: 1rem;
  cursor: pointer;
}

.contact .checkbox-label a {
  color: var(--scc-primary-color);
  text-decoration: none;
  transition: color 0.3s ease;
}

.contact .checkbox-label a:hover,
.contact .checkbox-label a:focus-visible {
  color: #357abd;
  text-decoration: underline;
}

.contact .cta-btn {
  display: inline-block;
  padding: 0.75rem 2rem;
  background-color: var(--scc-primary-color);
  color: #fff;
  text-decoration: none;
  border-radius: 5px;
  font-weight: bold;
  font-size: 1rem;
  border: none;
  cursor: pointer;
  text-align: center;
  transition: background-color 0.3s ease, transform 0.2s ease;
}

.contact .cta-btn:hover,
.contact .cta-btn:focus-visible {
  background-color: #357abd;
  transform: translateY(-2px);
  outline: 2px solid var(--scc-primary-color);
  outline-offset: 2px;
}

.contact .cta-btn:disabled {
  background-color: #aaa;
  cursor: not-allowed;
  transform: none;
}

/* Error and Success States */
.contact input:invalid:focus,
.contact textarea:invalid:focus {
  border-color: var(--scc-error-color);
  box-shadow: 0 0 5px rgba(231, 76, 60, 0.3);
}

.contact input:valid:focus,
.contact textarea:valid:focus {
  border-color: var(--scc-success-color);
  box-shadow: 0 0 5px rgba(46, 204, 113, 0.3);
}

/* Responsive Adjustments */
@media (min-width: 768px) {
  .contact {
    padding: clamp(4rem, 6vw, 5rem) 0;
  }

  .contact form {
    gap: 2rem;
  }

  .contact .cta-btn {
    padding: 1rem 2.5rem;
    font-size: 1.1rem;
  }
}

/*
 * CSS: Styles for Privacy Policy, Terms & Conditions, and Thanks Pages
 * Version: 1.0
 * Approach: Mobile-first, with media queries for larger screens.
 * Uses CSS variables for theming consistency with SkillCrane Challenge.
 */

.policy-page,
.thanks-page {
  padding: clamp(2.5rem, 5vw, 4rem) 0;
  background-color: var(--scc-light-color);
}

.policy-page h1,
.thanks-page h1 {
  font-size: clamp(2rem, 6vw, 2.8rem);
  color: var(--scc-dark-color);
  text-align: center;
  margin-bottom: 1.5rem;
}

.policy-last-updated {
  font-size: 0.9rem;
  color: var(--scc-text-color);
  text-align: center;
  margin-bottom: 2rem;
  font-style: italic;
}

.policy-page h2 {
  font-size: clamp(1.4rem, 4vw, 1.6rem);
  color: var(--scc-dark-color);
  margin: 2rem 0 1rem;
}

.policy-page p {
  font-size: 1rem;
  color: var(--scc-text-color);
  margin-bottom: 1rem;
  line-height: 1.7;
}

.policy-list {
  list-style: disc;
  padding-left: 1.5rem;
  margin-bottom: 1rem;
}

.policy-list li {
  font-size: 1rem;
  color: var(--scc-text-color);
  margin-bottom: 0.5rem;
}

.policy-page a {
  color: var(--scc-dark-color);
  text-decoration: none;
  transition: color 0.3s ease;
}

.policy-page a:hover,
.policy-page a:focus-visible {
  color: var(--scc-text-color);
  text-decoration: underline;
}

.thanks-message {
  font-size: 1.1rem;
  color: var(--scc-text-color);
  text-align: center;
  max-width: 600px;
  margin: 0 auto 2rem;
  line-height: 1.7;
}

.thanks-cta {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  justify-content: center;
  align-items: center;
}

@media (min-width: 768px) {
  .policy-page,
  .thanks-page {
    padding: clamp(4rem, 6vw, 5rem) 0;
  }

  .thanks-cta {
    flex-direction: row;
    gap: 1.5rem;
  }
}
