:root {
  --iv-gradient-orange1: linear-gradient(to bottom right, #f08357, #dd541d);
  --iv-gradient-orange2: linear-gradient(to bottom right, #dd541d, #f08357);
  --iv-white: #ffffff;
  --iv-orange: #dd541d;
}

body, input, button, a, select {
  font-family: 'Montserrat', sans-serif;
  font-weight: 400;
}

h1, h2, h3, h4, h5, h6 {
  text-align: center;
  margin-bottom: 3rem;
  font-weight: 600;
  font-family: 'Montserrat', sans-serif;
}

ul {
  text-align: left;
}

li {
  margin-bottom: 0.8rem;
}

#website-brief-module {
  max-width: 800px;
  margin: 0 auto;
  padding: 2rem 1rem;
  text-align: center;
}

#logo-wrap {
  text-align: center;
  margin-bottom: 2rem;
}

#hero-logo {
  max-width: 200px;
  width: 100%;
  height: auto;
  display: inline-block;
}

.contact-copy {
  max-width: 960px;
  text-align: center;
  margin: auto;
  padding-top: 20px;
}

/* Form grid & rows */
/* Consistent vertical spacing between rows */
.form-grid {
  display: flex;
  flex-direction: column;
  gap: 20px;                 /* increase spacing between input rows */
}

/* Maintain label + input alignment */
.form-row {
  display: flex;
  align-items: center;
  gap: 14px;                 /* spacing between label and input */
}

.form-row label {
  flex: 0 0 180px;           /* slightly larger label width for long text */
  font-size: 14px;
  color: #333;
  text-align: right;
}

.form-row input,
.form-row select {
  flex: 1;
  max-width: 100%;
  padding: 10px 12px;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 14px;
  height: 40px;
  line-height: 20px;
  box-sizing: border-box;
}

/* Short select for Yes/No */
.short-select {
  flex: 0 0 140px;
  max-width: 140px;
}
.form-row select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23666' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  padding-right: 36px;
}

/* Remove global margin-top that caused double spacing */
.form-row + .form-row {
  margin-top: 0;
}

/* Keep normal gap across all form sections */
.form-grid {
  gap: 20px;
}

/* Extra space below checkbox groups before navigation buttons */
#why_change_group,
#key_goals_group,
#dislikes_group,
#likes_group {
  margin-bottom: 50px;   /* adds space above the buttons */
}

/* Narrow budget select */
#budget {
  width: 33%;           /* one-third width */
  min-width: 160px;     /* sensible minimum so text isn’t cramped */
}

/* Taller freeform text box for additional info */
#additional_info {
  height: 120px;        /* roughly 3× a normal input height */
  resize: vertical;     /* allow user to resize if they want */
  padding-top: 10px;
  padding-bottom: 10px;
  line-height: 1.4;
}

/* Proper styling for multiline textarea */
#additional_info {
  width: 100%;
  min-height: 120px;       /* about 3× normal input height */
  padding: 10px 12px;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 14px;
  line-height: 1.5;
  resize: vertical;        /* allow user to resize */
  box-sizing: border-box;
  text-align: left;        /* ensure text starts on left */
  vertical-align: top;     /* start at top */
  white-space: pre-wrap;   /* wrap text and honour new lines */
}

/* Disabled button look during submission */
button:disabled,
button.submitting {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Alternate contact block must be flex for gap to work */
#alt-contact {
  display: flex;              /* <-- must be flex, not block */
  flex-direction: column;
  gap: 20px;                  /* spacing between its rows */
  margin-top: 20px;           /* space above the group */
}

/* Checkbox lists */
.checkbox-list {
  max-width: 680px;
  margin: 0.5rem auto 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  text-align: left;
}
.checkbox-list label {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-size: 14px;
}
.checkbox-list input[type="checkbox"] {
  transform: translateY(1px);
}

/* Card */
.step.card {
  display: block;
  max-width: 740px;
  margin: 2rem auto;
  padding: 1.5rem 2rem 2rem;
  border-radius: 6px;
  background: #f9f9f9;
  border: 1px solid #ccc;
}

/* Buttons */
/* Buttons: span the full card width, aligned to card edges */
.step.card .step-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 20px;
}

/* Button look */
.step-actions .back-btn {
  padding: 0.55rem 1rem;
  border-radius: 9999px;
  border: 1px solid #ccc;
  background: #fff;
  cursor: pointer;
  font-weight: 600;
  min-width: 90px;
  text-align: center;
}

.step-actions .next-btn,
.step-actions #submit-all {
  background-image: var(--iv-gradient-orange1);
  color: var(--iv-white);
  padding: 0.65rem 1.25rem;
  border: none;
  border-radius: 9999px;
  font-weight: 700;
  cursor: pointer;
  min-width: 90px;
  text-align: center;
  box-shadow: 0 2px 4px rgba(0,0,0,.1);
  transition: background-image .3s ease, box-shadow .3s ease;
}

.step-actions .next-btn:hover,
.step-actions #submit-all:hover {
  background-image: var(--iv-gradient-orange2);
  box-shadow: 0 4px 8px rgba(0,0,0,.15);
}

/* Spinner ring */
/* Wrap for the ring – rotates so 0 starts at 12 o'clock (top) */
#ring-wrap svg {
  transform: rotate(-90deg);   /* top start instead of right */
}

/* Make the ring start at the top (12 o'clock) */
.ring {
  transform: rotate(-90deg);        /* 3 o'clock → 12 o'clock */
  transform-origin: 50% 50%;
  transform-box: fill-box;          /* ensure origin is the SVG's box */
}

.ring-track {
  fill: none;
  stroke: rgba(0,0,0,0.12);
  stroke-width: 8;
}

.ring-fill {
  fill: none;
  stroke: var(--iv-orange);
  stroke-width: 8;
  stroke-linecap: round;
  stroke-dasharray: 106.814; /* updated in JS anyway */
  stroke-dashoffset: 106.814;
}

#ring-wrap {
  display: inline-flex;
  opacity: 1;
  transition: opacity 0.6s ease;
  will-change: opacity;
}

/* Fade-out class for the ring */
.ring.fade-out {
  opacity: 0;
  transition: opacity 0.6s ease;
  pointer-events: none;
}

#wizard-status {
  max-width: 680px;
  margin: 0.75rem auto 1.5rem auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

/* Mobile: stack labels */
@media (max-width: 520px) {
  .form-row {
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
  }
  .form-row label {
    text-align: left;
    flex: none;
    width: 100%;
  }
  .short-select {
    max-width: 100%;
    flex: 1;
  }
}

/* ===== HERO URL FORM (top screen) ===== */
#input-section { margin-top: 1rem; }

#url-form {
  max-width: 600px;
  margin: 1rem auto 0;
  display: flex;
  flex-direction: column;           /* stack input then button */
  align-items: stretch;
  gap: 12px;                        /* space between input and button */
}

/* Make the URL input match other fields */
/* Shorter, centred hero URL input */
#url-input {
  width: 80%;                 /* narrower so it doesn’t span full card */
  max-width: 400px;           /* absolute cap */
  margin: 0 auto;             /* centre the field itself */
  padding: 10px 12px;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 14px;
  height: 40px;
  line-height: 20px;
  box-sizing: border-box;
  text-align: center;         /* centre entered text */
}

/* Centre placeholder text consistently across browsers */
#url-input::placeholder {
  text-align: center;
  color: #999;
}

/* Bring back the orange rounded CTA and put it on its own line */
#analyse-btn {
  background-image: var(--iv-gradient-orange1);
  color: var(--iv-white);
  padding: 0.65rem 1.25rem;
  border: none;
  border-radius: 9999px;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  box-shadow: 0 2px 4px rgba(0,0,0,.1);
  transition: background-image .3s ease, box-shadow .3s ease;
  display: block;                   /* ensure it’s on its own line */
  width: fit-content;               /* don’t stretch full width */
  margin: 4px auto 0;               /* center under input */
}

#analyse-btn:hover {
  background-image: var(--iv-gradient-orange2);
  box-shadow: 0 4px 8px rgba(0,0,0,.15);
}

#final {
  margin: auto;
  text-align: center;
  max-width: 800px;
}

/* Indented, tidy reveal under "Other" */
.other-input {
  margin-left: 26px;   /* lines up under the checkbox text */
  margin-top: 6px;
  width: 100%;
}

.other-input input[type="text"] {
  width: 100%;
  max-width: 520px;
  padding: 10px 12px;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 14px;
  box-sizing: border-box;
}

/* Utility class for uppercase headings */
.uppercase {
  text-transform: uppercase;
  letter-spacing: 0.5px; /* a bit of spacing for readability */
}

/* Help/context blocks shown under each step card */
#step-helps {
  max-width: 800px;
  margin: 0 auto;
}

.step-help {
  max-width: 740px;                 /* align with your widened cards */
  margin: 1rem auto 2.25rem auto;   /* space below the grey card */
  text-align: left;
}

.step-help h2 {
  font-size: 20px;
  margin: 0.25rem 0 1rem 0;
}

.step-help p {
  font-size: 15px;
  line-height: 1.6;
  color: #333;
  margin: 0;
}

/* Optional: on very narrow screens, make button full width for comfort */
@media (max-width: 520px) {
  #analyse-btn {
    width: 100%;
    text-align: center;
  }
}
