/* ==========================================================================
   Aimi Camera — shared website styles
   Apple-inspired light editorial system, no external font dependencies.
   ========================================================================== */

:root {
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text",
    "Helvetica Neue", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --font-mono: "SF Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  --bg: #fbfbfd;
  --bg-alt: #f5f5f7;
  --ink: #1d1d1f;
  --ink-2: #424245;
  --muted: #6e6e73;
  --muted-2: #86868b;
  --muted-3: #a1a1a6;

  --line: #d2d2d7;
  --line-soft: #e8e8ed;

  --blue: #0071e3;
  --blue-hover: #0077ed;
  --gradient: linear-gradient(96deg, #0071e3 0%, #5e5ce6 52%, #bf5af2 100%);

  --radius-lg: 32px;
  --radius-md: 22px;
  --pill: 980px;

  --max: 1200px;
  --nav-max: 1320px;
  --gutter: clamp(20px, 4.6vw, 40px);
  --ease: cubic-bezier(0.28, 0.11, 0.32, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

img,
svg {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  cursor: pointer;
}

::selection {
  background: rgba(0, 113, 227, 0.2);
}

:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 3px;
}

[id] {
  scroll-margin-top: 64px;
}

.skip-link {
  position: fixed;
  top: 10px;
  left: 50%;
  z-index: 200;
  padding: 10px 18px;
  border-radius: var(--pill);
  background: var(--ink);
  color: #fff;
  font-size: 13px;
  transform: translate(-50%, -160%);
  transition: transform 0.25s var(--ease);
}

.skip-link:focus {
  transform: translate(-50%, 0);
}

.icon {
  width: 1em;
  height: 1em;
  fill: currentColor;
  vertical-align: -0.125em;
}

.icon-line {
  width: 1em;
  height: 1em;
  fill: none;
  stroke: currentcolor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
  vertical-align: -0.125em;
}

/* --------------------------------------------------------------------------
   Global navigation
   -------------------------------------------------------------------------- */

.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  background: rgba(251, 251, 253, 0.8);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
}

.nav-inner {
  position: relative;
  display: flex;
  width: 100%;
  max-width: var(--nav-max);
  height: 48px;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.nav-brand {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 9px;
  color: var(--ink);
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.025em;
}

.nav-brand img {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.16);
}

.nav-links {
  position: absolute;
  left: 50%;
  display: flex;
  align-items: center;
  gap: 2px;
  transform: translateX(-50%);
}

.nav-links a {
  padding: 8px 13px;
  border-radius: var(--pill);
  color: var(--ink-2);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.01em;
  white-space: nowrap;
  transition: background 0.25s var(--ease), color 0.25s var(--ease);
}

.nav-links a:hover {
  background: rgba(0, 0, 0, 0.045);
  color: var(--ink);
}

.nav-actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 10px;
}

.nav-cta {
  display: inline-flex;
  height: 30px;
  align-items: center;
  padding: 0 14px;
  border-radius: var(--pill);
  background: var(--blue);
  color: #fff;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.01em;
  white-space: nowrap;
  transition: background 0.25s var(--ease);
}

.nav-cta:hover {
  background: var(--blue-hover);
}

.nav-cta--ghost {
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink-2);
}

.nav-cta--ghost:hover {
  border-color: var(--muted-2);
  background: transparent;
  color: var(--ink);
}

.nav-toggle {
  display: none;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 50%;
  color: var(--ink);
}

.nav-toggle:hover {
  background: rgba(0, 0, 0, 0.05);
}

.nav-toggle {
  position: relative;
}

.nav-toggle span {
  position: absolute;
  top: 50%;
  left: 50%;
  display: block;
  width: 17px;
  height: 1.5px;
  border-radius: 999px;
  background: currentcolor;
  transition: transform 0.3s var(--ease);
}

.nav-toggle span:first-child {
  transform: translate(-50%, calc(-50% - 3.5px));
}

.nav-toggle span:last-child {
  transform: translate(-50%, calc(-50% + 3.5px));
}

.nav-toggle.is-open span:first-child {
  transform: translate(-50%, -50%) rotate(45deg);
}

.nav-toggle.is-open span:last-child {
  transform: translate(-50%, -50%) rotate(-45deg);
}

.mobile-menu {
  position: absolute;
  top: 100%;
  right: 0;
  left: 0;
  display: none;
  max-height: calc(100vh - 50px);
  overflow-y: auto;
  border-top: 1px solid var(--line-soft);
  background: #fbfbfd;
  box-shadow: 0 24px 50px rgba(0, 0, 0, 0.08);
}

.mobile-menu.is-open {
  display: block;
  animation: menu-in 0.3s var(--ease) both;
}

.mobile-menu a {
  display: block;
  padding: 15px var(--gutter);
  border-bottom: 1px solid var(--line-soft);
  color: var(--ink);
  font-size: 17px;
  font-weight: 500;
  letter-spacing: -0.01em;
}

.mobile-menu a:last-child {
  border-bottom: 0;
}

.mobile-menu .mobile-menu-cta {
  color: var(--blue);
}

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

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* --------------------------------------------------------------------------
   Shared buttons
   -------------------------------------------------------------------------- */

.btn {
  display: inline-flex;
  height: 48px;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 0 24px;
  border: 1px solid transparent;
  border-radius: var(--pill);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: -0.005em;
  white-space: nowrap;
  transition: background 0.3s var(--ease), border-color 0.3s var(--ease), color 0.3s var(--ease),
    box-shadow 0.3s var(--ease), transform 0.3s var(--ease);
}

.btn .icon,
.btn .icon-line {
  font-size: 18px;
}

.btn--primary {
  background: var(--blue);
  color: #fff;
}

.btn--primary:hover {
  background: var(--blue-hover);
  box-shadow: 0 10px 30px rgba(0, 113, 227, 0.24);
  transform: translateY(-1px);
}

.btn--ghost {
  border-color: var(--line);
  background: #fff;
  color: var(--ink);
}

.btn--ghost:hover {
  border-color: var(--muted-3);
}

.btn--disabled {
  border-color: transparent;
  background: var(--bg-alt);
  color: var(--muted);
  cursor: default;
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */

.site-footer {
  border-top: 1px solid var(--line-soft);
  background: var(--bg-alt);
  color: var(--muted);
  font-size: 12px;
}

.footer-main {
  display: grid;
  width: 100%;
  max-width: var(--max);
  grid-template-columns: 1.5fr repeat(3, 1fr);
  gap: 40px;
  margin: 0 auto;
  padding: 56px var(--gutter) 44px;
}

.footer-brand img {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.14);
}

.footer-brand strong {
  display: block;
  margin-top: 14px;
  color: var(--ink);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.footer-brand p {
  max-width: 260px;
  margin: 7px 0 0;
  color: var(--muted-2);
  font-size: 12px;
  line-height: 1.6;
}

.footer-col h2 {
  margin: 0 0 14px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.footer-col a,
.footer-col span {
  display: block;
  width: fit-content;
  margin: 9px 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.footer-col a:hover {
  color: var(--ink);
  text-decoration: underline;
}

.footer-col .is-coming {
  color: var(--muted-3);
  cursor: default;
}

.footer-bottom {
  display: flex;
  max-width: var(--max);
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 24px;
  margin: 0 auto;
  padding: 20px var(--gutter) 30px;
  border-top: 1px solid var(--line);
  color: var(--muted-2);
  font-size: 11px;
}

.footer-bottom p {
  margin: 0;
}

.footer-bottom a {
  color: var(--muted-2);
}

.footer-bottom a:hover {
  color: var(--ink);
  text-decoration: underline;
}

.footer-legal-links {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
}

/* --------------------------------------------------------------------------
   Legal documents
   -------------------------------------------------------------------------- */

.doc-main {
  width: 100%;
  max-width: 780px;
  margin: 0 auto;
  padding: clamp(54px, 8vw, 96px) var(--gutter) 80px;
}

.doc-eyebrow {
  margin: 0 0 14px;
  color: var(--muted-2);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.doc-main h1 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(38px, 6vw, 64px);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.05;
}

.doc-date {
  margin: 16px 0 42px;
  color: var(--muted-2);
  font-size: 13px;
}

.doc-body {
  color: var(--ink-2);
  font-size: 15px;
  line-height: 1.95;
}

.doc-body p {
  margin: 0 0 15px;
}

.doc-body h2 {
  margin: 42px 0 12px;
  color: var(--ink);
  font-size: 22px;
  font-weight: 650;
  letter-spacing: -0.015em;
  line-height: 1.35;
}

.doc-body a {
  color: var(--blue);
}

.doc-footnote {
  margin-top: 52px;
  padding-top: 26px;
  border-top: 1px solid var(--line);
  color: var(--muted-2);
  font-size: 12px;
}

.doc-footnote a {
  color: var(--blue);
}

/* --------------------------------------------------------------------------
   Reveal animation
   -------------------------------------------------------------------------- */

.js [data-reveal] {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
  transition-delay: var(--delay, 0s);
}

.js [data-reveal].is-visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

/* --------------------------------------------------------------------------
   Responsive shell
   -------------------------------------------------------------------------- */

@media (max-width: 1080px) {
  .nav-links {
    gap: 0;
  }

  .nav-links a {
    padding: 8px 10px;
  }
}

@media (max-width: 860px) {
  .nav-links {
    display: none;
  }

  .nav-toggle {
    display: grid;
  }

  .footer-main {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 32px;
    padding-top: 42px;
  }

  .footer-brand {
    grid-column: 1 / -1;
  }

  .footer-brand p {
    max-width: 360px;
  }
}

@media (max-width: 560px) {
  .nav-inner {
    height: 50px;
    gap: 10px;
  }

  .nav-brand {
    font-size: 17px;
  }

  .nav-brand img {
    width: 26px;
    height: 26px;
    border-radius: 7px;
  }

  .nav-cta {
    height: 28px;
    padding: 0 11px;
    font-size: 11px;
  }

  .btn {
    height: 46px;
    padding: 0 20px;
    font-size: 14px;
  }

  .doc-main {
    padding-top: 48px;
    padding-bottom: 60px;
  }

  .doc-body {
    font-size: 14.5px;
    line-height: 1.9;
  }

  .doc-body h2 {
    margin-top: 34px;
    font-size: 20px;
  }

  .footer-bottom {
    align-items: flex-start;
    flex-direction: column;
    padding-bottom: 24px;
  }

  .footer-main .footer-col:last-child {
    grid-column: 1 / -1;
  }
}
