/* ============================================================
   PONTE — UI Kit styles
   Extends ../../colors_and_type.css
   ============================================================ */

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body { min-height: 100vh; overflow-x: hidden; }

/* ---------- Layout shell ------------------------------------ */
.shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
}

.topbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  padding: 20px 32px;
  display: flex; align-items: center; justify-content: space-between;
  pointer-events: none;
}
.topbar > * { pointer-events: auto; }
.brand {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 300;
  font-size: 18px;
  color: var(--ink-900);
  letter-spacing: -0.005em;
  text-decoration: none;
}
.brand .sep { display: inline-block; width: 24px; height: 1px; background: currentColor; vertical-align: middle; margin: 0 8px; opacity: 0.6; }
.brand .mark { font-style: normal; font-weight: 500; letter-spacing: 0.28em; font-size: 14px; }

.topbar .progress {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--font-body); font-size: 12px;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--ink-500);
}
.topbar .progress .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ink-100); transition: background var(--dur-2) var(--ease-out); }
.topbar .progress .dot[data-on] { background: var(--accent); }

/* ---------- Screen system ----------------------------------- */
.screen {
  flex: 1;
  display: none;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity var(--dur-3) var(--ease-out), transform var(--dur-3) var(--ease-out);
}
.screen[data-active="true"] {
  display: flex;
  flex-direction: column;
  opacity: 1;
  transform: translateY(0);
}

/* ---------- Cover screens (full-bleed texture) -------------- */
.cover {
  min-height: 100vh;
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: 1fr;
  align-items: end;
  padding: 0;
}
.cover .bg {
  position: absolute; inset: 0;
  background-size: cover;
  background-position: center;
  z-index: 0;
}
.cover .bg::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(245,235,222,0) 30%, rgba(245,235,222,0.92) 100%);
}
.cover .inner {
  position: relative; z-index: 1;
  padding: 0 8vw 12vh;
  max-width: 1200px;
}
.cover .eyebrow {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 13px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-900);
  margin-bottom: 16px;
  display: flex; align-items: center; gap: 14px;
}
.cover .eyebrow .num {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 300;
  font-size: 28px;
  letter-spacing: 0;
  color: var(--ink-900);
  text-transform: none;
}
.cover .title {
  font-family: var(--font-display);
  font-weight: 300;
  font-style: italic;
  font-size: clamp(3rem, 2.4rem + 4vw, 6.5rem);
  line-height: 0.95;
  letter-spacing: -0.025em;
  color: var(--ink-900);
  margin: 0 0 24px;
  max-width: 18ch;
}
.cover .tagline {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(1.1rem, 0.9rem + 0.7vw, 1.5rem);
  color: var(--ink-700);
  max-width: 48ch;
  margin: 0 0 40px;
  line-height: 1.45;
}

/* ---------- Welcome (special cover w/ centered card) -------- */
.welcome {
  min-height: 100vh;
  position: relative;
  display: grid; place-items: center;
  overflow: hidden;
}
.welcome .bg { position: absolute; inset: 0; background-size: cover; background-position: center; z-index: 0; }
.welcome .bg::after {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(ellipse 70% 70% at center, rgba(245,235,222,0.72) 0%, rgba(245,235,222,0.92) 80%);
}
.welcome .panel {
  position: relative; z-index: 1;
  padding: 64px 72px 56px;
  max-width: 720px;
  text-align: left;
}
.welcome .hello {
  font-family: var(--font-hand);
  font-weight: 500;
  font-size: clamp(3.5rem, 2.8rem + 4vw, 6rem);
  color: var(--verde-700);
  line-height: 0.9;
  margin: 0 0 8px;
  transform: rotate(-3deg);
  transform-origin: left;
  display: inline-block;
}
.welcome .greeting {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 300;
  font-size: clamp(1.6rem, 1.2rem + 1.5vw, 2.5rem);
  color: var(--ink-900);
  margin: 16px 0 28px;
  max-width: 22ch;
  line-height: 1.1;
}
.welcome .body {
  font-family: var(--font-body);
  font-size: clamp(1rem, 0.95rem + 0.2vw, 1.1rem);
  line-height: 1.65;
  color: var(--ink-700);
  max-width: 56ch;
  margin: 0 0 40px;
}

/* ---------- Generic content screens -------------------------- */
.page {
  padding: 14vh 8vw 12vh;
  display: flex; flex-direction: column; align-items: flex-start;
  gap: 24px;
  max-width: 880px;
  margin: 0 auto;
}
.page-wide { max-width: 1080px; }

.eyebrow-row {
  display: flex; align-items: center; gap: 14px;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 12px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent-deep);
}
.eyebrow-row .num {
  font-family: var(--font-display); font-style: italic; font-size: 20px;
  font-weight: 300; color: var(--accent-deep);
  text-transform: none; letter-spacing: 0;
}
.eyebrow-row .rule { flex: 1; height: 1px; background: var(--line); max-width: 80px; }

h1.page-title {
  font-family: var(--font-display);
  font-weight: 300;
  font-style: italic;
  font-size: clamp(2.2rem, 1.6rem + 2.6vw, 3.8rem);
  line-height: 1;
  letter-spacing: -0.022em;
  color: var(--ink-900);
  margin: 0;
  text-wrap: balance;
  max-width: 22ch;
}

.lede {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(1.05rem, 0.95rem + 0.5vw, 1.3rem);
  line-height: 1.5;
  color: var(--ink-700);
  max-width: 56ch;
  margin: 0;
  text-wrap: pretty;
}

.body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.7;
  color: var(--ink-700);
  max-width: 60ch;
  margin: 0;
  text-wrap: pretty;
}

/* ---------- Buttons ----------------------------------------- */
.btn {
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.01em;
  padding: 14px 26px;
  border: none;
  border-radius: var(--radius-pill);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  transition: transform var(--dur-2) var(--ease-out),
              box-shadow var(--dur-2) var(--ease-out),
              background var(--dur-2) var(--ease-out),
              color var(--dur-2) var(--ease-out);
  user-select: none;
}
.btn-primary {
  background: var(--ink-900);
  color: var(--cream-100);
}
.btn-primary:hover { background: var(--accent-deep); transform: translateY(-1px); box-shadow: var(--shadow-2); }
.btn-primary:active { transform: translateY(0); box-shadow: var(--shadow-1); }

.btn-secondary {
  background: transparent;
  color: var(--ink-900);
  border: 1px solid var(--line-strong);
}
.btn-secondary:hover { background: var(--cream-200); transform: translateY(-1px); }

.btn-ghost {
  background: transparent;
  color: var(--ink-700);
  padding: 14px 16px;
}
.btn-ghost:hover { color: var(--accent-deep); }

.btn .arrow { font-size: 18px; line-height: 1; transition: transform var(--dur-2) var(--ease-out); }
.btn:hover .arrow { transform: translateX(3px); }

.cta-row { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; margin-top: 8px; }

/* ---------- Stage map (3 cards) ----------------------------- */
.stage-map { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 24px; width: 100%; margin-top: 8px; }
.stage-card {
  position: relative;
  padding: 28px 28px 28px;
  background: var(--cream-50);
  border: 1px solid var(--line);
  border-radius: var(--radius-3);
  display: flex; flex-direction: column; gap: 16px;
  transition: transform var(--dur-3) var(--ease-out), box-shadow var(--dur-3) var(--ease-out), border-color var(--dur-2) var(--ease-out);
  cursor: pointer;
  text-decoration: none;
  color: inherit;
}
.stage-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-2); border-color: transparent; }
.stage-card .swatch { width: 100%; height: 84px; border-radius: var(--radius-2); background-size: cover; background-position: center; }
.stage-card .n { font-family: var(--font-display); font-style: italic; font-weight: 300; font-size: 22px; color: var(--ink-500); }
.stage-card .t {
  font-family: var(--font-display); font-style: italic; font-weight: 300;
  font-size: 28px; line-height: 1.05; color: var(--ink-900); margin: 0;
  letter-spacing: -0.015em;
}
.stage-card .tag {
  font-family: var(--font-body); font-size: 13px; color: var(--ink-500); line-height: 1.5; margin: 0;
}

/* ---------- Areas list (single column, intimate) ------------- */
.areas {
  width: 100%;
  display: flex; flex-direction: column;
  gap: 0;
  margin-top: 16px;
}
.area {
  border-top: 1px solid var(--line);
  padding: 28px 0 32px;
}
.area:last-child { border-bottom: 1px solid var(--line); }

.area-head {
  display: flex; align-items: baseline; justify-content: space-between; gap: 16px;
  margin-bottom: 10px;
}
.area-name {
  font-family: var(--font-display);
  font-weight: 400;
  font-style: italic;
  font-size: clamp(1.6rem, 1.2rem + 1.3vw, 2.2rem);
  line-height: 1;
  color: var(--ink-900);
  margin: 0;
  letter-spacing: -0.015em;
}
.area-counter {
  font-family: var(--font-body);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-300);
}
.area-counter[data-filled="true"] { color: var(--accent-deep); }
.area-prompt {
  font-family: var(--font-display);
  font-weight: 300;
  font-style: italic;
  font-size: clamp(1rem, 0.95rem + 0.3vw, 1.15rem);
  line-height: 1.5;
  color: var(--ink-700);
  margin: 0 0 16px;
  max-width: 60ch;
  text-wrap: pretty;
}

.area-input {
  font-family: var(--font-body);
  font-size: 15.5px;
  line-height: 1.65;
  color: var(--ink-900);
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--line);
  padding: 10px 0 14px;
  width: 100%;
  min-height: 56px;
  resize: vertical;
  outline: none;
  transition: border-color var(--dur-2) var(--ease-out);
}
.area-input:focus { border-bottom-color: var(--accent); }
.area-input::placeholder { color: var(--ink-300); font-style: italic; }

.area-sugg {
  margin-top: 18px;
  display: flex; flex-direction: column; gap: 6px;
  font-family: var(--font-body);
  font-size: 13.5px;
  color: var(--ink-500);
  max-width: 64ch;
}
.area-sugg .label {
  font-family: var(--font-body);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent-deep);
  margin-bottom: 2px;
}
.area-sugg ul { margin: 0; padding-left: 18px; line-height: 1.55; }
.area-sugg li { padding: 2px 0; cursor: pointer; transition: color var(--dur-1) var(--ease-out); }
.area-sugg li:hover { color: var(--ink-900); }

.area-sugg details summary {
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 500;
  color: var(--accent-deep);
  cursor: pointer;
  letter-spacing: 0.06em;
  user-select: none;
  list-style: none;
  display: inline-flex; align-items: center; gap: 6px;
}
.area-sugg details summary::after { content: "↓"; font-size: 14px; transition: transform var(--dur-2) var(--ease-out); }
.area-sugg details[open] summary::after { transform: rotate(180deg); }

/* ---------- Pillars (Exercise 3 preface) -------------------- */
.pillars { display: grid; grid-template-columns: 1fr; gap: 8px; width: 100%; margin-top: 12px; }
.pillar {
  border-top: 1px solid var(--line);
  padding: 36px 0 28px;
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 32px;
  align-items: start;
}
.pillar:last-child { border-bottom: 1px solid var(--line); }
.pillar .left { position: sticky; top: 100px; }
.pillar .eyebrow { font-family: var(--font-hand); font-size: 34px; color: var(--laranja-700); line-height: 1; transform: rotate(-3deg); display: inline-block; transform-origin: left; }
.pillar h3 {
  font-family: var(--font-display);
  font-weight: 300; font-style: italic;
  font-size: clamp(1.6rem, 1.3rem + 1vw, 2.2rem);
  line-height: 1.05; letter-spacing: -0.015em;
  color: var(--ink-900); margin: 0 0 16px;
}
.pillar p { font-family: var(--font-body); font-size: 15.5px; line-height: 1.7; color: var(--ink-700); max-width: 60ch; margin: 0 0 16px; }
.pillar textarea {
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.65;
  color: var(--ink-900);
  background: var(--cream-50);
  border: 1px solid var(--line);
  border-radius: var(--radius-2);
  padding: 14px 16px;
  width: 100%;
  min-height: 110px;
  outline: none;
  transition: border-color var(--dur-2) var(--ease-out), background var(--dur-2) var(--ease-out);
}
.pillar textarea:focus { border-color: var(--accent); background: #fff; }
.pillar textarea::placeholder { color: var(--ink-300); font-style: italic; }
.pillar .tasks {
  margin: 10px 0 18px; padding-left: 20px;
  font-family: var(--font-display); font-style: italic; font-weight: 300;
  font-size: 16px; line-height: 1.65; color: var(--ink-700);
}
.pillar .tasks li { padding: 2px 0; }

@media (max-width: 720px) {
  .pillar { grid-template-columns: 1fr; gap: 16px; }
  .pillar .left { position: static; }
  .stage-map { grid-template-columns: 1fr; }
}

/* ---------- Compromisso (closing) --------------------------- */
.letter {
  background: var(--cream-50);
  border: 1px solid var(--line);
  border-radius: var(--radius-4);
  padding: 56px 64px;
  width: 100%;
  max-width: 720px;
  margin: 16px auto 0;
  box-shadow: var(--shadow-2);
  position: relative;
}
.letter .salut {
  font-family: var(--font-display);
  font-weight: 300; font-style: italic;
  font-size: 28px;
  color: var(--ink-900);
  margin: 0 0 24px;
}
.letter textarea {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: 19px;
  line-height: 1.6;
  color: var(--ink-900);
  background: transparent;
  border: none;
  width: 100%;
  min-height: 220px;
  outline: none;
  resize: vertical;
}
.letter textarea::placeholder { color: var(--ink-300); font-style: italic; }
.letter .sig {
  font-family: var(--font-hand);
  font-size: 38px;
  color: var(--laranja-700);
  transform: rotate(-3deg);
  display: inline-block;
  margin-top: 28px;
}
.letter .close {
  margin-top: 36px;
  font-family: var(--font-display); font-style: italic; font-weight: 300;
  font-size: 16px; line-height: 1.6;
  color: var(--ink-500);
  border-top: 1px solid var(--line);
  padding-top: 24px;
  max-width: 54ch;
}

/* ---------- Sticky save bar (during exercises) -------------- */
.save-bar {
  position: fixed; bottom: 20px; right: 24px; z-index: 60;
  background: var(--cream-50);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-pill);
  padding: 10px 18px 10px 14px;
  display: flex; align-items: center; gap: 12px;
  font-family: var(--font-body); font-size: 12px; color: var(--ink-500);
  box-shadow: var(--shadow-2);
  opacity: 0; transform: translateY(8px); pointer-events: none;
  transition: opacity var(--dur-2) var(--ease-out), transform var(--dur-2) var(--ease-out);
}
.save-bar[data-show="true"] { opacity: 1; transform: none; pointer-events: auto; }
.save-bar .indicator { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.save-bar .next {
  font-family: var(--font-body); font-size: 13px; font-weight: 500;
  background: var(--ink-900); color: var(--cream-100);
  padding: 8px 16px; border: none; border-radius: var(--radius-pill);
  cursor: pointer; display: inline-flex; align-items: center; gap: 8px;
}
.save-bar .next:hover { background: var(--accent-deep); }

/* ---------- Decorative little flourish --------------------- */
.flourish {
  font-family: var(--font-hand);
  font-size: 42px;
  line-height: 1;
  color: var(--accent);
  transform: rotate(-4deg);
  display: inline-block;
}

/* ---------- Misc ----------------------------------------- */
.cue {
  font-family: var(--font-display); font-style: italic; font-weight: 300;
  font-size: 14px; color: var(--ink-500);
  display: inline-flex; align-items: center; gap: 8px;
  border-left: 2px solid var(--accent); padding: 4px 12px;
  margin: 8px 0 0;
}
.cue a { color: var(--ink-700); }

.divider {
  width: 80px; height: 1px; background: var(--ink-900); opacity: 0.2; margin: 8px 0;
}

@media (max-width: 720px) {
  .topbar { padding: 16px 20px; }
  .page { padding: 12vh 6vw 14vh; }
  .welcome .panel { padding: 40px 32px; }
  .letter { padding: 36px 28px; }
}
