/* Capybara Around The World — shared styles. Cute, playful, game-like. */
@import url('https://fonts.googleapis.com/css2?family=Bubblegum+Sans&family=Caveat:wght@500;700&family=Nunito:wght@400;600;700;800&display=swap');

/* ===== Theme palettes (match the app: Classic / Sakura / Ocean) ===== */
:root{ /* Classic (default) */
  --cream:#FFF9F3; --teal:#2E8B7A; --teal-dark:#1F6558;
  --brown:#8B5E3C; --brown-light:#B8845A;
  --orange:#E8955A; --orange-dark:#CB7A42;
  --ink:#3B2010; --mid:#6b5a48;
  --ring:#FFD9A8; --glow1:#FFE9CF; --glow2:#DFF3EE;
  --shadow:0 14px 30px rgba(59,32,16,.14);
}
body[data-theme="sakura"]{
  --cream:#FFF0F5; --teal:#D63A77; --teal-dark:#A82960;
  --brown:#8B5E6A; --brown-light:#C48899;
  --orange:#F07045; --orange-dark:#D85A30;
  --ink:#3A1525; --mid:#6B4F60;
  --ring:#F7C6DD; --glow1:#FFDCEB; --glow2:#FCE3D8;
  --shadow:0 14px 30px rgba(120,30,70,.14);
}
body[data-theme="ocean"]{
  --cream:#EEF4FB; --teal:#1971C2; --teal-dark:#0E5099;
  --brown:#5D7A99; --brown-light:#7A9AB8;
  --orange:#F9A825; --orange-dark:#E08800;
  --ink:#0D1B33; --mid:#3E5472;
  --ring:#BFE0FF; --glow1:#D7ECFF; --glow2:#FBE9C4;
  --shadow:0 14px 30px rgba(13,40,80,.14);
}
*{box-sizing:border-box;}
html{scroll-behavior:smooth;}
body{
  margin:0; font-family:"Nunito",system-ui,sans-serif; color:var(--ink);
  background:
    radial-gradient(1200px 500px at 80% -10%, var(--glow1) 0%, transparent 60%),
    radial-gradient(900px 500px at -10% 10%, var(--glow2) 0%, transparent 55%),
    var(--cream);
  overflow-x:hidden;
  transition:background .4s ease, color .4s ease;
}
h1,h2,h3,.fancy{font-family:"Bubblegum Sans",cursive; font-weight:400; line-height:1.08; color:var(--brown);}
a{color:var(--orange-dark); text-decoration:none;}
.wrap{max-width:1080px; margin:0 auto; padding:0 22px;}

/* ---- top nav ---- */
.nav{display:flex; align-items:center; justify-content:space-between; padding:16px 22px; max-width:1080px; margin:0 auto;}
.brand{display:flex; align-items:center; gap:12px; font-family:"Bubblegum Sans"; font-size:22px; color:var(--brown);}
.brand img{width:42px; height:42px; border-radius:12px; box-shadow:var(--shadow);}
.nav-links a{margin-left:18px; font-weight:800; color:var(--teal);}
.nav-right{display:flex; align-items:center; gap:18px;}
.themes{display:flex; gap:8px;}
.sw{width:24px; height:24px; border-radius:50%; border:2px solid #fff; box-shadow:var(--shadow); cursor:pointer; padding:0; transition:transform .1s ease;}
.sw:active{transform:scale(.9);}
.sw.active{outline:3px solid var(--ring); outline-offset:2px;}

/* handwritten, endearing story block */
.story{
  font-family:"Caveat",cursive; font-weight:500;
  font-size:clamp(24px,3.6vw,36px); line-height:1.35;
  color:var(--teal); max-width:34ch; margin:6px auto 0; text-align:center;
}
.story b{color:var(--orange-dark);}

/* cute handwritten subtitle (more specific so it always wins over .section-sub) */
.section-sub.cute{
  font-family:"Caveat",cursive; font-weight:500;
  font-size:clamp(22px,3vw,30px); color:var(--brown);
  max-width:none; /* keep it on one line on wider screens */
}

/* ---- buttons (3D, bouncy) ---- */
.btn{
  display:inline-flex; align-items:center; gap:10px; cursor:pointer; border:none;
  font-family:"Bubblegum Sans"; font-size:20px; color:#fff; background:var(--teal);
  padding:14px 26px; border-radius:999px; box-shadow:0 6px 0 var(--teal-dark), var(--shadow);
  transition:transform .08s ease, box-shadow .08s ease;
}
.btn:active{transform:translateY(4px); box-shadow:0 2px 0 var(--teal-dark);}
.btn.orange{background:var(--orange); box-shadow:0 6px 0 var(--orange-dark), var(--shadow);}
.btn.orange:active{box-shadow:0 2px 0 var(--orange-dark);}
.btn.ghost{background:#fff; color:var(--teal); box-shadow:0 6px 0 #e7d8c4, var(--shadow);}

/* ---- hero ---- */
.hero{display:grid; grid-template-columns:1.1fr 1fr; gap:30px; align-items:center; padding:30px 0 50px;}
.hero h1{font-size:clamp(38px,6vw,68px); color:var(--brown); margin:.1em 0;}
.hero p.lead{font-size:clamp(17px,2.4vw,22px); color:var(--mid); max-width:30ch;}
.hero .cta{display:flex; gap:14px; flex-wrap:wrap; margin-top:22px;}
.hero-art{position:relative; text-align:center;}
.hero-art img{width:min(92%,460px); border-radius:32px; box-shadow:var(--shadow); animation:float 5s ease-in-out infinite;}
.spark{position:absolute; font-size:30px; animation:twinkle 2.6s ease-in-out infinite;}
.spark.s1{top:6%; left:4%;} .spark.s2{top:14%; right:8%; animation-delay:.6s;}
.spark.s3{bottom:8%; left:12%; animation-delay:1.1s;}

@keyframes float{0%,100%{transform:translateY(0) rotate(-1deg);}50%{transform:translateY(-14px) rotate(1deg);}}
@keyframes twinkle{0%,100%{opacity:.3; transform:scale(.85);}50%{opacity:1; transform:scale(1.15);}}
@keyframes bob{0%,100%{transform:translateY(0);}50%{transform:translateY(-8px);}}

/* ---- ribbon / badges ---- */
.ribbon{display:inline-block; background:var(--orange); color:#fff; font-family:"Bubblegum Sans";
  padding:4px 14px; border-radius:999px; font-size:15px; box-shadow:var(--shadow); transform:rotate(-2deg);}
.pill{display:inline-block; background:#fff; color:var(--teal); font-weight:800; font-size:13px;
  padding:5px 12px; border-radius:999px; border:2px solid var(--ring);}

/* ---- sections ---- */
section{padding:46px 0;}
.section-title{text-align:center; font-size:clamp(28px,4vw,44px); margin-bottom:8px;}
.section-sub{text-align:center; color:var(--mid); max-width:46ch; margin:0 auto 28px;}

/* ---- app cards grid ---- */
.cards{display:grid; grid-template-columns:repeat(auto-fit,minmax(260px,1fr)); gap:22px;}
.card{background:#fff; border-radius:26px; padding:22px; box-shadow:var(--shadow); border:3px solid #fff;
  transition:transform .15s ease, border-color .15s ease;}
.card:hover{transform:translateY(-6px) rotate(-.5deg); border-color:var(--ring);}
.card.featured{border-color:var(--teal);}
.card .thumb{width:64px; height:64px; border-radius:18px; box-shadow:var(--shadow); margin-bottom:12px;}
.card h3{font-size:26px; margin:.1em 0;}
.card p{color:var(--mid); font-size:15px;}
.card.soon{background:#FBF4EA; border-style:dashed; border-color:#E3D2BB; color:#b6a489;}
.card.soon h3{color:#b6a489;}

/* ---- features ---- */
.feat{display:grid; grid-template-columns:repeat(auto-fit,minmax(200px,1fr)); gap:18px;}
.feat .f{background:#fff; border-radius:22px; padding:20px; box-shadow:var(--shadow);}
.feat .f .emoji{font-size:34px; display:block; margin-bottom:8px; animation:bob 4s ease-in-out infinite;}
.feat .f h4{font-family:"Bubblegum Sans"; color:var(--brown); font-size:20px; margin:.2em 0;}
.feat .f p{color:var(--mid); font-size:14px; margin:0;}

/* ---- phones ---- */
.shots{display:flex; gap:26px; justify-content:center; flex-wrap:wrap; align-items:flex-start;}
.phone{width:220px; border-radius:34px; padding:6px; background:#3B2010; box-shadow:var(--shadow);}
.phone img{width:100%; border-radius:26px; display:block;}
.phone.tilt1{transform:rotate(-3deg);} .phone.tilt2{transform:rotate(3deg);}
.phone.tilt3{transform:rotate(-3deg);} .phone.tilt4{transform:rotate(3deg);}
/* landscape device frame (e.g. Capy Catch) */
.phoneL{width:min(92%,540px); border-radius:24px; padding:6px; background:#3B2010; box-shadow:var(--shadow); margin:22px auto 0; transform:rotate(-1deg);}
.phoneL img{width:100%; border-radius:16px; display:block;}
/* iPad / tablet frame */
.tablet{width:min(82%,380px); border-radius:26px; padding:12px; background:#3B2010; box-shadow:var(--shadow); margin:18px auto 0;}
.tablet img{width:100%; border-radius:16px; display:block;}

/* ---- pricing ---- */
.plans{display:grid; grid-template-columns:repeat(auto-fit,minmax(220px,1fr)); gap:18px;}
.plans.two{grid-template-columns:repeat(2,1fr); max-width:680px; gap:14px; margin:0 auto;}
@media(max-width:540px){.plans.two{grid-template-columns:1fr;}}
.plan{background:#fff; border-radius:20px; padding:16px 18px; box-shadow:var(--shadow); text-align:center; border:2px solid #fff;}
.plan.hi{border-color:var(--teal); position:relative;}
.plan h3{font-size:20px;} .plan .price{font-family:"Bubblegum Sans"; font-size:24px; color:var(--teal);}
.plan ul{list-style:none; padding:0; margin:10px 0 0; text-align:left; color:var(--mid); font-size:13px;}
.plan li{margin:5px 0; padding-left:22px; position:relative;}
.plan li:before{content:"🌿"; position:absolute; left:0;}

/* ---- framed square mascot image ---- */
.capy-frame{
  display:block; margin:34px auto 6px; width:min(58%,200px);
  border-radius:28px; border:6px solid #fff; background:#fff;
  box-shadow:var(--shadow);
  animation:bob 4.5s ease-in-out infinite;
}

/* ---- video ---- */
.heroVideo{width:min(92%,360px); border-radius:28px; box-shadow:var(--shadow);}

/* ---- footer ---- */
footer{background:var(--teal); color:#fff; padding:34px 0; margin-top:30px;}
footer .wrap{display:flex; flex-wrap:wrap; gap:16px; justify-content:space-between; align-items:center;}
footer a{color:#fff; font-weight:800; margin-right:16px;}
footer .small{opacity:.85; font-size:13px;}

/* ---- wavy divider ---- */
.wave{display:block; width:100%; height:40px;}

@media(max-width:760px){
  .hero{grid-template-columns:1fr; text-align:center;}
  .hero .cta{justify-content:center;}
  .hero p.lead{margin-left:auto; margin-right:auto;}
  .nav-links{display:none;}
}

/* ---- Decorated section divider (cute fading rules + center motif) ---- */
.divider{display:flex; align-items:center; gap:16px; max-width:640px; margin:66px auto 6px; padding:0 22px;}
.divider::before,.divider::after{content:""; flex:1; height:3px; border-radius:3px;
  background:linear-gradient(90deg,transparent, var(--brown-light));}
.divider::after{background:linear-gradient(90deg, var(--brown-light), transparent);}
.divider span{font-size:26px; line-height:1; filter:drop-shadow(0 2px 2px rgba(0,0,0,.12));}

/* ---- Tutorials: self-hosted portrait clips framed like phones ---- */
.tut-grid{display:grid; grid-template-columns:repeat(auto-fit,minmax(220px,1fr)); gap:28px; margin-top:26px;}
.tut{display:flex; flex-direction:column; align-items:center; text-align:center;}
.tut .phone-vid{width:min(100%,238px); border-radius:26px; padding:8px; background:#3B2010; box-shadow:var(--shadow);}
.tut .phone-vid video{width:100%; border-radius:20px; display:block; background:#000; aspect-ratio:9/19.5;}
.tut h4{margin:14px 0 4px; font-family:"Bubblegum Sans",cursive; color:var(--brown); font-size:21px;}
.tut p{color:var(--mid); font-size:15px; max-width:32ch; margin:0;}

/* landscape tutorial clips (flash card, Capy Catch, Capy Listen) */
.tut.land .phone-vid{width:min(100%,470px);}
.tut.land .phone-vid video{aspect-ratio:19.5/9;}
@media(min-width:600px){ .tut.land{grid-column:span 2;} }

/* Games: portraits on the left, landscape clips stacked on the right */
.games-shots{display:flex; gap:30px; justify-content:center; align-items:center; flex-wrap:wrap; margin-top:28px;}
.games-shots .shots{margin:0;}
.lands{display:flex; flex-direction:column; gap:18px;}
.lands .phoneL{margin:0; width:min(100%,430px); transform:rotate(-1deg);}
.lands .phoneL:last-child{transform:rotate(1deg);}

/* Games layout fix: guarantee portraits + landscapes on one row (desktop) */
.games-shots{flex-wrap:wrap; gap:28px; align-items:center;}
@media(min-width:920px){ .games-shots{flex-wrap:nowrap;} }
.games-shots .shots{gap:18px;}
.games-shots .phone{width:200px;}
.lands{gap:16px;}
.lands .phoneL{width:400px; max-width:100%;}

/* Tutorials: horizontal scroll-snap strip, peeking the next card */
.tut-grid{
  display:flex; grid-template-columns:none;
  gap:22px; overflow-x:auto;
  scroll-snap-type:x mandatory;
  -webkit-overflow-scrolling:touch;
  padding:6px 2px 16px; scroll-padding-left:2px;
  scrollbar-width:thin; scrollbar-color:var(--brown-light) transparent;
}
.tut{flex:0 0 auto; width:238px; scroll-snap-align:start;}
.tut.land{width:min(470px,86vw);}
.tut .phone-vid, .tut.land .phone-vid{width:100%; max-width:none;}
.tut-grid::-webkit-scrollbar{height:8px;}
.tut-grid::-webkit-scrollbar-thumb{background:var(--brown-light); border-radius:8px;}
.tut-grid::-webkit-scrollbar-track{background:transparent;}

/* iPad section: static screenshot + portrait tour video, side by side */
.ipad-duo{display:flex; gap:26px; justify-content:center; align-items:flex-start; flex-wrap:wrap; margin-top:18px;}
.ipad-duo .tablet{margin:0; width:min(86%,360px);}
.tablet video{width:100%; border-radius:16px; display:block; background:#000;}

/* Language switcher dropdown (in the header) */
.langpick select{font-family:"Nunito",sans-serif; font-weight:800; font-size:13px; cursor:pointer; color:var(--teal); background:#fff; border:1.5px solid var(--brown-light); border-radius:10px; padding:6px 24px 6px 10px;}
.langpick select:hover{border-color:var(--teal);}
html[dir="rtl"] .lead, html[dir="rtl"] .section-sub, html[dir="rtl"] .story, html[dir="rtl"] .tut p, html[dir="rtl"] .f p, html[dir="rtl"] .card p{text-align:right;}
