/* WebWrap app design system ("Groovy 70s"): tokens and components shared by sign-in, onboarding
   and the dashboard. Change the brand here; app-editor.css and phone-preview.css read these tokens.
   Rule of thumb: loud in headers and big moments, calm where people work (forms, keys, statuses).
   Orange and mustard are fills only; text is always brown ink, which passes contrast on cream. */

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

:root {
  /* Surfaces */
  --bg:        #FBEFD9;   /* cream page */
  --sand:      #F6D9A8;   /* header band */
  --paper:     #FFF8EA;   /* soft panels */
  --surface:   #FFFFFF;   /* cards and fields */
  --rule:        #E8D6B6;
  --rule-strong: #C9B48F;

  /* Text */
  --ink:   #3A2418;
  --ink-2: #6A5244;

  /* Brand fills */
  --orange:  #E2622A;
  --mustard: #F3B23B;
  --pink:    #F4A6B8;
  --olive:   #6E7B2F;

  /* Soft fills with their readable text colour */
  --orange-soft: #FDE3D3;  --orange-ink: #A8401A;
  --mustard-soft:#FCEBC4;  --mustard-ink:#7A5208;
  --pink-soft:   #FCE1E7;  --pink-ink:   #8E2F48;
  --olive-soft:  #EEF0DF;  --olive-ink:  #4A5420;
  --red-soft:    #FBDCD5;  --red-ink:    #9A2C14;

  /* Shape */
  --r-sm: 14px;
  --r:    22px;
  --r-lg: 28px;
  --pop:  5px 5px 0 var(--ink);
  --pop-sm: 3px 3px 0 var(--ink);
  --ring: 0 0 0 4px rgba(226, 98, 42, 0.22);

  --font:         'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-display: 'Shrikhand', 'DM Sans', serif;
  --mono:         ui-monospace, 'SF Mono', Menlo, monospace;

  /* Older names some shared pieces still use. */
  --accent: var(--ink);
  --ink-3: var(--ink-2);
  --surface-2: var(--paper);
}

html { -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.5;
  background: var(--bg);
  color: var(--ink);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--orange-ink); }
a:hover { color: #7A2E12; }
button { font-family: inherit; }
code { font-family: var(--mono); font-size: 12px; background: var(--paper); border: 1px solid var(--rule); padding: 1px 6px; border-radius: 6px; overflow-wrap: anywhere; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--orange); outline-offset: 2px; }

.display, h1.display, h2.display { font-family: var(--font-display); font-weight: 400; letter-spacing: 0; line-height: 1.04; }
h1, h2, h3 { color: var(--ink); }
h1 { font-family: var(--font-display); font-weight: 400; font-size: clamp(34px, 5vw, 56px); line-height: 1.02; }
h2 { font-size: 22px; font-weight: 700; line-height: 1.25; }
h3 { font-size: 17px; font-weight: 700; line-height: 1.3; }
.lede { font-size: 16px; line-height: 1.6; color: var(--ink-2); }
.muted { color: var(--ink-2); font-size: 14px; line-height: 1.55; }
.muted a { font-weight: 700; }
.small { font-size: 13px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ── Brand ── */
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.brand:hover { color: var(--ink); }
.brand__mark {
  width: 36px; height: 36px; flex-shrink: 0; display: inline-block;
  background: url("/logo.svg") center / contain no-repeat;
}
.brand__name { font-family: var(--font-display); font-size: 22px; line-height: 1; }

/* ── Buttons ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--font); font-size: 15px; font-weight: 700; line-height: 1.2;
  padding: 13px 24px; border-radius: 999px;
  border: 2px solid var(--ink);
  background: var(--ink); color: var(--bg);
  cursor: pointer; text-decoration: none; text-align: center; white-space: nowrap;
  transition: transform 0.1s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.btn:hover { color: var(--bg); background: #4E3326; }
.btn:active { transform: translate(1px, 1px); }
.btn:disabled, .btn[aria-disabled="true"] { opacity: 0.4; cursor: not-allowed; transform: none; }
.btn--pop { box-shadow: 4px 4px 0 var(--orange); }
.btn--pop:active { box-shadow: 2px 2px 0 var(--orange); }
.btn--outline { background: transparent; color: var(--ink); }
.btn--outline:hover { background: rgba(58, 36, 24, 0.06); color: var(--ink); }
.btn--cream { background: var(--bg); color: var(--ink); }
.btn--cream:hover { background: #fff; color: var(--ink); }
.btn--white { background: var(--surface); color: var(--ink); box-shadow: var(--pop-sm); }
.btn--white:hover { background: var(--surface); color: var(--ink); }
.btn--danger { background: var(--surface); color: var(--red-ink); border-color: #E5B3A6; }
.btn--danger:hover { background: var(--red-soft); color: var(--red-ink); }
.btn--sm { font-size: 13px; padding: 8px 16px; }
.btn--lg { font-size: 16px; padding: 15px 30px; }
.btn--block { display: flex; width: 100%; }
.btn--google { background: var(--surface); color: var(--ink); box-shadow: 3px 3px 0 var(--orange); }
.btn--google:hover { background: var(--surface); color: var(--ink); }
.btn--google svg { width: 18px; height: 18px; }
.link-btn { background: none; border: 0; padding: 0; font: inherit; font-weight: 700; color: var(--orange-ink); cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }
.link-btn:hover { color: #7A2E12; }
.link-btn--ink { color: var(--ink); }

.spinner {
  display: inline-block; width: 16px; height: 16px; flex-shrink: 0;
  border: 2.5px solid currentColor; border-right-color: transparent;
  border-radius: 50%; animation: spin 0.7s linear infinite;
}
.spinner--lg { width: 32px; height: 32px; border-width: 4px; color: var(--orange); }
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Forms ── */
.field { margin-bottom: 18px; }
.field > label, .label { display: block; font-size: 13px; font-weight: 700; color: var(--ink); margin-bottom: 6px; }
.field__row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.field__row a { font-size: 13px; font-weight: 700; }
.hint { font-size: 13px; color: var(--ink-2); margin-top: 6px; line-height: 1.5; }
.hint a { font-weight: 700; }
.optional { font-weight: 500; color: var(--ink-2); }
.input, .field input[type="text"], .field input[type="url"], .field input[type="email"],
.field input[type="password"], .field select {
  width: 100%; min-width: 0;
  font-family: var(--font); font-size: 15px; color: var(--ink);
  padding: 12px 20px;
  background: var(--surface);
  border: 2px solid var(--rule);
  border-radius: 999px;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.field textarea, textarea.input {
  width: 100%; min-width: 0; font-family: var(--mono); font-size: 12px; color: var(--ink);
  min-height: 110px; resize: vertical; padding: 14px 16px;
  background: var(--surface); border: 2px solid var(--rule); border-radius: var(--r-sm); outline: none;
}
.input:focus, .field input:focus, .field textarea:focus, .field select:focus { border-color: var(--ink); box-shadow: var(--ring); }
.input::placeholder, .field input::placeholder, .field textarea::placeholder { color: #9C8676; }
.input--xl { font-size: 17px; padding: 15px 22px; border-color: var(--ink); }
.input--strong { border-color: var(--ink); }
.field input[type="file"] { font-size: 13px; margin-bottom: 8px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
@media (max-width: 600px) { .grid-2 { grid-template-columns: 1fr; } }

/* ── Alerts ── */
.alert {
  display: flex; gap: 12px; align-items: center; flex-wrap: wrap;
  padding: 14px 18px; border-radius: var(--r);
  font-size: 14px; line-height: 1.5;
  margin-bottom: 16px;
}
.alert > div { flex: 1; min-width: 220px; }
.alert--error   { background: var(--red-soft);   color: #6E1F10; }
.alert--success { background: var(--olive-soft); color: #353D17; }
.alert--info    { background: var(--paper);      color: var(--ink); border: 1px solid var(--rule); }
.alert--warn    { background: var(--pink-soft);  color: #5E1F30; }

/* ── Cards ── */
.card { background: var(--surface); border: 1px solid var(--rule); border-radius: var(--r-lg); }
.card--pop { border: 2px solid var(--ink); box-shadow: var(--pop); }
.card--paper { background: var(--paper); border: 0; }
.card__pad { padding: 24px; }
@media (max-width: 600px) { .card__pad { padding: 18px; } }

/* ── Status pill and stickers ── */
.pill {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; font-weight: 700; line-height: 1;
  padding: 7px 12px; border-radius: 999px;
  white-space: nowrap; flex-shrink: 0;
  background: var(--paper); color: var(--ink);
}
.pill--ok   { background: var(--olive-soft);   color: var(--olive-ink); }
.pill--busy { background: var(--mustard-soft); color: var(--mustard-ink); }
.pill--todo { background: var(--pink-soft);    color: var(--pink-ink); }
.pill--bad  { background: var(--red-soft);     color: var(--red-ink); }

.sticker {
  display: inline-block; transform: rotate(-4deg);
  font-size: 13px; font-weight: 700; line-height: 1.2;
  padding: 5px 13px; border-radius: 999px;
  border: 2px solid var(--ink); background: var(--bg); color: var(--ink);
  white-space: nowrap;
}
.sticker--ok   { background: var(--olive); color: var(--bg); }
.sticker--busy { background: var(--mustard); }
.sticker--todo { background: var(--pink); }
.sticker--bad  { background: var(--red-soft); color: var(--red-ink); }
.sticker--pop  { box-shadow: 2px 2px 0 var(--ink); }

.tag { display: inline-block; font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: 999px; margin-left: 6px; vertical-align: 1px; background: var(--paper); color: var(--ink); border: 1px solid var(--rule); }
.tag--req { background: var(--orange-soft); color: var(--orange-ink); border-color: transparent; }

/* ── Numbered guide steps ── */
.guide { list-style: none; counter-reset: guide; margin: 0 0 18px; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.guide li { counter-increment: guide; display: flex; gap: 14px; align-items: flex-start; font-size: 14px; line-height: 1.55; }
.guide li::before {
  content: counter(guide); flex-shrink: 0;
  width: 30px; height: 30px; border-radius: 50%; border: 2px solid var(--ink);
  background: var(--orange); color: #fff; font-weight: 700; font-size: 13px;
  display: inline-flex; align-items: center; justify-content: center; margin-top: -3px;
}
.guide li:nth-child(4n+2)::before { background: var(--mustard); color: var(--ink); }
.guide li:nth-child(4n+3)::before { background: var(--pink); color: var(--ink); }
.guide li:nth-child(4n+4)::before { background: var(--olive); color: #fff; }
.guide a { font-weight: 700; }

/* ── Switch ── */
.switch { position: relative; width: 46px; height: 26px; flex-shrink: 0; display: inline-block; }
.switch input { opacity: 0; width: 0; height: 0; position: absolute; }
.switch__track { position: absolute; inset: 0; background: var(--rule); border-radius: 13px; cursor: pointer; transition: background 0.2s ease; }
.switch__track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; background: #fff; border-radius: 50%; box-shadow: 0 1px 3px rgba(0,0,0,0.2); transition: transform 0.2s ease; }
.switch input:checked + .switch__track { background: var(--olive); }
.switch input:checked + .switch__track::after { transform: translateX(20px); }
.switch input:focus-visible + .switch__track { outline: 3px solid var(--orange); outline-offset: 2px; }

/* ── Three-stripe progress (set --p from 0 to 1) ── */
.stripes { --p: 0.5; display: flex; flex-direction: column; gap: 5px; }
.stripes span { display: block; height: 8px; border-radius: 4px; background: #F6E3C4; position: relative; overflow: hidden; }
.stripes span::after { content: ""; position: absolute; inset: 0 auto 0 0; border-radius: 4px; }
.stripes span:nth-child(1)::after { width: calc(var(--p) * 100%); background: var(--orange); }
.stripes span:nth-child(2)::after { width: calc(var(--p) * 88%); background: var(--mustard); }
.stripes span:nth-child(3)::after { width: calc(var(--p) * 76%); background: var(--pink); }
.stripes--live span::after { animation: stripe 2.4s ease-in-out infinite alternate; }
.stripes--live span:nth-child(2)::after { animation-delay: 0.2s; }
.stripes--live span:nth-child(3)::after { animation-delay: 0.4s; }
@keyframes stripe { from { transform: translateX(-12%); } to { transform: translateX(6%); } }
@media (prefers-reduced-motion: reduce) { .stripes--live span::after { animation: none; } }

/* ── Sunburst behind an icon ── */
.sunburst { position: relative; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.sunburst::before { content: ""; position: absolute; inset: 0; border-radius: 50%; background: repeating-conic-gradient(var(--sun-ray, var(--orange)) 0 10deg, transparent 10deg 20deg); }
.sunburst > * { position: relative; }

/* ── App icon tile ── */
.app-icon {
  width: 56px; height: 56px; border-radius: 15px; border: 3px solid var(--ink);
  display: inline-flex; align-items: center; justify-content: center; overflow: hidden;
  background: var(--olive); color: #fff; font-family: var(--font-display); font-size: 26px; flex-shrink: 0;
}
.app-icon img { width: 100%; height: 100%; object-fit: cover; background: #fff; }

/* ── Page header band (sand, sunset, waves) ── */
.band { position: relative; background: var(--sand); overflow: hidden; overflow: clip; }
.band__nav { position: relative; z-index: 2; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 0 36px; min-height: 76px; flex-wrap: wrap; }
.band__left { display: flex; align-items: center; gap: 28px; flex-wrap: wrap; }
.band__inner { position: relative; z-index: 1; max-width: 1140px; margin: 0 auto; padding: 22px 36px 0; }
.band__sun { position: absolute; z-index: 0; right: 70px; top: 76px; width: min(360px, 32vw); pointer-events: none; }
.band__sun svg { width: 100%; height: auto; display: block; }
.band__waves { position: absolute; left: 0; right: 0; bottom: -1px; height: 64px; z-index: 1; pointer-events: none; }
.band__waves svg { width: 100%; height: 100%; display: block; }
.band--waves .band__inner { padding-bottom: 120px; min-height: 330px; }
.band--app .band__sun { right: auto; left: 46%; top: 70px; width: min(300px, 26vw); }
.band__copy { max-width: 560px; display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
.band__copy p { font-size: 16px; }
@media (max-width: 860px) {
  .band__sun, .band--app .band__sun { opacity: 0.35; left: auto; right: -40px; }
}
@media (max-width: 600px) {
  .band__nav { padding-top: 14px; padding-bottom: 4px; row-gap: 12px; }
  .band__left { display: contents; }
  .band__nav .brand { order: 1; margin-right: auto; }
  .band__nav .avatar:hover { color: var(--ink); }
.avatar { order: 2; }
  .navpill { order: 3; width: 100%; justify-content: space-between; }
  .navpill a { padding: 10px 16px; }
  .band__nav, .band__inner { padding-left: 18px; padding-right: 18px; }
}

.navpill { display: flex; gap: 4px; padding: 4px; border-radius: 999px; background: var(--bg); }
.navpill a { font-size: 14px; font-weight: 700; color: var(--ink); text-decoration: none; padding: 8px 16px; border-radius: 999px; }
.navpill a:hover { background: rgba(58, 36, 24, 0.07); color: var(--ink); }
.navpill a[aria-current="page"] { background: var(--ink); color: var(--bg); }

.avatar {
  width: 40px; height: 40px; border-radius: 50%; border: 2px solid var(--ink);
  background: var(--pink); color: var(--ink); font: 700 13px var(--font);
  display: inline-flex; align-items: center; justify-content: center; cursor: pointer; text-decoration: none;
}

/* Folder tabs along the bottom of the band. */
.tabs { display: flex; gap: 4px; overflow-x: auto; margin-top: 18px; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs a, .tabs button {
  font: 700 15px var(--font); color: var(--ink); text-decoration: none; background: none; border: 0; cursor: pointer;
  padding: 13px 20px; border-radius: 18px 18px 0 0; white-space: nowrap;
}
.tabs a:hover, .tabs button:hover { background: rgba(251, 239, 217, 0.5); color: var(--ink); }
.tabs [aria-selected="true"], .tabs [aria-current="page"] { background: var(--bg); }
.tabs .dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--orange); margin-left: 6px; vertical-align: 2px; }

/* Onboarding step bars. */
.stepbars { display: flex; gap: 8px; }
.stepbars span { width: 48px; height: 8px; border-radius: 4px; background: var(--rule); }
.stepbars .is-done { background: var(--olive); }
.stepbars .is-current { background: var(--orange); }

/* ── Simple centred pages (sign-in, payment) ── */
.center-page { min-height: 100vh; display: flex; flex-direction: column; position: relative; overflow: hidden; overflow: clip; background: var(--sand); }
.center-page__top { position: relative; z-index: 2; padding: 24px 36px; }
.center-page__main { position: relative; z-index: 2; flex: 1; display: flex; align-items: center; justify-content: center; padding: 20px 20px 150px; }
.center-page .band__waves { height: 110px; }
.center-card { width: 100%; max-width: 440px; padding: 34px; background: var(--paper); border: 2px solid var(--ink); border-radius: 30px; box-shadow: 6px 6px 0 var(--ink); }
.center-card--wide { max-width: 520px; text-align: center; }
.center-card h1 { font-size: 40px; margin: 14px 0 10px; }
.center-card .lede { margin-bottom: 24px; font-size: 15px; }
.center-card .foot { text-align: center; margin-top: 20px; font-size: 14px; color: var(--ink); }
.center-card .foot a { font-weight: 700; }
.center-card__art { display: block; width: 220px; margin: 0 auto 6px; }
@media (max-width: 600px) {
  .center-page__top { padding: 18px 16px; }
  .center-card { padding: 26px 20px; }
  .center-card h1 { font-size: 32px; }
}

/* Decorative sparkle. */
.sparkle { position: absolute; width: 22px; height: 22px; pointer-events: none; }

/* Marketing nav and footer (markup in src/partials, used by the homepage, platform pages, blog and docs). */
.site-top { position: relative; background: var(--sand); }
.site-nav { position: relative; z-index: 2; max-width: 1180px; margin: 0 auto; padding: 22px 40px; display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.site-nav__links { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
.site-nav__links a:not(.btn) { font-weight: 700; color: var(--ink); text-decoration: none; }
.site-nav__links a:not(.btn):hover { text-decoration: underline; }
@media (max-width: 760px) {
  .site-nav { padding: 16px 18px; flex-wrap: nowrap; }
  .site-nav .brand__name { font-size: 19px; }
  .site-nav .brand__mark { width: 30px; height: 30px; }
  .site-nav__links { gap: 12px; flex-wrap: nowrap; white-space: nowrap; }
  .site-nav__links .btn { padding: 8px 13px; font-size: 13px; }
  .site-nav__hide { display: none; }
}
.site-footer { background: var(--ink); color: var(--bg); padding: 40px 0 50px; }
.site-footer__inner { max-width: 1180px; margin: 0 auto; padding: 0 40px; display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.site-footer nav { display: flex; gap: 22px; flex-wrap: wrap; font-weight: 700; }
.site-footer a { color: var(--bg); text-decoration: none; }
.site-footer a:hover { color: var(--bg); text-decoration: underline; }
.site-footer small { font-size: 13px; color: var(--rule); }
@media (max-width: 760px) { .site-footer__inner { padding: 0 18px; } }
