/* =========================================================================
   Vista · Git Access — "Warm & Friendly" design system
   Inspired by modern boutique-clinic / lifestyle-brand UI:
   peachy-cream paper, deep cocoa ink, coral and sage accents,
   chunky italic display serif, rounded everything.
   ========================================================================= */

:root {
  /* Color — Vista brand: deep navy primary, warm cream paper, gold accent */
  --bg:              #F1ECDD;   /* Vista warm cream */
  --bg-deep:         #E4DCC6;   /* deeper cream */
  --bg-card:         #FAF6EB;   /* lighter card surface */
  --bg-pop:          #E4DCC6;   /* cream pop accent surface */
  --ink:             #16284D;   /* Vista navy — primary text + CTA */
  --ink-muted:       #4C5D7A;   /* softened navy */
  --ink-soft:        #8895AB;   /* even softer slate */
  --rule:            #D4CBB4;
  --rule-strong:     #B6AB8F;
  --coral:           #16284D;   /* primary CTA = Vista navy */
  --coral-deep:      #0A1F44;
  --sage:            #C9A155;   /* warm gold — the spark accent */
  --sage-deep:       #A48336;
  --butter:          #E5C77B;
  --error:           #A4321A;

  /* Typography */
  --font-display:    'Caprasimo', 'Cooper BT', 'Bookman Old Style', Georgia, serif;
  --font-body:       'DM Sans', -apple-system, BlinkMacSystemFont, 'Helvetica Neue', sans-serif;
  --font-script:     'Caveat', 'Bradley Hand', cursive;

  /* Radius */
  --r-sm:   8px;
  --r-md:   14px;
  --r-lg:   22px;
  --r-xl:   32px;
  --r-pill: 999px;

  /* Spacing */
  --s-1:   0.25rem;
  --s-2:   0.5rem;
  --s-3:   0.75rem;
  --s-4:   1rem;
  --s-5:   1.25rem;
  --s-6:   1.5rem;
  --s-8:   2rem;
  --s-10:  2.5rem;
  --s-12:  3rem;
  --s-16:  4rem;
  --s-20:  5rem;

  /* Soft shadow */
  --shadow-sm: 0 2px 0 rgba(42, 27, 16, 0.08);
  --shadow-md: 0 6px 0 rgba(42, 27, 16, 0.10);
  --shadow-lg: 0 14px 30px -10px rgba(42, 27, 16, 0.18);
}

/* ---------- Reset --------------------------------------------------------- */

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  background-color: var(--bg);
  min-height: 100%;
}

body {
  background-color: var(--bg);
  /* Fixed-attachment gradients hug the viewport regardless of page height,
     so the warm cream never visibly "ends" mid-scroll. */
  background-image:
    radial-gradient(ellipse 60% 40% at 90% 5%,  rgba(22, 40, 77, 0.06), transparent 60%),
    radial-gradient(ellipse 50% 50% at 5% 95%,  rgba(201, 161, 85, 0.10), transparent 60%);
  background-attachment: fixed;
  background-repeat: no-repeat;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.55;
  font-weight: 400;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

::selection {
  background: var(--coral);
  color: var(--bg-card);
}

/* ---------- Layout container --------------------------------------------- */

/* The container scales across three breakpoints:
   - phone (<560px):   tight padding, no max-width cap (uses full width minus padding)
   - tablet/laptop:    640px max-width, generous side padding
   - desktop (>1100px): 760px max-width + two-column hero (title left, illo right) */
.container {
  position: relative;
  z-index: 1;
  margin: 0 auto;
  max-width: 640px;
  padding: var(--s-8) var(--s-5) var(--s-8);
}

@media (min-width: 560px) {
  .container { padding: var(--s-10) var(--s-7) var(--s-8); }
}

@media (min-width: 900px) {
  .container {
    max-width: 720px;
    padding: var(--s-12) var(--s-8) var(--s-10);
  }
}

@media (min-width: 1280px) {
  .container {
    max-width: 760px;
  }
}

/* ---------- Top bar (wordmark + small nav) ------------------------------- */

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--s-12);
  font-size: 0.95rem;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  font-family: var(--font-display);
  font-size: 1.35rem;
  letter-spacing: -0.01em;
  color: var(--ink);
  text-decoration: none;
}

.wordmark .blob {
  display: inline-block;
  width: 22px;
  height: 22px;
  background: var(--coral);
  border-radius: 60% 40% 55% 45% / 55% 50% 50% 45%;
  transform: rotate(-8deg);
  flex-shrink: 0;
  transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.3, 1);
}

.wordmark:hover .blob {
  transform: rotate(20deg) scale(1.08);
}

.topbar .corner {
  font-size: 0.82rem;
  color: var(--ink-muted);
}

/* ---------- Hero illustration slot --------------------------------------- */

.hero-illo {
  display: block;
  margin-bottom: var(--s-4);
  width: 72px;
  height: 72px;
  transform: rotate(-3deg);
}

/* ---------- Status badge -------------------------------------------------- */

.badge {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  padding: 0.4rem 0.9rem;
  border-radius: var(--r-pill);
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  margin-bottom: var(--s-5);
  background: var(--bg-pop);
  color: var(--ink);
}

.badge::before {
  content: '';
  display: inline-block;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.7;
}

.badge.is-ok      { background: #D8EBD9; color: var(--sage-deep); }
.badge.is-warn    { background: #FFE2C7; color: #8B4F1E; }
.badge.is-error   { background: #F8D9D0; color: var(--error); }

/* ---------- Typography --------------------------------------------------- */

.page-title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(2.2rem, 4.5vw + 0.4rem, 3.3rem);
  line-height: 1.02;
  letter-spacing: -0.022em;
  color: var(--ink);
  margin-bottom: var(--s-5);
  text-wrap: balance;
}

.page-title .scribble {
  font-family: var(--font-script);
  font-weight: 600;
  font-size: 0.85em;
  color: var(--sage-deep);
  display: inline-block;
  transform: rotate(-3deg);
  margin: 0 -0.05em;
  line-height: 1;
}

.page-title .pop {
  display: inline-block;
  padding: 0 0.25em;
  background: var(--butter);
  border-radius: 12px;
  transform: rotate(-1.5deg);
  margin: 0 0.05em;
}

.lede {
  font-family: var(--font-body);
  font-size: clamp(1.05rem, 1.2vw + 0.4rem, 1.2rem);
  line-height: 1.5;
  color: var(--ink-muted);
  margin-bottom: var(--s-8);
  max-width: 36em;
}

p {
  margin-bottom: var(--s-4);
}

.muted {
  color: var(--ink-muted);
}

a {
  color: var(--coral-deep);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 4px;
  text-decoration-color: var(--coral);
  text-decoration-skip-ink: auto;
  transition: color 0.15s ease, text-decoration-color 0.15s ease;
}

a:hover {
  color: var(--ink);
  text-decoration-color: var(--ink);
}

strong {
  font-weight: 700;
  color: var(--ink);
}

code {
  font-family: ui-monospace, 'SF Mono', Menlo, monospace;
  font-size: 0.88em;
  background: var(--bg-card);
  padding: 0.12em 0.45em;
  border-radius: 6px;
  border: 1px solid var(--rule);
}

/* ---------- Card -------------------------------------------------------- */

.card {
  background: var(--bg-card);
  border: 1.5px solid var(--ink);
  border-radius: var(--r-xl);
  padding: var(--s-8);
  margin-bottom: var(--s-6);
  box-shadow: var(--shadow-md);
  position: relative;
}

@media (max-width: 520px) {
  .card { padding: var(--s-6); }
}

.card.is-pop {
  background: var(--bg-pop);
}

.card-eyebrow {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 1rem;
  color: var(--coral-deep);
  margin-bottom: var(--s-3);
  font-style: italic;
}

.card h2 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 1.7rem;
  line-height: 1.15;
  margin-bottom: var(--s-3);
  letter-spacing: -0.015em;
}

.card p {
  font-size: 1rem;
}

.card p:last-child { margin-bottom: 0; }

/* Decorative corner sticker for cards */
.card .sticker {
  position: absolute;
  top: -14px;
  right: 24px;
  background: var(--coral);
  color: var(--bg-card);
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.4rem 0.85rem;
  border-radius: var(--r-pill);
  transform: rotate(4deg);
  box-shadow: var(--shadow-sm);
}

.card .sticker.is-sage { background: var(--sage); color: var(--bg-card); }

/* ---------- Step pebbles (replacement for "step indicator") ------------- */

.steps {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-2);
  margin-bottom: var(--s-8);
}

.steps .step {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  padding: 0.35rem 0.85rem;
  border-radius: var(--r-pill);
  background: var(--bg-card);
  border: 1.5px solid var(--ink);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--ink-muted);
}

.steps .step .num {
  font-family: var(--font-display);
  font-size: 0.95rem;
  color: var(--ink-soft);
}

.steps .step.is-current {
  background: var(--ink);
  color: var(--bg-card);
}

.steps .step.is-current .num {
  color: var(--coral);
}

/* ---------- Process / numbered list ------------------------------------- */

.process-list {
  list-style: none;
  counter-reset: step;
}

.process-list > li {
  counter-increment: step;
  position: relative;
  padding: 0 0 0 3.5rem;
  margin-bottom: var(--s-6);
}

.process-list > li:last-child { margin-bottom: 0; }

.process-list > li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: -0.1em;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 50%;
  background: var(--bg-pop);
  border: 1.5px solid var(--ink);
  font-family: var(--font-display);
  font-size: 1.05rem;
  color: var(--ink);
}

.process-list.with-titles > li > .li-title {
  display: block;
  font-weight: 700;
  font-size: 1.08rem;
  margin-bottom: var(--s-1);
}

/* ---------- Bullet list ------------------------------------------------- */

.bullet-list {
  list-style: none;
}

.bullet-list > li {
  position: relative;
  padding-left: 1.75rem;
  margin-bottom: var(--s-3);
}

.bullet-list > li::before {
  content: '✦';
  position: absolute;
  left: 0;
  top: 0;
  color: var(--coral);
  font-size: 1.05rem;
}

/* ---------- Forms -------------------------------------------------------- */

.fieldset {
  display: flex;
  flex-direction: column;
  gap: var(--s-5);
  margin-bottom: var(--s-6);
}

.field label {
  display: block;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--ink);
  margin-bottom: var(--s-2);
}

.field .label-extra {
  font-weight: 400;
  color: var(--ink-soft);
  margin-left: 0.3em;
}

.field input,
.field textarea {
  display: block;
  width: 100%;
  padding: 0.85rem 1.1rem;
  background: var(--bg-card);
  color: var(--ink);
  border: 1.5px solid var(--ink);
  border-radius: var(--r-md);
  font-family: var(--font-body);
  font-size: 1.02rem;
  font-weight: 500;
  line-height: 1.4;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.field input:focus,
.field textarea:focus {
  outline: none;
  background: #fff;
  transform: translateY(-1px);
  box-shadow: 0 4px 0 var(--ink);
}

.field input::placeholder,
.field textarea::placeholder {
  color: var(--ink-soft);
  font-weight: 400;
}

.field textarea {
  resize: vertical;
  min-height: 5.5rem;
}

.field-hint {
  display: block;
  font-size: 0.85rem;
  color: var(--ink-muted);
  margin-top: var(--s-2);
}

/* ---------- Form error --------------------------------------------------- */

.form-error,
.error {
  display: flex;
  align-items: flex-start;
  gap: var(--s-2);
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--error);
  margin-top: var(--s-4);
  padding: var(--s-3) var(--s-4);
  background: #F8D9D0;
  border: 1.5px solid var(--error);
  border-radius: var(--r-md);
}

.form-error::before,
.error::before {
  content: '!';
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.4rem;
  height: 1.4rem;
  background: var(--error);
  color: #fff;
  border-radius: 50%;
  font-weight: 700;
  font-size: 0.9rem;
  flex-shrink: 0;
}

.form-error[hidden],
.error[hidden] {
  display: none;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.95rem 1.6rem;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.005em;
  border: 1.5px solid var(--ink);
  border-radius: var(--r-pill);
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.18s cubic-bezier(0.2, 0.8, 0.3, 1),
              box-shadow 0.18s cubic-bezier(0.2, 0.8, 0.3, 1),
              background 0.15s ease;
  user-select: none;
  line-height: 1;
  box-shadow: 0 4px 0 var(--ink);
}

.btn::after {
  content: '→';
  font-size: 1.05rem;
  transition: transform 0.2s cubic-bezier(0.2, 0.8, 0.3, 1);
}

.btn:hover {
  text-decoration: none;
}

.btn:hover::after {
  transform: translateX(3px);
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 0 var(--ink);
}

.btn:active {
  transform: translateY(2px);
  box-shadow: 0 1px 0 var(--ink);
}

.btn-primary {
  background: var(--coral);
  color: var(--bg-card);
}

.btn-primary:hover {
  background: var(--coral-deep);
  color: var(--bg-card);
}

.btn-secondary {
  background: var(--bg-card);
  color: var(--ink);
}

.btn-secondary:hover {
  background: var(--bg-pop);
  color: var(--ink);
}

.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: transparent;
  box-shadow: none;
  font-weight: 600;
  padding: 0.6rem 0.6rem;
}

.btn-ghost:hover {
  transform: none;
  box-shadow: none;
  color: var(--coral-deep);
}

.btn-ghost::after { content: ''; }

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-3);
  align-items: center;
}

/* GitHub-mark spec for the primary CTA */
.btn .gh-mark {
  width: 1.05em;
  height: 1.05em;
  margin-top: -1px;
}

/* ---------- Section ---------------------------------------------------- */

.section {
  margin-top: var(--s-8);
}

.section-eyebrow {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-style: italic;
  color: var(--coral-deep);
  margin-bottom: var(--s-3);
}

/* ---------- Footer ----------------------------------------------------- */

.page-footer {
  margin-top: var(--s-6);
  padding-top: var(--s-3);
  border-top: 1.5px dashed var(--rule-strong);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--s-2);
  font-size: 0.8rem;
  color: var(--ink-muted);
}

.page-footer .heart {
  color: var(--coral);
}

/* ---------- Animations: gentle on-load reveal -------------------------- */

@keyframes bounce-in {
  0%   { opacity: 0; transform: translateY(12px) scale(0.98); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes wobble {
  0%, 100% { transform: rotate(-3deg); }
  50%      { transform: rotate(3deg); }
}

.topbar, .hero-illo, .badge, .page-title, .lede, .btn-row, .steps, .card, .section, .page-footer {
  animation: bounce-in 0.55s cubic-bezier(0.2, 0.8, 0.3, 1) backwards;
}

.topbar       { animation-delay: 0.00s; }
.hero-illo    { animation-delay: 0.08s; }
.badge        { animation-delay: 0.10s; }
.steps        { animation-delay: 0.12s; }
.page-title   { animation-delay: 0.18s; }
.lede         { animation-delay: 0.28s; }
.btn-row      { animation-delay: 0.36s; }
.card         { animation-delay: 0.36s; }
.section      { animation-delay: 0.42s; }
.page-footer  { animation-delay: 0.50s; }

.hero-illo {
  animation: bounce-in 0.55s cubic-bezier(0.2, 0.8, 0.3, 1) 0.08s backwards,
             wobble 8s ease-in-out 1s infinite;
}

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

/* ---------- Responsive breakpoints ------------------------------------- */

/* Phones */
@media (max-width: 559px) {
  .topbar { margin-bottom: var(--s-6); }
  .topbar .corner { display: none; } /* wordmark only on mobile */
  .wordmark { font-size: 1.2rem; }
  .hero-illo { width: 60px; height: 60px; margin-bottom: var(--s-3); }
  .lede { margin-bottom: var(--s-6); }
  .card { padding: var(--s-5); border-radius: var(--r-lg); }
  .card .sticker { top: -12px; right: 18px; font-size: 0.65rem; padding: 0.3rem 0.7rem; }
  .process-list > li { padding-left: 2.85rem; margin-bottom: var(--s-5); }
  .process-list > li::before { width: 2.1rem; height: 2.1rem; font-size: 0.95rem; }
  .btn { padding: 0.85rem 1.2rem; font-size: 0.95rem; }
  .btn-row { flex-direction: column; align-items: stretch; }
  .btn-row .btn { justify-content: center; }
  .page-footer { flex-direction: column; gap: var(--s-1); }
}

/* Tablet / small laptop — no special rules; defaults apply. */

/* Desktop — generous spacing, larger hero, two-column landing hero */
@media (min-width: 900px) {
  .topbar { margin-bottom: var(--s-10); font-size: 1rem; }
  .hero-illo { width: 96px; height: 96px; margin-bottom: var(--s-5); }
  .lede { font-size: 1.25rem; max-width: 34em; }
  .card { padding: var(--s-10); }
  .btn { padding: 1rem 1.8rem; font-size: 1.05rem; }

  /* On the landing page, the hero illo sits to the right of the title at desktop sizes */
  .container.has-hero-illo .hero-illo {
    position: absolute;
    top: var(--s-12);
    right: var(--s-8);
    transform: rotate(-6deg);
    width: 110px;
    height: 110px;
    margin: 0;
  }
}
