/* ===== Attributions Page Styles (responsive, rem-based) ===== */

/* Base / reset tweaks */
#Head, #MainWrapper, #subWrapper { box-sizing: border-box; }
#Head * , #MainWrapper * , #subWrapper * { box-sizing: inherit; }
#MainWrapper { inline-size: 100%; }

/* Fluid typography */
#Head h1 {
  font-size: clamp(1.5rem, 1.2rem + 1.5vw, 2.5rem);
  line-height: 1.2;
  margin: clamp(1.5rem, 1rem + 2vw, 3rem) 0;
}

/* Page head */
#Head{
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-inline: clamp(1rem, 2vw, 2rem);
  padding-block: 0;
}

#Head p{
  margin: 1rem 0 2rem 0;
  text-align: justify;
  max-inline-size: 65ch;
  inline-size: min(90vw, 65ch);
  font-size: clamp(1rem, 0.95rem + 0.3vw, 1.125rem);
  line-height: 1.7;
}

/* Main wrapper */
#MainWrapper{
  padding: clamp(1.5rem, 1rem + 2vw, 3rem);
  display: grid;
  place-items: center;
}

/* Inner card */
#subWrapper{
  background-color: var(--lightpurple);
  padding: clamp(1rem, 0.75rem + 1.5vw, 2rem);
  padding-bottom: 0;
  border-radius: 1rem;
  inline-size: min(100%, 75rem); /* max ~1200px */
  box-shadow:
    0 1px 2px rgba(0,0,0,0.05),
    0 8px 24px rgba(0,0,0,0.12);
  border: 1px solid color-mix(in srgb, var(--lightpurple) 85%, #000 15%);
}

/* iFrame (height handled by script) */
#subWrapper iframe{
  display: block;
  inline-size: 100%;
  min-block-size: 60vh;
  border: none;
  border-bottom-left-radius: 1rem;
  border-bottom-right-radius: 1rem;
  overflow: clip;
  background: #fff0; /* transparent fallback */
}

/* Focus visibility */
#subWrapper :where(a, button, [tabindex="0"], iframe):focus-visible{
  outline: 3px solid color-mix(in srgb, var(--lightpurple) 40%, #fff 60%);
  outline-offset: 3px;
  border-radius: 0.5rem;
}

/* Motion respect */
@media (prefers-reduced-motion: reduce){
  * { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
}

/* Dark/Light nuance (keeps your palette vars) */
@media (prefers-color-scheme: light){
  #MainWrapper{ background-color: color-mix(in srgb, var(--darkestpurple) 92%, #fff 8%); }
  #subWrapper{ border-color: color-mix(in srgb, var(--lightpurple) 80%, #000 20%); }
}

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

/* <= 1200px (laptops/tablets landscape) */
@media (max-width: 75rem){
  #subWrapper{ inline-size: min(100%, 60rem); }
}

/* <= 768px (tablets/phones) */
@media (max-width: 48rem){
  #Head{
    padding-inline: 1rem;
  }
  #Head p{
    inline-size: 100%;
    text-align: left; /* improves readability on small screens */
  }
  #subWrapper{
    padding: clamp(0.75rem, 1.5vw + 0.5rem, 1.25rem);
    border-radius: 0.75rem;
  }
  #subWrapper iframe{
    min-block-size: 55vh;
    border-bottom-left-radius: 0.75rem;
    border-bottom-right-radius: 0.75rem;
  }
}

/* <= 480px (small phones) */
@media (max-width: 30rem){
  #Head h1{ font-size: clamp(1.375rem, 1.2rem + 3vw, 2rem); }
  #MainWrapper{ padding: 1rem; }
  #subWrapper{ padding: 0.75rem; }
  #subWrapper iframe{ min-block-size: 50vh; }
}
