@import url("base.css");

/* Keep the live summary within the viewport throughout the form. */
.summary-panel {
  align-self: stretch;
}

.summary-sticky {
  top: 16px;
  display: flex;
  max-height: calc(100dvh - 32px);
  flex-direction: column;
  overflow: hidden;
}

.summary-rows {
  min-height: 0;
  overflow-y: auto;
}

@media (max-width: 980px) {
  body {
    padding-bottom: 92px;
  }

  .summary-panel {
    position: fixed;
    right: 12px;
    bottom: 12px;
    left: 12px;
    z-index: 10;
    display: block;
  }

  .summary-sticky {
    position: static;
    display: grid;
    max-height: none;
    grid-template-columns: minmax(0, 1fr) minmax(180px, 240px);
    align-items: center;
    gap: 14px;
    padding: 13px 14px;
    overflow: visible;
  }

  .summary-panel .summary-kicker,
  .summary-panel .summary-rows,
  .summary-panel .summary-note,
  .summary-panel .button-secondary {
    display: none;
  }

  .summary-panel h2 {
    margin: 0;
    font-size: 22px;
  }

  .summary-panel .button-primary {
    min-height: 48px;
    margin: 0;
  }

  .mobile-actions {
    display: none;
  }

  .toast {
    bottom: 104px;
  }
}

@media (max-width: 680px) {
  body {
    padding-bottom: 84px;
  }

  .site-header {
    gap: 16px;
    padding-right: 16px;
    padding-left: 16px;
  }

  .header-meta {
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 10px;
  }

  .lang-switch__btn {
    min-width: 2.45rem;
    min-height: 2rem;
    font-size: 0.68rem;
  }

  .autosave-status {
    max-width: 132px;
  }

  .intro {
    min-height: 0;
    padding: 34px 0 30px;
  }

  .intro-copy-wrap {
    padding-right: 28px;
  }

  .intro-mark {
    right: -58px;
    top: 42px;
    width: 140px;
    height: 140px;
    border-width: 22px;
  }

  .intro-mark span {
    font-size: 62px;
  }

  h1 {
    font-size: clamp(36px, 12vw, 48px);
  }

  .intro-copy {
    margin-top: 16px;
    line-height: 1.5;
  }

  .progress-shell {
    margin-bottom: 16px;
  }

  .brief-form {
    gap: 16px;
  }

  .form-step {
    padding: 22px 16px;
  }

  .step-heading {
    grid-template-columns: 32px minmax(0, 1fr);
    gap: 8px;
    margin-bottom: 24px;
  }

  .step-heading p:last-child {
    margin-top: 8px;
    line-height: 1.4;
  }

  .field-grid {
    gap: 16px;
  }

  .field-locked {
    grid-column: auto;
  }

  .textarea-field,
  .upload-field {
    margin-top: 18px;
  }

  .drop-zone {
    min-height: 156px;
    padding: 18px;
  }

  .choice-group {
    gap: 8px;
  }

  .choice-card {
    padding: 14px 12px;
  }

  .choice-compact {
    width: 100%;
  }

  .priority-card {
    grid-template-columns: 34px minmax(0, 1fr);
    min-height: 0;
    align-content: initial;
    align-items: start;
    gap: 12px;
    padding: 16px;
  }

  .priority-icon {
    grid-row: 1 / span 2;
    margin-bottom: 0;
  }

  .priority-card strong,
  .priority-card small {
    grid-column: 2;
  }

  .priority-card small {
    margin-top: 0;
  }

  .service-switch {
    grid-template-columns: 44px minmax(0, 1fr);
    gap: 12px;
    padding: 16px;
  }

  .summary-sticky {
    grid-template-columns: minmax(105px, 1fr) minmax(160px, 190px);
    gap: 10px;
  }

  .summary-panel h2 {
    font-size: 18px;
  }

  .summary-panel .button-primary {
    padding: 0 12px;
    font-size: 13px;
  }

  footer {
    min-height: 0;
    flex-direction: column;
    justify-content: center;
    gap: 12px;
    padding: 24px 20px;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .summary-panel {
    right: 8px;
    bottom: 8px;
    left: 8px;
  }

  .summary-sticky {
    grid-template-columns: 1fr;
    padding: 10px;
  }

  .summary-panel h2 {
    display: none;
  }

  .summary-panel .button-primary {
    min-height: 52px;
  }

  .toast {
    bottom: 84px;
  }
}

@media (min-width: 981px) and (max-height: 760px) {
  .summary-sticky {
    top: 10px;
    max-height: calc(100dvh - 20px);
    padding: 20px;
  }

  .summary-panel h2 {
    margin-bottom: 12px;
    font-size: 24px;
  }

  .summary-rows > div {
    padding: 8px 0;
    font-size: 13px;
  }

  .summary-note {
    margin: 12px 0;
    padding: 10px;
  }

  .summary-sticky .button {
    min-height: 46px;
  }
}

/* Visual language aligned with qtubes-web default variant. */
:root {
  --ink: #0d242d;
  --muted: #64767c;
  --line: #dce6e8;
  --line-strong: #b9cbcf;
  --surface: #f3f7f6;
  --surface-strong: #e8f0ef;
  --accent: #0687c8;
  --accent-dark: #006da6;
  --accent-deep: #006da6;
  --font-sans: "Manrope", "Segoe UI", sans-serif;
  font-family: var(--font-sans);
  font-weight: 400;
}

body {
  background:
    radial-gradient(circle at 88% 0%, rgba(6, 135, 200, 0.08), transparent 24rem),
    #fff;
}

.site-header {
  min-height: 76px;
  padding: 0 max(54px, calc(50% - min(720px, 50%) + clamp(20px, 4vw, 64px)));
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(12px);
}

.brand img {
  width: 150px;
  height: auto;
  filter: none;
}

.header-meta {
  display: flex;
  align-items: center;
  gap: clamp(12px, 2vw, 20px);
  color: var(--ink);
}

.lang-switch {
  display: inline-flex;
  flex-shrink: 0;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  gap: 2px;
}

.lang-switch__btn {
  min-width: 2.65rem;
  min-height: 2.15rem;
  padding: 0 0.55rem;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-family: inherit;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  line-height: 1;
  transition:
    background-color 180ms ease,
    color 180ms ease,
    box-shadow 180ms ease;
}

.lang-switch__btn:hover {
  color: var(--accent);
}

.lang-switch__btn.is-active {
  background: #fff;
  color: var(--accent);
  box-shadow: 0 2px 10px rgb(6 135 200 / 0.16);
}

.lang-switch__btn:focus-visible {
  outline: 3px solid rgb(6 135 200 / 0.32);
  outline-offset: 2px;
}

.header-label {
  color: var(--ink);
  font-weight: 700;
}

.autosave-status {
  color: var(--muted);
}

.autosave-status.is-saving {
  color: var(--accent-dark);
}

.hero-banner {
  position: relative;
  width: calc(min(1440px, 100%) - clamp(40px, 8vw, 128px));
  margin: 0 auto;
  aspect-ratio: 2650 / 672;
  overflow: hidden;
  background: #202020;
}

.hero-banner-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.hero-banner-copy {
  --hero-copy-shift: clamp(3px, 0.45vw, 7px);
  position: absolute;
  top: 50%;
  left: 54px;
  display: flex;
  width: 17%;
  flex-direction: column;
  align-items: flex-start;
  gap: clamp(4px, 0.5vw, 8px);
  transform: translateY(-50%);
}

.hero-banner-slogan {
  display: block;
  width: 100%;
  height: auto;
  filter: drop-shadow(0 3px 18px rgba(0, 0, 0, 0.22));
  transform: translateY(calc(0px - var(--hero-copy-shift)));
}

.hero-banner-kicker {
  margin: 0;
  color: #fff;
  font-size: clamp(12px, 1.45vw, 22px);
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1;
  white-space: nowrap;
  transform: translateY(var(--hero-copy-shift));
}

main {
  width: min(1440px, 100%);
  padding: clamp(6px, 0.8vw, 12px) clamp(20px, 4vw, 64px) 80px;
}

.intro {
  grid-template-columns: minmax(0, 1.5fr) minmax(260px, 0.7fr);
  min-height: 0;
  align-items: end;
  padding: clamp(28px, 3vw, 48px) 0 42px;
}

.intro-copy-wrap {
  max-width: none;
}

.intro-mark {
  display: none;
}

.eyebrow,
.step-kicker,
.summary-kicker {
  color: var(--accent);
  font-weight: 700;
  letter-spacing: 0.12em;
}

h1 {
  max-width: 820px;
  font-size: clamp(42px, 5.4vw, 76px);
  font-weight: 800;
  letter-spacing: -0.045em;
  line-height: 0.98;
}

.intro-copy {
  max-width: 720px;
  margin-top: 20px;
  font-size: 16px;
  line-height: 1.65;
}

.progress-shell {
  margin-bottom: 20px;
  padding: 16px 20px;
  border: 1px solid #eceeea;
  border-radius: 14px;
  background: #fbfbfa;
}

.progress-track {
  border-radius: 999px;
  background: var(--surface-strong);
}

.progress-track span {
  border-radius: inherit;
  background: var(--accent);
}

.form-layout {
  grid-template-columns: minmax(480px, 2fr) minmax(260px, 1fr);
  gap: clamp(16px, 2vw, 28px);
  padding-bottom: 0;
}

.brief-form {
  gap: 12px;
}

.form-step {
  padding: 28px 20px 30px;
  border-color: #eceeea;
  border-radius: 16px;
  background: #fbfbfa;
  box-shadow: none;
}

.step-heading {
  grid-template-columns: 40px minmax(0, 1fr);
  gap: 10px;
  margin-bottom: 26px;
}

.step-number {
  padding-top: 5px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.step-heading h2,
.summary-panel h2,
.dialog-header h2 {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.step-heading p:last-child {
  font-size: 15px;
  font-weight: 400;
  line-height: 1.55;
}

.field > span,
.field-label,
.choice-card strong,
.priority-card strong,
.service-switch strong {
  font-weight: 700;
}

.field input,
.field textarea,
.choice-card,
.priority-card,
.service-switch,
.file-list li {
  border-radius: 9px;
}

.field input,
.field textarea {
  border-color: var(--line);
}

.field input:focus,
.field textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(6, 135, 200, 0.32);
}

.field input[readonly] {
  border-color: #cbdce6;
  background: #f3f9fc;
}

.drop-zone {
  border-color: #b9bcb7;
  border-radius: 12px;
  background: #fff;
}

.drop-zone:hover,
.drop-zone.is-dragging {
  border-color: var(--accent);
  background: #f3f9fc;
}

.upload-icon,
.summary-note > span {
  background: var(--accent);
}

.choice-card:hover,
.priority-card:hover {
  border-color: #b9bcb7;
  background: #fff;
}

.choice-card:has(input:checked),
.priority-card:has(input:checked),
.service-switch:has(input:checked) {
  border-color: var(--accent);
  background: #f3f9fc;
  box-shadow: inset 0 0 0 1px var(--accent);
}

.choice-card:has(input:checked) {
  box-shadow: inset 3px 0 0 var(--accent);
}

.choice-card input:checked + .choice-control {
  border-color: var(--accent);
}

.checkbox-group input:checked + .choice-control,
.service-switch input:checked + .switch-control {
  background: var(--accent);
}

.priority-icon {
  color: var(--accent-dark);
  background: #e9f5fb;
}

.summary-sticky {
  top: 16px;
  padding: 28px;
  border: 1px solid #eceeea;
  border-radius: 16px;
  background: #fbfbfa;
  box-shadow: none;
}

.summary-note {
  border-radius: 10px;
}

.button {
  border-radius: 999px;
  font-weight: 600;
}

.button-primary {
  background: var(--accent);
  box-shadow: 0 8px 24px rgb(6 135 200 / 0.22);
}

.button-primary:hover {
  background: var(--accent-dark);
}

.button-secondary {
  background: transparent;
  border-color: var(--line-strong);
}

.button-secondary:hover {
  border-color: var(--accent);
  color: var(--accent);
}

footer {
  min-height: 100px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  background: #fff;
}

footer img {
  filter: none;
}

.summary-dialog {
  border-radius: 18px;
}

.dialog-header {
  background: var(--ink);
}

.dialog-actions {
  background: #fbfbfa;
}

@media (max-width: 980px) {
  .form-layout {
    grid-template-columns: 1fr;
  }

  .summary-sticky {
    border-radius: 14px;
    box-shadow: 0 12px 34px rgba(23, 24, 23, 0.14);
  }
}

@media (max-width: 680px) {
  .site-header {
    padding-right: 20px;
    padding-left: 64px;
  }

  .brand img {
    width: 118px;
  }

  .hero-banner {
    width: calc(100% - 24px);
    min-height: 188px;
    aspect-ratio: 16 / 7;
  }

  .hero-banner-image {
    object-position: 58% center;
  }

  .hero-banner-copy {
    left: 24px;
    width: 24%;
  }

  .hero-banner-kicker {
    font-size: clamp(9px, 2.7vw, 13px);
  }

  main {
    width: 100%;
    padding-right: 12px;
    padding-left: 12px;
  }

  .intro {
    display: block;
    padding: 30px 0 28px;
  }

  .intro-copy-wrap {
    padding-right: 0;
  }

  h1 {
    font-size: clamp(36px, 12vw, 48px);
  }

  .form-step {
    padding: 22px 16px;
  }
}

@media (max-width: 480px) {
  .site-header {
    padding-left: 20px;
  }

  .autosave-status {
    font-size: 12px;
  }

  .hero-banner-copy {
    left: 18px;
    width: 28%;
  }
}

/* Keep operational and explanatory copy comfortably readable. */
:root {
  font-size: 17px;
}

.header-label,
.autosave-status,
.eyebrow,
.step-kicker,
.summary-kicker,
.progress-copy {
  font-size: 15px;
}

.intro-copy {
  font-size: 18px;
}

.step-number {
  font-size: 15px;
}

.step-heading p:last-child,
.link-context {
  font-size: 16px;
}

.field > span,
.field-label {
  font-size: 16px;
}

.field input,
.field textarea {
  font-size: 17px;
}

.field small,
.upload-field small,
.choice-card small,
.priority-card small,
.service-switch small {
  font-size: 15px;
  font-weight: 400;
  line-height: 1.5;
}

.upload-title,
.choice-card strong,
.priority-card strong,
.service-switch strong {
  font-size: 17px;
}

.file-type,
.group-error,
.priority-icon {
  font-size: 14px;
}

.file-meta strong,
.summary-rows > div,
.summary-note p,
.dialog-section dl,
.toast,
footer {
  font-size: 15px;
}

.summary-note p,
.summary-rows > div {
  line-height: 1.45;
}

.button {
  min-height: 3.25rem;
  font-size: 0.9375rem;
}

.dialog-section h3 {
  font-size: 15px;
}

@media (max-width: 680px) {
  .header-label,
  .autosave-status,
  .eyebrow,
  .step-kicker,
  .summary-kicker,
  .progress-copy {
    font-size: 14px;
  }

  .intro-copy,
  .step-heading p:last-child,
  .link-context,
  .field > span,
  .field-label,
  .button {
    font-size: 16px;
  }

  .field small,
  .upload-field small,
  .choice-card small,
  .priority-card small,
  .service-switch small,
  .summary-note p,
  .summary-rows > div {
    font-size: 15px;
  }
}
