/* TGD customer-facing Cake Topper visual pilot.
   Presentation-only; do not change the live design renderer, SVG output or save flow.
   Baseline: storefront Premium V2 approved Oct 27, 2026. */

:root {
  font-family: "Open Sans", "Segoe UI", Arial, sans-serif;
  color: #173f29;
  background: #faf9f5;

  --tgd-forest: #173f29;
  --tgd-deep: #092f20;
  --tgd-prose: #526456;
  --tgd-gold: #d6a02b;
  --tgd-line: rgba(28, 73, 44, 0.14);
  --tgd-ivory: #faf9f5;
  --tgd-white: #ffffff;
  --tgd-success: #277347;
  --tgd-error: #b42318;
  --tgd-warning: #916b22;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--tgd-forest);
  background:
    radial-gradient(ellipse 45% 48% at 5% 48%, rgba(49, 98, 64, 0.115) 0%, rgba(49, 98, 64, 0) 100%),
    radial-gradient(ellipse 42% 38% at 96% 73%, rgba(191, 151, 64, 0.09) 0%, rgba(191, 151, 64, 0) 100%),
    linear-gradient(145deg, #f2f5ef 0%, #faf9f5 50%, #f1f4ee 100%);
  -webkit-font-smoothing: antialiased;
}

.studio {
  max-width: 1180px;
  margin: 0 auto;
  padding: 18px 24px 56px;
}

.hero {
  text-align: center;
  margin: 20px 0 25px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  margin: 0 0 10px;
  color: #90691b;
  font-size: 11px;
  font-weight: 750;
  line-height: 1.4;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.eyebrow::before,
.eyebrow::after {
  content: "";
  width: 6px;
  height: 6px;
  background: var(--tgd-gold);
  transform: rotate(45deg);
  opacity: 0.9;
}

.hero h1 {
  max-width: 850px;
  margin: 0 auto;
  color: var(--tgd-forest);
  font-size: clamp(30px, 4.3vw, 45px);
  font-weight: 700;
  line-height: 1.13;
  letter-spacing: -0.04em;
}

.hero p:last-child {
  max-width: 650px;
  margin: 12px auto 0;
  color: var(--tgd-prose);
  font-size: 15px;
  line-height: 1.65;
  letter-spacing: 0;
  font-weight: 400;
}

.workspace {
  display: grid;
  grid-template-columns: minmax(0, 1.06fr) minmax(0, 0.94fr);
  gap: 22px;
  align-items: start;
}

.card {
  background: var(--tgd-white);
  border: 1px solid rgba(28, 73, 44, 0.15);
  border-radius: 24px;
  box-shadow: 0 20px 48px rgba(22, 48, 34, 0.12), 0 2px 8px rgba(22, 48, 34, 0.035);
}

.preview-card { padding: 15px; }

.preview-shell {
  display: grid;
  place-items: center;
  min-height: 610px;
  background: #f5f7f3;
  border: 1px solid rgba(28, 73, 44, 0.10);
  border-radius: 17px;
  overflow: hidden;
}

/* The customer preview retains its existing SVG, geometry and white stage. */
.runtime-svg {
  display: block;
  width: auto;
  max-width: 100%;
  max-height: 590px;
  background: #ffffff;
}

.controls-card { 
  padding: clamp(20px, 2.8vw, 30px);
  border-top: 2px solid rgba(214, 160, 43, 0.48);
}

.field { margin: 0 0 20px; }

.field label {
  display: block;
  margin-bottom: 8px;
  color: #234c33;
  font-size: 15px;
  font-weight: 650;
  line-height: 1.4;
}

.field input,
.field select {
  display: block;
  width: 100%;
  min-height: 48px;
  padding: 11px 14px;
  border: 1px solid #cbd9cf;
  border-radius: 12px;
  color: #23392b;
  background: #ffffff;
  font: inherit;
  font-size: 15px;
  letter-spacing: 0;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.field input:hover,
.field select:hover { border-color: #8ba994; }

.field input:focus,
.field select:focus {
  outline: none;
  border-color: #37754f;
  box-shadow: 0 0 0 3px rgba(55, 117, 79, 0.15);
}

.field input:focus-visible,
.field select:focus-visible {
  outline: 2px solid var(--tgd-gold);
  outline-offset: 2px;
}

.hint,
.fit-hint,
.secure-note,
.loading {
  color: var(--tgd-prose);
  font-size: 14px;
  font-weight: 400;
  line-height: 1.55;
  letter-spacing: 0;
}

.fit-hint {
  margin: 12px 3px 0;
  color: var(--tgd-warning);
  font-weight: 650;
}

.actions {
  display: flex;
  align-items: stretch;
  gap: 10px;
  margin-top: 26px;
}

.actions button {
  min-height: 49px;
  padding: 12px 17px;
  border-radius: 13px;
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0;
  cursor: pointer;
  transition: filter 160ms ease, box-shadow 160ms ease, background-color 160ms ease;
}

.primary {
  flex: 1;
  border: 1px solid #46815b;
  color: #ffffff;
  background: linear-gradient(180deg, #38754c 0%, #205b3c 26%, #12452d 68%, #092f20 100%);
  box-shadow:
    inset 0 2px 1px rgba(255, 255, 255, 0.26),
    inset 0 -2px 3px rgba(0, 0, 0, 0.23),
    0 5px 13px rgba(5, 42, 26, 0.23);
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.23);
}

.primary:not(:disabled):hover {
  filter: brightness(1.055);
  box-shadow:
    inset 0 2px 1px rgba(255, 255, 255, 0.32),
    inset 0 -2px 3px rgba(0, 0, 0, 0.2),
    0 7px 17px rgba(5, 42, 26, 0.27);
}

.secondary {
  border: 1px solid #c9d6cd;
  color: #234c33;
  background: #ffffff;
}

.secondary:not(:disabled):hover { background: #f0f5ee; }

.actions button:focus-visible {
  outline: 3px solid var(--tgd-gold);
  outline-offset: 3px;
}

.actions button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  box-shadow: none;
}

.status {
  margin-top: 15px;
  padding: 12px 13px;
  border: 1px solid #e3eae1;
  border-radius: 12px;
  color: var(--tgd-prose);
  background: #f4f7f1;
  font-size: 13px;
  line-height: 1.5;
  font-weight: 500;
}

.status.success {
  color: #276141;
  background: #edf6ed;
  border-color: #dceadb;
}

.status.error {
  color: var(--tgd-error);
  background: #fff1f1;
  border-color: #f3dbdb;
}

.status.warn {
  color: var(--tgd-warning);
  background: #fff8e7;
  border-color: #f1e0b2;
}

.secure-note { margin: 12px 2px 0; }

.loading { text-align: center; }

@media (max-width: 820px) {
  .studio { padding: 23px 13px 36px; }
  .hero { margin-bottom: 22px; }
  .workspace { grid-template-columns: 1fr; gap: 16px; }
  .preview-shell { min-height: 430px; }
  .runtime-svg { max-height: 420px; }
  .preview-card {
    position: sticky;
    top: 0;
    z-index: 2;
    padding: 12px;
  }
  .controls-card { padding: 20px; }
}

@media (max-width: 480px) {
  .hero h1 { font-size: clamp(28px, 7vw, 35px); }
  .preview-shell { min-height: 340px; }
  .runtime-svg { max-height: 330px; }
  .card { border-radius: 18px; }
  .actions button { padding: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  .field input,
  .field select,
  .actions button { transition: none; }
}

/* Branded customer journey — the brand bar is restrained, not a second store navigation. */
.brand-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  min-height: 72px;
  padding: 0 3px 13px;
  border-bottom: 1px solid var(--tgd-line);
}

.brand-logo {
  display: block;
  width: auto;
  height: 66px;
  max-width: 190px;
  object-fit: contain;
  object-position: left center;
}

.brand-tagline {
  max-width: 260px;
  color: var(--tgd-prose);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 1.45;
  text-align: right;
}

.hero h1::after {
  content: "";
  display: block;
  width: 46px;
  height: 2px;
  margin: 13px auto 0;
  border-radius: 99px;
  background: var(--tgd-gold);
}

.preview-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 4px 12px;
  padding: 2px 6px 13px;
}

.preview-heading__title {
  color: #234c33;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.035em;
}

.preview-heading__hint {
  color: var(--tgd-prose);
  font-size: 12px;
  line-height: 1.4;
}

.controls-heading {
  margin: 0 0 24px;
  padding: 0 0 18px;
  border-bottom: 1px solid var(--tgd-line);
}

.controls-heading__eyebrow {
  display: inline-block;
  margin-bottom: 8px;
  color: #916b22;
  font-size: 11px;
  font-weight: 750;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.controls-heading h2 {
  margin: 0;
  color: var(--tgd-forest);
  font-size: clamp(21px, 2vw, 25px);
  line-height: 1.22;
  font-weight: 700;
  letter-spacing: -0.027em;
}

.secure-note {
  padding-top: 5px;
  font-size: 14px;
}

@media (max-width: 820px) {
  .brand-bar { min-height: 66px; }
  .brand-logo { height: 58px; max-width: 170px; }
  .brand-tagline { font-size: 12px; max-width: 210px; }
  .hero { margin: 17px 0 23px; }
}

@media (max-width: 480px) {
  .brand-bar { gap: 9px; padding-bottom: 8px; }
  .brand-logo { height: 50px; max-width: 144px; }
  .brand-tagline { max-width: 150px; font-size: 11px; }
  .preview-heading { padding: 2px 3px 11px; }
  .preview-heading__hint { font-size: 11px; }
  .controls-heading { margin-bottom: 20px; }
}

/* Phone-first layout: no extra logo strip, give space to the actual design task. */
@media (max-width: 749px) {
  .brand-bar { display: none; }
  .studio { padding-top: 14px; }
  .hero { margin-top: 0; }
  .hero h1 { font-size: clamp(27px, 5.5vw, 34px); }
  .preview-shell { min-height: 330px; }
  .runtime-svg { max-height: 315px; }
  .preview-card { position: static; }
}
@media (max-width: 480px) {
  .studio { padding: 12px 12px 30px; }
  .hero { margin-bottom: 16px; }
  .hero p:last-child { font-size: 14px; margin-top: 10px; }
  .preview-shell { min-height: 300px; }
  .runtime-svg { max-height: 285px; }
}
