/* ==========================================================================
   Soonmao — components.css
   Buttons, cards, tables, accordion, forms, filters, misc UI
   ========================================================================== */

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */

.btn {
  --btn-bg: var(--ink);
  --btn-fg: var(--paper);
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 15px 26px;
  min-height: 48px;
  background: var(--btn-bg);
  color: var(--btn-fg);
  border: 1px solid var(--btn-bg);
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  line-height: 1;
  overflow: hidden;
  transition: color 0.4s var(--ease), background 0.4s var(--ease),
    border-color 0.4s var(--ease);
}

.btn::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--paper);
  transform: translateY(101%);
  transition: transform 0.45s var(--ease);
  z-index: 0;
}

.btn > * {
  position: relative;
  z-index: 1;
}

.btn:hover::after {
  transform: translateY(0);
}

.btn:hover {
  color: var(--ink);
}

.btn--ghost {
  --btn-bg: transparent;
  --btn-fg: var(--ink);
  border-color: var(--line-strong);
}

.btn--ghost::after {
  background: var(--ink);
}

.btn--ghost:hover {
  color: var(--paper);
  border-color: var(--ink);
}

.btn--light {
  --btn-bg: var(--paper);
  --btn-fg: var(--ink);
  border-color: var(--paper);
}

.btn--light::after {
  background: transparent;
}

.btn--light:hover {
  color: var(--ink);
  background: rgba(245, 242, 236, 0.86);
}

.btn--outline-light {
  --btn-bg: transparent;
  --btn-fg: var(--paper);
  border-color: rgba(245, 242, 236, 0.5);
}

.btn--outline-light::after {
  background: var(--paper);
}

.btn--outline-light:hover {
  color: var(--ink);
  border-color: var(--paper);
}

.btn--sm {
  min-height: 40px;
  padding: 11px 18px;
  font-size: 0.66rem;
  letter-spacing: 0.14em;
}

.btn--block {
  width: 100%;
}

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  padding-bottom: 4px;
  border-bottom: 1px solid var(--line-strong);
  transition: gap 0.3s var(--ease), border-color 0.3s;
}

.link-arrow::after {
  content: "\2192";
  font-size: 0.95rem;
  line-height: 1;
  transition: transform 0.3s var(--ease);
}

.link-arrow:hover {
  border-color: var(--ink);
  gap: 14px;
}

.section--ink .link-arrow {
  border-color: rgba(245, 242, 236, 0.4);
}

.section--ink .link-arrow:hover {
  border-color: var(--paper);
}

/* --------------------------------------------------------------------------
   Product cards
   -------------------------------------------------------------------------- */

.pcard {
  display: flex;
  flex-direction: column;
  background: var(--white);
  border: 1px solid var(--line);
  transition: border-color 0.35s var(--ease), transform 0.5s var(--ease);
}

.pcard:hover {
  border-color: var(--line-strong);
  transform: translateY(-3px);
}

.pcard__media {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--white);
}

.pcard__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.9s var(--ease);
}

.pcard:hover .pcard__media img {
  transform: scale(1.035);
}

.pcard__sku {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 5px 8px;
  background: rgba(245, 242, 236, 0.9);
  font-family: var(--font-display);
  font-size: 0.58rem;
  letter-spacing: 0.14em;
  color: var(--ink-60);
}

.pcard__body {
  padding: 20px 20px 22px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}

.pcard__name {
  font-family: var(--font-display);
  font-size: 1.02rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1.2;
}

.pcard__meta {
  font-size: 0.78rem;
  color: var(--ink-60);
  line-height: 1.5;
}

.pcard__foot {
  margin-top: auto;
  padding-top: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-family: var(--font-display);
  font-size: 0.64rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-45);
}

.pcard__foot span:last-child {
  color: var(--ink);
  opacity: 0;
  transform: translateX(-6px);
  transition: opacity 0.35s, transform 0.35s var(--ease);
}

.pcard:hover .pcard__foot span:last-child {
  opacity: 1;
  transform: none;
}

/* collection tile */
.tile {
  position: relative;
  display: block;
  overflow: hidden;
  background: var(--ink);
  color: var(--paper);
  aspect-ratio: 4 / 3;
}

.tile--tall {
  aspect-ratio: 3 / 4;
}

.tile--wide {
  aspect-ratio: 16 / 9;
}

.tile img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1.1s var(--ease), opacity 0.5s;
  opacity: 0.94;
}

.tile:hover img {
  transform: scale(1.045);
  opacity: 1;
}

.tile::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(10, 9, 7, 0.76) 0%, rgba(10, 9, 7, 0.06) 55%);
  transition: opacity 0.4s;
}

.tile__body {
  position: relative;
  z-index: 1;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: clamp(18px, 2vw, 28px);
  gap: 6px;
}

.tile__index {
  position: absolute;
  top: clamp(18px, 2vw, 26px);
  left: clamp(18px, 2vw, 28px);
  font-family: var(--font-display);
  font-size: 0.64rem;
  letter-spacing: 0.2em;
  color: rgba(245, 242, 236, 0.7);
}

.tile__title {
  font-family: var(--font-display);
  font-size: clamp(1.1rem, 1.6vw, 1.55rem);
  font-weight: 500;
  letter-spacing: -0.015em;
  line-height: 1.12;
}

.tile__meta {
  font-size: 0.74rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(245, 242, 236, 0.66);
}

.tile__body .link-arrow {
  margin-top: 12px;
  border-color: rgba(245, 242, 236, 0.45);
  color: var(--paper);
  align-self: flex-start;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.35s, transform 0.35s var(--ease);
}

.tile:hover .tile__body .link-arrow {
  opacity: 1;
  transform: none;
}

/* --------------------------------------------------------------------------
   Stats / numbers
   -------------------------------------------------------------------------- */

.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.stats__item {
  background: var(--paper);
  padding: clamp(20px, 2.6vw, 34px) clamp(14px, 2vw, 26px);
}

.section--ink .stats,
.section--ink .stats__item {
  background: transparent;
  border-color: rgba(245, 242, 236, 0.16);
}

.section--ink .stats {
  background: rgba(245, 242, 236, 0.16);
  border-color: rgba(245, 242, 236, 0.16);
}

.stats__num {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3vw, 3rem);
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}

.stats__label {
  margin-top: 10px;
  font-size: 0.74rem;
  line-height: 1.5;
  color: var(--ink-60);
  max-width: 20ch;
}

.section--ink .stats__label {
  color: rgba(245, 242, 236, 0.6);
}

@media (max-width: 760px) {
  .stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* --------------------------------------------------------------------------
   Numbered list / process
   -------------------------------------------------------------------------- */

.steps {
  border-top: 1px solid var(--line);
}

.step {
  display: grid;
  grid-template-columns: 70px minmax(0, 1fr) minmax(0, 1.15fr);
  gap: clamp(16px, 3vw, 48px);
  padding: clamp(22px, 3vw, 36px) 0;
  border-bottom: 1px solid var(--line);
  align-items: start;
}

.step__num {
  font-family: var(--font-display);
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  color: var(--clay);
  padding-top: 6px;
}

.step__title {
  font-family: var(--font-display);
  font-size: var(--step-1);
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1.2;
}

.step__text {
  color: var(--ink-60);
  font-size: 0.92rem;
  line-height: 1.7;
}

.section--ink .step {
  border-color: rgba(245, 242, 236, 0.16);
}

.section--ink .step__text {
  color: rgba(245, 242, 236, 0.62);
}

@media (max-width: 800px) {
  .step {
    grid-template-columns: 46px minmax(0, 1fr);
    gap: 10px 14px;
  }

  .step__text {
    grid-column: 2;
  }
}

/* --------------------------------------------------------------------------
   Spec table
   -------------------------------------------------------------------------- */

.spec {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.spec th,
.spec td {
  text-align: left;
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

.spec th {
  width: 38%;
  font-family: var(--font-display);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-45);
  padding-right: 18px;
}

.spec td {
  color: var(--ink-80);
}

.section--ink .spec th,
.section--ink .spec td {
  border-color: rgba(245, 242, 236, 0.16);
  color: rgba(245, 242, 236, 0.8);
}

/* --------------------------------------------------------------------------
   Accordion (FAQ)
   -------------------------------------------------------------------------- */

.acc {
  border-top: 1px solid var(--line);
}

.acc__item {
  border-bottom: 1px solid var(--line);
}

.acc__btn {
  width: 100%;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 22px;
  padding: clamp(18px, 2.2vw, 26px) 0;
  text-align: left;
  font-family: var(--font-display);
  font-size: var(--step-1);
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1.3;
  transition: color 0.2s;
}

.acc__btn:hover {
  color: var(--clay);
}

.acc__ico {
  position: relative;
  flex: 0 0 auto;
  width: 15px;
  height: 15px;
  margin-top: 5px;
}

.acc__ico::before,
.acc__ico::after {
  content: "";
  position: absolute;
  background: currentColor;
  transition: transform 0.35s var(--ease), opacity 0.3s;
}

.acc__ico::before {
  top: 7px;
  left: 0;
  width: 15px;
  height: 1px;
}

.acc__ico::after {
  left: 7px;
  top: 0;
  width: 1px;
  height: 15px;
}

.acc__item.is-open .acc__ico::after {
  transform: scaleY(0);
  opacity: 0;
}

.acc__panel {
  overflow: hidden;
  height: 0;
  transition: height 0.4s var(--ease);
}

.acc__panel > div {
  padding-bottom: 26px;
  padding-right: clamp(0px, 6vw, 90px);
  color: var(--ink-60);
  font-size: 0.94rem;
  line-height: 1.75;
}

.acc__panel p + p {
  margin-top: 0.8em;
}

/* --------------------------------------------------------------------------
   Forms
   -------------------------------------------------------------------------- */

.form {
  display: grid;
  gap: 18px;
}

.form__row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.field {
  display: grid;
  gap: 8px;
}

.field > label {
  font-family: var(--font-display);
  font-size: 0.66rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-60);
}

.field > label span {
  color: var(--clay);
}

.input,
.select,
.textarea {
  width: 100%;
  padding: 13px 14px;
  min-height: 48px;
  background: var(--white);
  border: 1px solid var(--line-strong);
  border-radius: 0;
  font-size: 0.92rem;
  transition: border-color 0.25s, box-shadow 0.25s;
  appearance: none;
}

.textarea {
  min-height: 130px;
  resize: vertical;
}

.select {
  background-image: linear-gradient(45deg, transparent 50%, var(--ink) 50%),
    linear-gradient(135deg, var(--ink) 50%, transparent 50%);
  background-position: calc(100% - 19px) 21px, calc(100% - 14px) 21px;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  padding-right: 38px;
}

.input:focus,
.select:focus,
.textarea:focus {
  outline: none;
  border-color: var(--ink);
  box-shadow: 0 0 0 3px rgba(20, 19, 15, 0.08);
}

.input::placeholder,
.textarea::placeholder {
  color: var(--ink-45);
}

.field.has-error .input,
.field.has-error .select,
.field.has-error .textarea {
  border-color: #a63a2f;
  background: #fdf5f4;
}

.field__err {
  font-size: 0.74rem;
  color: #a63a2f;
  display: none;
}

.field.has-error .field__err {
  display: block;
}

.check {
  display: flex;
  gap: 11px;
  align-items: flex-start;
  font-size: 0.8rem;
  color: var(--ink-60);
  line-height: 1.6;
  cursor: pointer;
}

.check input {
  margin-top: 3px;
  width: 16px;
  height: 16px;
  accent-color: var(--ink);
  flex: 0 0 auto;
}

.check a {
  border-bottom: 1px solid var(--line-strong);
  color: var(--ink);
}

.form__note {
  font-size: 0.76rem;
  color: var(--ink-45);
  line-height: 1.6;
}

.form__status {
  display: none;
  padding: 14px 16px;
  border: 1px solid var(--line-strong);
  background: var(--paper-2);
  font-size: 0.86rem;
}

.form__status.is-visible {
  display: block;
}

.form__status--ok {
  border-color: rgba(74, 82, 69, 0.5);
  background: #eef0ea;
}

@media (max-width: 640px) {
  .form__row {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* --------------------------------------------------------------------------
   Breadcrumb
   -------------------------------------------------------------------------- */

.crumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-45);
  padding-top: calc(var(--header-h) + 18px);
}

.crumbs a:hover {
  color: var(--ink);
}

.crumbs li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.crumbs li + li::before {
  content: "/";
  opacity: 0.5;
}

/* --------------------------------------------------------------------------
   Filter bar
   -------------------------------------------------------------------------- */

.filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px 22px;
  padding: 16px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  margin-bottom: clamp(22px, 3vw, 38px);
}

.filters__group {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.chip {
  padding: 9px 15px;
  border: 1px solid var(--line-strong);
  font-family: var(--font-display);
  font-size: 0.66rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-60);
  transition: background 0.25s, color 0.25s, border-color 0.25s;
}

.chip:hover {
  color: var(--ink);
  border-color: var(--ink);
}

.chip.is-active {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper);
}

.filters__count {
  font-size: 0.74rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-45);
}

.empty-state {
  display: none;
  padding: 60px 0;
  text-align: center;
  color: var(--ink-45);
  font-size: 0.92rem;
}

.empty-state.is-visible {
  display: block;
}

/* --------------------------------------------------------------------------
   Marquee
   -------------------------------------------------------------------------- */

.marquee {
  overflow: hidden;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 18px 0;
  background: var(--paper);
}

.marquee__track {
  display: flex;
  gap: 0;
  width: max-content;
  animation: marquee 38s linear infinite;
}

.marquee:hover .marquee__track {
  animation-play-state: paused;
}

.marquee__track span {
  display: inline-flex;
  align-items: center;
  gap: 26px;
  padding-right: 26px;
  font-family: var(--font-display);
  font-size: 0.76rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-45);
  white-space: nowrap;
}

.marquee__track span::after {
  content: "";
  width: 5px;
  height: 5px;
  background: var(--clay);
  transform: rotate(45deg);
}

@keyframes marquee {
  to {
    transform: translateX(-50%);
  }
}

@media (prefers-reduced-motion: reduce) {
  .marquee__track {
    animation: none;
  }
}

/* --------------------------------------------------------------------------
   Badges / tags
   -------------------------------------------------------------------------- */

.tag {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 11px;
  border: 1px solid var(--line-strong);
  font-family: var(--font-display);
  font-size: 0.62rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-60);
}

.tag--solid {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper);
}

.tag--clay {
  border-color: rgba(166, 85, 47, 0.4);
  color: var(--clay);
  background: rgba(166, 85, 47, 0.06);
}

/* callout */
.callout {
  border: 1px solid var(--line-strong);
  padding: clamp(20px, 2.6vw, 32px);
  background: var(--white);
  display: grid;
  gap: 12px;
}

.callout--clay {
  background: rgba(166, 85, 47, 0.05);
  border-color: rgba(166, 85, 47, 0.25);
}

.callout__title {
  font-family: var(--font-display);
  font-size: var(--step-1);
  font-weight: 500;
  letter-spacing: -0.01em;
}

/* CTA band */
.cta-band {
  position: relative;
  overflow: hidden;
  background: var(--ink);
  color: var(--paper);
  padding-block: clamp(48px, 7vw, 104px);
}

.cta-band__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 28px 48px;
}

.cta-band h2 {
  font-size: clamp(1.8rem, 1rem + 3.4vw, 3.8rem);
  max-width: 18ch;
  letter-spacing: -0.03em;
  line-height: 1.02;
}

.cta-band p {
  margin-top: 16px;
  max-width: 46ch;
  color: rgba(245, 242, 236, 0.7);
}

.cta-band__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

/* on small screens the trailing (current) crumb is dropped: long article
   titles pushed the trail onto a second line with a leading slash */
@media (max-width: 640px) {
  .crumbs li[aria-current="page"] {
    display: none;
  }
}
