/* Shared styles for Orif landing + blog pages. */

:root {
    --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, "Liberation Mono", monospace;
  }
  /* Dark theme (default) */
  :root, :root.dark {
    --bg: #1a1a1a;
    --fg: #e5e5e5;
    --muted: #a3a3a3;
    --faint: #525252;
    --line: #2a2a2a;
    --silver-matte: #9a9a9a;
    --silver-mid:   #e8e8e8;
    --silver-peak:  #ffffff;
    --silver-dim-matte: #6a6a6a;
    --silver-dim-mid:   #b0b0b0;
    --silver-dim-peak:  #d8d8d8;
    --hero-glow: rgba(255, 255, 255, 0.18);
    --logo-filter: brightness(0) invert(1);
  }
  /* Light theme */
  :root.light {
    --bg: #fafaf7;
    --fg: #1a1915;
    --muted: #555148;
    --faint: #a39e92;
    --line: #e9e6df;
    --silver-matte: #6a6a6a;
    --silver-mid:   #2a2a2a;
    --silver-peak:  #0a0a0a;
    --silver-dim-matte: #9a9a9a;
    --silver-dim-mid:   #555148;
    --silver-dim-peak:  #2a2a2a;
    --hero-glow: rgba(0, 0, 0, 0.06);
    --logo-filter: brightness(0);
  }
  * { box-sizing: border-box; margin: 0; padding: 0; }
  html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
  body {
    background: var(--bg);
    color: var(--fg);
    font-family: var(--mono);
    font-size: 14px;
    line-height: 1.6;
    font-weight: 400;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
  }
  /* Sticky footer pattern: main grows to fill, footer parks at bottom */
  main { flex: 1 0 auto; }
  footer { flex-shrink: 0; }
  a { color: inherit; text-decoration: none; }
  ::selection { background: var(--fg); color: var(--bg); }
  :focus-visible {
    outline: 1px solid var(--fg);
    outline-offset: 4px;
    border-radius: 2px;
  }

  .wrap {
    max-width: 760px;
    margin: 0 auto;
    padding: 0 28px;
  }

  /* Nav */
  header { padding: 32px 0; }
  .nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
  }
  .brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--fg);
    font-weight: 500;
    letter-spacing: -0.01em;
  }
  /* Brand wordmark: inline SVG (icon + ORIF together), color inherits from .brand */
  .brand-wordmark {
    height: 26px;
    width: auto;
    display: block;
    color: var(--fg);
  }
.nav .links {
    display: flex;
    align-items: center;
    gap: 24px;
  }
  .nav .links a {
    color: var(--muted);
    transition: color .15s ease;
  }
  .nav .links a:hover { color: var(--fg); }

  /* Reserve width for translatable links so the nav doesn't reflow on language switch.
     Monospace + ch units = pixel-perfect across en/ru/uz. */
  .nav .links a[data-i18n="nav.contact"] {
    display: inline-block;
    min-width: 8ch;        /* fits "контакты" (8 chars), the widest variant */
    text-align: center;
  }


  /* Theme toggle */
  .theme-toggle {
    width: 28px;
    height: 28px;
    background: transparent;
    border: 0;
    padding: 0;
    cursor: pointer;
    color: var(--muted);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: color .15s ease;
  }
  .theme-toggle:hover { color: var(--fg); }
  .theme-toggle:focus-visible {
    outline: 1px solid var(--fg);
    outline-offset: 4px;
    border-radius: 4px;
    color: var(--fg);
  }
  .theme-toggle svg { width: 16px; height: 16px; fill: currentColor; }
  .theme-toggle .icon-sun { display: none; }
  .theme-toggle .icon-moon { display: block; }
  :root.light .theme-toggle .icon-sun { display: block; }
  :root.light .theme-toggle .icon-moon { display: none; }

  .nav .lang {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--faint);
  }
  .nav .lang button {
    background: none;
    border: 0;
    padding: 0;
    margin: 0;
    font: inherit;
    cursor: pointer;
    color: var(--faint);
    transition: color .15s ease;
  }
  .nav .lang button.active { color: var(--muted); }
  .nav .lang button:hover { color: var(--fg); }
  .nav .lang button:focus-visible {
    outline: 1px solid var(--fg);
    outline-offset: 3px;
    border-radius: 2px;
  }
  .nav .lang .sep { color: var(--faint); user-select: none; }

  @media (max-width: 480px) {
    /* Mobile: keep all controls visible by tightening sizes/gaps */
    .brand-wordmark { height: 22px; }     /* was 26px */
    .nav .links { gap: 10px; }            /* was 14px */
    .nav .lang { gap: 3px; }              /* was 4px */
    /* Drop the contact slot reservation — mobile prioritizes fit over width-stability on language change */
    .nav .links a[data-i18n="nav.contact"] { min-width: 0; }
  }
  @media (max-width: 380px) {
    /* Below iPhone SE: hide contact (mailto is still in the footer) */
    .nav .links a[data-i18n="nav.contact"] { display: none; }
  }

  /* Hero */
  .hero { padding: 64px 0 48px; }
  .hero h1 {
    font-weight: 400;
    font-size: clamp(22px, 3.2vw, 28px);
    line-height: 1.4;
    letter-spacing: -0.01em;
    max-width: 36ch;
    /* Hero gets ambient glow on top of the silver */
    filter: drop-shadow(0 0 28px var(--hero-glow));
  }

  /* Silver shimmer — single tight specular highlight that sweeps diagonally.
     bg-size 280% keeps the bright fully off-screen at both endpoints, so the
     animation's restart happens invisibly during the dark stretch. */
  .silver {
    background: linear-gradient(
      135deg,
      var(--silver-matte) 0%,
      var(--silver-matte) 38%,
      var(--silver-mid) 46%,
      var(--silver-peak) 50%,
      var(--silver-mid) 54%,
      var(--silver-matte) 62%,
      var(--silver-matte) 100%
    );
    background-size: 280% 280%;
    background-position: 100% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    -webkit-text-fill-color: transparent;
    animation: silver-sweep 4s linear infinite;
  }

  .silver-dim {
    background: linear-gradient(
      135deg,
      var(--silver-dim-matte) 0%,
      var(--silver-dim-matte) 38%,
      var(--silver-dim-mid) 46%,
      var(--silver-dim-peak) 50%,
      var(--silver-dim-mid) 54%,
      var(--silver-dim-matte) 62%,
      var(--silver-dim-matte) 100%
    );
    background-size: 280% 280%;
    background-position: 100% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    -webkit-text-fill-color: transparent;
    animation: silver-sweep 4s linear infinite;
  }

  @keyframes silver-sweep {
    to { background-position: 0% 0%; }
  }

  @media (prefers-reduced-motion: reduce) {
    .silver, .silver-dim {
      animation: none;
      background-position: 50% 50%;
    }
  }

  /* Section heads (h2 used for semantic hierarchy) */
  .section-label {
    font-size: 12px;
    color: var(--faint);
    font-weight: 400;
    margin-bottom: 24px;
  }

  /* Backed by */
  .backed { padding: 40px 0; }
  .backed-logos {
    display: flex;
    align-items: center;
    gap: 40px;
    flex-wrap: wrap;
  }
  .backed-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--muted);
    font-weight: 500;
    letter-spacing: -0.01em;
    transition: color .2s ease;
  }
  .backed-logo:hover { color: var(--fg); }
  .backed-logo img {
    /* Render any colored SVG/PNG as monochrome white to match the page palette */
    filter: var(--logo-filter);
    opacity: 0.65;
    transition: opacity .2s ease;
    width: auto;
  }
  .backed-logo:hover img { opacity: 1; }
  .backed-logo--wordmark img { height: 22px; max-width: 220px; }
  .backed-logo[href*="startupgarage"] img { height: 34px; max-width: none; }

  /* Products */
  .products { padding: 40px 0; }
  .product {
    display: grid;
    grid-template-columns: minmax(96px, max-content) 1fr 110px;
    gap: 24px;
    align-items: baseline;
    padding: 16px 0;
    border-top: 1px solid var(--line);
  }
  .products .product:last-child {
    border-bottom: 1px solid var(--line);
  }
  .product .name { color: var(--fg); font-weight: 500; }
  .product .desc { color: var(--muted); }
  .product .arrow {
    color: var(--faint);
    transition: transform .15s ease, color .15s ease;
    text-align: right;
  }
  .product:hover .arrow { color: var(--fg); transform: translateX(2px); }

  /* "coming soon" status indicator for unshipped products */
  .product .status {
    color: var(--faint);
    text-align: right;
    font-size: 12px;
    letter-spacing: 0.02em;
  }
  .product--soon { cursor: default; }

  @media (max-width: 560px) {
    .product { grid-template-columns: 1fr 110px; }
    .product .name { grid-column: 1; }
    .product .arrow, .product .status { grid-column: 2; grid-row: 1; }
    .product .desc { grid-column: 1 / -1; }
  }

  /* Footer */
  footer {
    padding: 96px 0 48px;
    color: var(--muted);
  }
  footer .foot-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
  }
  footer a { color: var(--muted); transition: color .15s ease; }
  footer a:hover { color: var(--fg); }

  .socials {
    display: inline-flex;
    align-items: center;
    gap: 18px;
  }
  .socials a {
    width: 18px;
    height: 18px;
    color: var(--muted);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: color .2s ease;
  }
  .socials a:hover { color: var(--fg); }
  .socials svg { width: 100%; height: 100%; fill: currentColor; }

/* Blog-specific layout */
.blog-hero { padding: 96px 0 40px; }
  .posts { padding: 32px 0 96px; }
  .posts .empty {
    color: var(--faint);
    font-size: 14px;
    padding: 32px 0;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
  }
  /* When (later) you have real posts, use this row pattern: */
  .post {
    display: grid;
    grid-template-columns: 110px 1fr 16px;
    gap: 24px;
    align-items: baseline;
    padding: 18px 0;
    border-top: 1px solid var(--line);
    color: var(--muted);
  }
  .posts .post:last-of-type { border-bottom: 1px solid var(--line); }
  .post .date { color: var(--faint); font-size: 13px; }
  .post .title { color: var(--fg); }
  .post .arrow { color: var(--faint); text-align: right; transition: transform .15s ease, color .15s ease; }
  .post:hover .arrow { color: var(--fg); transform: translateX(2px); }
  .nav-current { color: var(--fg) !important; }

  /* Footer legal links — sits under the location/socials row */
  .foot-legal {
    margin-top: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--faint);
  }
  .foot-legal a { color: var(--faint); transition: color .15s ease; }
  .foot-legal a:hover { color: var(--fg); }
  .foot-legal .sep { color: var(--faint); user-select: none; }

  /* Legal pages (terms, privacy) */
  .legal { padding: 56px 0 72px; }
  .legal h1 {
    font-weight: 400;
    font-size: clamp(22px, 3.2vw, 28px);
    line-height: 1.4;
    letter-spacing: -0.01em;
    margin-bottom: 6px;
  }
  .legal .updated {
    color: var(--faint);
    font-size: 12px;
    margin-bottom: 36px;
  }
  .legal .intro {
    color: var(--fg);
    max-width: 64ch;
    margin-bottom: 8px;
  }
  .legal h2 {
    font-size: 14px;
    font-weight: 500;
    color: var(--fg);
    margin: 32px 0 10px;
  }
  .legal p {
    color: var(--muted);
    max-width: 64ch;
  }
