/* YapYap on the web: the landing page, Founding Family signup, and the
 * GrownUp Portal share this sheet. Tokens and components follow the design
 * canvas (the "· web" rows) and YapApp's DesignSystem/, so the two look like
 * one product: black outlines, hard offset shadows, Neulis/Fredoka titles over
 * Poppins.
 *
 * Plain CSS, no build step. Neulis Cursive comes from the Adobe Fonts kit,
 * which is licensed for the web; where the kit doesn't load, Fredoka stands in,
 * as it does in the app.
 */

:root {
  --cream: #F1ECE6;
  --ink: #000;
  --blue: #4089BC;
  --orange: #E4572E;
  --pink: #EF81B4;
  --yellow: #FDB52A;
  --white: #fff;
  --danger: #B23A16;
  --text-2: #4a4a4a;
  --lede: #2a2a2a;

  --line-card: 2.5px;
  --line: 2px;
  --r-card: 20px;
  --r-input: 14px;
  --r-btn: 16px;

  --display: "neulis-cursive", "Fredoka", sans-serif;
  --body: "poppins", "Poppins", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.45;
}
a { color: var(--ink); }
img { max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
[hidden] { display: none !important; }

/* ---- type ---------------------------------------------------------------- */

.d { font-family: var(--display); font-weight: 500; letter-spacing: -0.01em; }
.wh1 { font-family: var(--display); font-weight: 500; font-size: clamp(34px, 4vw, 48px); line-height: 1.05; margin: 0; }
.h2 { font-family: var(--display); font-weight: 500; font-size: 22px; line-height: 1.15; margin: 0; }
.sec { font-family: var(--display); font-weight: 500; font-size: 19px; margin: 0; }
.lede { font-size: 16px; line-height: 1.5; margin: 0; color: var(--lede); }
.small { font-size: 13px; line-height: 1.45; color: var(--text-2); margin: 0; }
.t1 { font-weight: 600; font-size: 15px; line-height: 1.25; }
.t2 { font-size: 13px; line-height: 1.35; color: var(--text-2); }
.lbl { font-weight: 600; font-size: 13px; line-height: 1.2; }
.error { color: var(--danger); font-size: 14px; margin: 0; }
.mono { font-variant-numeric: tabular-nums; }

/* ---- layout helpers -------------------------------------------------------- */

.row { display: flex; align-items: center; gap: 12px; }
.col { display: flex; flex-direction: column; gap: 12px; }
.grow { flex-grow: 1; min-width: 0; }
.wrap { flex-wrap: wrap; }
.between { justify-content: space-between; }
.stack-lg { display: flex; flex-direction: column; gap: 22px; }

/* ---- surfaces -------------------------------------------------------------- */

.card {
  background: var(--white);
  border: var(--line-card) solid var(--ink);
  border-radius: var(--r-card);
  box-shadow: 0 4px 0 var(--ink);
}
.card.flat { box-shadow: none; border-width: 2px; }
.card.clip { overflow: hidden; }
.card-head { padding: 16px 20px; border-bottom: 2px solid var(--ink); display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.card-body { padding: 18px 20px; display: flex; flex-direction: column; gap: 14px; }

.li {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 20px;
  border-top: 2px solid var(--ink);
  color: var(--ink); text-decoration: none;
}
.li:first-child { border-top: 0; }
.card-head + .li { border-top: 0; }
a.li:hover, button.li:hover { background: var(--cream); }
button.li { width: 100%; background: none; border-left: 0; border-right: 0; border-bottom: 0; text-align: left; cursor: pointer; }
.li.muted { background: var(--cream); }

/* ---- buttons --------------------------------------------------------------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  height: 56px; padding: 0 22px;
  border: var(--line-card) solid var(--ink); border-radius: var(--r-btn);
  box-shadow: 0 4px 0 var(--ink);
  background: var(--yellow); color: var(--ink);
  font-family: var(--body); font-weight: 600; font-size: 17px;
  text-decoration: none; cursor: pointer; white-space: nowrap;
}
.btn:hover { transform: translateY(1px); box-shadow: 0 3px 0 var(--ink); }
.btn:active { transform: translateY(2px); box-shadow: 0 2px 0 var(--ink); }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .45; cursor: default; transform: none; box-shadow: 0 4px 0 var(--ink); }
.btn.white { background: var(--white); }
.btn.blue { background: var(--blue); }
.btn.pink { background: var(--pink); }
.btn.orange { background: var(--orange); }
.btn.ink { background: var(--ink); color: var(--white); box-shadow: 0 4px 0 var(--blue); }
.btn.sm { height: 44px; font-size: 15px; border-radius: 12px; border-width: 2px; box-shadow: 0 3px 0 var(--ink); padding: 0 16px; }
.btn.sm:hover { box-shadow: 0 2px 0 var(--ink); }
.btn.block { width: 100%; }

.link {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 44px; padding: 0;
  background: none; border: 0; cursor: pointer;
  font-weight: 500; font-size: 15px; color: var(--ink);
  text-decoration: underline; text-underline-offset: 3px;
}
.link.danger { color: var(--danger); }
.link.sm { font-size: 14px; }

.iconbtn {
  width: 44px; height: 44px; flex-shrink: 0; padding: 0;
  border-radius: 50%; border: 2px solid var(--ink); background: var(--white);
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--ink); text-decoration: none; cursor: pointer;
}
.iconbtn.sm { width: 40px; height: 40px; }
.iconbtn.yellow { background: var(--yellow); }
.iconbtn.ink { background: var(--ink); color: var(--white); }
.iconbtn:hover { background-color: var(--cream); }
.iconbtn.yellow:hover { background: #f5a90f; }
.iconbtn.ink:hover { background: #222; }

/* ---- small parts ----------------------------------------------------------- */

.tag {
  align-self: flex-start;
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px 5px;
  border: 2px solid var(--ink);
  font-family: var(--display); font-weight: 500; font-size: 15px; line-height: 1.1;
  background: var(--pink);
}
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  height: 32px; padding: 0 12px;
  border: 2px solid var(--ink); border-radius: 16px; background: var(--white);
  font-weight: 500; font-size: 13px; white-space: nowrap;
}
button.chip { cursor: pointer; }
.chip.dashed { border-style: dashed; }
.badge {
  min-width: 22px; height: 22px; padding: 0 5px;
  border-radius: 11px; border: 2px solid var(--ink); background: var(--orange);
  font-weight: 600; font-size: 12px; line-height: 18px; text-align: center;
}
.av {
  border-radius: 50%; border: 2px solid var(--ink);
  display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
  font-family: var(--display); font-weight: 500; color: var(--ink);
  overflow: hidden; background-size: cover; background-position: center;
}
.dot { width: 10px; height: 10px; border-radius: 50%; border: 2px solid var(--ink); display: inline-block; flex-shrink: 0; background: var(--white); }
.dot.on { background: var(--blue); }
.num {
  width: 30px; height: 30px; border-radius: 50%; border: 2px solid var(--ink);
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 600; font-size: 14px; flex-shrink: 0; background: var(--white);
}
.hl { display: inline-block; padding: 0 6px; border: 2.5px solid var(--ink); transform: rotate(-2deg); margin: 2px 0; }

/* ---- form controls --------------------------------------------------------- */

.field { display: flex; flex-direction: column; gap: 6px; }
.field > label, .field > .lbl { font-weight: 600; font-size: 13px; line-height: 1.2; }
.field .opt { font-weight: 400; }
.input {
  height: 52px; width: 100%; padding: 0 16px;
  border: 2px solid var(--ink); border-radius: var(--r-input); background: var(--white);
  font-size: 16px; color: var(--ink);
}
.input::placeholder { color: #6b6b6b; }
.input:focus-visible, .btn:focus-visible, .iconbtn:focus-visible, .chip:focus-visible,
.switch:focus-visible, .link:focus-visible, .wnav:focus-visible, .li:focus-visible,
.segctl button:focus-visible {
  outline: 3px solid var(--blue); outline-offset: 2px;
}
select.input { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 40px; }
.inwrap { position: relative; display: flex; align-items: center; }
.inwrap .input { padding-left: 46px; }
.inwrap > svg { position: absolute; left: 14px; pointer-events: none; }

.switch {
  width: 52px; height: 32px; flex-shrink: 0; padding: 0;
  border-radius: 16px; border: 2px solid var(--ink); background: var(--white);
  position: relative; cursor: pointer;
}
.switch span { position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 11px; background: var(--ink); transition: left .12s; }
.switch[aria-checked="true"] { background: var(--blue); }
.switch[aria-checked="true"] span { left: 23px; background: var(--white); border: 2px solid var(--ink); }
.switch:disabled { opacity: .4; cursor: default; }

.segctl {
  display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr);
  border: 2px solid var(--ink); border-radius: 14px; background: var(--white); padding: 3px; gap: 3px;
}
.segctl button { height: 36px; border: 0; border-radius: 10px; background: transparent; font-weight: 500; font-size: 14px; cursor: pointer; padding: 0 12px; }
.segctl button[aria-pressed="true"] { background: var(--ink); color: var(--white); font-weight: 600; }

.swatches { display: flex; gap: 12px; }
.swatch {
  width: 44px; height: 44px; border-radius: 50%; border: 2.5px solid var(--ink); cursor: pointer; padding: 0;
}
.swatch[aria-pressed="true"] { border-width: 3px; box-shadow: 0 0 0 3px var(--cream), 0 0 0 6px var(--ink); }

/* ---- calling card ---------------------------------------------------------- */

.ccard {
  --cw: 250px;
  width: var(--cw); aspect-ratio: 250 / 158;
  border: var(--line-card) solid var(--ink); border-radius: calc(var(--cw) * .06);
  background: var(--white); box-shadow: 0 4px 0 var(--ink);
  overflow: hidden; display: flex; flex-direction: column; flex-shrink: 0;
}
.ccard .band {
  height: 26%; background: var(--yellow); border-bottom: var(--line-card) solid var(--ink);
  display: flex; align-items: center; justify-content: space-between; padding: 0 calc(var(--cw) * .045);
}
.ccard .band span { font-family: var(--display); font-weight: 500; font-size: calc(var(--cw) * .048); }
.ccard .band img { height: calc(var(--cw) * .068); width: auto; }
.ccard .face { flex-grow: 1; display: flex; align-items: center; gap: calc(var(--cw) * .044); padding: 0 calc(var(--cw) * .048); min-width: 0; }
.ccard .face .av { width: calc(var(--cw) * .228); height: calc(var(--cw) * .228); font-size: calc(var(--cw) * .104); }
.ccard .name { font-family: var(--display); font-weight: 500; font-size: calc(var(--cw) * .084); line-height: 1.1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ccard .sub { font-size: calc(var(--cw) * .044); color: var(--text-2); }

/* ---- decoration ------------------------------------------------------------ */

.deco { position: absolute; pointer-events: none; }

/* ---- toast and dialogs ----------------------------------------------------- */

.toast {
  position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%); z-index: 50;
  background: var(--ink); color: var(--white); padding: 12px 18px; border-radius: 14px;
  font-weight: 500; box-shadow: 0 4px 0 var(--blue); max-width: calc(100% - 32px);
}
dialog.sheet {
  border: var(--line-card) solid var(--ink); border-radius: var(--r-card); box-shadow: 0 6px 0 var(--ink);
  padding: 0; width: min(520px, calc(100% - 32px)); background: var(--white); color: var(--ink);
}
dialog.sheet::backdrop { background: rgb(0 0 0 / .35); }
dialog.sheet .card-head { background: var(--cream); }
dialog.sheet form { margin: 0; }

.spin { width: 22px; height: 22px; border-radius: 50%; border: 3px solid currentColor; border-right-color: transparent; animation: spin .8s linear infinite; display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }

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