@font-face {
  font-family: "Outfit";
  src: url("./fonts/outfit-latin-wght.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
    U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212,
    U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Fraunces";
  src: url("./fonts/fraunces-latin-wght.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
    U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212,
    U+2215, U+FEFF, U+FFFD;
}

:root {
  --bg0: #d8e2da;
  --bg1: #e8efea;
  --bg2: #c5d1c8;
  --ink: #1e2a32;
  --ink-muted: #5a6b66;
  --accent: #c47a2c;
  --accent-soft: rgba(196, 122, 44, 0.16);
  --ring: #d4924a;
  --surface: rgba(255, 255, 255, 0.55);
  --surface-solid: #f4f8f5;
  --danger: #b85a6a;
  --glow: radial-gradient(ellipse at 28% 18%, rgba(196, 122, 44, 0.22), transparent 55%),
    radial-gradient(ellipse at 82% 78%, rgba(184, 90, 106, 0.14), transparent 50%),
    linear-gradient(165deg, #d8e2da 0%, #c5d1c8 100%);
  --ease: cubic-bezier(0.32, 0.72, 0, 1);
  --serif: "Fraunces", Georgia, "Noto Serif", "Hiragino Mincho ProN", serif;
  --sans: "Outfit", "Segoe UI", "Noto Sans", "Noto Sans Arabic", "Noto Sans Hebrew",
    "Hiragino Sans", "PingFang SC", "Noto Sans JP", "Noto Sans SC", "Noto Sans KR",
    "Malgun Gothic", sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100dvh;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--glow);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 8;
  opacity: 0.45;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
}

.skip {
  position: absolute;
  inset-inline-start: 1rem;
  top: -4rem;
  z-index: 20;
  padding: 0.6rem 1rem;
  background: var(--ink);
  color: var(--surface-solid);
  border-radius: 999px;
}

.skip:focus {
  top: 1rem;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

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

.nav-wrap {
  position: sticky;
  top: 0;
  z-index: 10;
  padding: 1.25rem 1.25rem 0;
  pointer-events: none;
}

.nav {
  pointer-events: auto;
  width: max-content;
  max-width: calc(100% - 0px);
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 0.4rem 0.45rem 0.4rem 0.55rem;
  background: color-mix(in srgb, var(--surface-solid) 78%, transparent);
  border: 1px solid rgba(30, 42, 50, 0.08);
  border-radius: 999px;
  box-shadow: 0 18px 40px rgba(30, 42, 50, 0.08);
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--ink);
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.05rem;
  text-decoration: none;
}

.nav-brand img {
  display: block;
  border-radius: 8px;
}

.nav-links {
  display: flex;
  gap: 0.15rem;
}

.nav-links a {
  color: var(--ink-muted);
  font-size: 0.88rem;
  font-weight: 500;
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  text-decoration: none;
}

.nav-links a:hover {
  color: var(--ink);
  background: var(--accent-soft);
  text-decoration: none;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.lang-switch {
  display: flex;
  align-items: center;
  padding-inline: 0.35rem;
}

.lang-switch select {
  font: inherit;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--ink);
  background: var(--surface-solid);
  border: 1px solid rgba(30, 42, 50, 0.1);
  border-radius: 999px;
  padding: 0.35rem 0.7rem;
  min-height: 36px;
  max-width: 10.5rem;
}

.nav {
  flex-wrap: wrap;
  justify-content: center;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 3rem;
  padding: 3.5rem 1.25rem 4rem;
  max-width: 1180px;
  margin: 0 auto;
  overflow: visible;
}

.eyebrow {
  margin: 0 0 0.85rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.brand {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(3.4rem, 10vw, 5.6rem);
  letter-spacing: -0.035em;
  line-height: 0.92;
  margin: 0;
}

.brand span {
  color: var(--accent);
}

.lede {
  margin: 0.85rem 0 0;
  font-family: var(--serif);
  font-size: clamp(1.35rem, 3vw, 1.75rem);
  font-weight: 500;
  color: var(--accent);
}

.deck {
  margin: 1.1rem 0 0;
  max-width: 34rem;
  font-size: 1.08rem;
  line-height: 1.55;
  color: var(--ink-muted);
}

.cta-block {
  margin-top: 2rem;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.75rem;
}

.cta {
  display: inline-flex;
  align-items: center;
  gap: 1rem;
  padding: 0.55rem 0.55rem 0.55rem 1.35rem;
  border-radius: 999px;
  background: var(--accent);
  color: #fff8f0;
  text-decoration: none;
  box-shadow: 0 16px 32px rgba(196, 122, 44, 0.28);
  transition: transform 0.5s var(--ease), box-shadow 0.5s var(--ease);
}

.cta:hover {
  text-decoration: none;
  transform: translateY(-2px) scale(1.01);
  box-shadow: 0 20px 36px rgba(196, 122, 44, 0.34);
}

.cta:active {
  transform: scale(0.98);
}

.cta-label {
  font-weight: 600;
  font-size: 1.02rem;
}

.cta-meta {
  font-size: 0.78rem;
  opacity: 0.82;
  font-weight: 500;
}

.cta-icon {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 999px;
  background: rgba(255, 248, 240, 0.18);
  display: grid;
  place-items: center;
  transition: transform 0.5s var(--ease);
}

.cta:hover .cta-icon {
  transform: translateY(2px) scale(1.06);
}

.cta-status {
  margin: 0;
  font-size: 0.85rem;
  color: var(--ink-muted);
}

.sha-line,
.sums-link {
  margin: 0.35rem 0 0;
  font-size: 0.75rem;
  color: var(--ink-muted);
  word-break: break-all;
}

.sha-line code {
  font-family: ui-monospace, "Cascadia Code", "SF Mono", Menlo, monospace;
  font-size: 0.72rem;
  font-weight: 500;
}

.sums-link[hidden],
.sha-line[hidden] {
  display: none;
}

.other-downloads {
  list-style: none;
  margin: 0.4rem 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.other-downloads[hidden] {
  display: none;
}

.other-downloads a {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
  border: 1px solid rgba(30, 42, 50, 0.08);
  font-size: 0.82rem;
  font-weight: 500;
  text-decoration: none;
}

.other-downloads a:hover {
  background: var(--accent-soft);
  color: var(--accent);
}

.gallery {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: flex-end;
}

.shot {
  margin: 0;
  width: min(220px, 42vw);
}

.shot img {
  display: block;
  width: 100%;
  height: auto;
}

.bezel {
  padding: 0.4rem;
  border-radius: 1.35rem;
  background: rgba(30, 42, 50, 0.05);
  border: 1px solid rgba(30, 42, 50, 0.06);
}

.window {
  overflow: hidden;
  border-radius: calc(1.35rem - 0.4rem);
  background: var(--surface-solid);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.7);
}

.titlebar {
  display: flex;
  gap: 0.32rem;
  padding: 0.45rem 0.65rem 0.2rem;
}

.titlebar span {
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  background: var(--bg2);
}

.titlebar span:nth-child(2) {
  background: color-mix(in srgb, var(--accent) 55%, var(--bg2));
}

.titlebar span:nth-child(3) {
  background: color-mix(in srgb, var(--danger) 45%, var(--bg2));
}

.shot--timer {
  width: min(260px, 52vw);
  z-index: 3;
  animation: rise 1s var(--ease) both;
}

.shot--settings,
.shot--stats {
  display: none;
}

.tilt {
  height: 100%;
}

.rhythms {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 1.25rem 4.5rem;
}

.rhythms-label {
  margin: 0 0 0.85rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.chips {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0;
  padding: 0;
}

.chips button {
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink-muted);
  font-size: 0.88rem;
  font-weight: 500;
  border: 1px solid rgba(30, 42, 50, 0.06);
  cursor: pointer;
  transition: background 0.45s var(--ease), color 0.45s var(--ease),
    border-color 0.45s var(--ease), transform 0.45s var(--ease);
}

.chips button:hover {
  color: var(--ink);
  background: color-mix(in srgb, var(--surface-solid) 80%, transparent);
}

.chips button:active {
  transform: scale(0.97);
}

.chips .is-hot,
.chips button[aria-selected="true"] {
  background: var(--accent-soft);
  color: var(--accent);
  border-color: color-mix(in srgb, var(--accent) 35%, transparent);
}

.technique-card {
  margin-top: 1.15rem;
  padding: 1.35rem 1.4rem 1.45rem;
  border-radius: 1.5rem;
  background: var(--surface);
  border: 1px solid rgba(30, 42, 50, 0.06);
}

.technique-card header {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.35rem 1rem;
  margin-bottom: 0.4rem;
}

.technique-card h2 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.45rem;
  letter-spacing: -0.02em;
  margin: 0;
}

.technique-best {
  margin: 0;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--accent);
}

.technique-ratio {
  margin: 0 0 0.55rem;
  font-size: 0.88rem;
  color: var(--ink-muted);
  line-height: 1.4;
}

.technique-blurb {
  margin: 0;
  color: var(--ink);
  line-height: 1.55;
}

.technique-note {
  margin: 0.85rem 0 0;
  font-size: 0.75rem;
  color: var(--ink-muted);
}

.points {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 1.25rem 5rem;
  display: grid;
  gap: 1.5rem;
}

.point {
  padding: 1.5rem 1.5rem 1.6rem;
  border-radius: 1.5rem;
  background: var(--surface);
  border: 1px solid rgba(30, 42, 50, 0.06);
}

.point h2 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.55rem;
  letter-spacing: -0.02em;
  margin: 0 0 0.6rem;
}

.point p {
  margin: 0;
  color: var(--ink-muted);
  line-height: 1.55;
}

.install {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 1.25rem 5.5rem;
}

.install h2 {
  font-family: var(--serif);
  font-size: 1.8rem;
  margin: 0 0 1.25rem;
}

.install dl {
  margin: 0;
  display: grid;
  gap: 1rem;
}

.install dt {
  font-weight: 600;
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.3rem;
}

.install dd {
  margin: 0;
  color: var(--ink-muted);
  line-height: 1.5;
}

.install code {
  font-size: 0.88em;
  background: var(--surface);
  padding: 0.05em 0.35em;
  border-radius: 0.3em;
}

.foot {
  padding: 0 1.25rem 3rem;
  text-align: center;
  color: var(--ink-muted);
  font-size: 0.88rem;
}

.foot p {
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0.35rem 0.5rem;
}

.foot .fine {
  margin-top: 0.65rem;
  font-size: 0.75rem;
}

.foot img {
  display: block;
}

@media (min-width: 900px) {
  .hero {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
    align-items: center;
    padding: 5.5rem 2rem 5rem;
    gap: 1rem;
  }

  .gallery {
    height: 640px;
    min-height: 640px;
  }

  .shot {
    position: absolute;
    display: block;
  }

  .shot--settings,
  .shot--stats {
    display: block;
    width: 210px;
  }

  .shot--timer {
    width: 250px;
    left: 50%;
    top: 18px;
    margin-left: -125px;
    z-index: 3;
    animation: rise 1s var(--ease) 0.22s both;
  }

  .shot--settings {
    left: 4%;
    top: 88px;
    z-index: 1;
    animation: rise 1s var(--ease) 0.08s both;
  }

  .shot--settings .tilt {
    transform: rotate(-7deg);
  }

  .shot--stats {
    right: 6%;
    top: 64px;
    z-index: 2;
    animation: rise 1s var(--ease) 0.16s both;
  }

  .shot--stats .tilt {
    transform: rotate(6deg);
  }

  [dir="rtl"] .shot--timer {
    margin-left: 0;
    margin-inline-start: -125px;
  }

  [dir="rtl"] .shot--settings {
    left: auto;
    right: 4%;
  }

  [dir="rtl"] .shot--stats {
    right: auto;
    left: 6%;
  }

  [dir="rtl"] .shot--settings .tilt {
    transform: rotate(7deg);
  }

  [dir="rtl"] .shot--stats .tilt {
    transform: rotate(-6deg);
  }

  .points {
    grid-template-columns: 1.2fr 1fr 1fr;
    gap: 1.25rem;
    padding-inline: 2rem;
  }

  .rhythms,
  .install {
    padding-inline: 2rem;
  }

  .install dl {
    grid-template-columns: 1fr 1fr 1fr;
    gap: 1.5rem;
  }
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(28px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }

  .shot--settings .tilt,
  .shot--stats .tilt {
    transform: none;
  }
}
