/* ==========================================================================
   Components
   Reusable building blocks shared by more than one section.
   Section-specific styles live in styles/sections/.
   ========================================================================== */

/* ---- Monogram: the RV mark. Inherits the text color.
        <svg class="monogram"><use href="#rv"/></svg> ---- */
.monogram {
  display: block;
  flex: none;
  aspect-ratio: 120 / 150;
  width: 28px;
  height: auto;
}

/* ---- Logo lockup: monogram + "ROGELYN VICTOR" (+ optional sub line) ---- */
.logo {
  display: flex;
  align-items: center;
  gap: 14px;
  color: inherit;
  text-decoration: none;
}

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

.wordmark {
  font-family: var(--font-display);
  font-stretch: var(--stretch-display);
  font-weight: var(--weight-display);
  font-size: 14px;
  line-height: 1;
  letter-spacing: .16em;
  text-transform: uppercase;
  white-space: nowrap;
}

.wordmark-sub {
  font-size: 8px;
  font-weight: 400;
  line-height: 1;
  letter-spacing: .62em;
  text-transform: uppercase;
}

/* ---- Eyebrow: small uppercase kicker above headings ---- */
.eyebrow {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: var(--tracking-caps);
  text-transform: uppercase;
  color: var(--color-muted);
}

/* Use on onyx backgrounds */
.eyebrow--on-dark {
  color: var(--color-subtle);
}

/* ---- Label: tiny uppercase caption ---- */
.label {
  font-size: 9px;
  font-weight: 500;
  letter-spacing: var(--tracking-caps);
  text-transform: uppercase;
  color: var(--color-muted);
}

/* ---- Section heading block (eyebrow + title) ---- */
.section-heading {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Display headings: Archivo Expanded caps, tracked */
.section-title {
  margin: 0;
  font-family: var(--font-display);
  font-stretch: var(--stretch-display);
  font-weight: var(--weight-display);
  font-size: var(--heading-lg);
  line-height: 1.06;
  letter-spacing: var(--tracking-display);
  text-wrap: balance;
  text-transform: uppercase;
}

/* ---- Mask line: clips its content so text can slide up into view ---- */
.mask-line {
  display: block;
  overflow: hidden;
  padding: .06em 0 .1em;
  margin: -.06em 0 -.1em;
}

/* ---- Buttons (pill-shaped links) ---- */
.btn {
  box-sizing: border-box;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 52px;
  padding: 0 30px;
  border: 1px solid transparent;
  border-radius: var(--radius-pill);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: var(--tracking-caps);
  text-transform: uppercase;
  text-decoration: none;
  text-align: center;
  -webkit-tap-highlight-color: transparent;
  transition: transform 140ms var(--ease), background-color 160ms ease, border-color 160ms ease, color 160ms ease;
}

.btn--solid {
  color: var(--color-paper);
  background: var(--color-ink);
  border-color: var(--color-ink);
}

.btn--outline {
  color: var(--color-ink);
  border-color: var(--color-ink);
}

.btn--sm {
  min-height: 44px;
  padding: 0 22px;
}

@media (hover: hover) and (pointer: fine) {
  .btn:hover {
    color: var(--color-ink);
    background: var(--color-stone);
    border-color: var(--color-stone);
  }
}

.btn:active { transform: scale(.97); }

/* Magnetic buttons move with `translate`, which stays separate from the
   press `transform` above (scripts/features/magnetic.js). */
[data-magnetic] {
  transition: translate 200ms var(--ease), transform 140ms var(--ease), background-color 160ms ease, border-color 160ms ease, color 160ms ease;
}

/* ---- Text nav links with animated underline ---- */
.nav-link {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 44px;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: var(--tracking-caps);
  text-transform: uppercase;
  text-decoration: none;
}

.nav-link--on-dark {
  color: var(--color-on-dark);
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  right: var(--tracking-caps);   /* trailing letter-spacing is not underlined */
  bottom: 10px;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 180ms var(--ease);
}

@media (hover: hover) and (pointer: fine) {
  .nav-link:hover::after { transform: scaleX(1); transform-origin: left; }
}
.nav-link:focus-visible::after { transform: scaleX(1); }

/* The section currently on screen (scripts/features/scrollspy.js) */
.nav-link.is-current::after { transform: scaleX(1); transform-origin: left; }

.nav-link:active { color: var(--color-muted); }
.nav-link--on-dark:active { color: var(--color-on-band); }

/* ---- Contact options: three bordered cards (book, message, email).
        A card inverts on hover. Default colors suit paper backgrounds;
        add .contact-options--on-band on dark bands (the footer). ---- */
.contact-options {
  --opt-fg: var(--color-ink);
  --opt-bg: var(--color-paper);

  display: grid;
  /* four options: 2 × 2 beside a heading, one row of four across the footer,
     one column on phones */
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(10px, 1.2vw, 16px);
}

@media (min-width: 1000px) {
  .contact-options--on-band { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* Phones: still 2 × 2, with tighter cards so four fit comfortably */
@media (max-width: 560px) {
  /* (.contact-options prefix: these must beat the base card rules below) */
  .contact-options { gap: 10px; }
  .contact-options .contact-option { min-height: 150px; padding: 16px 14px; gap: 8px; }
  .contact-options .contact-option__title { margin-top: 22px; padding-right: 0; font-size: 14px; letter-spacing: .04em; }
  .contact-options .contact-option__text { font-size: 13px; line-height: 1.4; }
  .contact-options .contact-option__arrow { top: 12px; right: 12px; width: 30px; height: 30px; font-size: 13px; }
}

.contact-options--on-band {
  --opt-fg: var(--color-on-band);
  --opt-bg: var(--color-band);
}

.contact-option {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
  height: 100%;
  min-height: 168px;
  padding: clamp(18px, 2vw, 26px);
  border: 1.5px solid var(--opt-fg);
  border-radius: var(--radius-box);
  background: transparent;
  color: var(--opt-fg);
  text-decoration: none;
  transition: background-color 300ms ease, color 300ms ease, transform 400ms var(--ease);
}

.contact-option__num {
  font-family: var(--font-display);
  font-stretch: var(--stretch-display);
  font-weight: var(--weight-display);
  font-size: var(--text-num);
  letter-spacing: .1em;
  opacity: .6;
}

/* Content is stacked from the top so every card's title starts on the same
   line; the right padding keeps long titles clear of the arrow badge. */
.contact-option__title {
  margin-top: 28px;
  padding-right: 44px;
  font-family: var(--font-display);
  font-stretch: var(--stretch-display);
  font-weight: var(--weight-display);
  font-size: var(--text-lg);
  line-height: 1.2;
  letter-spacing: var(--tracking-display);
  text-transform: uppercase;
}

.contact-option__text {
  font-size: var(--text-sm);
  font-weight: 400;
  overflow-wrap: anywhere;
}

.contact-option__arrow {
  position: absolute;
  top: clamp(14px, 1.6vw, 22px);
  right: clamp(14px, 1.6vw, 22px);
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 1px solid currentColor;
  border-radius: 50%;
  font-size: 15px;
  transition: transform 400ms var(--ease);
}

@media (hover: hover) and (pointer: fine) {
  .contact-option:hover {
    background: var(--opt-fg);
    color: var(--opt-bg);
  }
}

@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  html:not(.motion-off):not(.is-keyboard) .contact-option:hover { transform: translateY(-5px); }
  html:not(.motion-off):not(.is-keyboard) .contact-option:hover .contact-option__arrow { transform: rotate(45deg); }
}

.contact-option:active {
  background: var(--opt-fg);
  color: var(--opt-bg);
}

/* ---- Cookie consent bar (scripts/features/consent.js) ----
        A small onyx card at the bottom right; full width on phones. It sits
        above the "Pause motion" pill until a choice is made. */
.consent {
  position: fixed;
  right: max(16px, env(safe-area-inset-right));
  bottom: max(16px, env(safe-area-inset-bottom));
  z-index: 90;
  display: flex;
  flex-direction: column;
  gap: 14px;
  width: min(400px, calc(100vw - 32px));
  padding: 18px 20px;
  border-radius: var(--radius-box);
  border: 1px solid rgb(255 255 255 / .14);   /* still visible over the dark footer */
  background: var(--color-band);
  color: var(--color-on-band);
  box-shadow: 0 10px 40px rgba(0, 0, 0, .22);
  animation: consent-in 500ms var(--ease) both;
}

.consent[hidden] { display: none; }

.consent__text {
  margin: 0;
  font-size: var(--text-sm);
  line-height: 1.5;
}

.consent__text a {
  color: inherit;
  text-underline-offset: 3px;
}

.consent__actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.consent__btn {
  min-height: 40px;
  padding: 0 18px;
  border: 1px solid currentColor;
  border-radius: var(--radius-pill);
  background: transparent;
  color: inherit;
  font: 500 10px var(--font-body);
  letter-spacing: var(--tracking-caps);
  text-transform: uppercase;
  cursor: pointer;
  transition: background-color 160ms ease, color 160ms ease;
}

.consent__btn--solid {
  background: var(--color-on-band);
  border-color: var(--color-on-band);
  color: var(--color-band);
}

@media (hover: hover) and (pointer: fine) {
  .consent__btn:hover { background: var(--color-stone); border-color: var(--color-stone); color: var(--color-ink); }
}

@media (max-width: 560px) {
  .consent { left: max(16px, env(safe-area-inset-left)); width: auto; }
  .consent__btn { flex: 1; }
}

@keyframes consent-in {
  from { opacity: 0; transform: translateY(12px); }
}

html.motion-off .consent { animation: none; }

@media (prefers-reduced-motion: reduce) {
  .consent { animation: none; }
}
