/* Exotics Direct components (exoticsdirect-website#1 AC 1.1). STRUCTURE only: every colour,
   size and radius comes from tokens.css, so no colour literal ever appears in this file. */

@font-face {
  font-family: 'Figtree';
  font-style: normal;
  font-display: swap;
  font-weight: 300 900;
  src: url('fonts/figtree-latin-wght.woff2') format('woff2-variations');
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: var(--font-size-base);
  line-height: var(--line-height-base);
}

h1,
h2,
h3 {
  font-family: var(--font-display);
  font-weight: var(--weight-bold);
  line-height: var(--line-height-tight);
  margin: 0 0 var(--space-3);
}

h1 {
  font-size: var(--font-size-2xl);
}

h2 {
  font-size: var(--font-size-xl);
}

h3 {
  font-size: var(--font-size-lg);
}

a {
  color: var(--color-accent);
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-3);
}

.muted {
  color: var(--color-muted);
}

/* nav: wordmark left, country + log in right */
.nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  padding: var(--space-3) 0;
}

.wordmark {
  font-family: var(--font-display);
  font-weight: var(--weight-bold);
  font-size: var(--font-size-lg);
  color: var(--color-text);
  text-decoration: none;
}

.nav__links {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

/* buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  min-height: 44px;
  padding: var(--space-2) var(--space-4);
  border: 2px solid var(--color-accent);
  border-radius: var(--radius-sm);
  background: var(--color-accent);
  color: var(--color-accent-contrast);
  font: inherit;
  font-weight: var(--weight-bold);
  text-decoration: none;
  cursor: pointer;
}

.btn:hover {
  background: var(--color-accent-hover);
  border-color: var(--color-accent-hover);
}

.btn--secondary {
  background: var(--color-surface);
  color: var(--color-accent);
}

.btn--secondary:hover {
  background: var(--color-accent-soft);
}

.btn-pill {
  border-radius: var(--radius-pill);
}

/* pills: small rounded labels (cadence, country, kind) */
.pill {
  display: inline-block;
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-pill);
  background: var(--color-sand);
  color: var(--color-sand-text);
  font-size: var(--font-size-sm);
  font-weight: var(--weight-bold);
}

/* status chips: one per parcel status */
.chip {
  display: inline-block;
  padding: var(--space-1) var(--space-2);
  border-radius: var(--radius-sm);
  font-size: var(--font-size-xs);
  font-weight: var(--weight-bold);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.chip--status-pending {
  background: var(--chip-pending-bg);
  color: var(--chip-pending-text);
}

.chip--status-processed {
  background: var(--chip-processed-bg);
  color: var(--chip-processed-text);
}

.chip--status-shipped {
  background: var(--chip-shipped-bg);
  color: var(--chip-shipped-text);
}

.chip--status-delivered {
  background: var(--chip-delivered-bg);
  color: var(--chip-delivered-text);
}

.chip--status-problem {
  background: var(--chip-problem-bg);
  color: var(--chip-problem-text);
}

/* form field: label, control, error */
.field {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  margin-bottom: var(--space-3);
}

/* a checkbox sits before its label on one line */
.field--check {
  flex-direction: row;
  align-items: center;
  gap: var(--space-2);
}

/* a public form's spam trap: off-screen, so only a bot fills it in */
.field--trap {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.field__label {
  font-weight: var(--weight-bold);
}

.field__control {
  min-height: 44px;
  padding: var(--space-2) var(--space-3);
  border: 1px solid var(--color-control-border);
  border-radius: var(--radius-sm);
  background: var(--color-surface);
  color: var(--color-text);
  font: inherit;
}

.field__error {
  color: var(--color-error);
  font-size: var(--font-size-sm);
}

.field--invalid .field__control {
  border-color: var(--color-error);
}

/* image cards: the landing page's two big choices */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr));
  gap: var(--space-4);
  margin-bottom: var(--space-5);
}

.card-image {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--color-surface);
  box-shadow: var(--shadow-card);
  color: var(--color-text);
  text-decoration: none;
}

.card-image:hover {
  box-shadow: var(--shadow-card-hover);
}

.card-image__media {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  background: var(--color-sand);
}

/* an icon in the media slot until a photo exists: whole icon, centred, with room around it */
.card-image__media--icon {
  object-fit: contain;
  padding: 20%;
}

.card-image__body {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  padding: var(--space-4);
}

/* plain card: kit items, receipts, parcels */
.card {
  padding: var(--space-4);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: var(--color-surface);
}

/* demo notice */
.demo-banner {
  padding: var(--space-2) var(--space-3);
  background: var(--color-demo-bg);
  color: var(--color-demo-text);
  font-size: var(--font-size-sm);
  font-weight: var(--weight-bold);
  text-align: center;
}

/* wide tables scroll sideways on a phone instead of breaking the page */
.table-scroll {
  overflow-x: auto;
}

.table-scroll table {
  width: 100%;
  border-collapse: collapse;
}

.table-scroll th,
.table-scroll td {
  padding: var(--space-2);
  border-bottom: 1px solid var(--color-border);
  text-align: left;
  white-space: nowrap;
}

/* footer + social row */
.footer {
  margin-top: var(--space-6);
  padding: var(--space-5) 0;
  border-top: 1px solid var(--color-border);
  color: var(--color-muted);
  font-size: var(--font-size-sm);
}

.footer__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
}

.social-row {
  display: flex;
  gap: var(--space-3);
  align-items: center;
}

/* Clear space of a quarter of the mark's width on every side (8px around a 24px mark). */
.social-row a {
  display: inline-flex;
  padding: var(--space-2);
}

/* Social marks keep their own colours and a 24px minimum (Facebook asks for 16px). */
.social-row img {
  width: 24px;
  height: 24px;
}

.icon {
  width: 1.25em;
  height: 1.25em;
  vertical-align: -0.2em;
}
