/* The Harmony family's top bar (13 Nov 2026, Harmony family 2026-11): one lockup on every product page,
   "Harmony" + the product you're in, and a small panel that switches to the other products. Used by the
   planner's landing (index.html, built into /<lang>/) and the invitations sales page; Photos joins later.
   The bar's size is the landing's: 64px tall, 1140px wide, 1.25rem in from the edges. Both pages load
   this file and js/family.js, so the bar is the same pixels on both. */

.fam-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(1140px, 100%);
  height: 64px;
  margin-inline: auto;
  padding-inline: 1.25rem;
}

.fam {
  position: relative;
  display: flex;
  align-items: center;
  min-width: 0;
}

.fam__mark {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-weight: 600;
  font-size: 1.35rem;
  line-height: 1;
  letter-spacing: 0.01em;
  color: #2D2926;
  text-decoration: none;
  white-space: nowrap;
  view-transition-name: fam-mark;
  /* 44px to tap, laid out as its 22px of type (13 Nov 2026, measured on an iPhone 17) */
  padding-block: 11px;
  margin-block: -11px;
}

/* The product you're in: small capitals beside the wordmark, like a house's line under its name. The
   button is the whole tappable strip (44px tall), the hairline before it is drawn inside it. */
.fam__product {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  min-height: 44px;
  margin-left: 0.55rem;
  /* 3px on top: the capitals sit on the wordmark's baseline, not on its middle */
  padding: 3px 0.55rem 0 0.75rem;
  border: 0;
  border-radius: 99px;
  background: none;
  color: #5C5854;
  font: 500 0.72rem/1 "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  white-space: nowrap;
  cursor: pointer;
  position: relative;
  -webkit-tap-highlight-color: transparent;
  view-transition-name: fam-product;
}

.fam__product::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 1px;
  height: 1.05rem;
  margin-top: -0.525rem;
  background: #D9CDBF;
}

.fam__product:hover,
.fam__product[aria-expanded="true"] {
  color: #2D2926;
}

.fam__chev {
  width: 9px;
  height: 6px;
  flex: none;
  transition: transform 0.2s ease;
}

.fam__product[aria-expanded="true"] .fam__chev {
  transform: rotate(180deg);
}

/* The panel: each product as its own object (the app's icon, the invitation's seal), its name, and a
   tick by the one you're in. */
.fam__menu {
  position: absolute;
  top: calc(100% + 0.35rem);
  left: -0.6rem;
  z-index: 120;
  min-width: 15.5rem;
  margin: 0;
  padding: 0.4rem;
  list-style: none;
  background: #FDFBF9;
  border: 1px solid #EAE2D8;
  border-radius: 18px;
  box-shadow: 0 1px 2px rgba(60, 40, 20, 0.06), 0 18px 40px -14px rgba(60, 40, 20, 0.28);
  opacity: 1;
  transform: none;
  transform-origin: 1.5rem 0;
  transition: opacity 0.16s ease, transform 0.2s cubic-bezier(0.2, 0.8, 0.2, 1), display 0.2s allow-discrete;
}

.fam__menu[hidden] {
  display: none;
  opacity: 0;
  transform: translateY(-4px) scale(0.98);
}

@starting-style {
  .fam__menu {
    opacity: 0;
    transform: translateY(-4px) scale(0.98);
  }
}

.fam__item {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.5rem 0.75rem 0.5rem 0.5rem;
  border-radius: 13px;
  color: #2D2926;
  font: 500 1rem/1.2 "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  text-decoration: none;
}

.fam__item:hover,
.fam__item:focus-visible {
  background: #F7F3F0;
}

.fam__item img {
  width: 2.5rem;
  height: 2.5rem;
  flex: none;
  border-radius: 0.6rem;
  box-shadow: 0 0 0 1px rgba(60, 40, 20, 0.08);
}

.fam__item span {
  flex: 1;
}

.fam__item[aria-current]::after {
  content: "";
  width: 12px;
  height: 9px;
  flex: none;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='9' viewBox='0 0 12 9'%3E%3Cpath d='M1 4.6l3.4 3.2L11 1' fill='none' stroke='%239A7B58' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat center;
}

.fam__product:focus-visible,
.fam__mark:focus-visible,
.fam__item:focus-visible {
  outline: 2px solid #9A7B58;
  outline-offset: 2px;
}

/* Between the two pages the wordmark stays where it is and only the product's name changes. */
@view-transition {
  navigation: auto;
}

::view-transition-group(fam-mark),
::view-transition-group(fam-product),
::view-transition-old(root),
::view-transition-new(root) {
  animation-duration: 0.3s;
}

/* "Planner" and "Invitations" differ in width: the two names cross-fade at their own size instead of
   being stretched to the box between them. */
::view-transition-old(fam-product),
::view-transition-new(fam-product) {
  width: auto;
  height: 100%;
}

@media (prefers-reduced-motion: reduce) {
  @view-transition {
    navigation: none;
  }

  .fam__menu,
  .fam__chev {
    transition: none;
  }
}

/* ---------- One ruler for the family (Landing page review 2026-11, step 3.4) ----------
   The landing and /invitations/ measured with two rulers (24 type styles against 17, corners 16/28/999
   against 10/12/20/99, two shadows). These are the invitations page's values, which the landing now uses
   too: eight type sizes, one body size and line height, three corners, one shadow. Breakpoints, which CSS
   variables can't carry: 34rem (a small phone), 52rem (phone to wide screen), and the bar's own 768px. */
:root {
  --fam-ink: #2D2926;
  --fam-ink-soft: #5C5854;
  --fam-muted: #77716C;
  --fam-paper: #FDFBF9;
  --fam-wash: #F7F3F0;
  --fam-hairline: #EAE2D8;
  --fam-gold: #C4A484;
  --fam-focus: #9A7B58;
  --fam-display: "Cormorant Garamond", Georgia, serif;
  --fam-body: "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

  --fam-t-figure: clamp(4.5rem, 19vw, 8.5rem);
  --fam-t-hero: clamp(2.5rem, 7vw, 4.2rem);
  --fam-t-h2: clamp(2rem, 5vw, 2.8rem);
  --fam-t-h3: clamp(1.7rem, 4.4vw, 2.2rem);
  --fam-t-lead: 1.15rem;
  --fam-t-body: 1.0625rem;
  --fam-t-small: 0.92rem;
  --fam-t-micro: 0.72rem;
  --fam-lh: 1.6;

  --fam-r-s: 10px;
  --fam-r-m: 20px;
  --fam-r-pill: 99px;
  --fam-shadow: 0 6px 18px rgba(60, 40, 20, 0.14);
}

/* Read by screen readers, not drawn. */
.vh {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* ---------- The language pill, the bar's right side on both pages (step 3.2) ----------
   On a wide screen the native select with the language's name; on a phone the pill shows the code
   ("EN") and the select lies over it, so a tap still opens the list of names (13 Nov 2026, measured at
   360px: the lockup and "Slovenčina" don't fit side by side). The label is 44px tall, the tap target. */
.lang {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 44px;
}

.lang select {
  -webkit-appearance: none;
  appearance: none;
  font: inherit;
  font-family: var(--fam-body);
  font-size: 0.85rem;
  line-height: 1.2;
  color: var(--fam-ink);
  padding: 0.42rem 1.75rem 0.42rem 0.85rem;
  border: 1px solid var(--fam-hairline);
  border-radius: var(--fam-r-pill);
  cursor: pointer;
  background: var(--fam-paper) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%235C5854' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 0.55rem center / 10px 7px;
}

.lang__code {
  display: none;
}

@media (max-width: 51.99rem) {
  .lang__code {
    display: block;
    font-family: var(--fam-body);
    font-size: 0.85rem;
    line-height: 1.2;
    letter-spacing: 0.04em;
    color: var(--fam-ink);
    padding: 0.42rem 1.75rem 0.42rem 0.85rem;
    border: 1px solid var(--fam-hairline);
    border-radius: var(--fam-r-pill);
    background: rgba(253, 251, 249, 0.8) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%235C5854' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 0.7rem center / 10px 7px;
  }

  .lang select {
    position: absolute;
    inset: 0;
    width: 100%;
    opacity: 0;
  }

  .lang:focus-within .lang__code {
    outline: 2px solid var(--fam-focus);
    outline-offset: 3px;
  }
}

/* ---------- One phone frame (step 3.3) ----------
   A real silver iPhone 17 Pro with the Dynamic Island removed (invitations/hero/iphone-17-pro.webp, from the
   App Store set: 1156 × 2385, screen 50, 43, 1056 × 2299, corner 179), drawn over the screen. Every real
   screen on the family's pages sits in it; the landing's arch is the one exception. The frame's corners
   outside the body are see-through, so the screen clips itself. */
.phone {
  position: relative;
  display: block;
  aspect-ratio: 1156 / 2385;
}

.phone::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: url("/invitations/hero/iphone-17-pro.webp") center / 100% 100% no-repeat;
}

.phone__screen {
  position: absolute;
  left: 4.15%;
  top: 1.72%;
  width: 91.7%;
  height: 96.56%;
  display: block;
  overflow: hidden;
  border-radius: 17% / 7.8%;
  background: var(--fam-paper);
  box-shadow: 0 30px 60px -24px rgba(60, 40, 20, 0.35);
}

.phone__screen > img,
.phone__screen > video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 0;
}
