/* ==========================================================================
   Excel Pixels — futuregenerationhub.com landing page
   Palette sampled directly from the Excel Pixels logo artwork.
   ========================================================================== */

:root {
  /* Brand — sampled from images/excelpixels-logo.png */
  --brand-red:    #e8192c;   /* PIXELS wordmark */
  --brand-blue:   #1878c0;   /* "Publishing & Distribution" + book spine */
  --brand-yellow: #ffc400;   /* book page */
  --brand-orange: #ef8a1a;   /* book gradient */

  /* Per-subject accents, all drawn from the brand set above.
     Each has an "-ink" partner: the same hue darkened until white text on it
     clears WCAG AA (4.5:1). The vivid value is for decoration only — accent
     bars and icon-tile tints — while anything carrying text uses the -ink one.
     Red and blue already pass, so their two values are identical. */
  --science:     #e8192c;   /* live platform gets the dominant brand colour */
  --science-ink: #e8192c;
  --ai:          #1878c0;
  --ai-ink:      #1878c0;
  --english:     #ef8a1a;
  --english-ink: #ad6413;
  --math:        #c99700;
  --math-ink:    #967000;

  /* Ink & surfaces */
  --ink:       #16304d;
  --ink-soft:  #4a5f78;
  --ink-faint: #68788a;
  --bg:        #f7f9fc;
  --surface:   #ffffff;
  --line:      #e2e8f0;

  /* Type */
  --font-head: "Zilla Slab", Georgia, "Times New Roman", serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  /* Shape & depth */
  --radius:    22px;
  --shadow:    0 1px 2px rgba(22, 48, 77, .05), 0 6px 18px -6px rgba(22, 48, 77, .10);
  --shadow-lg: 0 2px 4px rgba(22, 48, 77, .05), 0 26px 50px -16px rgba(22, 48, 77, .24);
}

*, *::before, *::after { box-sizing: border-box; }

/* Base tone sits on <html> so the body's layered backdrops paint above it */
html {
  background: var(--bg);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink-soft);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* --------------------------------------------------------------------------
   Backdrop, built in two layers:
     ::before  four brand-coloured washes, one per corner
     ::after   a fine dot grid that fades out before it reaches the footer
   -------------------------------------------------------------------------- */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background:
    radial-gradient(42rem 30rem at  4% -10%, rgba( 24, 120, 192, .26), transparent 62%),
    radial-gradient(38rem 27rem at 96%  -4%, rgba(232,  25,  44, .18), transparent 62%),
    radial-gradient(36rem 28rem at 86%  98%, rgba(255, 196,   0, .26), transparent 64%),
    radial-gradient(36rem 28rem at  6%  94%, rgba(239, 138,  26, .20), transparent 64%);
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image: radial-gradient(circle at 1px 1px, rgba(22, 48, 77, .10) 1px, transparent 0);
  background-size: 26px 26px;
  -webkit-mask-image: linear-gradient(180deg, #000 0%, #000 52%, transparent 88%);
          mask-image: linear-gradient(180deg, #000 0%, #000 52%, transparent 88%);
}

/* Visible to screen readers only. Locked cards use this to announce that a
   platform is unavailable, since they carry no visible badge. */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  padding: .7rem 1.1rem;
  background: var(--ink);
  color: #fff;
  border-radius: 0 0 12px 0;
  font-weight: 600;
  z-index: 10;
}
.skip-link:focus { left: 0; }

.page {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: clamp(1.75rem, 4vw, 3.25rem) clamp(1.1rem, 4vw, 2rem) 2.5rem;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* Masthead ------------------------------------------------------------------
   The logo PNG carries ~20% empty space above the artwork. The wrapper is set
   to the artwork's own aspect ratio (556 x 266) and the image is pulled up by
   that band, so it sits optically centred instead of low in its box.
   -12.05% = 20.1% of the image height, expressed against the wrapper width. */
.masthead {
  display: flex;
  justify-content: center;
}
.masthead__logo {
  display: block;
  width: clamp(196px, 23vw, 268px);
  aspect-ratio: 556 / 266;
  overflow: hidden;
}
.masthead__logo img {
  display: block;
  width: 100%;
  height: auto;
  margin-top: -12.05%;
}

/* Hero ---------------------------------------------------------------------- */
.hero {
  text-align: center;
  max-width: 46rem;
  margin: clamp(2rem, 5vw, 3.25rem) auto clamp(2.25rem, 5vw, 3.5rem);
}

.hero__eyebrow {
  margin: 0 0 1rem;
  display: inline-block;
  padding: .4rem 1rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, .78);
  backdrop-filter: blur(6px);
  color: var(--ink);
  font-size: .74rem;
  font-weight: 600;
  letter-spacing: .13em;
  text-transform: uppercase;
}

.hero__title {
  margin: 0 0 1rem;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: clamp(2.1rem, 6.2vw, 3.5rem);
  line-height: 1.1;
  letter-spacing: -.015em;
  color: var(--ink);
  text-wrap: balance;
}

.hero__lede {
  margin: 0 auto;
  max-width: 34rem;
  font-size: clamp(1rem, 1.6vw, 1.09rem);
  color: var(--ink-soft);
  text-wrap: pretty;
}

/* Platform grid ------------------------------------------------------------ */
.hubs {
  display: grid;
  gap: clamp(1rem, 2vw, 1.4rem);
  grid-template-columns: repeat(auto-fit, minmax(15.5rem, 1fr));
}

.hub {
  --accent: var(--ink);

  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 1.6rem 1.5rem 1.5rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  text-decoration: none;
  overflow: hidden;
  transition: transform .28s cubic-bezier(.4, .14, .3, 1),
              box-shadow .28s cubic-bezier(.4, .14, .3, 1),
              border-color .28s ease;
}

/* Accent bar across the top of each card */
.hub::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  background: var(--accent);
}

.hub--science { --accent: var(--science); --accent-ink: var(--science-ink); }
.hub--ai      { --accent: var(--ai);      --accent-ink: var(--ai-ink); }
.hub--english { --accent: var(--english); --accent-ink: var(--english-ink); }
.hub--math    { --accent: var(--math);    --accent-ink: var(--math-ink); }

/* Icon tile ---------------------------------------------------------------- */
.hub__icon {
  display: grid;
  place-items: center;
  width: 3.1rem;
  height: 3.1rem;
  margin-bottom: 1.15rem;
  border-radius: 15px;
  background: color-mix(in srgb, var(--accent) 11%, transparent);
  color: var(--accent-ink);
  transition: transform .28s cubic-bezier(.4, .14, .3, 1);
}
.hub__icon svg { width: 26px; height: 26px; }

/* Text --------------------------------------------------------------------- */
.hub__title {
  margin: 0 0 .45rem;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 1.32rem;
  line-height: 1.25;
  color: var(--ink);
}

.hub__desc {
  margin: 0 0 1.5rem;
  font-size: .915rem;
  line-height: 1.6;
  color: var(--ink-soft);
}

/* CTA ---------------------------------------------------------------------- */
.hub__cta {
  margin-top: auto;
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .62rem 1.15rem;
  border-radius: 999px;
  background: var(--accent-ink);
  color: #fff;
  font-family: var(--font-head);
  font-size: .96rem;
  font-weight: 600;
  transition: gap .28s ease, box-shadow .28s ease;
}
.hub__cta svg { width: 17px; height: 17px; }

/* Live card interactions --------------------------------------------------- */
.hub:not(.is-locked):hover,
.hub:not(.is-locked):focus-visible {
  transform: translateY(-6px);
  border-color: color-mix(in srgb, var(--accent) 40%, var(--line));
  box-shadow: var(--shadow-lg);
}
.hub:not(.is-locked):hover .hub__icon,
.hub:not(.is-locked):focus-visible .hub__icon {
  transform: scale(1.07) rotate(-3deg);
}
.hub:not(.is-locked):hover .hub__cta {
  gap: .8rem;
  box-shadow: 0 8px 20px -6px color-mix(in srgb, var(--accent-ink) 65%, transparent);
}
.hub:not(.is-locked):active { transform: translateY(-2px); }

.hub:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 3px;
}

/* Locked cards ------------------------------------------------------------- */
.hub.is-locked {
  cursor: not-allowed;
  background: rgba(255, 255, 255, .62);
  border-style: dashed;
  box-shadow: none;
}
.hub.is-locked::before { opacity: .28; }
.hub.is-locked .hub__icon {
  background: rgba(22, 48, 77, .05);
  color: var(--ink-faint);
}
.hub.is-locked .hub__title { color: var(--ink-faint); }
.hub.is-locked .hub__desc  { color: var(--ink-faint); }

/* Footer ------------------------------------------------------------------- */
.footer {
  margin-top: auto;
  padding-top: clamp(2.25rem, 5vw, 3.25rem);
  text-align: center;
  font-size: .82rem;
  color: var(--ink-faint);
}

/* Hairline rule that fades out at both ends */
.footer::before {
  content: "";
  display: block;
  width: min(100%, 22rem);
  height: 1px;
  margin: 0 auto clamp(1.6rem, 3vw, 2.1rem);
  background: linear-gradient(90deg, transparent, var(--line), transparent);
}

.footer__copy { margin: 0; }
.footer__copy a {
  color: var(--ink-soft);
  font-weight: 500;
  text-decoration-color: var(--line);
  text-underline-offset: 3px;
  transition: color .2s ease, text-decoration-color .2s ease;
}
.footer__copy a:hover {
  color: var(--brand-red);
  text-decoration-color: currentColor;
}
.footer__copy a:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 3px;
  border-radius: 3px;
}

/* Entrance animation ------------------------------------------------------- */
@media (prefers-reduced-motion: no-preference) {
  .masthead, .hero, .hub {
    animation: rise .7s cubic-bezier(.2, .7, .3, 1) backwards;
  }
  .masthead         { animation-delay: .02s; }
  .hero             { animation-delay: .10s; }
  .hub:nth-child(1) { animation-delay: .20s; }
  .hub:nth-child(2) { animation-delay: .27s; }
  .hub:nth-child(3) { animation-delay: .34s; }
  .hub:nth-child(4) { animation-delay: .41s; }

  @keyframes rise {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: none; }
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
}

/* Narrow screens ----------------------------------------------------------- */
@media (max-width: 24rem) {
  .hub { padding: 1.5rem 1.2rem 1.35rem; }
}

/* Fallback for browsers without color-mix() -------------------------------- */
@supports not (background: color-mix(in srgb, red 10%, transparent)) {
  .hub__icon { background: rgba(22, 48, 77, .06); }
}
