/* =========================================================
   NEURORDER FINANCIAL STORY
   Responsive layout for desktop, tablet and mobile
   ========================================================= */


/* =========================================================
   GLOBAL PAGE STRUCTURE
   ========================================================= */

.financial-story-intro,
.founder-message-section,
.service-notice,
.consent-section,
.financial-profile-section,
.financial-activity-section {
  position: relative;
  width: 100%;
  box-sizing: border-box;
}

.financial-story-intro .journey-copy,
.consent-section .journey-copy,
.financial-profile-section .journey-copy,
.financial-activity-section .journey-copy {
  width: min(100%, 880px);
  margin: 0 auto;
  text-align: center;
}

.financial-story-intro .section-title,
.consent-section .section-title,
.financial-profile-section .section-title,
.financial-activity-section .section-title {
  max-width: 820px;
  margin-left: auto;
  margin-right: auto;
}

.financial-story-intro .section-text,
.consent-section .section-text,
.financial-profile-section .section-text,
.financial-activity-section .section-text {
  max-width: 760px;
  margin-left: auto;
  margin-right: auto;
}


/* =========================================================
   HERO IMPROVEMENTS
   ========================================================= */

.credit-hero {
  width: min(100% - 40px, 1240px);
  margin: 0 auto;
  padding-top: 140px;
  padding-bottom: 90px;

  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(340px, 0.92fr);
  align-items: center;
  gap: clamp(40px, 7vw, 100px);
}

.credit-hero-copy {
  min-width: 0;
}

.credit-hero-copy h1 {
  max-width: 780px;
  font-size: clamp(2.4rem, 5vw, 5.2rem);
  line-height: 1.02;
  letter-spacing: -0.045em;
  margin: 18px 0 24px;
}

.credit-hero-copy > p:not(.eyebrow) {
  max-width: 690px;
  font-size: clamp(1rem, 1.4vw, 1.15rem);
  line-height: 1.8;
  opacity: 0.78;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 34px;
}

.hero-actions .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding: 0 24px;
  text-align: center;
}

.hero-score-card {
  width: 100%;
  max-width: 500px;
  justify-self: end;
  overflow: hidden;
}

.hero-score-card img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
}


/* =========================================================
   HOW IT WORKS
   ========================================================= */

.financial-story-steps {
  width: min(100%, 1180px);
  margin: 48px auto 0;

  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
}

.story-step {
  min-width: 0;
  min-height: 245px;
  padding: 30px 26px;

  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.story-step > span {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  width: 44px;
  height: 44px;
  flex: 0 0 44px;

  margin-bottom: 28px;

  border: 1px solid rgba(89, 153, 255, 0.48);
  border-radius: 50%;

  color: #8dbbff;
  font-size: 0.82rem;
  letter-spacing: 0.08em;
}

.story-step h3 {
  margin: 0 0 14px;
  font-size: 1.08rem;
  line-height: 1.35;
}

.story-step p {
  margin: 0;
  line-height: 1.72;
  opacity: 0.76;
}


/* =========================================================
   FOUNDER MESSAGE
   ========================================================= */

.founder-note {
  width: min(100%, 920px);
  margin: 0 auto;
  padding: clamp(28px, 5vw, 54px);
  box-sizing: border-box;
}

.founder-note h2 {
  max-width: 700px;
  margin: 14px 0 26px;
  font-size: clamp(1.8rem, 3vw, 3rem);
  line-height: 1.16;
}

.founder-note blockquote {
  margin: 0 0 34px;
  padding: 0;
  border: 0;

  font-size: clamp(1rem, 1.55vw, 1.23rem);
  line-height: 1.85;
  opacity: 0.88;
}

.founder-signature {
  margin: 0;
  font-weight: 700;
  line-height: 1.65;
}

.founder-signature span {
  font-weight: 400;
  opacity: 0.66;
}


/* =========================================================
   SERVICE NOTICE
   ========================================================= */

.service-notice-card {
  width: min(100%, 920px);
  margin: 0 auto;
  padding: clamp(28px, 5vw, 48px);
  box-sizing: border-box;

  border: 1px solid rgba(89, 153, 255, 0.22);
}

.service-notice-card h2 {
  margin: 14px 0 22px;
  font-size: clamp(1.7rem, 3vw, 2.7rem);
  line-height: 1.2;
}

.service-notice-card p {
  max-width: 790px;
  margin: 0 0 15px;
  line-height: 1.75;
  opacity: 0.78;
}

.service-notice-card p:last-child {
  margin-bottom: 0;
}


/* =========================================================
   CONSENT CARD
   Every permission appears on its own line.
   Checkbox remains next to its sentence.
   ========================================================= */

.consent-card {
  width: min(100%, 920px);
  margin: 38px auto 0;
  padding: clamp(24px, 4vw, 40px);
  box-sizing: border-box;

  display: flex;
  flex-direction: column;
  align-items: stretch;
}

.consent-row {
  width: 100%;
  box-sizing: border-box;

  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  align-items: start;
  column-gap: 15px;

  padding: 20px 0;
  margin: 0;

  border-bottom: 1px solid rgba(255, 255, 255, 0.08);

  cursor: pointer;
  text-align: left;
}

.consent-row:first-of-type {
  padding-top: 4px;
}

.consent-row:last-of-type {
  border-bottom: 0;
  padding-bottom: 4px;
}

.consent-row input[type="checkbox"] {
  appearance: auto;
  -webkit-appearance: checkbox;

  width: 19px;
  height: 19px;
  min-width: 19px;

  margin: 3px 0 0;
  padding: 0;

  cursor: pointer;
}

.consent-row span {
  display: block;
  min-width: 0;

  font-size: 0.98rem;
  line-height: 1.65;
  overflow-wrap: anywhere;
}

.consent-row em {
  display: inline;
  margin-left: 5px;
  font-style: normal;
  opacity: 0.6;
}

.consent-note {
  width: 100%;
  margin: 26px 0 0;
  padding-top: 22px;

  border-top: 1px solid rgba(255, 255, 255, 0.08);

  font-size: 0.9rem;
  line-height: 1.7;
  opacity: 0.66;
  text-align: left;
}


/* =========================================================
   AUTHENTICATION STATUS
   ========================================================= */

.auth-status {
  width: min(100%, 920px);
  margin: 34px auto 0;
  padding: 18px 24px;
  box-sizing: border-box;

  text-align: center;
  line-height: 1.6;
}

.auth-status a {
  color: #91bdff;
  text-decoration: none;
}

.auth-status a:hover {
  text-decoration: underline;
}

.auth-required {
  border-color: rgba(255, 180, 90, 0.4);
}

.auth-success {
  border-color: rgba(91, 210, 151, 0.38);
}


/* =========================================================
   PROFILE AND ACTIVITY FORMS
   ========================================================= */

.financial-form {
  width: min(100%, 920px);
  margin: 24px auto 0;
  padding: clamp(26px, 4vw, 42px);
  box-sizing: border-box;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

.form-grid label {
  min-width: 0;

  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 10px;

  font-size: 0.94rem;
  line-height: 1.4;
}

.form-grid .full-width {
  grid-column: 1 / -1;
}

.optional-label {
  display: inline-block;
  width: fit-content;

  font-size: 0.78rem;
  font-weight: 400;
  opacity: 0.55;
}

.financial-form input,
.financial-form select,
.financial-form textarea {
  display: block;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;

  padding: 14px 15px;

  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;

  background: rgba(255, 255, 255, 0.035);
  color: inherit;

  font: inherit;
  line-height: 1.4;

  outline: none;
}

.financial-form input,
.financial-form select {
  min-height: 50px;
}

.financial-form textarea {
  min-height: 130px;
  resize: vertical;
}

.financial-form input:focus,
.financial-form select:focus,
.financial-form textarea:focus {
  border-color: rgba(89, 153, 255, 0.7);
  box-shadow: 0 0 0 3px rgba(89, 153, 255, 0.1);
}

.financial-form select option {
  background: #070b12;
  color: #ffffff;
}

.financial-form .journey-btn {
  width: 100%;
  max-width: 320px;
  min-height: 52px;

  margin: 30px auto 0;
  padding: 14px 22px;

  display: flex;
  align-items: center;
  justify-content: center;
}

.financial-form .journey-btn:disabled {
  cursor: wait;
  opacity: 0.62;
}


/* =========================================================
   STATUS MESSAGES
   ========================================================= */

.form-message {
  min-height: 1.7em;
  margin: 18px 0 0;

  text-align: center;
  line-height: 1.6;
}

.form-message.success {
  color: #74d9a4;
}

.form-message.error {
  color: #ff9f9f;
}

.form-message.info {
  opacity: 0.72;
}


/* =========================================================
   HIDDEN ELEMENTS
   ========================================================= */

[hidden] {
  display: none !important;
}


/* =========================================================
   TABLET
   ========================================================= */

@media (max-width: 1050px) {

  .credit-hero {
    grid-template-columns: 1fr 0.8fr;
    gap: 48px;
  }

  .credit-hero-copy h1 {
    font-size: clamp(2.25rem, 5vw, 4.1rem);
  }

  .financial-story-steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .story-step {
    min-height: 220px;
  }

}


/* =========================================================
   SMALL TABLET
   ========================================================= */

@media (max-width: 820px) {

  .credit-hero {
    width: min(100% - 32px, 720px);
    grid-template-columns: 1fr;
    padding-top: 120px;
    padding-bottom: 65px;
  }

  .credit-hero-copy {
    text-align: center;
  }

  .credit-hero-copy > p:not(.eyebrow) {
    margin-left: auto;
    margin-right: auto;
  }

  .hero-actions {
    justify-content: center;
  }

  .hero-score-card {
    justify-self: center;
    max-width: 520px;
  }

  .financial-story-intro .journey-copy,
  .consent-section .journey-copy,
  .financial-profile-section .journey-copy,
  .financial-activity-section .journey-copy {
    width: min(100%, 680px);
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .form-grid .full-width {
    grid-column: auto;
  }

}


/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 640px) {

  .credit-hero {
    width: calc(100% - 28px);
    padding-top: 105px;
    padding-bottom: 52px;
    gap: 34px;
  }

  .credit-hero-copy h1 {
    margin-top: 14px;
    margin-bottom: 20px;

    font-size: clamp(2rem, 10.5vw, 3.15rem);
    line-height: 1.05;
    letter-spacing: -0.04em;
  }

  .credit-hero-copy > p:not(.eyebrow) {
    font-size: 0.96rem;
    line-height: 1.7;
  }

  .hero-actions {
    width: 100%;
    flex-direction: column;
  }

  .hero-actions .btn {
    width: 100%;
    box-sizing: border-box;
  }

  .hero-score-card {
    max-width: 100%;
  }

  .financial-story-steps {
    width: 100%;
    grid-template-columns: 1fr;
    gap: 15px;
    margin-top: 32px;
  }

  .story-step {
    min-height: auto;
    padding: 25px 21px;
  }

  .story-step > span {
    margin-bottom: 20px;
  }

  .founder-note,
  .service-notice-card,
  .consent-card,
  .financial-form {
    width: 100%;
    padding: 24px 19px;
    border-radius: 16px;
  }

  .founder-note blockquote {
    font-size: 0.97rem;
    line-height: 1.78;
  }

  .consent-card {
    margin-top: 28px;
  }

  .consent-row {
    grid-template-columns: 20px minmax(0, 1fr);
    column-gap: 12px;
    padding: 18px 0;
  }

  .consent-row input[type="checkbox"] {
    width: 18px;
    height: 18px;
    min-width: 18px;
  }

  .consent-row span {
    font-size: 0.93rem;
    line-height: 1.58;
  }

  .consent-row em {
    display: block;
    margin: 4px 0 0;
  }

  .auth-status {
    width: 100%;
    padding: 16px 17px;
    font-size: 0.92rem;
  }

  .form-grid {
    gap: 19px;
  }

  .financial-form input,
  .financial-form select,
  .financial-form textarea {
    font-size: 16px;
  }

  .financial-form .journey-btn {
    max-width: 100%;
  }

}


/* =========================================================
   VERY SMALL MOBILE
   ========================================================= */

@media (max-width: 390px) {

  .credit-hero {
    width: calc(100% - 22px);
  }

  .credit-hero-copy h1 {
    font-size: 2rem;
  }

  .story-step,
  .founder-note,
  .service-notice-card,
  .consent-card,
  .financial-form {
    padding-left: 16px;
    padding-right: 16px;
  }

  .consent-row {
    column-gap: 10px;
  }

  .consent-row span {
    font-size: 0.9rem;
  }

}