/* Apple Pro Darkroom Controls — crisp white primary pill, neutral glass secondary, monochrome macOS segmented controls. */

:root {
  --font: "SF Pro Display", "SF Pro Text", -apple-system, BlinkMacSystemFont, "PingFang SC",
          "Hiragino Sans GB", "Helvetica Neue", "Noto Sans SC", system-ui, sans-serif;
}

html { scrollbar-gutter: stable; }

/* Nav wordmark */
.wordmark-text {
  display: block;
  font-family: var(--font);
  font-size: 20px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: -.04em;
  color: var(--ink);
}

/* No-JS fallback */
.noscript-nav {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  padding: 12px var(--page-gutter);
  border-top: 1px solid var(--line);
  background: var(--canvas);
  font-size: var(--caption);
  position: relative;
  z-index: 45;
}
.noscript-nav a { color: var(--muted); }
.noscript-nav a:hover { color: var(--ink); }
@media (min-width: 761px) { .noscript-nav { display: none; } }

/* Final CTA: Apple centered hero close */
.final-cta { text-align: center; }
.final-cta .page-width { max-width: 860px; }
.final-cta .page-width > p,
.final-cta .page-width > .button,
.final-cta .page-width > .platform-note { margin-left: auto; margin-right: auto; }
.final-cta .button { margin-top: 28px; }
.final-cta .cta-requirements { margin-top: 18px; }

/* Platform clarity */
.platform-note {
  margin-top: 12px;
  font-size: 13px;
  line-height: 1.65;
  color: var(--muted);
  max-width: 54ch;
}
.platform-note a { color: var(--accent); text-decoration: none; }
.platform-note a:hover { text-decoration: underline; text-underline-offset: 3px; }

/* Primary Download Pill — Apple pure crisp white pill, dark ink, zero fake gold gradient */
:is(.photo-edition,.system-page) a.button.primary[href*="download"] {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding: 0 26px;
  gap: 10px;
  border: 1px solid rgb(255 255 255 / .92);
  border-radius: 999px;
  background: #f5f5f7;
  color: #000000;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -.01em;
  box-shadow: 0 1px 2px rgb(0 0 0 / .35);
  transition: background-color 180ms ease, transform 180ms var(--ease), box-shadow 220ms ease;
}
:is(.photo-edition,.system-page) a.button.primary[href*="download"]::before,
:is(.photo-edition,.system-page) a.button.primary[href*="download"]::after { display: none; }
:is(.photo-edition,.system-page) a.button.primary[href*="download"]:hover {
  background: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 10px 28px -10px rgb(255 255 255 / .34);
}
:is(.photo-edition,.system-page) a.button.primary[href*="download"]:active {
  transform: scale(.985);
}
:is(.photo-edition,.system-page) a.button.primary[href*="download"] .download-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  margin-left: 2px;
  padding: 0;
  border: 0;
  background: transparent;
}
:is(.photo-edition,.system-page) a.button.primary[href*="download"] .download-arrow {
  width: 18px;
  height: 18px;
  transition: transform 200ms var(--ease);
}
:is(.photo-edition,.system-page) a.button.primary[href*="download"]:hover .download-arrow {
  transform: translateY(2px);
}
:is(.photo-edition,.system-page) a.button.primary[href*="download"]:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

/* Disable goofy jelly squash */
.jelly-btn.is-squish { transform: scale(.985) !important; }
.jelly-btn.is-release { animation: none !important; }

/* Nav compact download pill — Apple top-nav crisp white capsule */
:is(.photo-edition,.system-page) .nav-download {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 0 16px;
  gap: 6px;
  border: 0;
  border-radius: 999px;
  background: #f5f5f7;
  color: #000000;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -.01em;
  box-shadow: none;
  transition: background-color 180ms ease, transform 160ms var(--ease);
}
:is(.photo-edition,.system-page) .nav-download:hover {
  background: #ffffff;
  transform: translateY(-.5px);
}
:is(.photo-edition,.system-page) .mobile-menu-footer a.button.primary[href*="download"] {
  min-height: 44px;
  padding: 0 20px;
  font-size: 14px;
}

/* Secondary actions — translucent neutral frosted glass pill (zero gold border or tide) */
:is(.photo-edition,.system-page) a.button.primary:not([href*="download"]),
:is(.photo-edition,.system-page) .quiet-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding: 0 22px;
  gap: 8px;
  border: 1px solid rgb(255 255 255 / .18);
  border-radius: 999px;
  background: rgb(255 255 255 / .055);
  color: #f5f5f7;
  font-size: 16px;
  font-weight: 500;
  text-decoration: none !important;
  box-shadow: none;
  transition: background-color 180ms ease, border-color 180ms ease, color 180ms ease;
}
:is(.photo-edition,.system-page) a.button.primary:not([href*="download"]):hover,
:is(.photo-edition,.system-page) .quiet-link:hover {
  background: rgb(255 255 255 / .12);
  border-color: rgb(255 255 255 / .32);
  color: #ffffff;
}

/* Remove muddy gold tide overlays */
.tide-full::before,
.tide-soft::before { display: none !important; }
.tide-soft { color: inherit; }
.tide-soft:hover { color: #ffffff; }

@media (max-width: 760px) {
  :is(.photo-edition,.system-page) .quiet-link { min-height: 46px; padding: 0 18px; font-size: 15px; }
  :is(.photo-edition,.system-page) a.button.primary[href*="download"] { min-height: 48px; padding: 0 20px; font-size: 15px; }
}

/* macOS Native Segmented Control (.rubber-segment) — clean dark carbon track + crisp white thumb */
.rubber-segment {
  position: relative;
  display: inline-grid;
  grid-auto-flow: column;
  grid-auto-columns: max-content;
  align-items: center;
  gap: 0;
  padding: 3px;
  border-radius: 12px;
  background: #17171b;
  border: 1px solid rgb(255 255 255 / .08);
  isolation: isolate;
  overflow-x: auto;
  max-width: 100%;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
}
.rubber-segment::-webkit-scrollbar { display: none; }
.rubber-segment.rubber-equal { grid-auto-columns: minmax(0, 1fr); }
.rubber-segment button {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 38px;
  margin: 0;
  padding: 0 15px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: #9e9ea6;
  font: 500 13px/1 var(--font);
  white-space: nowrap;
  cursor: pointer;
  opacity: 1;
  transition: color 160ms ease;
}
.rubber-segment button:hover { color: #f5f5f7; }
.rubber-segment button[aria-pressed="true"],
.rubber-segment button[aria-selected="true"],
.rubber-segment button.rubber-active {
  color: transparent !important;
  background: transparent !important;
}
.rubber-segment button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.rubber-segment .motion-indicator { display: none !important; }
.rubber-segment .rubber-thumb {
  position: absolute;
  left: 3px;
  top: 3px;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: 0;
  border-radius: 9px;
  background: #f5f5f7;
  box-shadow: 0 2px 10px rgb(0 0 0 / .45);
  pointer-events: auto;
  cursor: grab;
  touch-action: none;
  transition:
    left 260ms cubic-bezier(.22,1,.36,1),
    top 260ms cubic-bezier(.22,1,.36,1),
    width 260ms cubic-bezier(.22,1,.36,1),
    height 260ms cubic-bezier(.22,1,.36,1);
}
.rubber-segment[data-dragging] .rubber-thumb { cursor: grabbing; transition: none; }
.rubber-segment .rubber-thumb-label {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0 15px;
  color: #000000;
  font: 600 13px/1 var(--font);
  white-space: nowrap;
  pointer-events: none;
}
.rubber-segment .rubber-thumb-label svg { width: 18px; height: 18px; flex: 0 0 auto; }
@media (max-width: 760px) {
  .rubber-segment button { min-height: 40px; padding: 0 12px; }
  .rubber-segment .rubber-thumb-label { padding: 0 12px; }
}
@media (prefers-reduced-motion: reduce) {
  .rubber-segment .rubber-thumb { transition: none; }
}

.mode-picker.rubber-segment { display: inline-grid; width: max-content; flex-wrap: nowrap; padding: 3px; }
.compare-actions.rubber-segment { display: grid; width: 100%; grid-auto-columns: minmax(0, 1fr); }
.gallery-tabs.rubber-segment { display: inline-grid; width: max-content; max-width: 100%; flex-wrap: nowrap; gap: 0; margin-bottom: 28px; }
.gallery-tabs.rubber-segment .rubber-thumb { pointer-events: none; cursor: default; }

/* Clean Apple text links — optical blue on hover, zero boxy gold frame */
.text-link,
.text-button,
.recipe-link {
  text-decoration: none !important;
  color: var(--accent);
  border-bottom: 0;
  transition: color 180ms ease, opacity 180ms ease;
}
.text-link:hover,
.text-button:hover,
.recipe-link:hover {
  color: var(--accent-light);
  text-decoration: underline !important;
  text-underline-offset: 4px;
}
.jump-link::before { display: none !important; }
.jump-link:hover,
.jump-link:focus-visible { color: var(--accent-light); }

/* Arrows */
.ui-arrow-down { overflow: visible; }
.ui-arrow-up-right { display: block; width: 16px; height: 16px; overflow: visible; }
.ui-arrow-wrap { display: inline-flex; align-items: center; justify-content: center; width: 16px; height: 16px; flex: 0 0 auto; }

/* Balanced 3-column editorial gallery */
@media (min-width: 1101px) {
  .look-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
  }
}

picture { display: contents; }
