/* ============================================
   Hidden Gems — CS 147 Project Website
   Sketchbook + pastel theme. Edit colors below.
   ============================================ */

:root {
  --pencil: #4a4550; /* outlines + main text */
  --graphite: #6f6a76; /* secondary text */
  --paper: #fffaf3; /* page background */
  --white: #ffffff;

  /* pastels pulled from the logo gems */
  --pink: #ffd3e4;
  --pink-deep: #f39ac0;
  --blue: #d4e5ff;
  --blue-deep: #8fb3f2;
  --mint: #cff3d6;
  --mint-deep: #78d28e;
  --lav: #e6dbff;
  --lav-deep: #ad93f0;
  --butter: #fff2bf;

  /* hand-drawn wobbly corners */
  --wobble: 255px 18px 225px 18px / 18px 225px 18px 255px;
  --wobble-2: 18px 225px 18px 255px / 255px 18px 225px 18px;
  --soft-shadow: 0 10px 24px -14px rgba(74, 69, 80, 0.45);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
html {
  scroll-behavior: smooth;
}

body {
  font-family: "Nunito", system-ui, sans-serif;
  color: var(--pencil);
  background-color: var(--paper);
  /* faint dot-grid sketchbook paper */
  background-image: radial-gradient(
    rgba(74, 69, 80, 0.13) 1px,
    transparent 1.2px
  );
  background-size: 22px 22px;
  line-height: 1.65;
  font-size: 17px;
  overflow-x: hidden;
}

h1,
h2,
h3 {
  font-family: "Fredoka", "Nunito", sans-serif;
  font-weight: 600;
  line-height: 1.15;
}
a {
  color: inherit;
}
img {
  max-width: 100%;
  display: block;
}

.container {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
}
section[id],
main[id] {
  scroll-margin-top: 84px;
}

/* ---------- Sketchy pencil outline (add class="sketch") ---------- */
.sketch,
.polaroid,
.sticky,
.card {
  position: relative;
}
.sketch::before,
.polaroid::before,
.sticky::before,
.card::before {
  content: "";
  position: absolute;
  inset: 0;
  border: 2px solid var(--pencil);
  border-radius: var(--wobble);
  filter: url(#sketch);
  pointer-events: none;
}

/* ---------- Highlighter marks ---------- */
.hl {
  padding: 0 0.15em;
  margin: 0 -0.05em;
  background: linear-gradient(
    100deg,
    transparent 2%,
    var(--hl) 4%,
    var(--hl) 95%,
    transparent 98%
  );
  background-size: 100% 48%;
  background-position: 0 85%;
  background-repeat: no-repeat;
}
.hl-pink {
  --hl: var(--pink);
}
.hl-blue {
  --hl: var(--blue);
}
.hl-mint {
  --hl: var(--mint);
}
.hl-lav {
  --hl: var(--lav);
}

/* ---------- Washi tape ---------- */
.tape {
  position: absolute;
  top: -13px;
  left: 50%;
  width: 92px;
  height: 26px;
  transform: translateX(-50%) rotate(-3deg);
  background: var(--tape, var(--butter));
  opacity: 0.85;
  z-index: 2;
  /* torn edges */
  clip-path: polygon(
    3% 0,
    97% 4%,
    100% 30%,
    97% 55%,
    100% 80%,
    96% 100%,
    4% 96%,
    0 70%,
    3% 45%,
    0 18%
  );
}
.tape-pink {
  --tape: var(--pink);
}
.tape-blue {
  --tape: var(--blue);
}
.tape-mint {
  --tape: var(--mint);
}
.tape-lav {
  --tape: var(--lav);
}

/* ---------- Polaroids ---------- */
.polaroid {
  background: var(--white);
  padding: 12px 12px 4px;
  box-shadow: var(--soft-shadow);
}
.polaroid::before {
  border-radius: 6px 10px 8px 12px;
}
.polaroid-caption {
  font-family: "Caveat", cursive;
  font-size: 1.5rem;
  font-weight: 700;
  text-align: center;
  padding: 6px 0 4px;
}

/* ================= HEADER ================= */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 250, 243, 0.94);
  backdrop-filter: blur(6px);
}
.site-header::after {
  /* hand-drawn wavy line under the header */
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -6px;
  height: 8px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 80 8'%3E%3Cpath d='M0 4 Q 10 1 20 4 T 40 4 T 60 4 T 80 4' fill='none' stroke='%234a4550' stroke-width='1.6'/%3E%3C/svg%3E")
    repeat-x;
  background-size: 80px 8px;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}
.brand-logo {
  height: 58px;
  width: auto;
}

.nav-links {
  display: flex;
  gap: 8px;
}
.nav-links a {
  font-family: "Fredoka", sans-serif;
  font-weight: 500;
  font-size: 1.05rem;
  text-decoration: none;
  padding: 6px 12px;
  background: linear-gradient(var(--pink), var(--pink)) no-repeat 50% 80% / 0%
    40%;
  transition: background-size 0.25s ease;
}
.nav-links a:nth-child(2) {
  background-image: linear-gradient(var(--blue), var(--blue));
}
.nav-links a:nth-child(3) {
  background-image: linear-gradient(var(--mint), var(--mint));
}
.nav-links a:hover {
  background-size: 85% 40%;
}

.nav-toggle,
.nav-burger {
  display: none;
}

/* ================= HERO ================= */
.hero {
  position: relative;
  padding: 56px 0 96px;
}

.hero-inner {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 48px;
  align-items: center;
}

.hero-logo {
  width: 100%;
  max-width: 520px;
  margin-left: -14px;
  transform: rotate(-2deg);
}

.value-prop {
  font-family: "Caveat", cursive;
  font-weight: 700;
  font-size: clamp(2.6rem, 6vw, 3.8rem);
  line-height: 1;
  margin: 6px 0 18px;
}

.hero-sub {
  font-size: 1.15rem;
  color: var(--graphite);
  max-width: 30em;
  margin-bottom: 28px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 26px;
}

.btn {
  display: inline-block;
  font-family: "Fredoka", sans-serif;
  font-weight: 600;
  font-size: 1.05rem;
  text-decoration: none;
  padding: 12px 24px;
  background: var(--white);
  border-radius: var(--wobble);
  transition: transform 0.2s ease;
}
.btn-pink {
  background: var(--pink);
}
.btn:hover {
  transform: rotate(-2deg) scale(1.04);
}

.hero-note {
  font-family: "Caveat", cursive;
  font-size: 1.3rem;
  color: var(--graphite);
}

/* sparkles from the logo */
.doodle-sparkle {
  position: absolute;
  width: 26px;
  height: 26px;
  animation: twinkle 3s ease-in-out infinite;
}
.s1 {
  top: 10%;
  left: 46%;
}
.s2 {
  top: 70%;
  left: 4%;
  width: 18px;
  height: 18px;
  animation-delay: 0.8s;
}
.s3 {
  bottom: 8%;
  right: 8%;
  width: 20px;
  height: 20px;
  animation-delay: 1.5s;
}
.s4 {
  top: 60px;
  right: 12%;
  animation-delay: 0.4s;
}
.s5 {
  bottom: 70px;
  left: 6%;
  width: 18px;
  height: 18px;
  animation-delay: 1.2s;
}
@keyframes twinkle {
  0%,
  100% {
    transform: scale(1) rotate(0);
    opacity: 1;
  }
  50% {
    transform: scale(0.7) rotate(20deg);
    opacity: 0.6;
  }
}

/* sketched map */
.hero-art {
  position: relative;
  display: flex;
  justify-content: center;
  padding: 20px 0;
}
.map-polaroid {
  width: 100%;
  max-width: 380px;
  transform: rotate(3deg);
}
.sketch-map {
  width: 100%;
  height: auto;
  display: block;
}

.map-gem {
  position: absolute;
  width: 40px;
  height: 40px;
  animation: bob 2.8s ease-in-out infinite;
}
.g-pink {
  fill: var(--pink-deep);
  top: 12%;
  left: 74%;
}
.g-lav {
  fill: var(--lav-deep);
  top: 42%;
  left: 50%;
  animation-delay: 0.5s;
}
.g-mint {
  fill: var(--mint-deep);
  top: 58%;
  left: 18%;
  animation-delay: 1s;
}
@keyframes bob {
  0%,
  100% {
    translate: 0 0;
  }
  50% {
    translate: 0 -7px;
  }
}

.note {
  position: absolute;
  font-family: "Caveat", cursive;
  font-weight: 700;
  font-size: 1.35rem;
  padding: 6px 16px;
  box-shadow: var(--soft-shadow);
  white-space: nowrap;
  z-index: 3;
}
.note-1 {
  background: var(--butter);
  top: 2%;
  left: -2%;
  transform: rotate(-7deg);
}
.note-2 {
  background: var(--lav);
  top: 52%;
  right: -6%;
  transform: rotate(5deg);
}

/* ================= SECTIONS ================= */
.section {
  position: relative;
  padding: 96px 0;
}

.section-head {
  margin-bottom: 44px;
}
.section-tag {
  display: inline-block;
  font-family: "Caveat", cursive;
  font-weight: 700;
  font-size: 1.6rem;
  color: var(--graphite);
  transform: rotate(-3deg);
  margin-bottom: 4px;
}
.section-tag::before {
  content: "✦ ";
  color: var(--pink-deep);
}
.section h2 {
  font-size: clamp(2rem, 4.5vw, 3rem);
  max-width: 18em;
}
.section-intro {
  font-size: 1.1rem;
  color: var(--graphite);
  margin-top: 10px;
}

/* ================= ABOUT ================= */
.about-grid {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 52px;
  align-items: start;
  margin-bottom: 72px;
}

.video-polaroid {
  transform: rotate(-1.5deg);
}
.video-frame {
  position: relative;
  aspect-ratio: 16 / 9;
  background: var(--lav);
  border-radius: 4px;
  overflow: hidden;
}
.video-frame iframe,
.video-frame video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  object-fit: cover;
  background: var(--lav);
}

.video-links {
  display: flex;
  flex-wrap: wrap;
  gap: 22px;
  margin-top: 22px;
  padding-left: 8px;
}
.video-links a {
  font-family: "Caveat", cursive;
  font-size: 1.45rem;
  font-weight: 700;
  text-decoration: underline wavy var(--pink-deep);
  text-underline-offset: 5px;
}
.video-links a:hover {
  color: var(--pink-deep);
}

/* ---------- Award tags ---------- */
.awards {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 12px 14px;
  margin-top: 26px;
  padding-left: 4px;
}
.award {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: "Fredoka", sans-serif;
  font-weight: 500;
  font-size: 0.92rem;
  padding: 5px 14px 5px 6px;
  border-radius: var(--wobble);
  box-shadow: var(--soft-shadow);
  transition: transform 0.2s ease;
}
.award .place {
  font-family: "Caveat", cursive;
  font-weight: 700;
  font-size: 1.25rem;
  line-height: 1;
  background: var(--white);
  padding: 3px 8px 4px;
  border-radius: 50% 40% 55% 45% / 55% 50% 45% 50%;
}
.award-gold {
  background: var(--butter);
  transform: rotate(-1.5deg);
}
.award-pink {
  background: var(--pink);
  transform: rotate(1deg);
}
.award-blue {
  background: var(--blue);
  transform: rotate(-0.8deg);
}
.award:hover {
  transform: rotate(0) scale(1.05);
}

.lead {
  font-size: 1.3rem;
  font-weight: 600;
  margin-bottom: 18px;
}
.about-copy p:not(.lead) {
  color: var(--graphite);
}

/* sticky notes */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}
.sticky {
  padding: 28px 26px 30px;
  box-shadow: var(--soft-shadow);
  transition: transform 0.25s ease;
}
.sticky::before {
  border-radius: 4px 8px 6px 10px;
}
.sticky-blue {
  background: var(--blue);
  transform: rotate(-2deg);
}
.sticky-pink {
  background: var(--pink);
  transform: rotate(1.5deg);
}
.sticky-mint {
  background: var(--mint);
  transform: rotate(-1deg);
}
.sticky:hover {
  transform: rotate(0) translateY(-4px);
}
.doodle-icon {
  width: 54px;
  height: 54px;
  margin-bottom: 10px;
}
.sticky h3 {
  font-family: "Caveat", cursive;
  font-weight: 700;
  font-size: 1.9rem;
  margin-bottom: 4px;
}
.sticky p {
  color: var(--pencil);
  opacity: 0.85;
}

/* ================= DESIGN PROCESS ================= */
.section-notebook {
  background-color: #fbf8ff;
  /* ruled notebook lines */
  background-image: repeating-linear-gradient(
    transparent 0 33px,
    rgba(143, 179, 242, 0.3) 33px 34px
  );
  margin: 30px 0;
}
.section-notebook::before,
.section-notebook::after {
  /* wavy torn edges */
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 22px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 22' preserveAspectRatio='none'%3E%3Cpath d='M0 22 L0 10 Q 15 0 30 10 T 60 10 T 90 10 T 120 10 L120 22Z' fill='%23fbf8ff'/%3E%3Cpath d='M0 10 Q 15 0 30 10 T 60 10 T 90 10 T 120 10' fill='none' stroke='%234a4550' stroke-width='1.6'/%3E%3C/svg%3E")
    repeat-x;
  background-size: 120px 22px;
}
.section-notebook::before {
  top: -21px;
}
.section-notebook::after {
  bottom: -21px;
  transform: scaleY(-1);
}

.process-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 36px 28px;
}

.card {
  background: var(--white);
  padding: 30px 24px 24px;
  display: flex;
  flex-direction: column;
  box-shadow: var(--soft-shadow);
  transition: transform 0.25s ease;
}
.card::before {
  border-radius: var(--wobble-2);
}
.card:nth-child(3n + 1) {
  transform: rotate(-1.2deg);
}
.card:nth-child(3n + 2) {
  transform: rotate(0.8deg);
}
.card:nth-child(3n) {
  transform: rotate(-0.4deg);
}
.card:hover {
  transform: rotate(0) translateY(-4px);
}

.c-blue {
  --tape: var(--blue);
  --tint: var(--blue);
}
.c-pink {
  --tape: var(--pink);
  --tint: var(--pink);
}
.c-mint {
  --tape: var(--mint);
  --tint: var(--mint);
}
.c-lav {
  --tape: var(--lav);
  --tint: var(--lav);
}
.c-butter {
  --tape: var(--butter);
  --tint: var(--butter);
}

.step-num {
  align-self: flex-start;
  font-family: "Caveat", cursive;
  font-weight: 700;
  font-size: 1.7rem;
  line-height: 1;
  padding: 2px 10px 4px;
  margin-bottom: 10px;
  background: var(--tint);
  border-radius: 50% 40% 55% 45% / 55% 50% 45% 50%;
}
.card h3 {
  font-size: 1.2rem;
  margin-bottom: 6px;
}
.card p {
  color: var(--graphite);
  font-size: 0.96rem;
  margin-bottom: 18px;
  flex-grow: 1;
}

.step-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.step-links a {
  font-family: "Fredoka", sans-serif;
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none;
  padding: 4px 14px 5px;
  background: var(--white);
  border-radius: var(--wobble);
  transition: background 0.2s;
}
.step-links a:hover {
  background: var(--tint);
}

.soon {
  position: absolute;
  top: 12px;
  right: 16px;
  font-family: "Caveat", cursive;
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--pink-deep);
  transform: rotate(6deg);
}

.demo-video {
  max-width: 720px;
  margin: 72px auto 0;
}

/* ================= TEAM ================= */
.team-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
}

.member {
  text-align: center;
}
.member .polaroid {
  margin-bottom: 14px;
  transition: transform 0.25s ease;
}
.member:nth-child(1) .polaroid {
  transform: rotate(-3deg);
}
.member:nth-child(2) .polaroid {
  transform: rotate(2deg);
}
.member:nth-child(3) .polaroid {
  transform: rotate(-1.5deg);
}
.member:nth-child(4) .polaroid {
  transform: rotate(3deg);
}
.member:hover .polaroid {
  transform: rotate(0) scale(1.03);
}

.photo {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 3px;
  display: grid;
  place-items: center;
  font-family: "Caveat", cursive;
  font-weight: 700;
  font-size: 3rem;
  color: var(--pencil);
}
.p-pink {
  background: var(--pink);
}
.p-blue {
  background: var(--blue);
}
.p-mint {
  background: var(--mint);
}
.p-lav {
  background: var(--lav);
}

.major {
  color: var(--graphite);
  font-size: 0.95rem;
}
.role {
  display: inline-block;
  margin-top: 8px;
  font-family: "Fredoka", sans-serif;
  font-size: 0.88rem;
  font-weight: 500;
  padding: 3px 14px 4px;
  background: var(--butter);
  border-radius: var(--wobble);
}

/* ================= FOOTER ================= */
.site-footer {
  position: relative;
  background: var(--lav);
  padding: 40px 0 36px;
  margin-top: 40px;
}
.site-footer::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: -21px;
  height: 22px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 22' preserveAspectRatio='none'%3E%3Cpath d='M0 22 L0 10 Q 15 0 30 10 T 60 10 T 90 10 T 120 10 L120 22Z' fill='%23e6dbff'/%3E%3Cpath d='M0 10 Q 15 0 30 10 T 60 10 T 90 10 T 120 10' fill='none' stroke='%234a4550' stroke-width='1.6'/%3E%3C/svg%3E")
    repeat-x;
  background-size: 120px 22px;
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
}
.footer-gems {
  height: 52px;
  width: auto;
}
.site-footer p {
  font-family: "Caveat", cursive;
  font-size: 1.35rem;
}
.back-top {
  font-family: "Fredoka", sans-serif;
  font-weight: 500;
  text-decoration: none;
}
.back-top:hover {
  text-decoration: underline wavy var(--pink-deep);
}

/* ================= RESPONSIVE ================= */
@media (max-width: 900px) {
  .hero-inner,
  .about-grid {
    display: grid;
    grid-template-columns: 1.15fr 1fr;
    gap: 52px;
    align-items: start;
    margin-bottom: 72px;
  }
  .hero {
    padding: 36px 0 80px;
  }
  .hero-logo {
    margin-left: -8px;
  }
  .map-polaroid {
    max-width: 340px;
  }
  .process-grid,
  .feature-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .team-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .section {
    padding: 76px 0;
  }
}

@media (max-width: 640px) {
  body {
    font-size: 16px;
  }
  .brand-logo {
    height: 40px;
  }

  .nav-burger {
    display: block;
    width: 42px;
    height: 40px;
    background: var(--pink);
    border-radius: var(--wobble);
    cursor: pointer;
  }
  .nav-burger span,
  .nav-burger span::before,
  .nav-burger span::after {
    position: absolute;
    left: 11px;
    width: 20px;
    height: 2px;
    background: var(--pencil);
    border-radius: 2px;
    content: "";
  }
  .nav-burger span {
    top: 19px;
  }
  .nav-burger span::before {
    top: -6px;
    left: 0;
  }
  .nav-burger span::after {
    top: 6px;
    left: 0;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: 78px;
    left: 12px;
    right: 12px;
    flex-direction: column;
    background: var(--white);
    padding: 12px 16px;
    border-radius: 14px;
    box-shadow: var(--soft-shadow);
  }
  .nav-toggle:checked ~ .nav-links {
    display: flex;
  }

  .process-grid,
  .feature-grid {
    grid-template-columns: 1fr;
  }
  .team-grid {
    gap: 22px 18px;
  }
  .note {
    font-size: 1.15rem;
  }
  .note-1 {
    left: 0;
  }
  .note-2 {
    right: -4px;
    top: 56%;
  }
}
