/* ==========================================================
   Site Synthesizer (component "synth", prefix sx-)
   Load after styles.css. Every selector starts with .sx-
   Uses the v3 tokens: --green, --green-2, --lime, --paper,
   --sand, --ink, --mute, --line, --font, --serif.
   ========================================================== */

/* ---------- section ---------- */
.sx-sec {
  position: relative;
  background: var(--green);
  color: #fff;
  padding: clamp(56px, 8vw, 104px) 0;
  overflow-x: clip;
}
.sx-head { max-width: 760px; margin-bottom: clamp(28px, 4vw, 48px); }
.sx-title { color: #fff; }
.sx-title em { color: var(--lime); }
.sx-sub { margin-top: 1rem; max-width: 38em; font-size: clamp(1.02rem, 1.4vw, 1.12rem); color: rgba(255, 255, 255, .86); }

/* visible focus on dark green (the page default is dark green) */
.sx-sec :focus-visible { outline: 3px solid var(--lime); outline-offset: 3px; }

/* ---------- layout ---------- */
.sx-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 28px; }
.sx-ctl, .sx-out, .sx-act { min-width: 0; }
.sx-ctl { display: grid; gap: 24px; align-content: start; }

/* ---------- controls ---------- */
.sx-field { display: block; min-width: 0; margin: 0; padding: 0; border: 0; }
.sx-label { display: block; padding: 0; margin: 0 0 10px; font-size: .8rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: rgba(255, 255, 255, .84); }

.sx-input {
  display: block; width: 100%; min-width: 0;
  padding: .7em .85em;
  border: 2px solid transparent; border-radius: 14px;
  background: var(--paper); color: var(--ink);
  font-size: 1.25rem; font-weight: 650; letter-spacing: -.01em; line-height: 1.2;
}
.sx-input::placeholder { color: var(--mute); opacity: 1; font-weight: 500; }
.sx-input:focus, .sx-input:focus-visible { outline: 3px solid var(--lime); outline-offset: 2px; border-color: var(--green-2); }
.sx-hint { margin-top: 8px; font-size: .9rem; color: rgba(255, 255, 255, .8); }

/* chips and style options are real radio buttons, drawn as pills */
.sx-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.sx-chip { position: relative; display: inline-flex; max-width: 100%; }
.sx-chip input, .sx-opt input {
  position: absolute; inset: 0; z-index: 1;
  width: 100%; height: 100%; margin: 0;
  opacity: 0; cursor: pointer;
}
.sx-chip span {
  display: block; max-width: 100%;
  padding: .55em .95em;
  border: 1.5px solid rgba(255, 255, 255, .45); border-radius: 999px;
  font-size: .93rem; font-weight: 600; line-height: 1.25; color: #fff;
  transition: background-color .2s, border-color .2s, color .2s;
}
.sx-chip input:hover + span { border-color: #fff; background: rgba(255, 255, 255, .07); }
.sx-chip input:checked + span { background: var(--lime); border-color: var(--lime); color: var(--green); }

.sx-seg { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.sx-opt { position: relative; display: block; min-width: 0; }
.sx-opt span {
  display: grid; gap: 2px; height: 100%;
  padding: .65em .5em;
  border: 1.5px solid rgba(255, 255, 255, .45); border-radius: 14px;
  text-align: center; line-height: 1.2; color: #fff;
  transition: background-color .2s, border-color .2s, color .2s;
}
.sx-opt b { font-weight: 700; font-size: 1rem; }
.sx-opt small { font-size: .78rem; font-weight: 500; color: rgba(255, 255, 255, .82); }
.sx-opt input:hover + span { border-color: #fff; background: rgba(255, 255, 255, .07); }
.sx-opt input:checked + span { background: var(--lime); border-color: var(--lime); color: var(--green); }
.sx-opt input:checked + span small { color: var(--green); }

.sx-chip input:focus-visible + span,
.sx-opt input:focus-visible + span { outline: 3px solid var(--lime); outline-offset: 3px; }

/* ---------- browser frame ---------- */
.sx-out { display: grid; gap: 14px; align-content: start; }
.sx-frame {
  border-radius: 16px; overflow: hidden;
  background: var(--paper);
  box-shadow: 0 40px 80px -36px rgba(0, 0, 0, .6), 0 0 0 1px rgba(255, 255, 255, .1);
}
.sx-bar { display: flex; align-items: center; gap: 6px; padding: 9px 12px; background: var(--sand); border-bottom: 1px solid var(--line); }
.sx-bar i { flex: none; width: 10px; height: 10px; border-radius: 50%; background: rgba(16, 39, 31, .22); }
.sx-url {
  flex: 1 1 auto; min-width: 0; margin-left: 6px;
  padding: 4px 12px; border-radius: 999px;
  background: var(--paper); color: var(--mute);
  font-size: .78rem; font-weight: 500; line-height: 1.3;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.sx-tag { flex: none; padding: 3px 9px; border-radius: 999px; background: var(--green); color: var(--lime); font-size: .68rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; line-height: 1.3; }

/* ---------- the sketched homepage ---------- */
.sx-site {
  /* colors (JS overwrites these on every change) */
  --sx-bg: #faf8f4; --sx-fg: #1f1a17; --sx-mute: #5a4f48; --sx-surf: #f1ebe4;
  --sx-acc: #9a4a1e; --sx-acc2: #e6a04f; --sx-btnfg: #fff; --sx-line: rgba(0, 0, 0, .1);
  /* type + shape per style */
  --sx-hf: var(--font); --sx-hst: normal; --sx-hw: 700; --sx-hwd: 92%; --sx-htt: none;
  --sx-hls: -.035em; --sx-hlh: 1.02; --sx-hs: 1;
  --sx-r: 8px; --sx-cr: 12px;
  container-type: inline-size;
  position: relative;
  background: var(--sx-bg); color: var(--sx-fg);
  font-family: var(--font); font-size: 16px; line-height: 1.35; text-align: left;
  transition: background-color .5s ease, color .5s ease;
}
.sx-site[data-style="bold"] { --sx-hw: 800; --sx-hwd: 75%; --sx-htt: uppercase; --sx-hls: -.015em; --sx-hlh: .92; --sx-hs: .94; --sx-r: 3px; --sx-cr: 4px; }
.sx-site[data-style="warm"] { --sx-hf: var(--serif); --sx-hst: italic; --sx-hw: 400; --sx-hwd: 100%; --sx-hls: -.01em; --sx-hlh: 1; --sx-hs: 1.16; --sx-r: 999px; --sx-cr: 18px; }

.sx-m-nav { display: flex; align-items: center; gap: 3cqw; padding: 2.4cqw 4cqw; border-bottom: 1px solid var(--sx-line); font-size: max(11px, 1.55cqw); }
.sx-m-brand { display: flex; align-items: center; gap: 1.2cqw; flex: 1 1 auto; min-width: 0; }
.sx-m-mark { flex: none; width: max(24px, 3.8cqw); height: max(24px, 3.8cqw); }
.sx-m-brand b {
  min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font-family: var(--sx-hf); font-style: var(--sx-hst); font-weight: var(--sx-hw); font-stretch: var(--sx-hwd);
  letter-spacing: var(--sx-hls); font-size: 1.3em;
}
.sx-m-links { display: flex; flex: none; gap: 2.6cqw; color: var(--sx-mute); font-weight: 500; }
.sx-m-navcta { flex: none; padding: .45em .95em; border-radius: var(--sx-r); box-shadow: inset 0 0 0 1.5px var(--sx-fg); font-weight: 700; white-space: nowrap; }

.sx-m-hero { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: 4cqw; align-items: center; padding: 5cqw 4cqw 4cqw; }
.sx-m-copy { min-width: 0; }
.sx-m-eyebrow { margin-bottom: 1.8cqw; font-size: max(10px, 1.3cqw); font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--sx-acc); transition: color .5s ease; }
/* Space for two headline lines is reserved at the tallest style's size, so switching
   names, kinds of business or styles doesn't push the rest of the page around. */
.sx-m-h {
  min-height: calc(2 * 1.16 * max(26px, 6.2cqw));
  margin-bottom: 2cqw;
  font-family: var(--sx-hf); font-style: var(--sx-hst); font-weight: var(--sx-hw); font-stretch: var(--sx-hwd);
  text-transform: var(--sx-htt); letter-spacing: var(--sx-hls); line-height: var(--sx-hlh);
  font-size: calc(max(26px, 6.2cqw) * var(--sx-hs));
  text-wrap: balance; overflow-wrap: break-word;
}
.sx-m-p { max-width: 40ch; min-height: calc(3em * 1.45); margin-bottom: 2.6cqw; font-size: max(12px, 1.7cqw); line-height: 1.45; color: var(--sx-mute); transition: color .5s ease; }
.sx-m-btns { display: flex; flex-wrap: wrap; gap: 1.2cqw; }
.sx-m-btn {
  display: inline-block; max-width: 100%;
  padding: .8em 1.3em; border-radius: var(--sx-r);
  background: var(--sx-acc); color: var(--sx-btnfg);
  font-size: max(11px, 1.55cqw); font-weight: 700; line-height: 1.2; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis;
  transition: background-color .5s ease, color .5s ease;
}
.sx-m-ghost { background: transparent; color: var(--sx-fg); box-shadow: inset 0 0 0 1.5px var(--sx-fg); }
.sx-m-artbox { position: relative; aspect-ratio: 1; border-radius: var(--sx-cr); overflow: hidden; background: var(--sx-surf); }
.sx-m-artbox svg { position: absolute; inset: 0; width: 100%; height: 100%; }

.sx-m-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.6cqw; padding: 0 4cqw 4cqw; }
.sx-m-card { min-width: 0; padding: 2.2cqw; border-radius: var(--sx-cr); background: var(--sx-surf); transition: background-color .5s ease; }
.sx-m-num { display: block; font-size: max(10px, 1.2cqw); font-weight: 700; letter-spacing: .1em; color: var(--sx-acc); transition: color .5s ease; }
.sx-m-ct {
  display: block; margin: .8cqw 0 .5cqw;
  min-height: calc(1.16 * 1.1 * max(14px, 2.3cqw));
  font-family: var(--sx-hf); font-style: var(--sx-hst); font-weight: var(--sx-hw); font-stretch: var(--sx-hwd);
  letter-spacing: var(--sx-hls); line-height: 1.1;
  font-size: calc(max(14px, 2.3cqw) * var(--sx-hs));
}
.sx-m-cd { display: block; min-height: 2.8em; font-size: max(11px, 1.35cqw); line-height: 1.4; color: var(--sx-mute); transition: color .5s ease; }

/* phone-style call bar, only when the sketch itself is narrow */
.sx-m-dock { display: none; gap: 6px; margin: 0 4cqw 4cqw; padding: 5px; border-radius: 999px; background: var(--sx-surf); }
.sx-m-dock span { flex: 1 1 0; min-width: 0; padding: 8px 4px; border-radius: 999px; box-shadow: inset 0 0 0 1.5px var(--sx-fg); text-align: center; font-size: 11px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sx-m-dock .sx-m-go { flex-grow: 1.7; background: var(--sx-acc); color: var(--sx-btnfg); box-shadow: none; }

@container (max-width: 520px) {
  .sx-m-links { display: none; }
  .sx-m-hero { grid-template-columns: minmax(0, 1fr); padding-top: 4cqw; }
  .sx-m-artbox { order: -1; aspect-ratio: 5 / 2; }
  .sx-m-cards { grid-template-columns: minmax(0, 1fr); }
  .sx-m-card:nth-child(3) { display: none; }
  .sx-m-dock { display: flex; }
}

/* ---------- logo + colors strip ---------- */
.sx-kit { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 10px; }
.sx-logo { position: relative; aspect-ratio: 1; border-radius: 14px; overflow: hidden; background: var(--paper); box-shadow: 0 0 0 1px rgba(255, 255, 255, .16); }
.sx-logo svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.sx-pal { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 0; padding: 0; list-style: none; border-radius: 14px; overflow: hidden; box-shadow: 0 0 0 1px rgba(255, 255, 255, .16); }
.sx-pal li {
  display: flex; flex-direction: column; justify-content: flex-end; gap: 1px;
  min-width: 0; padding: 10px;
  background: #fff; color: #000;
  transition: background-color .45s ease, color .45s ease;
}
.sx-sw-l { font-size: .68rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; line-height: 1.3; }
.sx-sw-v { font-size: .8rem; font-weight: 600; letter-spacing: .02em; font-variant-numeric: tabular-nums; line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- actions ---------- */
.sx-act { display: grid; gap: 14px; align-content: start; padding-top: 22px; border-top: 1px solid rgba(255, 255, 255, .18); }
.sx-act-row { display: flex; flex-wrap: wrap; gap: 10px; }
.sx-ghost { background: transparent; }
.sx-act-row .sx-ghost { flex: 1 1 auto; }
.sx-ghost[aria-busy="true"] { opacity: .7; cursor: progress; }
.sx-cta { justify-self: start; }
.sx-cta-note { font-size: .92rem; color: rgba(255, 255, 255, .8); }

.sx-fine { display: flex; flex-wrap: wrap; gap: 4px 18px; margin-top: clamp(24px, 3vw, 36px); font-size: .92rem; color: rgba(255, 255, 255, .8); }
.sx-fine b { color: #fff; font-weight: 650; }

.sx-vh { position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; border: 0; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }

/* ---------- responsive ---------- */
@media (min-width: 900px) {
  .sx-grid {
    grid-template-columns: minmax(0, 340px) minmax(0, 1fr);
    grid-template-rows: auto 1fr;
    grid-template-areas: "ctl out" "act out";
    column-gap: clamp(32px, 4vw, 56px);
    row-gap: 28px;
  }
  .sx-ctl { grid-area: ctl; }
  .sx-out { grid-area: out; }
  .sx-act { grid-area: act; }
}
@media (min-width: 1120px) {
  .sx-grid { grid-template-columns: minmax(0, 380px) minmax(0, 1fr); }
}
@media (max-width: 559px) {
  .sx-chips { gap: 6px; }
  .sx-chip span { padding: .5em .8em; font-size: .87rem; }
  .sx-act-row .sx-ghost { flex-basis: 100%; }
  .sx-cta { justify-self: stretch; }
  .sx-pal { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sx-pal li { padding: 6px 8px; }
}

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