/* =========================================================
   Animated Works Studio — warm & cozy theme
   Palette pulled from the channel logo: cream, with rainbow
   letter-block accents (red, orange, yellow, green, blue, purple).
   ========================================================= */

:root {
  /* Surfaces */
  --bg:          #fdf6e8;       /* cream — matches the logo background */
  --bg-soft:     #fff9ec;
  --bg-card:     #ffffff;
  --bg-warm:     #fbeed1;

  /* Text */
  --text:        #3a2e1f;       /* warm dark brown — gentler than black */
  --text-muted:  #8a7660;
  --text-soft:   #a89a82;

  /* Accents (logo letters) */
  --red:         #e04a3a;
  --orange:      #f07d2d;
  --yellow:      #f5b829;
  --green:       #5fae5a;
  --blue:        #4f8fd1;
  --purple:      #8a5cb8;
  --brown:       #8a5a3b;

  /* System */
  --accent:      var(--red);
  --accent-hov:  #c93b2c;
  --border:      rgba(58, 46, 31, 0.10);
  --border-hi:   rgba(58, 46, 31, 0.20);
  --shadow-sm:   0 2px 8px rgba(58, 46, 31, 0.06);
  --shadow-md:   0 8px 24px rgba(58, 46, 31, 0.10);
  --shadow-lg:   0 18px 50px rgba(58, 46, 31, 0.14);

  --max-w:       1180px;
  --pad-x:       clamp(1.25rem, 4vw, 2.5rem);
  --radius:      18px;
  --radius-lg:   28px;

  --font-display: 'Fredoka', 'Baloo 2', 'Quicksand', system-ui, sans-serif;
  --font-body:    'Nunito', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img, svg { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
::selection { background: var(--yellow); color: var(--text); }

h1, h2, h3 { font-family: var(--font-display); font-weight: 600; line-height: 1.1; }

/* =========================================================
   NAV
   ========================================================= */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem var(--pad-x);
  background: rgba(253, 246, 232, 0);
  -webkit-backdrop-filter: blur(0px);
  backdrop-filter: blur(0px);
  border-bottom: 1px solid transparent;
  transition: background 0.25s ease, backdrop-filter 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}
.nav.is-scrolled {
  background: rgba(253, 246, 232, 0.92);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-bottom-color: var(--border);
  box-shadow: var(--shadow-sm);
}
.nav__brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-shrink: 0;
}
.nav__logo {
  height: 40px;
  width: 40px;
  border-radius: 10px;
  object-fit: contain;
  background: var(--bg-soft);
}
.nav__name {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--text);
}
.nav__links {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}
.nav__links a {
  color: var(--text-muted);
  font-size: 0.95rem;
  font-weight: 600;
  transition: color 0.15s ease;
}
.nav__links a:hover { color: var(--red); }
.nav__cta {
  padding: 0.55rem 1.1rem;
  background: var(--red);
  color: #fff !important;
  border-radius: 999px;
  box-shadow: 0 4px 12px rgba(224, 74, 58, 0.25);
  transition: background 0.15s ease, transform 0.15s ease, box-shadow 0.2s ease;
}
.nav__cta:hover {
  background: var(--accent-hov);
  color: #fff !important;
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(224, 74, 58, 0.35);
}

@media (max-width: 640px) {
  .nav__links { gap: 0.65rem; }
  .nav__links a:not(.nav__cta) { display: none; }
  .nav__name { font-size: 1rem; }
}

/* =========================================================
   HERO
   ========================================================= */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding: 7rem var(--pad-x) 5rem;
  overflow: hidden;
  isolation: isolate;
}

/* Pastel blob decorations */
.hero__blobs {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}
.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.55;
  animation: blobFloat 18s ease-in-out infinite alternate;
}
.blob--yellow {
  width: 520px; height: 520px;
  top: -180px; left: -120px;
  background: var(--yellow);
  opacity: 0.45;
}
.blob--peach {
  width: 460px; height: 460px;
  top: 30%; right: -160px;
  background: var(--orange);
  opacity: 0.30;
  animation-delay: -6s;
}
.blob--mint {
  width: 380px; height: 380px;
  bottom: -120px; left: 20%;
  background: var(--green);
  opacity: 0.28;
  animation-delay: -12s;
}
.blob--sky {
  width: 320px; height: 320px;
  top: 12%; left: 38%;
  background: var(--blue);
  opacity: 0.18;
  animation-delay: -3s;
}
@keyframes blobFloat {
  from { transform: translate(0, 0) scale(1); }
  to   { transform: translate(40px, -30px) scale(1.06); }
}

.hero__inner {
  position: relative;
  max-width: 880px;
  width: 100%;
  margin: 0 auto;
  text-align: center;
}

/* Logo as the hero centerpiece — full square mark, no circle clip */
.hero__art {
  width: clamp(220px, 32vw, 340px);
  margin: 0 auto 2rem;
  display: grid;
  place-items: center;
  animation: gentleBob 6s ease-in-out infinite;
}
.hero__logo {
  width: 100%;
  height: auto;
  border-radius: 24px;
  filter: drop-shadow(0 18px 40px rgba(58, 46, 31, 0.18));
}
/* Fallback if the logo image is missing */
.hero__art--missing {
  width: clamp(220px, 32vw, 340px);
  height: clamp(220px, 32vw, 340px);
  border-radius: 24px;
  background: var(--bg-card);
  box-shadow: var(--shadow-lg);
  position: relative;
}
.hero__art--missing::before {
  content: 'AWS';
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-size: clamp(3rem, 6vw, 5rem);
  font-weight: 700;
  background: linear-gradient(135deg, var(--red), var(--orange) 25%, var(--yellow) 50%, var(--green) 70%, var(--blue));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
@keyframes gentleBob {
  0%, 100% { transform: translateY(0) rotate(-1deg); }
  50%      { transform: translateY(-8px) rotate(1deg); }
}

.hero__eyebrow {
  font-size: 0.85rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--orange);
  margin: 0 0 0.75rem;
  font-weight: 700;
}
.hero__title {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 6.5vw, 5rem);
  font-weight: 600;
  line-height: 1.05;
  margin: 0 auto 1.25rem;
  color: var(--text);
  max-width: 18ch;
}
.hero__tagline {
  font-size: clamp(1.05rem, 1.5vw, 1.25rem);
  color: var(--text-muted);
  max-width: 48ch;
  margin: 0 auto 2.25rem;
}
.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  justify-content: center;
}

/* =========================================================
   BUTTONS
   ========================================================= */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.95rem 1.7rem;
  border-radius: 999px;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.98rem;
  letter-spacing: 0.01em;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.2s ease, color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }

.btn--primary {
  background: var(--red);
  color: #fff;
  box-shadow: 0 8px 22px rgba(224, 74, 58, 0.30);
}
.btn--primary:hover {
  background: var(--accent-hov);
  box-shadow: 0 12px 28px rgba(224, 74, 58, 0.40);
}

.btn--ghost {
  background: var(--bg-card);
  border-color: var(--border-hi);
  color: var(--text);
  box-shadow: var(--shadow-sm);
}
.btn--ghost:hover {
  border-color: var(--text);
  box-shadow: var(--shadow-md);
}

/* =========================================================
   SECTIONS
   ========================================================= */
section { padding: 6rem var(--pad-x); position: relative; }

.section__eyebrow {
  font-size: 0.8rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--orange);
  margin: 0 0 0.75rem;
  font-weight: 700;
}
.section__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  max-width: var(--max-w);
  margin: 0 auto 2.5rem;
  gap: 1rem;
  flex-wrap: wrap;
}
.section__title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(2rem, 4.5vw, 3.25rem);
  letter-spacing: -0.005em;
  line-height: 1.1;
  margin: 0;
  color: var(--text);
}
.section__link {
  color: var(--text-muted);
  font-size: 0.95rem;
  font-weight: 700;
  transition: color 0.15s ease;
}
.section__link:hover { color: var(--red); }

/* =========================================================
   VIDEOS
   ========================================================= */
.videos { background: var(--bg); }
.video-grid {
  max-width: var(--max-w);
  margin: 0 auto;
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
}
.video-card {
  display: block;
  color: inherit;
  text-decoration: none;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}
.video-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
  border-color: var(--border-hi);
}
.video-card:focus-visible {
  outline: 3px solid var(--red);
  outline-offset: 3px;
}
.video-card__frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  overflow: hidden;
}
.video-card__thumb {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform 0.4s ease, filter 0.25s ease;
}
.video-card:hover .video-card__thumb {
  transform: scale(1.04);
  filter: brightness(0.92);
}
.video-card__play {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  pointer-events: none;
  transition: transform 0.25s ease;
}
.video-card__play svg {
  width: clamp(56px, 18%, 84px);
  height: auto;
  filter: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.45));
  transition: transform 0.25s ease;
}
.video-card:hover .video-card__play svg {
  transform: scale(1.08);
}
.video-card__meta {
  padding: 1rem 1.25rem 1.25rem;
}
.video-card__title {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 600;
  margin: 0 0 0.25rem;
  color: var(--text);
}
.video-card__sub {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* =========================================================
   ABOUT
   ========================================================= */
.about {
  background: var(--bg-warm);
  position: relative;
}
.about::before, .about::after {
  content: '';
  position: absolute;
  left: 0; right: 0;
  height: 40px;
  pointer-events: none;
}
.about::before {
  top: -1px;
  background: linear-gradient(to bottom, var(--bg) 0%, transparent 100%);
}
.about::after {
  bottom: -1px;
  background: linear-gradient(to top, var(--bg) 0%, transparent 100%);
}
.about__inner {
  max-width: 760px;
  margin: 0 auto;
  text-align: center;
}
.about__lead {
  font-size: clamp(1.15rem, 1.8vw, 1.4rem);
  color: var(--text);
  margin: 1.5rem 0 1rem;
  line-height: 1.5;
}
.about__body {
  color: var(--text-muted);
  margin: 0 0 2rem;
  font-size: 1.05rem;
}

/* Colored chips for what-we-make */
.about__chips {
  list-style: none;
  padding: 0;
  margin: 2rem 0 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.6rem;
}
.chip {
  padding: 0.55rem 1.05rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.9rem;
  color: #fff;
  letter-spacing: 0.01em;
  box-shadow: 0 4px 10px rgba(58, 46, 31, 0.10);
}
.chip--red    { background: var(--red); }
.chip--green  { background: var(--green); }
.chip--blue   { background: var(--blue); }
.chip--yellow { background: var(--yellow); color: var(--text); }

/* =========================================================
   CONTACT
   ========================================================= */
.contact { background: var(--bg); }
.contact__inner {
  max-width: 680px;
  margin: 0 auto;
  text-align: center;
}
.contact__lead {
  color: var(--text-muted);
  margin: 1.25rem 0 2rem;
  font-size: 1.05rem;
}
.contact__socials {
  list-style: none;
  padding: 0;
  margin: 2.5rem 0 0;
  display: flex;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap;
}
.contact__socials a {
  color: var(--text-muted);
  font-weight: 700;
  font-size: 0.95rem;
  transition: color 0.15s ease;
}
.contact__socials a:hover { color: var(--red); }

/* =========================================================
   FOOTER
   ========================================================= */
.footer {
  padding: 2.5rem var(--pad-x);
  border-top: 1px solid var(--border);
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9rem;
  background: var(--bg-soft);
}
.footer p { margin: 0; }

/* =========================================================
   REVEAL ON SCROLL
   ========================================================= */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* =========================================================
   MOTION PREFERENCES
   ========================================================= */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}
