/* jellifis.studio — shared styles.
   The studio shell (header, footer, jellyfish mark) stays neutral; each app
   page layers its own look on top via a body class (e.g. .app-littlebox). */

:root {
  color-scheme: light;
  --paper: #f8f5ef;
  --card: #ffffff;
  --ink: #3a2b27;
  --ink-soft: #7b625b;
  --ink-faint: #a8958e;
  --line: #ece5da;
  --frame: #d6be95;

  --pink: #f7d9de;
  --lilac: #ddd5f3;
  --sage: #d6e8d3;
  --butter: #f4e8c3;
  --sky: #d3e3f6;

  --radius: 28px;
  --shadow: 0 1px 2px rgba(58, 43, 39, 0.05), 0 8px 24px rgba(58, 43, 39, 0.07);
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Rounded", "SF Pro Text",
    "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --gutter: 20px;
  --max: 1080px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-underline-offset: 3px; text-decoration-thickness: 1.5px; }
a:hover { color: var(--ink-soft); }
:focus-visible { outline: 3px solid var(--frame); outline-offset: 3px; border-radius: 8px; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.narrow { max-width: 720px; }

h1, h2, h3 { line-height: 1.15; letter-spacing: -0.02em; margin: 0 0 0.4em; }
h1 { font-size: clamp(2.4rem, 7vw, 4rem); font-weight: 700; }
h2 { font-size: clamp(1.6rem, 4.5vw, 2.3rem); font-weight: 700; }
h3 { font-size: 1.2rem; font-weight: 650; }
p { margin: 0 0 1em; }
.soft { color: var(--ink-soft); }
.eyebrow {
  font-size: 0.8rem; font-weight: 600; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--ink-faint);
}

/* ---------- Studio shell ---------- */

.site-header { padding: 22px 0; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 650; letter-spacing: -0.01em; }
.brand svg { width: 34px; height: 34px; flex: none; }
.site-nav { display: flex; gap: 18px; font-size: 0.95rem; }
.site-nav a { text-decoration: none; color: var(--ink-soft); }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--ink); }

.site-footer { margin-top: 96px; padding: 40px 0 56px; border-top: 1px solid var(--line); font-size: 0.92rem; color: var(--ink-soft); }
.site-footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px 32px; align-items: center; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.site-footer a { text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 22px; border-radius: 999px;
  background: var(--ink); color: #fff; text-decoration: none;
  font-weight: 600; font-size: 1rem;
  box-shadow: var(--shadow);
}
.btn:hover { color: #fff; background: #52403a; }
.btn svg { width: 20px; height: 20px; }
.btn.is-soon { background: var(--card); color: var(--ink); border: 1.5px solid var(--line); box-shadow: none; cursor: default; }
.btn.is-soon:hover { color: var(--ink); }

/* ---------- Studio home ---------- */

.studio-hero { padding: 56px 0 40px; text-align: center; }
.studio-hero .jelly { width: 132px; height: 132px; margin: 0 auto 18px; animation: bob 5s ease-in-out infinite; }
.studio-hero p { font-size: 1.2rem; max-width: 30em; margin: 0 auto; }

.app-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; margin-top: 48px; }
.app-card {
  display: flex; gap: 18px; align-items: center;
  background: var(--card); border-radius: var(--radius); padding: 22px;
  text-decoration: none; box-shadow: var(--shadow);
  transition: transform 0.2s ease;
}
.app-card:hover { transform: translateY(-3px); color: var(--ink); }
.app-card img { width: 84px; height: 84px; border-radius: 22%; flex: none; }
.app-card h3 { margin: 0 0 2px; }
.app-card p { margin: 0; color: var(--ink-soft); font-size: 0.95rem; }
.app-card.is-placeholder { background: transparent; border: 2px dashed var(--line); box-shadow: none; color: var(--ink-faint); justify-content: center; min-height: 128px; }
.app-card.is-placeholder:hover { transform: none; color: var(--ink-faint); }

@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }

/* ---------- LittleBox ---------- */

.lb-hero { position: relative; padding: 40px 0 24px; text-align: center; }
.lb-hero .icon { width: 132px; height: 132px; border-radius: 22%; margin: 0 auto 22px; box-shadow: var(--shadow); }
.lb-hero .tagline { font-size: clamp(1.15rem, 3vw, 1.35rem); color: var(--ink-soft); max-width: 26em; margin: 0 auto 28px; }

/* Stickers float around the hero like the corkboard. Hidden on small screens
   where they'd crowd the text. */
.stickers { position: absolute; inset: 0; pointer-events: none; }
.sticker { position: absolute; width: 76px; filter: drop-shadow(0 4px 6px rgba(58, 43, 39, 0.12)); animation: bob 6s ease-in-out infinite; }
.sticker:nth-child(2n) { animation-delay: -2s; }
.sticker:nth-child(3n) { animation-delay: -4s; }
@media (max-width: 760px) { .sticker { width: 52px; } .sticker.hide-sm { display: none; } }

.shots {
  display: flex; gap: 24px; justify-content: center; align-items: flex-start;
  padding: 36px 0 12px;
}
.phone {
  width: 260px; flex: none;
  border-radius: 40px; padding: 8px; background: #fff;
  box-shadow: var(--shadow), 0 0 0 1px var(--line);
}
.phone img { border-radius: 32px; width: 100%; height: auto; }
.shots .phone:nth-child(1) { transform: rotate(-3deg) translateY(24px); }
.shots .phone:nth-child(3) { transform: rotate(3deg) translateY(24px); }
@media (max-width: 860px) {
  .shots { justify-content: flex-start; overflow-x: auto; scroll-snap-type: x mandatory; padding: 24px var(--gutter) 24px; margin: 0 calc(-1 * var(--gutter)); }
  .shots .phone { width: 230px; scroll-snap-align: center; transform: none !important; }
}

.features { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); margin-top: 72px; }
.feature { border-radius: var(--radius); padding: 26px 24px 22px; position: relative; overflow: hidden; }
.feature img { width: 64px; height: 64px; object-fit: contain; margin-bottom: 14px; }
.feature p { margin: 0; color: var(--ink-soft); }
/* Same textures as the activity boxes in the app. */
.feature.pink { background: var(--pink) radial-gradient(circle, rgba(255,255,255,0.7) 2.5px, transparent 3px) 0 0 / 20px 20px; }
.feature.lilac {
  background:
    repeating-linear-gradient(0deg, rgba(255,255,255,0.45) 0 10px, transparent 10px 20px),
    repeating-linear-gradient(90deg, rgba(255,255,255,0.45) 0 10px, transparent 10px 20px),
    var(--lilac);
}
.feature.sage { background: var(--sage); }
.feature.butter {
  background:
    repeating-linear-gradient(0deg, rgba(214,190,149,0.22) 0 10px, transparent 10px 20px),
    repeating-linear-gradient(90deg, rgba(214,190,149,0.22) 0 10px, transparent 10px 20px),
    var(--butter);
}
.feature.sky { background: var(--sky) radial-gradient(circle, rgba(255,255,255,0.7) 2.5px, transparent 3px) 0 0 / 20px 20px; }
.feature.paper { background: var(--card); box-shadow: var(--shadow); }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; margin-top: 110px; }
.split.flip .split-text { order: 2; }
.split .phone { margin: 0 auto; width: 280px; }
@media (max-width: 760px) {
  .split { grid-template-columns: 1fr; gap: 28px; margin-top: 72px; }
  .split.flip .split-text { order: 0; }
}

.corkframe { background: var(--frame); border-radius: var(--radius); padding: 14px; }
.corkframe > div {
  background: #fff; border-radius: 18px; padding: 40px 28px; text-align: center;
  background-image: repeating-linear-gradient(90deg, rgba(0,0,0,0.018) 0 2px, transparent 2px 9px);
}

.privacy-note { margin-top: 110px; text-align: center; }
.privacy-note .corkframe { max-width: 720px; margin: 0 auto; }
.privacy-note h2 { margin-bottom: 10px; }
.privacy-note ul { list-style: none; padding: 0; margin: 20px 0 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.privacy-note li { background: var(--paper); border-radius: 999px; padding: 6px 16px; font-size: 0.95rem; }

.cta { text-align: center; margin-top: 110px; }

/* ---------- Document pages (privacy, support) ---------- */

.doc { padding-top: 24px; }
.doc h1 { font-size: clamp(2rem, 6vw, 2.8rem); }
.doc h2 { font-size: 1.35rem; margin-top: 2em; }
.doc .card { background: var(--card); border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow); margin-top: 28px; }
.doc ul { padding-left: 1.2em; }
.doc li { margin-bottom: 0.4em; }
.doc details { border-bottom: 1px solid var(--line); padding: 16px 0; }
.doc details:last-of-type { border-bottom: 0; }
.doc summary { cursor: pointer; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.doc summary::-webkit-details-marker { display: none; }
.doc summary::after { content: "+"; color: var(--ink-faint); font-weight: 400; font-size: 1.3rem; line-height: 1; }
.doc details[open] summary::after { content: "–"; }
.doc details p { margin: 10px 0 0; color: var(--ink-soft); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

@media (max-width: 420px) {
  .brand { white-space: nowrap; font-size: 0.95rem; }
  .brand img { width: 28px; height: 28px; }
  .site-nav { gap: 12px; font-size: 0.88rem; }
}

/* ---------- LittleBox: poem opener ---------- */

.poem {
  /* SF Mono on Apple devices (their own copy, via ui-monospace); Roboto Mono,
     the closest free match, everywhere else. */
  --poem-font: ui-monospace, "SF Mono", SFMono-Regular, "Roboto Mono", Menlo, monospace;
  max-width: 780px; margin: 0 auto; padding-block: 48px 8px;
  font-family: var(--poem-font); font-weight: 400;
  font-size: clamp(1.05rem, 2.6vw, 1.6rem); line-height: 1.55; letter-spacing: -0.02em;
}
.poem .line { margin: 0; padding-left: var(--x, 0%); }
.poem .line.gap { margin-top: 1.1em; }
.poem em { font-style: italic; }
.poem .bead {
  display: inline-block; height: var(--h, 1.8em); width: auto; margin-left: 0.35em;
  margin-block: calc((1.35em - var(--h, 1.8em)) / 2);
  vertical-align: -0.5em; transform: rotate(var(--r, 0deg));
  filter: drop-shadow(0 3px 4px rgba(58, 43, 39, 0.12));
}
.poem-mascot { width: min(260px, 56%); height: auto; margin: 28px 0 0 auto; margin-right: 6%; }
.poem + .lb-hero { margin-top: 56px; padding-top: 56px; border-top: 1px solid var(--line); }
@media (max-width: 600px) {
  .poem { padding-block: 28px 0; font-size: 1rem; }
  .poem .line { padding-left: calc(var(--x, 0%) * 0.45); }
  .poem-mascot { margin-right: 0; }
}
.poem .nobr { white-space: nowrap; }

/* Feature crops: one focused piece of a screen instead of the whole phone. */
.crop { margin: 0; width: 100%; max-width: 480px; justify-self: center; }
.crop img {
  width: 100%; height: auto; border-radius: 26px; background: var(--paper);
  box-shadow: var(--shadow), 0 0 0 1px var(--line);
}
.crop-stack { display: grid; }
.crop-stack img:last-child { position: relative; width: 78%; margin: -5% 0 0 auto; }

/* Let the nav drop under the brand when both don't fit on one line. */
.site-header .wrap { flex-wrap: wrap; row-gap: 10px; }
