/*
 * Prime Clothing — information pages: contact, about, FAQ and 404.
 * Classes are prefixed by page (.contact-, .about-, .faq-, .nf-); .info- is
 * shared between them. Shared components (forms, accordion, care label,
 * buttons, tables) live in styles.css.
 */

/* ================================================================ contact */

.contact-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--s-7);
  padding-top: clamp(32px, 5vw, 64px);
}
@media (min-width: 900px) {
  .contact-layout {
    grid-template-columns: minmax(0, 7fr) minmax(300px, 4fr);
    gap: clamp(48px, 6vw, 112px);
    align-items: start;
  }
  .contact-aside {
    position: sticky;
    top: calc(var(--header-h) + var(--s-5));
  }
}

.contact-h {
  font-size: var(--fs-lg);
  margin-bottom: var(--s-5);
}
.contact-form {
  gap: var(--s-5);
}
.contact-form .form-row {
  gap: var(--s-5) var(--s-4);
}
/* Side-by-side fields stay top-aligned when only one of them has a hint. */
.contact-form .field {
  align-content: start;
}
/* Order numbers are spec data: mono, shown in capitals. 16px stops iOS zooming. */
.contact-order {
  font-family: var(--font-mono);
  font-size: 1rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.contact-message {
  min-height: 188px;
}

.contact-submit {
  display: grid;
  gap: var(--s-3);
  padding-top: var(--s-2);
}
.contact-submit .btn {
  width: 100%;
}
.contact-submit__note {
  display: flex;
  gap: var(--s-2);
  align-items: flex-start;
  font-size: var(--fs-sm);
  color: var(--graphite);
}
.contact-submit__note .icon {
  width: 18px;
  height: 18px;
  margin-top: 1px;
}
@media (min-width: 560px) {
  .contact-submit {
    display: flex;
    align-items: center;
    gap: var(--s-5);
  }
  .contact-submit .btn {
    width: auto;
    min-width: 200px;
  }
  .contact-submit__note {
    max-width: 34ch;
  }
}

/* The form-alert link (failed send) needs to read as a link on the red tint. */
.contact-form .form-alert a {
  color: inherit;
  font-weight: 600;
}

/* --- sent / email-app panels */
.contact-done {
  display: grid;
  gap: var(--s-4);
  justify-items: start;
  padding: var(--s-6) var(--s-5);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
@media (min-width: 560px) {
  .contact-done {
    padding: var(--s-7) var(--s-6);
  }
}
.contact-done > * {
  max-width: 100%;
}
.contact-done__badge {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--success-tint);
  color: var(--success);
}
.contact-done__badge .icon {
  width: 24px;
  height: 24px;
}
.contact-done__badge--mail {
  background: var(--cobalt-tint);
  color: var(--cobalt);
}
.contact-done__title {
  font-size: var(--fs-xl);
}
.contact-done__title:focus:not(:focus-visible) {
  outline: none;
}
.contact-done__text {
  max-width: 52ch;
  color: var(--ink-soft);
  overflow-wrap: anywhere;
}
.contact-done__text strong {
  color: var(--ink);
}
.contact-done__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-3);
  padding-top: var(--s-2);
}
.contact-done__status:empty {
  display: none;
}
.contact-done__status {
  font-size: var(--fs-sm);
  color: var(--success);
}
.contact-done__edit {
  min-height: 44px;
  font-size: var(--fs-sm);
}

/* A sewn-in label summarising what was sent. */
.contact-receipt {
  width: 100%;
  margin-block: var(--s-2);
}
.contact-receipt__meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-1) var(--s-5);
  margin: 0 0 var(--s-3);
}
.contact-receipt__meta div {
  display: flex;
  gap: var(--s-2);
}
.contact-receipt__meta dt {
  color: var(--graphite);
}
.contact-receipt__meta dt::after {
  content: ':';
}
.contact-receipt__meta dd {
  margin: 0;
}
.contact-receipt__msg {
  padding-top: var(--s-3);
  border-top: 1px solid var(--line);
  white-space: pre-line;
  overflow-wrap: anywhere;
  color: var(--ink-soft);
}

.contact-copy {
  width: 100%;
}
.contact-copy__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 2px var(--s-4);
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  letter-spacing: 0.02em;
  color: var(--graphite);
  overflow-wrap: anywhere;
}
.contact-copy__text[readonly] {
  min-height: 200px;
  background: var(--chalk);
}

/* --- aside */
.contact-card {
  padding: var(--s-5) var(--s-5) var(--s-3);
}
.contact-card .care-label__title {
  margin-bottom: var(--s-2);
}
.contact-card__list {
  margin: 0;
}
.contact-card__row {
  padding-block: var(--s-3);
  border-top: 1px solid var(--line);
}
.contact-card__row dt {
  display: flex;
  align-items: center;
  gap: var(--s-2);
  font-size: var(--fs-xs);
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--graphite);
}
.contact-card__row dd {
  margin: 2px 0 0 26px;
  color: var(--ink);
  overflow-wrap: anywhere;
}
.contact-card__icon {
  display: inline-grid;
  color: var(--cobalt);
}
.contact-card__icon .icon {
  width: 18px;
  height: 18px;
}
/* Comfortable tap target without adding visual height. */
.contact-card__link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin-block: -11px;
  font-weight: 500;
}

.contact-tip {
  margin-top: var(--s-4);
}
.contact-tip .mono {
  font-weight: 500;
}
.contact-nowrap {
  white-space: nowrap;
}

.contact-links {
  margin-top: var(--s-6);
}
.contact-links ul {
  margin: var(--s-3) 0 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line);
}
.contact-links a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-3);
  min-height: 52px;
  border-bottom: 1px solid var(--line);
  font-weight: 600;
  text-decoration: none;
}
.contact-links a > span {
  display: inline-grid;
  color: var(--graphite);
  transition: transform var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease);
}
.contact-links a .icon {
  width: 18px;
  height: 18px;
}
.contact-links a:hover > span {
  color: var(--cobalt);
  transform: translateX(3px);
}

/* ================================================================== about */

.about-split {
  display: grid;
  gap: var(--s-6);
}
.about-split__media {
  order: -1;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: var(--stone);
  border-radius: 2px;
}
.about-split__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.about-split__body .eyebrow {
  margin-bottom: var(--s-3);
}
.about-copy {
  margin-top: var(--s-5);
  max-width: 54ch;
  color: var(--ink-soft);
  text-wrap: pretty;
}
.about-copy p + p {
  margin-top: var(--s-4);
}
.about-copy p:first-child {
  font-size: var(--fs-md);
  color: var(--ink);
}
@media (min-width: 900px) {
  .about-split {
    grid-template-columns: minmax(0, 6fr) minmax(0, 5fr);
    gap: var(--s-8);
    align-items: center;
  }
  .about-split__media {
    order: 0;
  }
}

/* --- principles: numbered rows like a spec sheet */
.about-principles {
  padding-top: 0;
}
.about-principles__head {
  margin-bottom: var(--s-6);
}
.about-principles__head .eyebrow {
  margin-bottom: var(--s-3);
}
.about-principles__list {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--ink);
}
.about-principle {
  display: grid;
  gap: var(--s-3);
  padding-block: var(--s-6);
  border-bottom: 1px solid var(--line);
}
.about-principle__num {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: var(--fs-xs);
  letter-spacing: 0.08em;
  color: var(--cobalt);
}
.about-principle__title {
  font-size: var(--fs-lg);
  text-wrap: balance;
}
.about-principle__body {
  max-width: 64ch;
  color: var(--ink-soft);
}
.about-principle .about-principle__body > * + * {
  margin-top: var(--s-5);
}
@media (min-width: 900px) {
  .about-principle {
    grid-template-columns: 72px minmax(0, 4fr) minmax(0, 7fr);
    gap: var(--s-6);
    padding-block: var(--s-7);
  }
  .about-principle__num {
    padding-top: 0.55em;
  }
}

/* 01 — range tiles */
.about-range {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--s-4) var(--s-3);
  margin: 0;
  padding: 0;
  list-style: none;
}
@media (min-width: 560px) {
  .about-range {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}
.about-range__link {
  display: grid;
  gap: 2px;
  color: var(--ink);
  text-decoration: none;
}
.about-range__media {
  display: block;
  aspect-ratio: 4 / 5;
  margin-bottom: var(--s-2);
  overflow: hidden;
  background: var(--stone);
  border-radius: 2px;
}
.about-range__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 600ms var(--ease);
}
.about-range__name {
  font-size: var(--fs-sm);
  font-weight: 600;
  line-height: 1.3;
}
.about-range__meta {
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--graphite);
}
.about-range__link:hover .about-range__name {
  color: var(--cobalt);
}
@media (hover: hover) {
  .about-range__link:hover .about-range__media img {
    transform: scale(1.03);
  }
}

/* 02 — fabric spec on a care label */
.about-spec {
  padding-block: var(--s-4);
}
.about-spec .care-label__title {
  margin-bottom: 0;
  padding-bottom: var(--s-2);
}
.about-spec__list {
  margin: 0;
  padding: 0;
  list-style: none;
}
.about-spec__list li {
  border-top: 1px solid var(--line);
}
.about-spec__row {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 2px;
  min-height: 56px;
  padding-block: var(--s-3);
  color: var(--ink);
  text-decoration: none;
}
.about-spec__name {
  font-weight: 500;
}
.about-spec__leader {
  display: none;
}
.about-spec__value {
  color: var(--graphite);
  font-size: var(--fs-xs);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.about-spec__row:hover .about-spec__name {
  color: var(--cobalt);
}
@media (min-width: 560px) {
  .about-spec__row {
    grid-template-columns: auto minmax(var(--s-5), 1fr) auto;
    align-items: center;
    gap: var(--s-3);
    min-height: 48px;
  }
  .about-spec__leader {
    display: block;
    margin-top: 0.4em;
    border-bottom: 1px dotted var(--stone-deep);
  }
}

/* 03 / 04 — links and facts */
.about-link {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  min-height: 44px;
  color: var(--ink);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}
.about-link > span {
  display: inline-grid;
}
.about-link .icon {
  width: 18px;
  height: 18px;
  transition: transform var(--dur-fast) var(--ease);
}
.about-link:hover .icon:last-child {
  transform: translateX(3px);
}
.about-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0 var(--s-6);
}
.about-facts {
  display: grid;
  gap: var(--s-4);
  padding-top: var(--s-1);
  margin: 0;
  padding: 0;
  list-style: none;
}
.about-facts li {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  gap: var(--s-4);
  align-items: start;
}
.about-facts strong {
  color: var(--ink);
}
.about-facts a {
  color: var(--ink);
  overflow-wrap: anywhere;
}
.about-facts__icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--white);
  box-shadow: inset 0 0 0 1px var(--line);
}
.about-facts__icon .icon {
  width: 18px;
  height: 18px;
}

/* ========================================================== woven band */
/*
 * A call-to-action band that is itself a woven label: the shared .woven
 * weave and stitching, re-laid out as a block. Use once per page at most.
 */
.woven.info-band {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-5) var(--s-6);
  width: 100%;
  padding: clamp(32px, 5vw, 64px) clamp(24px, 5vw, 64px);
  border-radius: 3px;
  font-stretch: 100%;
  font-weight: 400;
  text-transform: none;
  letter-spacing: normal;
  line-height: 1.5;
}
.woven.info-band::after {
  inset: 8px;
  border-radius: 2px;
}
.info-band__body {
  position: relative;
  z-index: 1;
  display: grid;
  gap: var(--s-3);
  max-width: 40rem;
}
.info-band__title {
  font-size: var(--fs-2xl);
  font-stretch: 125%;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: -0.015em;
  line-height: 1;
}
.info-band__text {
  font-size: var(--fs-md);
  opacity: 0.88;
}
.info-band .btn {
  position: relative;
  z-index: 1;
}
/* The light button would vanish into cobalt on hover; go ink instead. */
.info-band .btn--light:hover {
  --btn-bg: var(--ink);
  --btn-fg: var(--white);
  --btn-border: var(--ink);
}
.info-band .btn:focus-visible {
  outline-color: var(--white);
}
@media (max-width: 559.98px) {
  .info-band .btn {
    width: 100%;
  }
}

/* ==================================================================== faq */

.faq-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--s-6);
  padding-top: clamp(24px, 4vw, 56px);
}
@media (min-width: 900px) {
  .faq-layout {
    grid-template-columns: 200px minmax(0, 1fr);
    gap: clamp(48px, 6vw, 112px);
    align-items: start;
  }
}

/* Topic list: a swipeable row of pills on phones, a sticky index on desktop. */
.faq-nav__title {
  margin-bottom: var(--s-3);
}
.faq-nav__list {
  display: flex;
  gap: var(--s-2);
  margin: 0 calc(var(--gutter) * -1);
  padding: 2px var(--gutter) 6px;
  list-style: none;
  overflow-x: auto;
  scroll-padding-inline: var(--gutter);
  scrollbar-width: none;
}
.faq-nav__list::-webkit-scrollbar {
  display: none;
}
.faq-nav__list li {
  flex: none;
}
.faq-nav__link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 var(--s-4);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: var(--fs-sm);
  font-weight: 600;
  white-space: nowrap;
  text-decoration: none;
}
.faq-nav__link:hover {
  border-color: var(--ink);
  color: var(--ink);
}
@media (max-width: 899.98px) {
  .faq-nav__title {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }
}
@media (min-width: 900px) {
  .faq-nav {
    position: sticky;
    top: calc(var(--header-h) + var(--s-6));
  }
  .faq-nav__list {
    display: grid;
    gap: 0;
    margin: 0;
    padding: 0;
    overflow: visible;
    border-left: 1px solid var(--line);
  }
  .faq-nav__link {
    display: flex;
    min-height: 40px;
    margin-left: -1px;
    padding: 0 0 0 var(--s-4);
    border: 0;
    border-left: 2px solid transparent;
    border-radius: 0;
    font-weight: 500;
    color: var(--graphite);
    white-space: normal;
  }
  .faq-nav__link:hover {
    color: var(--ink);
  }
  .faq-nav__link.is-active {
    border-left-color: var(--cobalt);
    color: var(--ink);
    font-weight: 600;
  }
}

/* Groups */
.faq-group + .faq-group {
  margin-top: var(--s-8);
}
.faq-group__head {
  display: flex;
  align-items: baseline;
  gap: var(--s-3);
  margin-bottom: var(--s-4);
}
.faq-group__num {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: var(--fs-xs);
  letter-spacing: 0.08em;
  color: var(--cobalt);
}
.faq-group__title {
  font-size: var(--fs-xl);
}
.faq-group .accordion > summary {
  padding-block: var(--s-3);
  line-height: 1.35;
  transition: color var(--dur-fast) var(--ease);
}
.faq-group .accordion > summary:hover {
  color: var(--cobalt);
}
.faq-group .accordion__body {
  max-width: 70ch;
}
.faq-group .accordion__body > * + * {
  margin-top: var(--s-3);
}
.faq-group .accordion__body a {
  color: var(--ink);
}
.faq-group .accordion__body a:hover {
  color: var(--cobalt);
}
.faq-group .accordion__body strong {
  color: var(--ink);
}
.faq-group__more {
  margin-top: var(--s-4);
  font-size: var(--fs-sm);
  color: var(--graphite);
}
.faq-group__more a {
  color: var(--ink);
  font-weight: 600;
}

/* Shipping rates table (rendered by site.js) sits inside an answer. */
.faq-group [data-shipping-rates] .table-wrap {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
}
.faq-group [data-shipping-rates] .table tbody tr:last-child > * {
  border-bottom: 0;
}
/* Size charts */
.faq-charts {
  display: grid;
  gap: var(--s-4);
}
@media (min-width: 700px) {
  .faq-charts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
.faq-chart {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
}
.faq-chart .table caption {
  padding: var(--s-3) 12px;
  text-align: left;
  font-weight: 600;
  color: var(--ink);
  border-bottom: 1px solid var(--line);
}
.faq-chart .table caption a {
  text-decoration: none;
}
.faq-chart .table caption a:hover {
  text-decoration: underline;
}
.faq-chart__unit {
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  font-weight: 400;
  letter-spacing: 0.04em;
  color: var(--graphite);
}
.faq-chart .table tbody tr:last-child > * {
  border-bottom: 0;
}
.faq-chart .table td {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
}

/* How to measure, fit notes */
.faq-terms,
.faq-fit {
  display: grid;
  margin: 0;
  border-top: 1px solid var(--line);
}
.faq-terms > div,
.faq-fit > div {
  display: grid;
  gap: 2px var(--s-4);
  padding-block: var(--s-3);
  border-bottom: 1px solid var(--line);
}
.faq-terms dt,
.faq-fit dt {
  font-weight: 600;
  color: var(--ink);
}
.faq-terms dd,
.faq-fit dd {
  margin: 0;
}
@media (min-width: 560px) {
  .faq-terms > div {
    grid-template-columns: 7rem minmax(0, 1fr);
  }
  .faq-fit > div {
    grid-template-columns: 14rem minmax(0, 1fr);
  }
}

/* Care labels */
.faq-care {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr));
  gap: var(--s-3);
}
.faq-care__label {
  padding: var(--s-4) var(--s-5);
}
.faq-care__label .care-label__title {
  font-family: var(--font-mono);
}
.faq-care__label ul {
  margin: 0;
  padding: 0;
  list-style: none;
  color: var(--ink);
}

/* Still have a question? */
.faq-more {
  display: grid;
  gap: var(--s-5);
  margin-top: var(--s-8);
  padding: var(--s-6) var(--s-5);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.faq-more__title {
  font-size: var(--fs-lg);
}
.faq-more__body p {
  margin-top: var(--s-2);
  color: var(--ink-soft);
}
.faq-more__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--s-2) var(--s-5);
}
.faq-more__email {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-family: var(--font-mono);
  font-size: var(--fs-sm);
  overflow-wrap: anywhere;
}
@media (min-width: 760px) {
  .faq-more {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    padding: var(--s-6);
  }
  .faq-more__actions {
    flex-direction: column;
    align-items: flex-end;
  }
}

/* ==================================================================== 404 */

.nf-hero {
  padding-block: clamp(48px, 8vw, 112px) clamp(40px, 6vw, 80px);
  border-bottom: 1px solid var(--line);
}
.nf-hero__inner {
  display: grid;
  justify-items: start;
}
/* The 404 as an oversized woven label, hung slightly off-square. */
.woven.nf-code {
  font-size: clamp(1.75rem, 1rem + 3.4vw, 3.5rem);
  padding: 0.42em 0.7em 0.38em;
  transform: rotate(-2deg);
  transform-origin: left center;
}
.woven.nf-code::after {
  inset: 5px;
}
.nf-title {
  margin-top: var(--s-6);
  font-size: clamp(2rem, 1.1rem + 4vw, 4.5rem);
  text-wrap: balance;
}
.nf-lede {
  margin-top: var(--s-4);
}
.nf-path {
  margin-top: var(--s-4);
  max-width: 100%;
  font-family: var(--font-mono);
  font-size: var(--fs-sm);
  color: var(--graphite);
  overflow-wrap: anywhere;
}
.nf-actions {
  display: grid;
  gap: var(--s-3);
  width: 100%;
  margin-top: var(--s-6);
}
@media (min-width: 480px) {
  .nf-actions {
    display: flex;
    flex-wrap: wrap;
    width: auto;
  }
}
.nf-help {
  display: flex;
  flex-wrap: wrap;
  gap: 0 var(--s-5);
  margin: var(--s-5) 0 0;
  padding: 0;
  list-style: none;
  font-size: var(--fs-sm);
}
.nf-help a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--ink-soft);
}
.nf-help a:hover {
  color: var(--cobalt);
}
.nf-products__head {
  margin-bottom: var(--s-6);
}
.nf-products__head .eyebrow {
  margin-bottom: var(--s-3);
}
