@import url("./typography.css");

:root {
  --account-burgundy: #3d0b0e;
  --account-orange: #ec4d1d;
  --account-aqua: #004650;
  --account-white: #ffffff;
  --account-cream: #fff5ea;
  --account-ink-muted: rgba(61, 11, 14, 0.72);
  --account-site-margin: clamp(16px, 5.555vw, 80px);
  --account-grid-gap: 16px;
}

html {
  background: var(--account-burgundy);
  color: var(--account-orange);
  font-family: var(--font-body);
  scroll-behavior: smooth;
}

body.account-page {
  margin: 0;
  min-width: 320px;
  background: var(--account-burgundy);
}

.account-page a {
  color: inherit;
  text-decoration: none;
}

.account-header {
  position: fixed;
  z-index: 30;
  top: 0;
  left: 0;
  width: 100%;
  height: 80px;
  color: var(--account-white);
}

.account-header::before {
  position: absolute;
  z-index: -1;
  inset: -6px 0 0;
  content: "";
  background: var(--account-burgundy);
}

.account-header__inner {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: var(--account-grid-gap);
  align-items: center;
  width: min(100% - (var(--account-site-margin) * 2), 1280px);
  height: 100%;
  margin: 0 auto;
}

.account-header__logo {
  display: block;
  grid-column: span 2;
  width: 160px;
}

.account-header__logo img {
  display: block;
  width: 100%;
  height: auto;
}

.account-header__nav {
  display: flex;
  grid-column: 4 / -1;
  gap: 24px;
  align-items: center;
  justify-content: flex-end;
  font-family: var(--font-heading);
  font-size: 16px;
  font-weight: 900;
  white-space: nowrap;
}

.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  height: 32px;
  padding: 8px 32px;
  border: 2px solid transparent;
  border-radius: 1000px;
  font-family: var(--font-heading);
  font-size: 15px;
  font-weight: 900;
  line-height: 1;
  white-space: nowrap;
}

.account-page .pill--account {
  background: var(--account-orange);
  color: var(--account-white);
}

.account-hero {
  position: relative;
  display: grid;
  min-height: 620px;
  overflow: hidden;
  align-items: end;
  padding: 144px var(--account-site-margin) 72px;
  background: var(--account-burgundy);
}

.account-hero__media {
  position: absolute;
  inset: 80px var(--account-site-margin) 0;
  overflow: hidden;
}

.account-hero__media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.account-hero__media::after {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(180deg, rgba(61, 11, 14, 0.18), rgba(61, 11, 14, 0.74));
}

.account-hero__content {
  position: relative;
  z-index: 1;
  display: grid;
  width: min(100%, 1280px);
  margin: 0 auto;
  color: var(--account-white);
}

.account-hero__eyebrow {
  margin: 0 0 14px;
  color: var(--account-orange);
  font-family: var(--font-heading);
  font-size: 20px;
  line-height: 1;
}

.account-hero__title {
  max-width: 940px;
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(62px, 8.9vw, 128px);
  font-weight: 400;
  letter-spacing: 0;
  line-height: 0.88;
  text-transform: uppercase;
}

.account-hero__copy {
  max-width: 580px;
  margin: 20px 0 0;
  color: var(--account-orange);
  font-family: var(--font-heading);
  font-size: clamp(24px, 2.5vw, 36px);
  line-height: 1.05;
}

.account-shell {
  padding: 72px var(--account-site-margin) 104px;
  background: var(--account-orange);
  color: var(--account-burgundy);
}

.account-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 352px);
  gap: 24px;
  width: min(100%, 1280px);
  margin: 0 auto;
  align-items: start;
}

.account-auth {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 536px);
  gap: 24px;
  width: min(100%, 1280px);
  margin: 0 auto;
  align-items: start;
  padding: clamp(20px, 3vw, 32px);
  border-radius: 32px;
  background: var(--account-white);
  box-shadow: var(--form-shadow);
}

.account-auth[hidden],
.account-unsubscribe[hidden],
.account-form[hidden] {
  display: none;
}

.account-auth__intro {
  display: grid;
  gap: 12px;
}

.account-auth__intro h2 {
  margin: 0;
  color: var(--account-burgundy);
  font-family: var(--font-heading);
  font-size: clamp(32px, 5vw, 64px);
  line-height: 0.95;
}

.account-auth__intro p:not(.account-panel__kicker) {
  max-width: 560px;
  margin: 0;
  color: var(--account-ink-muted);
  font-family: var(--font-heading);
  font-size: clamp(20px, 2.5vw, 28px);
  line-height: 1.04;
}

.account-auth__form {
  display: grid;
  gap: 16px;
}

.account-auth__form .tb-form-field {
  width: 100%;
}

.account-auth__form .tb-form-message {
  display: block;
  min-height: 18px;
}

.account-auth__form .tb-form-message:not(.is-visible) {
  visibility: hidden;
}

.account-auth__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: flex-end;
}

.account-auth__actions .tb-button {
  min-height: 44px;
  border: 0;
  cursor: pointer;
}

.account-unsubscribe__back {
  border-color: var(--account-orange);
}

.account-form__main {
  display: grid;
  gap: 24px;
}

.account-panel,
.account-summary__inner {
  display: grid;
  gap: 24px;
  border-radius: 32px;
  background: var(--account-white);
  box-shadow: var(--form-shadow);
}

.account-panel {
  padding: clamp(20px, 3vw, 32px);
}

.account-panel__heading {
  display: grid;
  gap: 8px;
}

.account-panel__kicker,
.account-summary__label {
  margin: 0;
  color: var(--form-accessible-orange);
  font-family: var(--font-body);
  font-size: 12px;
  letter-spacing: 1px;
  line-height: 1.16;
  text-transform: uppercase;
}

.account-panel h2,
.account-summary__inner h2 {
  margin: 0;
  color: var(--account-burgundy);
  font-family: var(--font-heading);
  font-size: clamp(24px, 3vw, 40px);
  line-height: 1;
}

.account-panel--profile {
  gap: 28px;
}

.account-photo-field {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 16px;
  align-items: end;
}

.account-photo-field__preview {
  display: grid;
  width: 112px;
  aspect-ratio: 1;
  overflow: hidden;
  place-items: center;
  border: 1px solid var(--form-grey-999);
  border-radius: 50%;
  background: var(--form-blue-tint-soft);
  color: var(--account-burgundy);
}

.account-photo-field__preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.account-photo-field__preview .material-symbols-outlined {
  font-size: 36px;
}

.account-photo-field__control {
  display: grid;
  gap: 8px;
  width: min(100%, var(--form-field-width));
}

.account-photo-field__control input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.account-file-control {
  display: flex;
  min-height: 56px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 16px;
  border: 1px solid var(--form-grey-999);
  border-radius: var(--form-radius-control);
  background: var(--account-white);
  color: var(--form-grey-666);
  font-family: var(--font-heading);
  font-size: 13px;
  line-height: 1;
  cursor: pointer;
}

.account-file-control span:first-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

.account-form .tb-form-field {
  width: 100%;
}

.account-form .tb-form-control {
  min-height: 56px;
  padding: 0 16px;
}

.account-chip-group {
  display: grid;
  gap: 12px;
}

.account-chip-group__title {
  margin: 0;
  color: var(--account-burgundy);
  font-family: var(--font-heading);
  font-size: 15px;
  line-height: 1;
}

.account-segmented {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
  padding: 0;
  border: 0;
}

.account-segmented legend {
  grid-column: 1 / -1;
  margin-bottom: 8px;
}

.account-segmented label {
  position: relative;
  display: grid;
  min-height: 44px;
  place-items: center;
  border: 1px solid var(--form-grey-999);
  border-radius: var(--form-radius-control);
  background: var(--form-blue-tint-soft);
  color: var(--form-grey-333);
  font-family: var(--font-heading);
  font-size: 13px;
  line-height: 1;
  cursor: pointer;
}

.account-segmented input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.account-segmented label:has(input:checked) {
  border-color: var(--form-blue-focus);
  background: var(--form-blue-tint);
}

.account-toggle {
  width: fit-content;
}

.tb-form-control--textarea {
  min-height: 112px;
  align-items: flex-start;
  padding-top: 14px;
  padding-bottom: 14px;
}

.tb-form-control--textarea textarea {
  width: 100%;
  min-width: 0;
  resize: vertical;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--form-grey-333);
  font: inherit;
  line-height: 1.25;
}

.tb-form-control--textarea textarea::placeholder {
  color: var(--form-grey-666);
}

.account-opt-out {
  display: flex;
  gap: 24px;
  align-items: center;
  justify-content: space-between;
  padding-top: 8px;
  border-top: 1px solid rgba(153, 153, 153, 0.45);
}

.account-opt-out p {
  max-width: 520px;
  margin: 8px 0 0;
  color: var(--account-ink-muted);
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.25;
}

.tb-button--danger {
  background: var(--account-burgundy);
  color: var(--account-white);
}

.account-summary {
  position: sticky;
  top: 104px;
}

.account-summary__inner {
  padding: 24px;
}

.account-summary__copy {
  margin: 0;
  color: var(--account-ink-muted);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.28;
}

.account-summary .tb-form-message {
  display: block;
  min-height: 18px;
}

.account-summary .tb-form-message:not(.is-visible) {
  visibility: hidden;
}

.account-summary__submit {
  width: 100%;
  min-height: 44px;
  border: 0;
  color: var(--account-burgundy);
  cursor: pointer;
}

.account-header__nav a:focus-visible,
.account-header__logo:focus-visible,
.account-file-control:focus-within,
.account-segmented label:focus-within,
.account-summary__submit:focus-visible,
.account-auth__actions .tb-button:focus-visible {
  outline: 3px solid var(--form-blue-focus);
  outline-offset: 4px;
}

@media (hover: hover) {
  .account-header__nav a:not(.pill):hover {
    color: var(--account-orange);
  }

  .pill--account:hover,
  .account-summary__submit:hover {
    background: var(--account-white);
    color: var(--account-orange);
  }

  .account-shell .pill--account:hover,
  .account-form .tb-button:hover {
    filter: brightness(0.94);
  }
}

@media (max-width: 980px) {
  .account-header__inner {
    width: min(100% - 32px, 720px);
  }

  .account-header__logo {
    grid-column: 1 / span 4;
    width: 146px;
  }

  .account-header__nav {
    grid-column: 5 / -1;
    gap: 14px;
    font-size: 14px;
  }

  .account-header__nav a:not(.pill) {
    display: none;
  }

  .account-hero__media {
    inset-inline: 16px;
  }

  .account-auth,
  .account-form {
    grid-template-columns: 1fr;
    width: min(100%, 720px);
  }

  .account-summary {
    position: static;
  }
}

@media (max-width: 680px) {
  .account-hero {
    min-height: 560px;
    padding: 128px 16px 48px;
  }

  .account-hero__title {
    font-size: clamp(52px, 18vw, 82px);
  }

  .account-shell {
    padding: 40px 16px 72px;
  }

  .account-panel,
  .account-auth,
  .account-summary__inner {
    border-radius: 24px;
  }

  .account-photo-field,
  .account-form__grid,
  .account-segmented {
    grid-template-columns: 1fr;
  }

  .account-opt-out {
    display: grid;
  }

  .account-opt-out .tb-button {
    width: 100%;
  }
}
