/* ==========================================================================
   VisaTribe app, coming soon. World: the luggage tag.
   Ground: tag orange. Paper: cool-white thermal stock. Ink: warm black.
   ========================================================================== */

@font-face {
  font-family: "Barlow Condensed";
  src: url("/fonts/barlow-condensed-700.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Barlow Condensed";
  src: url("/fonts/barlow-condensed-800.woff2") format("woff2");
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Barlow";
  src: url("/fonts/barlow-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Barlow";
  src: url("/fonts/barlow-500.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Barlow";
  src: url("/fonts/barlow-600.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

:root {
  --orange: #ff5a1f;
  --ink: #14110f;
  --ink-soft: #4a443d;
  --ink-on-orange: #1d0b04;
  --stock: #f4f5f1;
  --stock-edge: #d6d9cf;
  --rule: rgba(20, 17, 15, 0.82);

  --font-display: "Barlow Condensed", "Arial Narrow", "Helvetica Neue", sans-serif;
  --font-body: "Barlow", "Helvetica Neue", Arial, sans-serif;

  --gutter: clamp(1rem, 6vw, 6.5rem);
  --measure: 1320px;
  --radius-paper: 18px;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

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

html {
  background: var(--orange);
  color-scheme: light;
  scrollbar-color: var(--ink) var(--orange);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--orange);
  color: var(--ink-on-orange);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  caret-color: var(--ink);
}

::selection {
  background: var(--ink);
  color: var(--orange);
}

img,
svg {
  display: block;
  max-width: 100%;
}

h1,
h2,
h3,
p,
dl,
dd,
dt {
  margin: 0;
}

a {
  color: inherit;
  text-decoration-thickness: 0.12em;
  text-underline-offset: 0.22em;
}

a:hover {
  text-decoration-thickness: 0.2em;
}

:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 3px;
  border-radius: 3px;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 10;
  padding: 0.7rem 1.1rem;
  background: var(--ink);
  color: var(--stock);
  font-weight: 600;
  border-radius: 8px;
  text-decoration: none;
}
.skip-link:focus {
  top: 1rem;
}

.icon {
  width: 1.25em;
  height: 1.25em;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ==========================================================================
   Stage and tag
   ========================================================================== */

.stage {
  display: grid;
  place-items: center;
  min-height: 100vh;
  min-height: 100svh;
  padding: clamp(1.75rem, 5vw, 4rem) var(--gutter);
}

.tag {
  --stub: clamp(15.5rem, 24vw, 22rem);
  --head: 3.5rem;
  --hole-x: 3.75rem;
  position: relative;
  width: min(var(--measure), 100%);
  filter: drop-shadow(0 28px 36px rgba(60, 14, 0, 0.34))
    drop-shadow(0 6px 10px rgba(60, 14, 0, 0.28));
  transform-origin: 3.75rem 50%;
}

.is-ready .tag {
  animation: lay-down 1.1s var(--ease-out) both;
}

@keyframes lay-down {
  from {
    transform: translateY(-22px) rotate(-1.8deg) scale(1.012);
    filter: drop-shadow(0 56px 56px rgba(60, 14, 0, 0.26))
      drop-shadow(0 14px 16px rgba(60, 14, 0, 0.22));
  }
  to {
    transform: none;
    filter: drop-shadow(0 28px 36px rgba(60, 14, 0, 0.34))
      drop-shadow(0 6px 10px rgba(60, 14, 0, 0.28));
  }
}

.tag__strap {
  position: absolute;
  left: calc(var(--hole-x) - 7.5rem);
  top: 50%;
  width: 9.5rem;
  height: 1.75rem;
  translate: 0 -50%;
  z-index: 1;
  pointer-events: none;
}
.tag__strap rect {
  fill: none;
  stroke: var(--ink);
  stroke-width: 8;
}

.tag__paper {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1fr) var(--stub);
  grid-template-rows: var(--head) auto;
  background: var(--stock);
  color: var(--ink);
  border-radius: var(--radius-paper);
  overflow: hidden;
  /* die-cut: the eyelet hole and the two claim-stub notches */
  -webkit-mask-image: radial-gradient(circle 14px at var(--hole-x) 50%, #0000 13.5px, #000 14px),
    radial-gradient(circle 12px at calc(100% - var(--stub)) 0, #0000 11.5px, #000 12px),
    radial-gradient(circle 12px at calc(100% - var(--stub)) 100%, #0000 11.5px, #000 12px);
  -webkit-mask-composite: source-in;
  mask-image: radial-gradient(circle 14px at var(--hole-x) 50%, #0000 13.5px, #000 14px),
    radial-gradient(circle 12px at calc(100% - var(--stub)) 0, #0000 11.5px, #000 12px),
    radial-gradient(circle 12px at calc(100% - var(--stub)) 100%, #0000 11.5px, #000 12px);
  mask-composite: intersect;
}

/* reinforcement ring around the eyelet */
.tag__ring {
  position: absolute;
  left: calc(var(--hole-x) - 1.4rem);
  top: 50%;
  z-index: 3;
  width: 2.8rem;
  height: 2.8rem;
  translate: 0 -50%;
  border-radius: 50%;
  border: 0.5rem solid var(--stock-edge);
  pointer-events: none;
}

.tag__head {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0 1.75rem 0 calc(var(--hole-x) + 3.2rem);
  background: var(--ink);
  color: var(--stock);
}

.tag__head {
  position: relative;
}
.tag__head::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: calc(100% - var(--stub));
  border-left: 2px dashed rgba(244, 245, 241, 0.32);
  pointer-events: none;
}

.wordmark {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.75rem;
  line-height: 1;
  letter-spacing: 0.01em;
  text-transform: uppercase;
}

.tag__badge {
  font-weight: 600;
  font-size: 0.8125rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  white-space: nowrap;
}

.tag__body {
  display: grid;
  grid-template-columns: minmax(0, 0.78fr) minmax(0, 1.22fr);
  column-gap: clamp(1.5rem, 3vw, 3rem);
  row-gap: clamp(1.75rem, 3vw, 2.5rem);
  align-content: start;
  padding: clamp(1.75rem, 3vw, 2.75rem) clamp(1.5rem, 3vw, 2.75rem)
    clamp(1.75rem, 3vw, 2.5rem) calc(var(--hole-x) + 2.9rem);
}

.tag__route {
  align-self: center;
}

.tag__route svg {
  width: 100%;
  height: auto;
  fill: var(--ink);
}

.tag__lede {
  align-self: center;
  display: grid;
  gap: 1.1rem;
}

h1 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2.05rem, 3.4vw, 3.1rem);
  line-height: 1;
  letter-spacing: -0.005em;
  text-wrap: balance;
}

.tag__lede p {
  max-width: 34ch;
  font-size: 1.1875rem;
  color: var(--ink-soft);
  text-wrap: pretty;
}

/* printed data fields */
.tag__fields {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  column-gap: clamp(1rem, 2vw, 1.75rem);
}

.field {
  display: grid;
  align-content: start;
  gap: 0.3rem;
  padding: 0.7rem 0 1rem;
  border-top: 2px solid var(--ink);
}

.field--wide {
  grid-column: span 2;
}

.field dt {
  font-weight: 600;
  font-size: 0.75rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.field dd {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.3rem, 1.9vw, 1.65rem);
  line-height: 1.08;
  letter-spacing: 0.005em;
  text-wrap: balance;
}

.field--routes dd {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.7rem;
}
.slots {
  display: inline-flex;
  gap: 0.35rem;
}
.slot {
  width: 2.1rem;
  height: 1.3rem;
  border: 2px dashed var(--ink);
  border-radius: 6px;
}

/* claim stub */
.tag__stub {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
  padding: clamp(1.5rem, 2.4vw, 2.25rem) clamp(1.25rem, 2vw, 1.9rem) clamp(1.25rem, 2vw, 1.75rem);
  border-left: 2px dashed rgba(20, 17, 15, 0.5);
}

.stub__title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.9rem, 2.7vw, 2.4rem);
  line-height: 1;
  text-wrap: balance;
}

.btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 1rem 1rem;
  background: var(--ink);
  color: var(--stock);
  border-radius: 12px;
  font-weight: 600;
  font-size: 1.0625rem;
  line-height: 1.2;
  text-decoration: none;
  transition: background-color 0.18s var(--ease-out), color 0.18s var(--ease-out),
    transform 0.18s var(--ease-out);
}
.btn:hover {
  background: var(--orange);
  color: var(--ink);
  transform: translateY(-2px);
}
.btn:active {
  transform: translateY(0);
}
.btn .icon {
  width: 1.35em;
  height: 1.35em;
}
.btn__label {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
}

.stub__alt {
  font-size: 0.97rem;
  color: var(--ink-soft);
}
.stub__alt a {
  color: var(--ink);
  font-weight: 600;
}
.stub__alt .icon {
  display: inline-block;
  width: 0.95em;
  height: 0.95em;
  vertical-align: -0.1em;
  margin-left: 0.15rem;
}

.stub__field {
  display: grid;
  gap: 0.3rem;
  margin-top: auto;
  padding-top: 0.7rem;
  border-top: 2px solid var(--ink);
}
.stub__field dt {
  font-weight: 600;
  font-size: 0.75rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.stub__field dd {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.65rem;
  line-height: 1.05;
}

.btn--lede {
  display: none;
}

.stub__barcode {
  width: 100%;
  max-width: 22rem;
  display: grid;
  gap: 0.4rem;
}
.stub__barcode svg {
  width: 100%;
  height: 3.6rem;
  fill: var(--ink);
}
.stub__code {
  font-weight: 500;
  font-size: 0.72rem;
  letter-spacing: 0.34em;
  text-align: center;
  color: var(--ink-soft);
}

/* ==========================================================================
   Good to know
   ========================================================================== */

.notes {
  width: min(var(--measure), calc(100% - 2 * var(--gutter)));
  margin: 0 auto;
  padding: clamp(3rem, 7vw, 6rem) 0 clamp(3.5rem, 8vw, 7rem);
  display: grid;
  gap: clamp(2rem, 4vw, 3.5rem);
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 2fr);
}

.notes h2 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2.5rem, 5vw, 4.5rem);
  line-height: 0.95;
  text-wrap: balance;
}

.qa {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: clamp(1.5rem, 3vw, 3rem);
}

.qa__item {
  padding: 1.1rem 0 1.9rem;
  border-top: 2px solid var(--rule);
}

.qa__item h3 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.55rem;
  line-height: 1.08;
  margin-bottom: 0.55rem;
  text-wrap: balance;
}

.qa__item p {
  max-width: 44ch;
  text-wrap: pretty;
}

/* ==========================================================================
   Footer
   ========================================================================== */

.site-footer {
  background: var(--ink);
  color: #e9e7e1;
  padding: clamp(2.5rem, 5vw, 4rem) var(--gutter) 1.75rem;
}

.site-footer__grid {
  width: min(var(--measure), 100%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(1.75rem, 4vw, 3.5rem);
}

.site-footer .wordmark {
  color: var(--stock);
  font-size: 2rem;
  margin-bottom: 0.9rem;
}

.site-footer p,
.site-footer li {
  font-size: 0.97rem;
  color: #cfccc4;
}

.site-footer h2 {
  font-weight: 600;
  font-size: 0.75rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #a8a49b;
  margin-bottom: 0.85rem;
}

.site-footer ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.5rem;
}

.site-footer a {
  color: #f4f5f1;
}

.site-footer :focus-visible {
  outline-color: var(--orange);
}

.social {
  display: flex;
  gap: 0.6rem;
  margin-top: 1.1rem;
}
.social a {
  display: grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  border: 1.5px solid #5a554d;
  border-radius: 50%;
  transition: background-color 0.18s var(--ease-out), border-color 0.18s var(--ease-out),
    color 0.18s var(--ease-out);
}
.social a:hover {
  background: var(--orange);
  border-color: var(--orange);
  color: var(--ink);
}

.site-footer__legal {
  width: min(var(--measure), 100%);
  margin: clamp(1.75rem, 4vw, 3rem) auto 0;
  padding-top: 1.25rem;
  border-top: 1px solid #3a3631;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.6rem 2rem;
  font-size: 0.875rem;
  color: #a8a49b;
}

.tnum {
  font-variant-numeric: tabular-nums;
}

/* ==========================================================================
   Narrow screens: the tag stands upright, the stub drops to the bottom
   ========================================================================== */

@media (max-width: 820px) {
  .stage {
    padding-top: 5.25rem;
    padding-inline: 1rem;
  }

  .tag {
    --head: 3.25rem;
    --stub-h: 19.5rem;
    --hole-x: 50%;
    --hole-y: 2.3rem;
    transform-origin: 50% var(--hole-y);
  }

  .tag__strap {
    left: 50%;
    top: -1.55rem;
    width: 8.5rem;
    height: 1.75rem;
    translate: -50% -50%;
    rotate: 90deg;
  }

  .tag__paper {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: 6.25rem auto auto;
    -webkit-mask-image: radial-gradient(circle 14px at 50% var(--hole-y), #0000 13.5px, #000 14px),
      radial-gradient(circle 12px at 0 calc(100% - var(--stub-h)), #0000 11.5px, #000 12px),
      radial-gradient(circle 12px at 100% calc(100% - var(--stub-h)), #0000 11.5px, #000 12px);
    mask-image: radial-gradient(circle 14px at 50% var(--hole-y), #0000 13.5px, #000 14px),
      radial-gradient(circle 12px at 0 calc(100% - var(--stub-h)), #0000 11.5px, #000 12px),
      radial-gradient(circle 12px at 100% calc(100% - var(--stub-h)), #0000 11.5px, #000 12px);
  }

  .tag__ring {
    left: 50%;
    top: var(--hole-y);
    translate: -50% -50%;
  }

  .tag__head {
    grid-row: 1;
    align-items: flex-end;
    padding: 0 1.4rem 0.8rem;
  }
  .tag__head .wordmark {
    font-size: 1.6rem;
  }
  .tag__head::after {
    display: none;
  }

  .tag__body {
    grid-row: 2;
    padding: 1.75rem 1.4rem 1.5rem;
  }

  .btn--lede {
    display: flex;
    margin-top: 0.4rem;
  }

  .tag__stub {
    grid-row: 3;
    border-left: 0;
    border-top: 2px dashed rgba(20, 17, 15, 0.5);
    padding: 1.6rem 1.4rem 1.4rem;
  }

  .notes {
    grid-template-columns: minmax(0, 1fr);
    width: calc(100% - 2.8rem);
  }
  .qa {
    grid-template-columns: minmax(0, 1fr);
  }
  .site-footer__grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 600px) {
  .tag__body {
    grid-template-columns: minmax(0, 1fr);
    row-gap: 1.5rem;
  }
  .tag__route {
    max-width: 12.5rem;
  }
  .tag__lede p {
    font-size: 1.0625rem;
  }
  .tag__fields {
    grid-template-columns: minmax(0, 1fr);
  }
  .field--wide {
    grid-column: auto;
  }
  .field {
    padding-bottom: 0.85rem;
  }
  .tag__badge {
    letter-spacing: 0.1em;
    font-size: 0.72rem;
  }
}

@media (max-width: 380px) {
  .tag__route {
    max-width: 9.5rem;
  }
  h1 {
    font-size: 1.95rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .is-ready .tag {
    animation: none;
  }
  .btn,
  .social a {
    transition: none;
  }
  .btn:hover {
    transform: none;
  }
}
