/* Shared by every dark page on joinjell.app (home, about): tokens, the
   full-bleed film, header, nav and its "more" pull-down, glass, the CTA. */

/* Colors are the iOS app's own (InterestTheme / ExploreTheme): parchment,
   tan rules, leaf green, pale pigment avatars -- here laid over the film
   as smoked glass rather than paper. */
:root {
  --night: #171312;
  --cream: #F6EBD9;
  --cream-soft: rgba(246, 235, 217, .68);
  --glass: rgba(23, 19, 18, .42);
  --tan: #C8B49A;
  --tan-line: rgba(200, 180, 154, .38);
  --leaf: #3F7D48;
  --leaf-deep: #2F6237;
  --leaf-lit: #8CC896;
  --leaf-red: #B85450;
  --ink: #2C1A0E;
  --ink-mid: #5C3D1E;
  --ink-muted: #846B4E;
  --paper: #FDEDD3;
  --line: #E3D2B4;
  --serif: "IM Fell English", Georgia, serif;
  --sans: "Inter", system-ui, -apple-system, sans-serif;
  --edge: max(20px, env(safe-area-inset-left));
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--night);
  color: var(--cream);
  font-family: var(--serif);
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}

/* ---- the film: full-bleed, looping ---------------------------------- */
.stage { position: fixed; inset: 0; }
.stage video {
  width: 100%; height: 100%; object-fit: cover; display: block;
  background: var(--night) url(/assets/landing-poster.jpg) center / cover;
}
.stage::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(ellipse 70% 45% at 50% 50%, rgba(23, 19, 18, .45), transparent 70%),
    linear-gradient(rgba(23, 19, 18, .55), transparent 22%, transparent 70%, rgba(23, 19, 18, .75));
}

/* ---- chrome --------------------------------------------------------- */
.chrome {
  position: fixed; inset: 0; z-index: 2;
  display: grid; grid-template-rows: auto 1fr auto; grid-template-columns: minmax(0, 1fr);
  padding: max(20px, env(safe-area-inset-top)) var(--edge) max(18px, env(safe-area-inset-bottom));
}

header { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 26px; color: var(--cream); text-decoration: none;
}
/* The "Jell" wordmark (jellyfish J), used as a mask so each page can color it. */
.brand .mark {
  width: 66px; height: 46px; flex: none; background: var(--cream);
  -webkit-mask: url(/assets/logo.png) center / contain no-repeat;
          mask: url(/assets/logo.png) center / contain no-repeat;
}
nav { display: flex; align-items: center; gap: 22px; }
nav a {
  font-size: 17px; color: var(--cream-soft); text-decoration: none;
  border-bottom: 1px solid transparent; transition: color .15s, border-color .15s;
}
nav a:hover { color: var(--cream); border-color: var(--tan); }
/* "more": a small pull-down for the fine print (after Goose) */
.more { position: relative; }
.more button {
  font: inherit; font-size: 17px; color: var(--cream-soft); background: none; border: 0; padding: 0; cursor: pointer;
  display: inline-flex; align-items: center; gap: 5px;
  border-bottom: 1px solid transparent; transition: color .15s, border-color .15s;
}
.more button:hover, .more button[aria-expanded="true"] { color: var(--cream); border-color: var(--tan); }
.more button:focus-visible, .more-menu a:focus-visible { outline: 1px solid var(--tan); outline-offset: 4px; border-radius: 4px; }
.more button svg { width: 10px; height: 10px; fill: none; stroke: currentColor; stroke-width: 1.6; transition: transform .25s; }
.more button[aria-expanded="true"] svg { transform: rotate(180deg); }
.more-menu {
  position: absolute; right: 0; top: calc(100% + 12px); z-index: 5; min-width: 180px;
  display: flex; flex-direction: column; padding: 8px; border-radius: 14px;
  background: rgba(23, 19, 18, .72);
  transform-origin: top right; animation: drop .22s cubic-bezier(.2, .8, .2, 1);
}
.more-menu[hidden] { display: none; }
@keyframes drop { from { opacity: 0; transform: translateY(-6px) scale(.97); } }
.more-menu a { font-size: 16px; padding: 8px 12px; border-radius: 9px; border: 0; white-space: nowrap; }
.more-menu a:hover { background: rgba(246, 235, 217, .08); }

.glass {
  background: var(--glass); border: 1px solid var(--tan-line);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
}

.cta {
  font: 21px var(--serif); color: #F5EFE3;
  background: var(--leaf); border: 1px solid rgba(140, 200, 150, .35); border-radius: 999px; cursor: pointer;
  padding: 13px 28px; display: inline-flex; align-items: center; gap: 10px;
  box-shadow: 0 12px 30px -10px rgba(0, 0, 0, .7);
  transition: background .15s, transform .15s;
}
.cta:hover { background: var(--leaf-deep); transform: translateY(-1px); }
.cta svg { width: 13px; height: 13px; fill: currentColor; }

@media (min-width: 1000px) {
  .chrome { padding: 40px 48px 36px; }
}

/* ---- content pages (about, contact): a panel over a one-second loop ------
   Markup: <main class="page" data-layout="text"> holding an optional
   <figure class="device"> and an <article class="panel glass">. */
/* A heavier, even veil than the home page: here the film is texture
   behind reading, not the subject. */
.stage.veil::after { background: radial-gradient(ellipse at 50% 50%, rgba(23, 19, 18, .35), rgba(23, 19, 18, .7)); }

nav a[aria-current="page"] { color: var(--cream); border-color: var(--tan); }

/* ---- layout ----------------------------------------------------------
   Two layouts share this markup, chosen by data-layout on <main>:

     text    (now)   one reading panel, centered (after 222.place)
     device  (later) a phone showing the app in the middle, the copy
                     beside it (after goose.app). To switch: put a
                     screenshot or screen recording in .device .screen,
                     remove `hidden` from .device, set data-layout="device".
*/
.page { grid-row: 2; display: grid; place-items: center; min-height: 0; padding: 12px 0; }

.page[data-layout="text"] .panel {
  width: min(580px, 100%); max-height: calc(100dvh - 150px); overflow-y: auto;
  background: rgba(23, 19, 18, .62);
}

.page[data-layout="device"] {
  grid-template-columns: 1fr auto 1fr; gap: clamp(28px, 5vw, 80px); align-items: center;
}
.page[data-layout="device"] .device { grid-column: 2; }
.page[data-layout="device"] .panel {
  grid-column: 3; justify-self: start; width: min(400px, 100%);
  background: none; border: 0; -webkit-backdrop-filter: none; backdrop-filter: none; padding: 0;
}
/* panel parts that belong to the reading layout only */
.page[data-layout="device"] .panel .text-only { display: none; }
@media (max-width: 900px) {
  .page[data-layout="device"] { grid-template-columns: 1fr; }
  .page[data-layout="device"] .device, .page[data-layout="device"] .panel { grid-column: 1; justify-self: center; text-align: center; }
}

/* ---- the phone (for the device layout) ------------------------------ */
.device { margin: 0; }
.device[hidden] { display: none; }
.device .frame {
  position: relative; width: clamp(230px, 22vw, 330px); aspect-ratio: 9 / 19.5;
  border-radius: 48px; padding: 10px; background: #0d0b0a;
  box-shadow: 0 0 0 1.5px rgba(200, 180, 154, .35), 0 40px 90px -30px rgba(0, 0, 0, .8);
}
.device .frame::before { /* the island */
  content: ""; position: absolute; top: 20px; left: 50%; z-index: 2;
  width: 30%; height: 24px; margin-left: -15%; border-radius: 999px; background: #0d0b0a;
}
.device .screen {
  width: 100%; height: 100%; border-radius: 38px; overflow: hidden; background: #F5EFE3;
}
.device .screen > img, .device .screen > video { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ---- the reading panel ---------------------------------------------- */
.panel {
  position: relative; border-radius: 26px; padding: 40px 44px 36px;
  color: var(--cream); font-size: 18px; line-height: 1.62;
}
.panel h1 { font-weight: 400; font-size: clamp(30px, 3.4vw, 40px); line-height: 1.1; margin: 0 0 22px; }
.panel p { margin: 0 0 18px; color: rgba(246, 235, 217, .86); }
.panel em { color: var(--cream); }
.panel hr { border: 0; border-top: 1px solid var(--tan-line); margin: 28px 0; }
.panel-close {
  position: absolute; top: 28px; right: 28px; width: 40px; height: 40px; border-radius: 50%;
  display: grid; place-items: center; color: var(--cream-soft); text-decoration: none;
  border: 1px solid var(--tan-line); background: rgba(23, 19, 18, .4); font-size: 22px; line-height: 1;
  transition: color .15s, background .15s;
}
.panel-close:hover { color: var(--cream); background: rgba(23, 19, 18, .7); }

.signoff { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-top: 30px; }
.signoff .cta { font-size: 19px; padding: 11px 24px; text-decoration: none; }
.credits a { color: inherit; }

@media (max-width: 560px) {
  .panel { padding: 30px 24px 26px; font-size: 17px; border-radius: 22px; }
  .panel-close { top: 22px; right: 20px; width: 36px; height: 36px; }
  .panel h1 { padding-right: 44px; }
  .page[data-layout="text"] .panel { max-height: calc(100dvh - 120px); }
}

/* ---- forms (contact page, waitlist pop-up) ---------------------------------
   Glass fields ruled in tan, like the pills on the home page. */
.form { display: grid; gap: 16px; }
.field { display: grid; gap: 7px; }
.field label { font-size: 15px; font-style: italic; color: var(--cream-soft); }
.field input, .field select, .field textarea {
  font: 16px/1.5 var(--sans); color: var(--cream); width: 100%;
  background: rgba(23, 19, 18, .45); border: 1px solid var(--tan-line); border-radius: 14px;
  padding: 12px 14px; outline: none; transition: border-color .15s, background .15s;
}
.field input::placeholder, .field textarea::placeholder { color: rgba(246, 235, 217, .35); }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--leaf-lit); background: rgba(23, 19, 18, .6); }
.field textarea { min-height: 132px; resize: vertical; }
.field select {
  appearance: none; -webkit-appearance: none; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M3 4.5 6 7.5 9 4.5' fill='none' stroke='%23C8B49A' stroke-width='1.6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center; background-size: 12px;
  padding-right: 38px;
}
.field select option { color: #2C1A0E; }
.field select:invalid { color: rgba(246, 235, 217, .45); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.send { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: 6px; }
.send .cta { font-size: 19px; padding: 11px 26px; }
.send .cta:disabled { opacity: .6; cursor: progress; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 420px) { .field-row { grid-template-columns: 1fr; } }
.status { margin: 0; font-size: 15px; font-style: italic; color: var(--cream-soft); min-height: 1.5em; }
.status.err { color: #E08A84; font-style: normal; }

/* a sent form gives way to a short note with one of the stage plates */
.sent[hidden] { display: none; }
.sent .plate { width: 64px; height: 64px; object-fit: contain; margin-bottom: 8px; }
button.panel-close { font: inherit; font-size: 22px; padding: 0; cursor: pointer; }
