/* The SEDONA family — arc carousel (desktop) and snap cards (phone).
   Built to the client's reference design: centred heading, robots on an arc where the
   active one is full size and bright, neighbours shrink, dim and soften with distance. */

.fam-sec {
  --amber: #f2a65a;
  --fam-h: 400px;      /* robot height at the centre */
  --fam-floor: 60px;
  --fam-serif: "Instrument Serif", var(--intl-serif), Georgia, serif;
  position: relative;
  overflow: hidden;
  background: var(--night);
  color: var(--cream);
  padding-block: 96px;
  scroll-margin-top: 64px;
}
.fam-bg {
  position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(ellipse 70% 55% at 50% 72%, rgba(194, 24, 91, 0.35), transparent 70%),
    radial-gradient(ellipse 40% 30% at 50% 68%, rgba(242, 166, 90, 0.35), transparent 70%),
    linear-gradient(to bottom, #070a1a, #0e1430 40%, #2a0d1c);
}
.fam-wrap { position: relative; max-width: 1400px; margin-inline: auto; padding-inline: 20px; }

/* Heading */
.fam-head { display: flex; flex-direction: column; align-items: center; gap: 20px; text-align: center; margin-inline: auto; }
.fam-eyebrow {
  display: flex; align-items: center; gap: 12px;
  color: rgba(242, 166, 90, 0.9);
  font-family: var(--f-display); font-size: 0.72rem; font-weight: 500;
  letter-spacing: 0.3em; text-transform: uppercase;
}
html.lang-zh .fam-eyebrow { letter-spacing: 0.22em; }
.fam-eyebrow i { display: block; height: 1px; width: 32px; flex-shrink: 0; background: currentColor; }
.fam-title {
  max-width: 48rem;
  font-family: var(--fam-serif);
  font-size: 2.1rem; line-height: 1.18; font-weight: 500; letter-spacing: 0;
  text-wrap: balance; white-space: pre-line;
  color: var(--cream);
}
.fam-lede { max-width: 42rem; font-size: 1rem; line-height: 1.625; color: rgba(246, 239, 230, 0.7); }

/* ---------- Desktop arc carousel ---------- */
.fam-stage {
  position: relative;
  display: block;
  margin: 40px auto 0;
  height: calc(var(--fam-h) + 160px); max-width: 1200px;
  cursor: grab; touch-action: pan-y; user-select: none; -webkit-user-select: none;
  outline: none;
}
.fam-stage:active { cursor: grabbing; }
.fam-stage:focus-visible { box-shadow: 0 0 0 2px rgba(242, 166, 90, 0.5); border-radius: 24px; }
.fam-ring { position: absolute; bottom: 42px; left: 50%; transform: translateX(-50%); width: 240px; height: 72px; overflow: visible; pointer-events: none; }
.fam-ring .dash { animation: famOrbit 14s linear infinite; }
@keyframes famOrbit { to { stroke-dashoffset: -220; } }
.fam-items { position: absolute; left: 0; right: 0; top: 0; bottom: var(--fam-floor); pointer-events: none; }
.fam-item {
  position: absolute; bottom: 0; left: 50%;
  transform-origin: bottom center;
  border-radius: 24px;
  cursor: pointer;
  pointer-events: auto;
  will-change: transform, opacity;
}
.fam-item:focus-visible { outline: none; box-shadow: 0 0 0 2px rgba(242, 166, 90, 0.7); }
.fam-glow {
  position: absolute; left: -64px; right: -64px; top: 10%; bottom: 10%;
  border-radius: 999px; filter: blur(64px);
  background: radial-gradient(closest-side, rgba(242, 166, 90, 0.55), rgba(232, 90, 79, 0.2) 60%, transparent);
  pointer-events: none;
}
.fam-body { position: relative; }
.fam-body img { display: block; height: var(--fam-h); width: auto; max-width: none; pointer-events: none; user-select: none; -webkit-user-drag: none; }
.fam-item[data-id="p1"] .fam-body img { height: calc(var(--fam-h) / 2); }
.fam-floor {
  position: absolute; left: 50%; bottom: -12px; transform: translateX(-50%);
  height: 24px; width: 110%; border-radius: 50%;
  background: rgba(0, 0, 0, 0.6); filter: blur(12px);
  pointer-events: none; z-index: -1;
}

/* Controls under the stage */
.fam-ctrl { position: relative; display: block; max-width: 48rem; margin: 24px auto 0; }
.fam-row { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.fam-arrow {
  width: 48px; height: 48px; flex-shrink: 0; border-radius: 50%;
  display: grid; place-items: center;
  border: 1px solid rgba(246, 239, 230, 0.2);
  transition: border-color 0.3s, color 0.3s;
}
.fam-arrow:hover { border-color: var(--amber); color: var(--amber); }
.fam-arrow svg { width: 18px; height: 18px; }
.fam-arrow.prev svg { transform: rotate(180deg); }
.fam-info { display: flex; flex-direction: column; align-items: center; text-align: center; min-width: 0; }
.fam-info.swap { animation: famSwap 0.6s var(--ease-out) both; }
@keyframes famSwap { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.fam-code {
  color: rgba(242, 166, 90, 0.9);
  font-family: var(--f-display); font-size: 0.72rem; font-weight: 500; letter-spacing: 0.3em; text-transform: uppercase;
}
html.lang-zh .fam-code { letter-spacing: 0.2em; }
.wordmark { font-family: var(--f-display); font-weight: 500; letter-spacing: 0.28em; text-transform: uppercase; }
.fam-name { margin-top: 12px; font-size: 1.5rem; line-height: 1.25; color: var(--cream); font-weight: 400; }
.fam-line { margin-top: 12px; font-family: var(--fam-serif); font-size: 1.125rem; line-height: 1.5; color: rgba(246, 239, 230, 0.8); }
.fam-more {
  margin-top: 24px;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 10px 24px; border-radius: 999px;
  font-size: 0.75rem; font-weight: 500; letter-spacing: 0.04em;
  border: 1px solid rgba(246, 239, 230, 0.3);
  background: rgba(246, 239, 230, 0.05); color: var(--cream);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  transition: border-color 0.5s var(--ease-out), background 0.5s var(--ease-out);
}
.fam-more:hover { border-color: rgba(246, 239, 230, 0.6); background: rgba(246, 239, 230, 0.12); }
.fam-more svg { width: 16px; height: 16px; transition: transform 0.5s var(--ease-out); }
.fam-more:hover svg { transform: translateX(4px); }
.fam-chips { margin-top: 40px; display: flex; align-items: center; justify-content: center; gap: 8px; }
.fam-chips button {
  border-radius: 999px; padding: 6px 14px;
  font-size: 0.62rem; color: rgba(246, 239, 230, 0.5);
  transition: color 0.5s, background 0.5s;
}
.fam-chips button:hover { color: var(--cream); }
.fam-chips button[aria-current="true"] { background: var(--sunrise); color: #fff; }
.fam-hint { margin-top: 20px; text-align: center; font-size: 0.75rem; letter-spacing: 0.05em; color: rgba(246, 239, 230, 0.4); }

/* ---------- Breakpoints (sm 640, md 768, xl 1280) ---------- */
@media (max-width: 639px) { .fam-eyebrow i { display: none; } }
@media (max-width: 767px) {
  .fam-sec { --fam-h: 270px; --fam-floor: 44px; }
  .fam-stage { margin-top: 28px; height: calc(var(--fam-h) + 96px); }
  .fam-ring { bottom: 28px; width: 180px; height: 54px; }
  .fam-glow { left: -28px; right: -28px; filter: blur(44px); }
  .fam-ctrl { margin-top: 10px; }
  .fam-row { gap: 10px; }
  .fam-arrow { width: 40px; height: 40px; }
  .fam-arrow svg { width: 16px; height: 16px; }
  .fam-name { font-size: 1.1rem; letter-spacing: 0.16em; text-wrap: balance; }
  .fam-line { font-size: 1rem; }
  .fam-more { margin-top: 18px; }
  .fam-chips { margin-top: 26px; gap: 2px; }
  .fam-chips button { padding: 6px 10px; }
  .fam-hint { margin-top: 14px; }
}
@media (min-width: 640px) { .fam-title { font-size: 2.25rem; } }
@media (min-width: 768px) {
  .fam-sec { padding-block: 128px; }
  .fam-wrap { padding-inline: 40px; }
  .fam-title { font-size: 3rem; }
  .fam-lede { font-size: 1.125rem; }
  .fam-name { font-size: 1.875rem; }
}
@media (min-width: 1280px) { .fam-title { font-size: 3.5rem; } }

@media (prefers-reduced-motion: reduce) {
  .fam-info.swap { animation: none; }
}
/* Hebrew: arrows point the reading way; the arc carousel itself keeps its geometry */
html[dir="rtl"] .fam-arrow svg, html[dir="rtl"] .fam-more svg { scale: -1 1; }
html[dir="rtl"] .fam-more:hover svg { transform: translateX(-4px); }
