/* Sign-in, contact and signed-in portal screens (concept G). Tokens and shared components live in
   site.css; the photo band and its centered card (.band-card) are there too. */

/* ---------- Form fields (DESIGN.md "Forms and inputs") ---------- */
.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.field__label {
  font-size: 14px;
  font-weight: 600;
}
.field__optional {
  font-weight: 500;
  color: var(--muted);
}
.field__input {
  width: 100%;
  min-height: 48px;
  padding: 0 14px;
  border: 1.5px solid var(--field-line);
  border-radius: var(--radius-sm);
  background: var(--white);
  color: var(--ink);
  font: inherit;
  font-size: 16px;
}
.field__input--area {
  padding: 12px 14px;
  resize: vertical;
}
.field__input::placeholder {
  color: var(--muted);
  opacity: 1;
}
.field__input:focus-visible {
  outline: none;
  border-color: var(--ink);
  box-shadow: var(--shadow-focus);
}
.field--error .field__input {
  border-color: var(--coral-ink);
}
.field__error {
  margin: 0;
  font-size: 14px;
  color: var(--coral-ink);
}
.field__error::before {
  content: "! ";
  font-weight: 700;
}

.form-alert {
  padding: 12px 16px;
  border: 1.5px solid var(--coral-ink);
  border-radius: var(--radius-md);
  background: var(--white);
  font-size: 15px;
  font-weight: 600;
  color: var(--coral-ink);
}

/* Turnstile is usually invisible; when it does show a box, give it room. */
.turnstile:not(:empty) {
  min-height: 65px;
}

.btn--block {
  width: 100%;
}

/* ---------- Sign-in screens (in a .band-card under the photo band) ---------- */
.band-card p {
  margin: 0;
}
.auth-note {
  font-weight: 600;
  color: var(--teal-ink);
}
.auth-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.auth-done {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}
.auth-done__line {
  font-weight: 600;
  overflow-wrap: anywhere;
}
.welcome__button {
  align-self: flex-start;
}
.welcome__promos {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  background: var(--oat);
}
.welcome__promos p {
  font-weight: 600;
}

/* ---------- Contact page (DESIGN.md "Pages", "Tabs") ---------- */
.contact-page {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
  gap: var(--space-6);
  align-items: start;
  padding-top: var(--space-7);
  padding-bottom: var(--space-9);
}
.contact-page__main {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}
.contact-page__more {
  margin: 0;
  font-size: 15px;
}
.notice {
  padding: 16px 18px;
  border: 1.5px solid var(--sand-ink);
  border-radius: var(--radius-lg);
  background: var(--sand-wash);
  color: var(--ink);
}
.notice p {
  margin: 0;
}

/* The segmented tabs: an Oat track with 44px pills; the selected one is Ink. */
.segmented {
  display: flex;
  gap: 4px;
  padding: 4px;
  border-radius: var(--radius-pill);
  background: var(--oat);
}
.segmented__tab {
  display: inline-flex;
  flex: 1 1 0;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 16px;
  border-radius: var(--radius-pill);
  color: var(--ink);
  font-size: 15px;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  transition:
    background-color var(--dur-fast) ease,
    color var(--dur-fast) ease;
}
.segmented__tab:hover {
  background: var(--white);
  color: var(--ink);
}
.segmented__tab[aria-selected="true"] {
  background: var(--ink);
  color: var(--cream);
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}
.contact-form__form {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}
.contact-form__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: var(--space-4);
}
.contact-form__foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
}
.contact-form__foot p {
  margin: 0;
  font-size: 14px;
}

/* Beside the form: a light card with Show phone & email, then Where to find Debi. */
.contact-side {
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
  padding: 28px;
  border: 1.5px solid var(--ink);
  border-radius: var(--radius-xl);
  background: var(--cream);
}
.contact-side__reveal {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-bottom: var(--space-5);
  border-bottom: 1px solid var(--rule);
}
/* The Where to find Debi card sits inside the side card here, without its own border. */
.contact-side .find-card {
  padding: 0;
  border: 0;
  background: none;
}
.contact-side__hint {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}
.contact-side .reveal__details a {
  color: var(--teal-ink);
}
@media (max-width: 900px) {
  .contact-page {
    grid-template-columns: minmax(0, 1fr);
  }
}
@media (max-width: 640px) {
  .segmented {
    flex-direction: column;
    border-radius: var(--radius-form);
  }
  .contact-form__grid {
    grid-template-columns: 1fr;
  }
  .contact-form__foot .btn {
    width: 100%;
  }
}

/* ---------- Signed-in header and footer (views/portal/PortalLayout.tsx) ---------- */
.portal-header__who {
  max-width: 240px;
  overflow: hidden;
  color: var(--muted);
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.site-header--photo .portal-header__who {
  color: rgba(251, 248, 240, 0.85);
}
.site-menu__panel .portal-header__who {
  max-width: none;
  margin: 8px 0 0;
  white-space: normal;
  overflow-wrap: anywhere;
}
.portal-signout {
  margin: 0;
}
.portal-footer__contact {
  margin: 0;
  overflow-wrap: anywhere;
}
.portal-footer__contact a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}
@media (max-width: 1100px) {
  .portal-header__who {
    display: none;
  }
  .site-menu__panel .portal-header__who {
    display: block;
  }
}

/* Two more button styles for the portal's cards */
.btn--small {
  min-height: 44px;
  padding: 0 18px;
  font-size: 15px;
}
/* Cream pill with an Ink arrow dot (the carousel's "See the line", on its Ink panel). */
.btn--cream {
  background: var(--cream);
  color: var(--ink);
}
.btn--cream:hover {
  background: var(--white);
  color: var(--ink);
}
.btn--cream .btn__dot {
  background: var(--ink);
  color: var(--cream);
}

/* ---------- /catalogs: Welcome back and Recently opened ---------- */
.portal-welcome {
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
  padding-top: var(--space-7);
  padding-bottom: var(--space-6);
}
.portal-welcome__title {
  font-size: var(--text-h1);
  line-height: 1.05;
  letter-spacing: -0.03em;
}
.recent {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.recent__list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr));
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.recent-card {
  display: flex;
  align-items: center;
  gap: 16px;
  height: 100%;
  min-height: 96px;
  padding: 14px 18px;
  border: 1px solid var(--rule);
  border-radius: var(--radius-card);
  background: var(--white);
  color: var(--ink);
  text-decoration: none;
  transition: border-color var(--dur-fast) ease;
}
.recent-card:hover {
  border-color: var(--ink);
  color: var(--ink);
}
.recent-card__cover {
  flex: none;
  width: 56px;
  border: 1px solid var(--rule);
  border-radius: 6px;
}
.recent-card__cover--blank {
  height: 72px;
  background: var(--sand-wash);
}
.recent-card__text {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.recent-card__title {
  font-weight: 600;
}
.recent-card__meta {
  color: var(--muted);
  font-size: 14px;
}

/* ---------- The line carousel (DESIGN.md "Line carousel") ---------- */
.carousel-wrap {
  padding-bottom: var(--space-8);
}
.carousel {
  position: relative;
}
.carousel__track {
  display: flex;
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
  /* Without the script: a row that scrolls sideways, a card at a time. */
  overflow-x: auto;
  scroll-snap-type: x mandatory;
}
.carousel__slide {
  flex: 0 0 min(88%, 760px);
  scroll-snap-align: start;
}
/* With the script: the current card in the middle (2.5 parts), the next and previous peeking. */
.carousel.is-ready .carousel__track {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2.5fr) minmax(0, 1fr);
  overflow: visible;
}
.carousel.is-ready .carousel__slide {
  grid-row: 1;
}
.carousel.is-ready .carousel__slide[hidden] {
  display: none;
}
.carousel.is-ready .is-prev {
  grid-column: 1;
  opacity: 0.45;
}
.carousel.is-ready .is-current {
  grid-column: 2;
}
.carousel.is-ready .is-next {
  grid-column: 3;
  opacity: 0.45;
}
.carousel__card {
  position: relative;
  height: 480px;
  overflow: hidden;
  border-radius: var(--radius-xl);
  background: var(--oat);
  box-shadow: var(--shadow-lift);
}
.carousel__media {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.carousel__media--blank {
  background: var(--sand-wash);
}
.carousel.is-ready .is-prev .carousel__panel,
.carousel.is-ready .is-next .carousel__panel,
.carousel.is-ready .is-prev .carousel__pause,
.carousel.is-ready .is-next .carousel__pause {
  display: none;
}
.carousel__panel {
  position: absolute;
  left: 22px;
  bottom: 22px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
  max-width: min(440px, calc(100% - 44px));
  padding: 22px;
  border-radius: var(--radius-card);
  background: rgba(31, 45, 44, 0.88);
  color: var(--cream);
}
.carousel__logo {
  display: inline-flex;
  align-items: center;
  height: 56px;
  padding: 8px 16px;
  border-radius: var(--radius-pill);
  background: var(--white);
}
.carousel__logo--dark {
  background: var(--ink);
  border: 1px solid rgba(251, 248, 240, 0.3);
}
.carousel__logo img {
  width: auto;
  max-width: 180px;
  height: 40px;
  object-fit: contain;
}
.carousel__name {
  font-family: var(--font-serif);
  font-size: 28px;
}
.carousel__sentence {
  margin: 0;
  font-size: 18px;
  font-weight: 500;
  line-height: 1.45;
}
.carousel__pause {
  position: absolute;
  top: 18px;
  right: 18px;
  min-height: 44px;
  padding: 0 18px;
  border: 0;
  border-radius: var(--radius-pill);
  background: rgba(31, 45, 44, 0.78);
  color: var(--cream);
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}
.carousel__pause[hidden] {
  display: none;
}
.carousel__arrow {
  position: absolute;
  top: 214px;
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border: 0;
  border-radius: 50%;
  background: var(--ink);
  color: var(--cream);
  cursor: pointer;
}
.carousel__arrow[hidden] {
  display: none;
}
.carousel__arrow--prev {
  left: -10px;
}
.carousel__arrow--prev .icon {
  transform: rotate(180deg);
}
.carousel__arrow--next {
  right: -10px;
}
.carousel__segments {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
}
.carousel__segments[hidden] {
  display: none;
}
.carousel__segment {
  display: grid;
  place-items: center;
  width: 56px;
  height: 44px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}
.carousel__segment::before {
  content: "";
  width: 44px;
  height: 5px;
  border-radius: var(--radius-pill);
  /* Field Line, not Rule: 3.8:1 on Cream (DESIGN.md "Line carousel"). */
  background: var(--field-line);
}
.carousel__segment[aria-current="true"]::before {
  background: var(--ink);
}
@media (max-width: 760px) {
  .carousel.is-ready .carousel__track {
    grid-template-columns: minmax(0, 1fr);
  }
  .carousel.is-ready .is-prev,
  .carousel.is-ready .is-next {
    display: none;
  }
  .carousel.is-ready .is-current {
    grid-column: 1;
  }
  .carousel__card {
    height: 420px;
  }
  /* Above the Ink panel, so they never cover its words. */
  .carousel__arrow {
    top: 96px;
  }
  /* Seven segments still fit on one line at 48px each (44px targets). */
  .carousel__segment {
    width: 48px;
  }
  .carousel__segment::before {
    width: 36px;
  }
  .carousel__arrow--prev {
    left: 8px;
  }
  .carousel__arrow--next {
    right: 8px;
  }
  .carousel__panel {
    left: 12px;
    right: 12px;
    bottom: 12px;
    max-width: none;
  }
}

/* ---------- This month's promotions (views/portal/Promotions.tsx) ---------- */
.promotions {
  padding: 72px 0;
}
.promo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr));
  gap: 22px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.promo-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  height: 100%;
  padding: 18px;
  border-radius: var(--radius-card);
  background: var(--cream);
}
.promo-card__picture {
  display: block;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border-radius: var(--radius-photo);
  background: var(--white);
}
.promo-card__picture img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.promo-card__picture--flyer {
  display: grid;
  place-items: center;
  background: var(--sand-wash);
  color: var(--sand-ink);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.promo-card__line {
  margin: 4px 0 0;
  color: var(--sand-ink);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.promo-card__title {
  font-size: 24px;
  line-height: 1.15;
}
.promo-card__body {
  margin: 0;
}
.promo-card__ends {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
}
.promo-card__flyer {
  align-self: flex-start;
  margin-top: auto;
}
.promo-note {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 16px;
  margin-top: var(--space-4);
  padding: 16px 20px;
  border: 1px solid var(--rule);
  border-radius: var(--radius-card);
  background: var(--cream);
}
.promo-note p {
  margin: 0;
  font-weight: 600;
}

/* ---------- Your lines: a card per line (DESIGN.md "Line cards") ---------- */
/* Its Line row sits under the Category row, as close as Shop's two rows. */
.shop__filters--more {
  margin-top: calc(var(--space-4) - var(--space-7));
}
.line-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(320px, 100%), 1fr));
  gap: 22px;
  margin: var(--space-6) 0 0;
  padding: 0;
  list-style: none;
}
.line-card {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 20px;
  border: 1px solid var(--rule);
  border-radius: var(--radius-card);
  background: var(--white);
}
.line-card__logo {
  height: 120px;
  padding: 18px;
  border-radius: var(--radius-lg);
}
.line-card__body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 8px;
}
.line-card__name-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
}
.line-card__name {
  font-size: 24px;
  line-height: 1.15;
}
.line-card__states {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
}
.line-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: auto;
  padding-top: 8px;
}

/* ---------- A line's portal page (/catalogs/<slug>) ---------- */
.line-head {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  padding-top: var(--space-6);
}
.line-head__back a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-weight: 600;
}
.line-head__row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-5);
}
.line-head__logo {
  width: 260px;
  height: 140px;
}
.line-head__words {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.line-head__name {
  font-size: var(--text-h1);
  line-height: 1.05;
  letter-spacing: -0.03em;
}
.line-head__states {
  margin: 0;
  color: var(--muted);
}
.line-head__blurb {
  max-width: 760px;
  font-size: 19px;
  line-height: 1.6;
}
.catalog-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(220px, 100%), 1fr));
  gap: 22px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.catalog-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.catalog-card__cover {
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  padding: 12px;
  border: 1px solid var(--rule);
  border-radius: var(--radius-photo);
  background: var(--white);
}
.catalog-card__cover img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}
.catalog-card__blank {
  color: var(--sand-ink);
}
.catalog-card__title {
  font-size: 20px;
  line-height: 1.2;
}
.catalog-card__meta {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}
.catalog-card__open {
  align-self: flex-start;
  margin-top: 4px;
}
.catalog-missing {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-3) var(--space-5);
  padding: 28px;
  border-radius: var(--radius-xl);
  background: var(--oat);
}
.catalog-missing p {
  margin: 0;
}
.whats-new__card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 760px;
  padding: 32px;
  border: 1px solid var(--rule);
  border-radius: var(--radius-form);
  background: var(--cream);
}
.brand-whats-new {
  margin: 0;
  white-space: pre-line;
}
@media (max-width: 640px) {
  .line-head__logo {
    width: 100%;
  }
  .line-card__actions .btn {
    width: 100%;
  }
}
