/* Guhit website — hand-drawn sketchbook identity.
   Cream paper, ink text, crayon accents, wobbly hand-drawn shapes. */

:root {
  --paper: #f3ede2;
  --paper-deep: #ece3d2;
  --ink: #1f1b16;
  --orange: #f0a03c;
  --blue: #4a90d9;
  --red: #e05b4b;
  --green: #58a05c;
  --purple: #9b59d0;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Nunito', sans-serif;
  background: var(--paper);
  color: var(--ink);
  overflow-x: hidden;
}

h1, h2, .hand {
  font-family: 'Caveat', cursive;
}

/* ---- floating background doodles ---- */
.doodle {
  position: fixed;
  pointer-events: none;
  opacity: 0.5;
  z-index: 0;
  animation: floaty 7s ease-in-out infinite;
}
.doodle:nth-child(2n) { animation-duration: 9s; animation-delay: 1.2s; }
.doodle:nth-child(3n) { animation-duration: 11s; animation-delay: 2.4s; }

@keyframes floaty {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-14px) rotate(3deg); }
}

main { position: relative; z-index: 1; }

/* ---- nav ---- */
nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 6vw;
  position: sticky;
  top: 0;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: blur(8px);
  z-index: 10;
}
nav .logo img { height: 44px; }
nav .links a {
  color: var(--ink);
  text-decoration: none;
  font-weight: 800;
  margin-left: 26px;
  font-size: 15px;
  position: relative;
}
nav .links a::after {
  content: '';
  position: absolute;
  left: 0; right: 100%;
  bottom: -4px;
  height: 3px;
  background: var(--orange);
  border-radius: 3px;
  transition: right .25s ease;
}
nav .links a:hover::after { right: 0; }

/* ---- hero ---- */
.hero {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6vw;
  padding: 8vh 6vw 10vh;
  flex-wrap: wrap;
}
.hero-copy { max-width: 520px; }
.hero-copy h1 {
  font-size: clamp(44px, 7vw, 80px);
  line-height: 1.05;
  font-weight: 700;
}
.hero-copy h1 .squiggle {
  position: relative;
  white-space: nowrap;
}
.hero-copy h1 .squiggle::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: 4px;
  height: 10px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='10' viewBox='0 0 120 10'%3E%3Cpath d='M2 6 Q 12 2, 24 6 T 46 6 T 68 6 T 90 6 T 118 5' fill='none' stroke='%23f0a03c' stroke-width='4' stroke-linecap='round'/%3E%3C/svg%3E") repeat-x;
  background-size: 120px 10px;
  z-index: -1;
}
.hero-copy p {
  margin: 18px 0 30px;
  font-size: 18px;
  line-height: 1.6;
  color: #5c554b;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--ink);
  color: var(--paper);
  font-weight: 800;
  font-size: 17px;
  text-decoration: none;
  padding: 15px 28px;
  border-radius: 16px;
  transition: transform .15s ease, box-shadow .15s ease;
  box-shadow: 0 6px 0 rgba(31, 27, 22, .25);
}
.btn:hover { transform: translateY(-3px) rotate(-1deg); box-shadow: 0 9px 0 rgba(31,27,22,.25); }
.btn:active { transform: translateY(1px); box-shadow: 0 3px 0 rgba(31,27,22,.25); }
.btn small { display: block; font-weight: 600; font-size: 11px; opacity: .75; }

.android-note {
  margin-top: 12px;
  font-size: 13px;
  color: #8a8274;
  font-weight: 700;
}

/* ---- wooden easel holding the canvas ---- */
.hero-art { position: relative; }
.easel {
  position: relative;
  width: min(360px, 80vw);
  padding: 26px 24px 96px;
  transition: transform .3s ease;
}
.easel:hover { transform: scale(1.015); }
.easel-leg {
  position: absolute;
  width: 13px;
  background: linear-gradient(90deg, #a97b4e, #8a6238 60%, #75522e);
  border-radius: 7px;
  box-shadow: 0 6px 14px rgba(31,27,22,.18);
}
.easel-leg-l { height: 88%; left: 12%; bottom: 0; transform: rotate(9deg); }
.easel-leg-r { height: 88%; right: 12%; bottom: 0; transform: rotate(-9deg); }
.easel-leg-c {
  height: 42%;
  left: 50%;
  bottom: 0;
  margin-left: -6px;
  z-index: -1;
}
.easel-top {
  position: absolute;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  width: 46%;
  height: 14px;
  background: linear-gradient(180deg, #a97b4e, #8a6238);
  border-radius: 7px;
  box-shadow: 0 4px 10px rgba(31,27,22,.2);
  z-index: 3;
}
.easel-tray {
  position: absolute;
  bottom: 78px;
  left: 4%;
  width: 92%;
  height: 18px;
  background: linear-gradient(180deg, #b98a58, #8a6238);
  border-radius: 6px;
  box-shadow: 0 6px 14px rgba(31,27,22,.25);
  z-index: 3;
}

/* the canvas itself: stretched cotton with a wooden frame edge */
.canvas-card {
  position: relative;
  width: 100%;
  aspect-ratio: 320 / 400;
  background:
    repeating-linear-gradient(0deg, rgba(31,27,22,.015) 0 2px, transparent 2px 4px),
    repeating-linear-gradient(90deg, rgba(31,27,22,.015) 0 2px, transparent 2px 4px),
    #fdfbf6;
  border: 10px solid #e7dcc8;
  border-bottom-color: #d9cbb1;
  border-right-color: #ddd0b8;
  border-radius: 4px;
  box-shadow:
    inset 0 0 24px rgba(31,27,22,.06),
    0 18px 44px rgba(31, 27, 22, .25);
  transform: rotate(.6deg);
  overflow: hidden;
  z-index: 2;
}
.canvas-card .scene { width: 100%; height: 100%; display: block; }

/* Crayon cursor: positioned by the drawing engine (JS). */
.crayon {
  position: absolute;
  font-size: 34px;
  left: 0;
  top: 0;
  pointer-events: none;
  transition: opacity .3s ease;
  filter: drop-shadow(0 3px 4px rgba(31,27,22,.3));
  z-index: 4;
}

/* ---- sections ---- */
section { padding: 8vh 6vw; }
section h2 {
  font-size: clamp(34px, 5vw, 54px);
  text-align: center;
  margin-bottom: 6vh;
}

.features {
  display: grid;
  /* 3×2 on desktop so the six cards sit balanced; wraps on smaller. */
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: 26px;
  max-width: 1060px;
  margin: 0 auto;
}
.card {
  --accent: var(--blue);
  --tilt: -0.8deg;
  --rx: 0deg;
  --ry: 0deg;
  background: #fff;
  border-radius: 22px;
  padding: 28px 26px;
  box-shadow: 0 4px 16px rgba(31, 27, 22, .10);
  transform: perspective(700px) rotateX(var(--rx)) rotateY(var(--ry))
      rotate(var(--tilt));
  transition: transform .18s ease, box-shadow .25s ease;
}
/* scrapbook: each card sits at its own slight angle */
.card:nth-child(even) { --tilt: 0.8deg; }
.card:hover {
  --tilt: 0deg;
  box-shadow: 0 16px 34px rgba(31, 27, 22, .18);
}
/* emoji in a wobbly color-washed blob matching the card accent */
.card .emoji {
  width: 64px;
  height: 64px;
  display: grid;
  place-items: center;
  font-size: 32px;
  background: color-mix(in srgb, var(--accent) 16%, #fff);
  border-radius: 54% 46% 50% 50% / 46% 54% 46% 54%;
  transition: border-radius .3s ease;
}
.card:hover .emoji {
  animation: wiggle .5s ease;
  border-radius: 46% 54% 48% 52% / 52% 46% 54% 48%;
}
@keyframes wiggle {
  0%, 100% { transform: rotate(0deg) scale(1); }
  25% { transform: rotate(-9deg) scale(1.08); }
  60% { transform: rotate(7deg) scale(1.05); }
}
.card h3 { margin: 16px 0 8px; font-size: 19px; }
.card h3::after {
  content: '';
  display: block;
  width: 44px;
  height: 4px;
  margin-top: 8px;
  border-radius: 4px;
  background: var(--accent);
  transition: width .35s ease;
}
.card:hover h3::after { width: 100%; }
.card p { color: #6b6355; line-height: 1.6; font-size: 15px; }
.card:nth-child(1) { --accent: var(--blue); }
.card:nth-child(2) { --accent: var(--red); }
.card:nth-child(3) { --accent: var(--green); }
.card:nth-child(4) { --accent: var(--orange); }
.card:nth-child(5) { --accent: var(--purple); }
.card:nth-child(6) { --accent: #2aa9a0; }

/* scroll-in animation */
.reveal { opacity: 0; transform: translateY(26px); transition: all .6s ease; }
.reveal.shown { opacity: 1; transform: none; }

/* ---- crayon word ticker ---- */
.ticker {
  overflow: hidden;
  background: var(--ink);
  transform: rotate(-1deg);
  margin: 3vh -2vw;
  box-shadow: 0 8px 20px rgba(31,27,22,.18);
}
.ticker-track {
  display: flex;
  align-items: center;
  white-space: nowrap;
  width: max-content;
  padding: 14px 0;
  animation: tick 26s linear infinite;
}
.ticker-track span {
  display: inline-flex;
  align-items: center;
  font-family: 'Caveat', cursive;
  font-size: 30px;
  font-weight: 700;
  line-height: 1;
}
/* hand-drawn star separator between words */
.ticker-track span::after {
  content: '✦';
  font-size: 16px;
  margin: 0 26px;
  color: var(--orange);
  opacity: .9;
}
/* words cycle through the crayon palette */
.ticker-track span:nth-child(5n+1) { color: var(--paper); }
.ticker-track span:nth-child(5n+2) { color: var(--orange); }
.ticker-track span:nth-child(5n+3) { color: #8fc1f0; }
.ticker-track span:nth-child(5n+4) { color: #f0a49a; }
.ticker-track span:nth-child(5n+5) { color: #9ed4a1; }
@keyframes tick { to { transform: translateX(-50%); } }
.ticker:hover .ticker-track { animation-play-state: paused; }

/* ---- how it works ---- */
.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 28px;
  max-width: 980px;
  margin: 0 auto;
}
.step { text-align: center; padding: 0 10px; }
.stepnum {
  width: 64px;
  height: 64px;
  margin: 0 auto 14px;
  display: grid;
  place-items: center;
  font-size: 38px;
  font-weight: 700;
  color: var(--ink);
  background: #fff;
  border-radius: 50% 46% 52% 48% / 48% 52% 46% 54%;
  box-shadow: 0 4px 14px rgba(31,27,22,.14);
}
.step:nth-child(1) .stepnum { color: var(--blue); }
.step:nth-child(2) .stepnum { color: var(--red); }
.step:nth-child(3) .stepnum { color: var(--green); }
.step h3 { font-size: 19px; margin-bottom: 8px; }
.step p { color: #6b6355; font-size: 15px; line-height: 1.55; }

/* ---- FAQ ---- */
.faq { max-width: 720px; margin: 0 auto; }
.faq details {
  background: #fff;
  border-radius: 16px;
  padding: 18px 22px;
  margin-bottom: 12px;
  box-shadow: 0 3px 12px rgba(31,27,22,.08);
}
.faq summary {
  cursor: pointer;
  font-weight: 800;
  font-size: 16px;
  list-style: none;
  position: relative;
  padding-right: 28px;
}
.faq summary::after {
  content: '+';
  position: absolute;
  right: 0;
  top: -4px;
  font-family: 'Caveat', cursive;
  font-size: 28px;
  color: var(--orange);
  transition: transform .2s ease;
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { margin-top: 10px; color: #6b6355; line-height: 1.6; font-size: 15px; }

/* ---- big CTA ---- */
.cta {
  text-align: center;
  background: var(--paper-deep);
  border-radius: 40px;
  margin: 0 6vw 8vh;
  padding: 10vh 6vw;
}
.cta h2 { margin-bottom: 12px; }
.cta p { color: #6b6355; margin-bottom: 30px; }

/* ---- footer ---- */
footer {
  padding: 40px 6vw;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  color: #8a8274;
  font-size: 14px;
}
footer a { color: var(--ink); font-weight: 700; text-decoration: none; margin-right: 18px; }
footer a:hover { color: var(--orange); }

/* ---- legal pages ---- */
.legal {
  max-width: 760px;
  margin: 0 auto;
  padding: 6vh 6vw 10vh;
  line-height: 1.7;
}
.legal h1 { font-size: clamp(40px, 6vw, 60px); margin-bottom: 8px; }
.legal .updated { color: #8a8274; font-size: 14px; margin-bottom: 34px; }
.legal h2 { font-size: 30px; margin: 36px 0 10px; text-align: left; }
.legal p, .legal li { color: #4d463c; font-size: 16px; margin-bottom: 12px; }
.legal ul { padding-left: 22px; }

/* ---- pen cursor + crayon-dust trail ---- */
html, body, a, button, summary {
  cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='34' height='34' viewBox='0 0 34 34'%3E%3Cg transform='rotate(40 17 17)'%3E%3Crect x='14' y='2' width='7' height='19' rx='2.5' fill='%23f0a03c' stroke='%231f1b16' stroke-width='1.6'/%3E%3Cpath d='M14 21 L17.5 30 L21 21 Z' fill='%23e7dcc8' stroke='%231f1b16' stroke-width='1.6'/%3E%3Cpath d='M16.4 26 L17.5 30 L18.6 26 Z' fill='%231f1b16'/%3E%3C/g%3E%3C/svg%3E") 6 30, auto;
}

.trail-dot {
  position: fixed;
  width: 8px;
  height: 8px;
  border-radius: 40% 60% 55% 45%;
  pointer-events: none;
  z-index: 9999;
  animation: dust .65s ease-out forwards;
}
@keyframes dust {
  0%   { opacity: .9; transform: scale(1) translateY(0) rotate(0deg); }
  100% { opacity: 0;  transform: scale(.2) translateY(10px) rotate(80deg); }
}
