/* =========================================================
   AROZ — Stylesheet (cleaned & commented)
   =========================================================
   Notes:
   - Functionality unchanged from your working version.
   - Header is transparent on desktop; hamburger shows on mobile.
   - Whiteboard scales on mobile (86vw cap) and stays centered.
   - Slide-in animations preserved.
   ========================================================= */

/* -----------------------------
   Theme tokens
----------------------------- */
:root {
  --bg: linear-gradient(120deg, #d5c4f1, #bfa5ec);
  --accent: #a69ee5;

  --heading-font: 'Luckiest Guy', cursive;
  --body-font: 'Luckiest Guy', cursive;

  /* Mobile typography clamps (used in responsive rules) */
  --h1-mobile: clamp(1.6rem, 7vw, 2.4rem);
  --h2-mobile: clamp(1.25rem, 5vw, 1.6rem);
  --p-mobile:  clamp(0.95rem, 3.5vw, 1.05rem);
}

/* -----------------------------
   Base / Reset-ish
----------------------------- */
html, body {
  margin: 0;
  font-family: var(--body-font);
  background: var(--bg);
  color: #1c1c1c;
  scroll-behavior: smooth;

  /* Never allow sideways scroll */
  max-width: 100%;
  overflow-x: hidden;
}

/* Inherit the playful font everywhere */
* {
  font-family: inherit;
  box-sizing: border-box;
}

/* Media should never overflow containers */
img, svg, canvas, video {
  max-width: 100%;
  height: auto;
  display: block;
}

/* -----------------------------
   Header / Top Navigation
----------------------------- */
header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;

  display: flex;
  align-items: center;
  justify-content: space-between;

  padding: 1rem 2rem;
  background: rgba(255,255,255,0.7);
  backdrop-filter: blur(8px);
}

/* Logo block */
.logo {
  display: flex;
  align-items: center;
  font-family: var(--heading-font);
  font-size: 1.5rem;
  font-weight: bold;
  color: #6e34f3;
}
.logo-img { height: 32px; margin-right: 8px; }

/* Desktop nav links */
nav#nav-links a {
  margin: 0 0.5rem;
  padding: 0.5rem 1rem;
  text-decoration: none;
  background: #f3eaff;
  border-radius: 12px;
  color: #222;
  font-family: var(--heading-font);
  font-size: 1.1rem;
  transition: all 0.2s ease;
}
nav#nav-links a:hover {
  background: #d4c4f9;
  color: #6e34f3;
}

/* Social icons */
.social-icons a {
  display: inline-block;
  margin-left: 0.5rem;
  background: #ece4fd;
  padding: 0.5rem;
  border-radius: 50%;
  box-shadow: 0 4px 10px rgba(0,0,0,0.15);
  transition: transform 0.3s ease;
}
.social-icons a:hover { transform: translateY(-5px) scale(1.1); }
.social-icons img { width: 20px; height: 20px; }

/* Hamburger button (hidden on desktop) */
#menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 2rem;
  cursor: pointer;
}

/* Desktop layout: show nav inline, hide hamburger */
@media (min-width: 901px) {
  nav#nav-links {
    display: flex !important;
    gap: 0.5rem;
    position: static;
    background: transparent;
    padding: 0;
    box-shadow: none;
  }
}

/* Mobile layout: hamburger visible, nav collapses */
@media (max-width: 900px) {
  #menu-toggle { display: block; }

  nav#nav-links {
    display: none;
    flex-direction: column;
    gap: 0.5rem;

    position: absolute;
    top: 64px; left: 0; right: 0;

    padding: 1rem;
    background: rgba(255,255,255,.95);
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0,0,0,.15);

    /* Guards against side overflow */
    max-width: 100vw;
    padding-inline: 1rem;
    overflow-x: hidden;
  }
  nav#nav-links.show { display: flex; }
}

/* -----------------------------
   Sections (full-width bands)
----------------------------- */
.glass-section {
  width: 100%;
  padding: 4rem 2rem;
  text-align: center;
  color: #111;
  overflow-x: clip; /* extra guard */
}

/* Center inner content on very wide screens */
.glass-section > * {
  max-width: 1200px;
  margin-inline: auto;
}

/* Background themes */
.purple-gradient-2 { background: linear-gradient(120deg, #cab6fb 0%, #e9dcff 100%); }
.purple-gradient-3 { background: linear-gradient(120deg, #b497f0 0%, #d5c4f1 100%); }

/* -----------------------------
   Typography
----------------------------- */
h1, h2, h3 {
  font-family: var(--heading-font);
  font-size: 2.5rem;
  color: #111;
  margin-bottom: 1rem;
}

.section-lead {
  font-size: 1.1rem;
  margin-top: -0.5rem;
  margin-bottom: 1rem;
  opacity: 0.9;
}

/* -----------------------------
   Hero
----------------------------- */
.hero-banner {
  background: linear-gradient(120deg, #b497f0, #d5c4f1);
  color: white;
  padding: 6rem 2rem 0;
  position: relative;
  overflow: hidden;
}

.hero-content {
  max-width: 1200px;
  margin: auto;

  display: flex;
  flex-wrap: wrap;        /* stack on small screens */
  align-items: center;
  justify-content: space-between;
  gap: 2rem;

  position: relative;
  z-index: 2;
}

.hero-text { flex: 1 1 460px; min-width: 320px; }
.hero-image { flex: 1 1 380px; min-width: 280px; display: flex; justify-content: center; }

.hero-text h1 {
  font-size: 3.2rem;
  line-height: 1.2;
  margin-bottom: 1rem;
  color: #111;
}
.hero-text .highlight { color: var(--accent); text-shadow: 2px 2px 0 #000; }
.hero-text .welcome   { font-size: 1.3rem; color: #111; }
.hero-text p {
  font-size: 1.1rem;
  max-width: 500px;
  margin-bottom: 1rem;
  color: #111;
}

/* CA + CTA stack */
.hero-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-start; /* center on mobile via media query */
  gap: 0.75rem;
}

/* Primary button */
.cta-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap; /* never wrap text */

  background: #fff;
  color: #6e34f3;
  padding: 0.75rem 1.5rem;
  border-radius: 12px;
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  box-shadow: 0 6px 20px rgba(166,158,229,0.3);
  transition: all 0.3s ease;
}
.cta-button:hover { background: #e8e1ff; transform: translateY(-3px); }

/* Hero image */
.hero-image img {
  max-width: 480px; /* prevent forcing a wrap */
  width: 100%;
  height: auto;
  filter: drop-shadow(0 0 8px #a69ee5aa);
}

/* Contract box in hero */
.contract-box {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: #fff;
  border-radius: 12px;
  padding: 0.5rem 0.75rem;
  box-shadow: 0 4px 10px rgba(0,0,0,0.08);
  margin: 0 0 1rem 0;
  color: #000; /* make CA text black for readability */
}
.contract-box span {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 0.95rem;
  letter-spacing: 0.3px;
}
#copy-ca-hero {
  background: #ece4fd;
  border: none;
  border-radius: 10px;
  height: 36px;
  padding: 0 0.8rem;
  cursor: pointer;
  font-weight: 700;
}
#copy-ca-hero:hover { background: #d8c9f5; }

/* -----------------------------
   Whiteboard
----------------------------- */
canvas {
  background: #fff;
  border-radius: 12px;
  margin-top: 0.5rem;
  box-shadow: 0 6px 20px rgba(0,0,0,0.1);
}

/* Toolbar controls */
.toolbar {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}
.toolbar select,
.toolbar button {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  height: 44px;
  padding: 0.6rem 1rem;
  border-radius: 10px;
  border: none;
  background: #ece4fd;
  cursor: pointer;
  transition: 0.3s;
  font-size: 0.95rem;
}
.toolbar button img { width: 20px; height: 20px; }
.toolbar button:hover,
.toolbar select:hover { background: #d8c9f5; }

/* Centered canvas; mascot positioned outside so it doesn't shift layout */
.whiteboard-area {
  position: relative;
  max-width: 800px;
  margin: 0 auto;
}
#whiteboard-canvas {
  display: block;
  margin: 0 auto;
}
.mascot-chill {
  position: absolute;
  right: 100%;
  margin-right: clamp(12px, 3vw, 28px);
  bottom: 0;
  width: clamp(180px, 26vw, 360px);
  pointer-events: none;
}

/* -----------------------------
   Memes
----------------------------- */
.meme-gallery {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: nowrap;
}
.meme-gallery img {
  width: 300px;
  height: 450px;
  object-fit: contain; /* scales without cutting */
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  background: #fff; /* optional background fill */
}

/* -----------------------------
   Roadmap
----------------------------- */
.roadmap {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}
.roadmap .phase {
  background: #fff;
  border-radius: 16px;
  padding: 2rem 1rem;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}
.roadmap .phase h3 { margin-top: 0; color: #6e34f3; }

/* -----------------------------
   How To Use
----------------------------- */
.how-to {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2rem;
  padding-top: 1rem;
}
.how-to .step {
  background: #ffffffdd;
  border-radius: 16px;
  padding: 1.5rem;
  width: 300px;
  box-shadow: 4px 4px 0px #00000022;
  border: 2px solid #00000010;
  font-size: 1.1rem;
  position: relative;
  transition: 0.3s ease;
}
.how-to .step:hover { transform: translateY(-5px); box-shadow: 6px 6px 0px #00000022; }
.how-to .step::before {
  content: attr(data-step);
  position: absolute;
  top: -15px; left: -15px;
  background: #a5d2f8;
  font-family: var(--heading-font);
  font-size: 1.4rem;
  padding: 0.5rem 0.9rem;
  border-radius: 50%;
  box-shadow: 2px 2px 0px #00000022;
}

/* -----------------------------
   Footer
----------------------------- */
footer {
  text-align: center;
  padding: 2rem;
  font-size: 1rem;
  color: #444;
}

/* -----------------------------
   Mascots At Bottom
----------------------------- */
#mascot-watch { text-align: center; padding: 3rem 0; }
#mascot-watch img,
.mascot-watch {
  display: block;
  margin: 0 auto;
  max-width: min(280px, 80vw);
}

/* -----------------------------
   Animations
----------------------------- */
.bounce { display: inline-block; animation: bounce 1.2s infinite; }
@keyframes bounce { 0%,100%{transform:translateY(0)} 50%{transform:translateY(-8px)} }

.slide-in { opacity: 0; transform: translateY(40px); transition: all 0.8s ease-out; }
.slide-in.visible { opacity: 1; transform: translateY(0); }

/* =========================================================
   Responsive — Tablets & Phones
   ========================================================= */

/* ----- ≤900px (tablet & down) ----- */
@media (max-width: 900px) {
  /* Hero stacks & centers */
  .hero-content { flex-direction: column; text-align: center; }
  .hero-text, .hero-image { flex: 1 1 100%; min-width: auto; }
  .hero-image img { max-width: 360px; }

  .hero-text h1 { font-size: 2.4rem; }

  /* Contract box stacks neatly */
  .contract-box {
    flex-direction: column;
    align-items: center;
    margin: 0 auto 1rem auto;
    max-width: 100%;
  }
  .contract-box span { font-size: 0.85rem; word-break: break-all; }
  #copy-ca-hero { margin-top: 0.5rem; width: 100%; }

  /* CTA fits width */
  .hero-actions { align-items: center; }
  .cta-button { width: 100%; margin: 0 auto; }

  /* Whiteboard area fits fully */
  .whiteboard-area { max-width: 100%; padding: 0 1rem; }
  #whiteboard-canvas { width: 100%; height: auto; }

  /* Roadmap becomes 1 column */
  .roadmap { grid-template-columns: 1fr; }
}

/* ----- ≤768px (phones) ----- */
@media (max-width: 768px) {
  /* Global size adjustments */
  body { font-size: 14px; }
  h1 { font-size: var(--h1-mobile); }
  h2 { font-size: var(--h2-mobile); }
  p  { font-size: var(--p-mobile); }

  /* Compact header spacing */
  header { padding: 0.6rem 1rem; }

  /* Hero paddings & sizes */
  .hero-banner { padding: 4rem 1rem 0; }
  .hero-content { gap: 1rem; }
  .contract-box { font-size: 0.85rem; }
  .cta-button { font-size: 0.95rem; padding: 0.6rem 1rem; width: 100%; }

  /* Section padding tighter */
  .glass-section { padding: 2.25rem 1rem; }

  /* Toolbar smaller but tappable */
  .toolbar { gap: 0.5rem; margin-bottom: 1rem; }
  .toolbar select, .toolbar button {
    height: 40px;
    padding: 0.45rem 0.8rem;
    font-size: 0.9rem;
  }

  /* Whiteboard cap: 86vw with 3:2 ratio */
  .whiteboard-area { max-width: 86vw; margin: 0 auto; padding: 0; }
  #whiteboard-canvas {
    width: 100% !important;
    max-width: 86vw;
    height: auto !important;
    aspect-ratio: 3 / 2;
  }

  /* Mascot stacks & shrinks */
  .mascot-chill {
    position: static;
    width: min(170px, 52vw);
    margin: 0 auto 10px;
  }

  /* Cards & galleries tighter */
  .how-to .step { width: 100%; padding: 1rem; font-size: 0.95rem; }
  .roadmap { gap: 1rem; }
  .meme-gallery img { width: 90px; height: 90px; }

  /* Footer compact */
  footer { font-size: 0.8rem; padding: 1rem; }
}

/* ----- ≤380px (very small phones) ----- */
@media (max-width: 380px) {
  .glass-section { padding: 1.75rem 0.75rem; }
  #whiteboard-canvas { max-width: 90vw; }
  .toolbar select, .toolbar button { height: 38px; font-size: 0.85rem; }
}
