/* ==========================================================================
   Hero: expanded-caps name paired with the monogram card
   ========================================================================== */

.hero {
  display: flex;
  flex-direction: column;
  gap: clamp(32px, 4vw, 60px);
  padding: clamp(28px, 4vw, 56px) var(--gutter) clamp(40px, 5vw, 72px);
}

/* Two small-caps taglines with a dot between them */
.hero__top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 32px;
}

.hero__top .eyebrow {
  color: var(--color-ink);
}

.hero__top-dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--color-ink);
}

.hero__main {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(280px, .85fr);
  align-items: end;
  gap: clamp(32px, 5vw, 80px);
}

/* A size container, so the name scales with its own column (cqw units) */
.hero__intro {
  min-width: 0;
  container-type: inline-size;
}

/* Letters are split into .char spans by scripts/features/hero-title.js */
.hero__name {
  margin: 0;
  font-family: var(--font-display);
  font-stretch: var(--stretch-display);
  font-weight: var(--weight-display);
  font-size: clamp(38px, 11vw, 150px);   /* fallback without cqw */
  font-size: clamp(38px, 15cqw, 150px);
  line-height: .98;
  letter-spacing: .02em;
  text-transform: uppercase;
}

.hero__name .mask-line {
  white-space: nowrap;
}

.hero__name .char {
  display: inline-block;
}

/* After the entrance (.is-settled), letters lift as the mouse passes over
   them: quick up, slow settle. */
@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  html:not(.motion-off) .hero__name.is-settled .char {
    transition: transform 700ms var(--ease), color 500ms ease;
  }

  html:not(.motion-off) .hero__name.is-settled .char:hover {
    transform: translateY(-.06em);
    color: var(--color-accent);
    transition-duration: 120ms;
  }
}

/* The brand tagline */
.hero__lede {
  margin: 32px 0 0;
  font-size: var(--text-xl);
  font-weight: 400;
  line-height: 1.32;
  letter-spacing: -.005em;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

/* ==========================================================================
   Interactive business card (scripts/features/business-card.js)
   - Standard business-card proportions (3.5 × 2 in).
   - Front: onyx with bone text (it inverts in the dark theme).
     Back: stone with onyx text.
   - .is-enhanced turns on the 3D flip; without JavaScript both sides stack.
   - --rx / --ry tilt the card toward the mouse; --px / --py move the sheen.
   ========================================================================== */

.bcard {
  --card-radius: 10px;
  position: relative;
  width: 100%;
  max-width: 460px;
  justify-self: end;
  perspective: 1400px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.bcard__inner {
  display: grid;
  gap: 12px;
}

.bcard__face {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  aspect-ratio: 7 / 4;
  padding: clamp(18px, 2vw, 26px);
  border-radius: var(--card-radius);
  box-shadow: 0 1px 0 rgb(var(--ink-rgb) / .06), 0 30px 50px -28px rgba(0, 0, 0, .45);
}

.bcard__face--front {
  background: var(--color-ink);
  color: var(--color-paper);
}

.bcard__face--back {
  background: var(--color-stone);
  color: var(--color-ink);
}

/* ---- Front ---- */
.bcard__logo {
  width: clamp(30px, 3vw, 40px);
}

.bcard__logo--sm {
  width: 24px;
}

.bcard__id {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.bcard__name {
  margin: 0;
  font-family: var(--font-display);
  font-stretch: var(--stretch-display);
  font-weight: var(--weight-display);
  font-size: clamp(16px, 1.6vw, 21px);
  line-height: 1.15;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.bcard__title {
  margin: 0;
  font-size: 9px;
  font-weight: 500;
  letter-spacing: var(--tracking-caps);
  text-transform: uppercase;
  opacity: .75;
}

.bcard__foot {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  padding-top: 12px;
  border-top: 1px solid rgb(var(--paper-rgb) / .2);
}

.bcard__meta {
  margin: 0;
  font-size: 11px;
  line-height: 1.6;
  opacity: .85;
}

.bcard__hint {
  margin: 0;
  font-size: 9px;
  font-weight: 500;
  letter-spacing: .2em;
  text-transform: uppercase;
  opacity: .6;
  white-space: nowrap;
}

.bcard__hint-touch { display: none; }

@media (hover: none) {
  .bcard__hint-mouse { display: none; }
  .bcard__hint-touch { display: inline; }
}

/* ---- Back ---- */
.bcard__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.bcard__status {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-size: 9px;
  font-weight: 500;
  letter-spacing: .2em;
  text-transform: uppercase;
}

.bcard__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #3f8f5a;
  box-shadow: 0 0 0 3px rgb(63 143 90 / .2);
}

.bcard__contacts {
  display: grid;
  gap: 4px;
  margin: 0;
}

.bcard__contacts div {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  align-items: baseline;
  gap: 8px;
}

.bcard__contacts dt {
  font-size: 9px;
  font-weight: 500;
  letter-spacing: .18em;
  text-transform: uppercase;
  opacity: .7;
}

.bcard__contacts dd {
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.bcard__contacts a,
.bcard__cta {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  cursor: pointer;
}

.bcard__cta {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 32px;
  font-size: 9px;
  font-weight: 500;
  letter-spacing: var(--tracking-caps);
  text-transform: uppercase;
  text-underline-offset: 5px;
}

/* ---- Flip button: a small round button on the card's top-right corner ---- */
.bcard__flip {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid rgb(var(--paper-rgb) / .35);
  border-radius: 50%;
  background: transparent;
  color: var(--color-paper);
  cursor: pointer;
  transition: transform 500ms var(--ease), color 300ms ease, border-color 300ms ease, background-color 200ms ease;
}

.bcard.is-flipped .bcard__flip {
  border-color: rgb(var(--ink-rgb) / .35);
  color: var(--color-ink);
  transform: rotate(180deg);
}

@media (hover: hover) and (pointer: fine) {
  .bcard__flip:hover { background: rgb(var(--paper-rgb) / .12); }
  .bcard.is-flipped .bcard__flip:hover { background: rgb(var(--ink-rgb) / .08); }
}

/* the back's own logo sits clear of the flip button */
.bcard__face--back .bcard__row { padding-right: 44px; }

/* ---- Sheen: soft light that follows the pointer ---- */
.bcard__sheen {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(260px circle at var(--px, 30%) var(--py, 20%), rgb(255 255 255 / .16), transparent 65%),
    linear-gradient(115deg, transparent 35%, rgb(255 255 255 / .05) 50%, transparent 65%);
  opacity: .5;
  transition: opacity 300ms ease;
}

.bcard.is-hovered .bcard__sheen {
  opacity: 1;
}

/* ==========================================================================
   Enhanced: a real two-sided card that flips
   ========================================================================== */

.bcard.is-enhanced .bcard__inner {
  position: relative;
  display: block;
  aspect-ratio: 7 / 4;
  transform-style: preserve-3d;
  z-index: 0;   /* own stacking layer, so the flip button stays on top */
  transform: rotateX(var(--rx, 0deg)) rotateY(calc(var(--ry, 0deg) + var(--flip, 0deg)));
  /* one smooth curve for both the pointer tilt and the flip */
  transition: transform 800ms var(--ease);
}

.bcard.is-flipped {
  --flip: 180deg;
}

.bcard.is-enhanced .bcard__face {
  position: absolute;
  inset: 0;
  /* the face takes the card's size; aspect-ratio here made iOS Safari shrink
     each face and push the front left and the back right */
  width: 100%;
  height: 100%;
  aspect-ratio: auto;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  /* also swap visibility halfway through, in case 3D is flattened */
  transition: visibility 0s linear 450ms;
}

.bcard.is-enhanced .bcard__face--back {
  transform: rotateY(180deg);
}

.bcard.is-enhanced:not(.is-flipped) .bcard__face--back,
.bcard.is-enhanced.is-flipped .bcard__face--front {
  visibility: hidden;
}

/* Paused / reduced motion: flip instantly, no tilt */
html.motion-off .bcard__inner {
  transform: rotateY(var(--flip, 0deg)) !important;
}

@media (prefers-reduced-motion: reduce) {
  .bcard.is-enhanced .bcard__inner { transform: rotateY(var(--flip, 0deg)); }
}

/* ---- Facts row ---- */
.hero__bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 28px 32px;
  padding-top: 28px;
  border-top: 1px solid var(--color-line);
}

.hero__facts {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 24px 36px;
  width: 100%;
  margin: 0;
}

.fact {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.fact__value {
  margin: 0;
  font-size: var(--text-base);
  font-weight: 400;
}

@media (max-width: 700px) {
  .hero__main { grid-template-columns: 1fr; gap: 32px; }
  .hero__top-dot { display: none; }
  .hero__top .eyebrow { font-size: 9px; letter-spacing: .22em; }

  .bcard { justify-self: stretch; max-width: none; }
  .bcard__contacts dd { font-size: 12px; }

  .hero__facts { gap: 20px 24px; }
  .hero__actions { width: 100%; }
  .hero__actions .btn { flex: 1 1 auto; justify-content: center; }
}
