/* OtoShot homepage. Colours come from tokens.css, which is generated from the
   app's own palettes (OtoShotPreview --site). The look follows the app: warm
   paper with a dot grid, stepped pixel corners, the camera, and clips shown as
   taped instant photos. The pixel font is drawn only at 16 / 32 / 48 px, its
   native grid, so it stays sharp. */
@font-face {
  font-family: "MaruMonica";
  src: url("assets/fonts/x12y16pxMaruMonica.ttf") format("truetype");
  font-display: swap;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  font-family: "MaruMonica", "BIZ UDGothic", "Yu Gothic UI", "Meiryo", sans-serif;
  font-size: 16px;
  line-height: 32px;
  color: var(--ink);
  background-color: var(--paper);
  /* The app's paper: one quiet dot every 16 px. */
  background-image: radial-gradient(var(--pattern) 1px, transparent 1.5px);
  background-size: 16px 16px;
  -webkit-font-smoothing: none;
  font-smooth: never;
}
img { max-width: 100%; height: auto; }
a { color: inherit; text-underline-offset: 4px; }
a:hover { color: var(--mascot); }
:focus-visible { outline: 2px dashed var(--ink); outline-offset: 4px; }
h1, h2, h3, p, ul, ol, figure { margin: 0; }
h1, h2, h3 { font-weight: normal; }
.wrap { width: min(1080px, 100% - 32px); margin-inline: auto; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; background: var(--card); padding: 0 12px; z-index: 10; }
.muted { color: var(--muted); }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Stepped corners, as the app's window and buttons. */
.stepped { clip-path: polygon(8px 0, calc(100% - 8px) 0, calc(100% - 8px) 4px, calc(100% - 4px) 4px, calc(100% - 4px) 8px, 100% 8px,
  100% calc(100% - 8px), calc(100% - 4px) calc(100% - 8px), calc(100% - 4px) calc(100% - 4px), calc(100% - 8px) calc(100% - 4px),
  calc(100% - 8px) 100%, 8px 100%, 8px calc(100% - 4px), 4px calc(100% - 4px), 4px calc(100% - 8px), 0 calc(100% - 8px),
  0 8px, 4px 8px, 4px 4px, 8px 4px); }
/* The clip would cut a focus ring drawn outside; draw it inside the steps. */
.stepped:focus-visible { outline-offset: -8px; }

/* Icons are single-colour pixel SVGs drawn in the text colour. */
.icon { display: inline-block; width: 24px; height: 24px; flex: none; background: currentColor;
  -webkit-mask: var(--src) center / contain no-repeat; mask: var(--src) center / contain no-repeat; image-rendering: pixelated; }
.icon-48 { width: 48px; height: 48px; }
/* Which icon: a class, with the file named here. A URL written in a page's own
   style attribute is read from this stylesheet's folder, so "../assets" on the
   English pages pointed outside the site. */
.i-album { --src: url(assets/icons/album.svg); }
.i-check { --src: url(assets/icons/check.svg); }
.i-chevron-right { --src: url(assets/icons/chevron-right.svg); }
.i-copy { --src: url(assets/icons/copy.svg); }
.i-download { --src: url(assets/icons/download.svg); }
.i-mic { --src: url(assets/icons/mic.svg); }
.i-moon { --src: url(assets/icons/moon.svg); }
.i-paste { --src: url(assets/icons/paste.svg); }
.i-record { --src: url(assets/icons/record.svg); }
.i-rewind { --src: url(assets/icons/rewind.svg); }

/* Header */
.header { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-block: 24px; }
.brand { display: inline-flex; align-items: center; gap: 12px; font-size: 32px; line-height: 48px; text-decoration: none; }
.brand img { width: 48px; height: 48px; image-rendering: pixelated; }
.header-nav { display: flex; align-items: center; gap: 24px; }
.header-nav a { text-decoration: none; }
.mode-button { display: inline-grid; place-items: center; width: 48px; height: 48px; border: 0; padding: 0;
  color: var(--ink); background: var(--card); cursor: pointer; }
.mode-button:hover { background: var(--hover); }
@media (max-width: 640px) { .header-nav .optional { display: none; } .header-nav { gap: 16px; } }

/* Hero: a board of instant photos of the real app on the left (Home, the
   Clip page and the copy notice, pinned at different angles), the promise and
   the download on the right. */
.hero { display: grid; grid-template-columns: minmax(0, 560px) minmax(0, 1fr); gap: 56px; align-items: center; padding-block: 24px 64px; }
.board { position: relative; padding-bottom: 22%; }
.board .photo { margin: 0; }
.board .print-main { width: 72%; transform: rotate(-2.5deg); z-index: 1; }
.board .print-clip { position: absolute; right: 0; top: 18%; width: 52%; transform: rotate(3deg); z-index: 2; }
.board .print-note { position: absolute; left: 6%; bottom: 4%; width: 54%; transform: rotate(-1deg); z-index: 3; padding: 8px 8px 4px; }
.board .print-clip::before { left: 30%; }
.board .print-note::before { width: 56px; height: 16px; top: -8px; left: 80%; }
.board-note { position: absolute; right: 0; bottom: -8px; color: var(--muted); }
/* The words come first in the page (screen readers, phones); wide screens put
   the board on the left. */
.board { order: -1; }
.hero h1 { font-size: 48px; line-height: 64px; margin-block: 16px 24px; }
.hero .lead { font-size: 16px; line-height: 32px; max-width: 30em; }
.eyebrow { display: flex; align-items: center; gap: 12px; color: var(--muted); }
.tag { display: inline-flex; align-items: center; gap: 8px; padding: 0 12px; background: var(--tape); color: var(--photo-ink); }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; margin-top: 32px; }
.button { display: inline-flex; align-items: center; gap: 12px; min-height: 56px; padding: 0 24px; text-decoration: none;
  background: var(--accent); color: var(--ink); border: 0; font: inherit; cursor: pointer; }
.button:hover { background: var(--accent-hover); color: var(--ink); }
.button.secondary { background: var(--card); }
.button.secondary:hover { background: var(--hover); }
.button[aria-disabled="true"], .button:disabled { background: var(--card); color: var(--muted); cursor: default; }
/* Until release the download is a native disabled button (as GGKeeper's site
   did): no link to the private release repository. */
button.button { font: inherit; border: 0; }
.meta { margin-top: 16px; color: var(--muted); }
/* As GGKeeper's: the Store first, the installer without the Store in a note,
   and free to use with a way to support development. */
.download-note { margin-top: 8px; color: var(--muted); max-width: 32em; }
.support-note { margin-top: 8px; }
.how-note { margin-top: 24px; color: var(--muted); }
@media (max-width: 880px) {
  .hero { grid-template-columns: 1fr; gap: 32px; }
  .hero h1 { font-size: 32px; line-height: 48px; }
  /* On a phone the promise comes first, then the board. */
  .board { order: 0; padding-bottom: 26%; margin-bottom: 32px; }
  .board-note { bottom: -40px; }
}

/* An instant photo: white print, strip of tape, a slight tilt. */
.photo { position: relative; background: var(--photo-frame); padding: 12px 12px 16px; box-shadow: 0 0 0 2px var(--photo-edge), 8px 8px 0 var(--shadow); }
.photo::before { content: ""; position: absolute; left: 50%; top: -12px; width: 96px; height: 24px; transform: translateX(-50%); background: var(--tape); opacity: .9; }
.photo img { display: block; width: 100%; }
.photo figcaption { color: var(--photo-ink); padding-top: 8px; }
.tilt-left { transform: rotate(-1.5deg); }
.tilt-right { transform: rotate(1.5deg); }
@media (prefers-reduced-motion: no-preference) {
  .photo { transition: transform .2s; }
  .board .photo:hover { transform: rotate(0) scale(1.02); z-index: 4; }
}

/* Sections */
section { scroll-margin-top: 16px; }
.section { padding-block: 64px; }
.section h2 { font-size: 32px; line-height: 48px; margin-bottom: 16px; }
.section > .wrap > p.intro { max-width: 36em; }
.card { background: var(--card); padding: 32px; }
@media (max-width: 640px) { .card { padding: 24px 16px; } .section { padding-block: 48px; } }

/* Sample waveforms (site.js draws the bars; a made-up shape, not real audio). */
.film-bars { display: flex; align-items: center; gap: 2px; height: 96px; }
.film-bars i { flex: 1; background: #6e5650; min-width: 1px; }
.film-bars i.taken { background: var(--photo-bar); }
.keycaps { display: flex; gap: 4px; }
.nowrap { white-space: nowrap; }
kbd { display: inline-block; min-width: 40px; padding: 0 8px; text-align: center; font: inherit; color: var(--ink);
  background: var(--card); box-shadow: inset 0 -4px 0 var(--line); }
.mini-photo { background: var(--photo-frame); padding: 8px 8px 4px; box-shadow: 0 0 0 2px var(--photo-edge); color: var(--photo-ink); transform: rotate(-2deg); }
.mini-photo .film-bars { height: 56px; background: var(--photo); padding: 0 6px; }
.mini-photo .film-bars i { background: var(--photo-bar); }
.mini-photo span { display: flex; justify-content: space-between; }

/* The story, as GGKeeper's: a looping picture of the idea (10 s). The sound
   arrives left to right up to "now"; something good plays; the keys are
   pressed after it; the yellow frame goes back (◀◀) over the last 10 s; the
   silent ends of those 10 s are marked and the frame closes in on the sound
   between them; that becomes a clip; Ctrl + V pastes it. The base styles are
   the last frame, so with reduced motion (no animation) the picture still
   reads. site.js pauses it while it is off screen.
   The wave has 48 bars and the last 12 are the 10 s (3 silent, 7 with sound,
   2 silent: data-quiet); the percentages below place things on those bars. */
.story { margin-top: 40px; }
.story-stage { display: grid; grid-template-columns: minmax(0, 1fr) auto 200px auto; gap: 24px; align-items: center; }
.story-wave { position: relative; background: var(--photo); padding: 16px 12px; overflow: hidden; }
.story-cover { position: absolute; top: 0; bottom: 0; right: 0; width: 0; background: var(--photo); animation: story-cover 10s linear infinite; }
.story-now { position: absolute; top: 8px; bottom: 8px; left: calc(100% - 6px); width: 2px; background: var(--photo-frame); animation: story-now 10s linear infinite; }
.story-frame { position: absolute; top: 6px; bottom: 6px; right: calc(4.17% + 5px); width: calc(14.58% + 7px); box-shadow: inset 0 0 0 4px var(--yellow);
  animation: story-frame 10s linear infinite; }
/* ◀◀ runs from "now" back to the start of the 10 s: the さかのぼり. */
.story-rewind { position: absolute; top: calc(50% - 16px); left: calc(75% - 42px); width: 32px; height: 32px; color: var(--yellow); animation: story-rewind 10s ease-out infinite; }
/* The silent ends of the 10 s: hatched, then left outside the frame. */
.story-mute { position: absolute; top: 6px; bottom: 6px; background: repeating-linear-gradient(135deg, rgba(255, 253, 249, .28) 0 4px, transparent 4px 8px);
  animation: story-mute 10s steps(1, end) infinite; }
.story-mute-a { left: calc(75% - 2px); width: calc(6.25% - 6px); }
.story-mute-b { right: 6px; width: calc(4.17% + 3px); }
.story-wave .film-bars i.taken { animation: story-taken 10s steps(1, end) infinite; }
.story-keys kbd { animation: story-press 10s steps(1, end) infinite; }
.story-clip { animation: story-clip 10s ease-out infinite; }
.story-paste { display: grid; justify-items: center; gap: 8px; animation: story-paste 10s steps(1, end) infinite; }
.story-steps { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 12px; margin-top: 32px; font-size: 16px; }
.story-steps > .icon { color: var(--muted); }
.story-step-a { animation: story-step-a 10s steps(1, end) infinite; }
.story-step-b { animation: story-step-b 10s steps(1, end) infinite; }
.story-step-c { animation: story-step-c 10s steps(1, end) infinite; }
.story-step-d { animation: story-step-d 10s steps(1, end) infinite; }
.story figcaption { margin-top: 16px; color: var(--muted); text-align: center; }
.story.is-paused * { animation-play-state: paused; }
@keyframes story-cover { 0% { width: 100%; } 45%, 100% { width: 0; } }
@keyframes story-now { 0% { left: 0; } 45%, 100% { left: calc(100% - 6px); } }
@keyframes story-taken { 0% { background: #6e5650; } 54%, 100% { background: var(--photo-bar); } }
/* The whole 10 s first, then (72-78%) only the sound between the silent ends. */
@keyframes story-frame {
  0%, 53.9% { opacity: 0; right: 6px; width: calc(25% - 4px); } 54%, 72% { opacity: 1; right: 6px; width: calc(25% - 4px); }
  78%, 97% { opacity: 1; right: calc(4.17% + 5px); width: calc(14.58% + 7px); } 100% { opacity: 0; right: calc(4.17% + 5px); width: calc(14.58% + 7px); }
}
@keyframes story-rewind { 0%, 53% { left: calc(100% - 42px); opacity: 0; } 54% { left: calc(100% - 42px); opacity: 1; } 63%, 97% { left: calc(75% - 42px); opacity: 1; } 100% { left: calc(75% - 42px); opacity: 0; } }
@keyframes story-mute { 0% { opacity: 0; } 66%, 97% { opacity: 1; } 100% { opacity: 0; } }
@keyframes story-press { 0% { background: var(--card); transform: none; } 49% { background: var(--accent); transform: translateY(2px); } 54%, 100% { background: var(--card); transform: none; } }
@keyframes story-clip { 0%, 80% { opacity: 0; transform: rotate(-2deg) translateX(-24px) scale(.9); } 86%, 97% { opacity: 1; transform: rotate(-2deg); } 100% { opacity: 0; transform: rotate(-2deg); } }
@keyframes story-paste { 0% { color: var(--muted); } 90%, 97% { color: var(--ink); } 100% { color: var(--muted); } }
@keyframes story-step-a { 0% { opacity: 1; } 45%, 100% { opacity: .4; } }
@keyframes story-step-b { 0% { opacity: .4; } 45% { opacity: 1; } 64%, 100% { opacity: .4; } }
@keyframes story-step-c { 0% { opacity: .4; } 64% { opacity: 1; } 80%, 100% { opacity: .4; } }
@keyframes story-step-d { 0% { opacity: .4; } 80%, 100% { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .story * { animation: none !important; } }
@media (max-width: 880px) {
  .story-stage { grid-template-columns: 1fr 1fr; grid-template-areas: "wave wave" "keys paste" "clip clip"; justify-items: center; }
  .story-wave { grid-area: wave; justify-self: stretch; }
  .story-keys { grid-area: keys; } .story-paste { grid-area: paste; } .story-clip { grid-area: clip; width: min(240px, 100%); }
}

/* Cutting by hand, right after the story: the same clip (two humps), its
   frame's left end moved in past the small hump, so only the good part stays
   (as in the announcement video). A 6 s loop; the base styles are the last
   frame, for reduced motion. The clip has 18 bars and the big hump starts at
   bar 7 (site.js, data-humps), so the frame's end goes to 7/18 of the bars. */
.edit { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 440px); gap: 48px; align-items: center; }
.checks { list-style: none; padding: 0; display: grid; gap: 8px; margin-top: 16px; }
.checks li { display: grid; grid-template-columns: 24px 1fr; gap: 12px; align-items: start; }
.checks li .icon { margin-top: 4px; }
@media (max-width: 880px) { .edit { grid-template-columns: 1fr; } }
.trim { margin: 0; }
.trim .mini-photo { padding: 12px 12px 8px; transform: rotate(-1.5deg); }
.trim .mini-photo > span { margin-top: 8px; }
.trim-wave { position: relative; --cut: calc(6px + (100% - 10px) * 7 / 18 - 4px); }
.trim-wave .film-bars { height: 160px; }
/* What is left outside the frame goes dim, then is cut away. */
.trim-shade { position: absolute; top: 0; bottom: 0; left: 0; width: var(--cut); background: var(--photo); opacity: .65; animation: trim-shade 6s ease-in-out infinite; }
.trim-frame { position: absolute; top: 4px; bottom: 4px; right: 2px; left: var(--cut); box-shadow: inset 0 0 0 4px var(--yellow); animation: trim-frame 6s ease-in-out infinite; }
.trim-hand { position: absolute; top: calc(100% - 44px); left: calc(var(--cut) - 2px); width: 24px; height: 32px; animation: trim-hand 6s ease-in-out infinite; }
.trim-hand .ink { fill: var(--ink); } .trim-hand .paper { fill: var(--photo-frame); }
/* The length: before and after, in one place (the one not shown is see-through). */
.trim-len { display: inline-grid; justify-items: end; }
.trim-len > span { grid-area: 1 / 1; }
.trim-len .a { opacity: 0; animation: trim-before 6s steps(1, end) infinite; }
.trim-len .b { animation: trim-after 6s steps(1, end) infinite; }
.trim figcaption { margin-top: 24px; color: var(--muted); text-align: center; }
.trim.is-paused * { animation-play-state: paused; }
@keyframes trim-frame { 0%, 25% { left: 2px; } 60%, 100% { left: var(--cut); } }
@keyframes trim-shade { 0%, 25% { width: 0; } 60%, 100% { width: var(--cut); } }
@keyframes trim-hand { 0%, 8% { left: 40%; top: 100%; opacity: 0; } 20%, 25% { left: 0; top: calc(100% - 44px); opacity: 1; }
  60%, 80% { left: calc(var(--cut) - 2px); top: calc(100% - 44px); opacity: 1; } 90%, 100% { left: calc(var(--cut) - 2px); opacity: 0; } }
@keyframes trim-before { 0% { opacity: 1; } 60%, 100% { opacity: 0; } }
@keyframes trim-after { 0% { opacity: 0; } 60%, 100% { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .trim * { animation: none !important; } }

/* More things it does: three cards, each with its own heading. */
.more { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; margin-top: 32px; }
.more > div { background: var(--card); padding: 24px; }
.more h3 { font-size: 32px; line-height: 48px; margin-block: 16px 8px; }
@media (max-width: 760px) { .more { grid-template-columns: 1fr; } }

/* Fruits: four themes as four prints; choosing one recolours this page. */
.fruits { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; margin-top: 32px; }
.fruit { display: block; width: 100%; padding: 0; border: 0; background: none; font: inherit; color: inherit; cursor: pointer; text-align: center; }
.fruit .photo { padding: 8px 8px 4px; }
.fruit .photo::before { width: 56px; height: 16px; top: -8px; }
.fruit[aria-pressed="true"] .photo { box-shadow: 0 0 0 4px var(--edge), 8px 8px 0 var(--shadow); }
.fruit span.name { display: block; margin-top: 12px; }
@media (max-width: 760px) { .fruits { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Steps */
.steps { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; counter-reset: step; margin-top: 32px; }
.steps li { background: var(--card); padding: 24px; }
.steps .number { color: var(--mascot); }
/* Each step shows the app's icon for it, top right (as the app's help steps). */
.steps li { position: relative; }
.steps li > .icon { position: absolute; top: 24px; right: 24px; color: var(--ink); }
.steps h3 { font-size: 16px; margin-block: 8px 0; }
@media (max-width: 760px) { .steps { grid-template-columns: 1fr; } }

/* Manners: why voices matter, with the note the app shows on a copy. */
.manners { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 360px); gap: 48px; align-items: center; }
.manners ul { padding-left: 1.2em; display: grid; gap: 8px; margin-top: 16px; }
@media (max-width: 880px) { .manners { grid-template-columns: 1fr; } }

/* Questions, in two groups: before installing, and while using it. */
.faq { max-width: 760px; }
.faq h3 { font-size: 16px; color: var(--muted); margin-top: 24px; }
.faq code { font-family: Consolas, monospace; font-size: 14px; word-break: break-all; }
.faq details { border-bottom: 2px solid var(--line); }
.faq summary { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding-block: 12px; cursor: pointer; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary .icon { transition: transform .15s; }
.faq details[open] summary .icon { transform: rotate(90deg); }
.faq details p { padding-bottom: 16px; color: var(--muted); }
@media (prefers-reduced-motion: reduce) { .faq summary .icon { transition: none; } }

/* Closing and footer */
.closing { text-align: center; padding-block: 64px; }
.closing img { width: 96px; height: 96px; image-rendering: pixelated; }
.closing h2 { font-size: 32px; line-height: 48px; margin-block: 16px 24px; }
.closing .actions { justify-content: center; }
.closing .download-note { margin-inline: auto; }
/* Footer as GGKeeper's: the name and role, the links (how to use, updates,
   licences, privacy, support), and the author. */
.footer { display: grid; grid-template-columns: auto 1fr; gap: 8px 32px; align-items: center; padding-block: 32px 48px; border-top: 2px solid var(--line); color: var(--muted); }
.footer-id { display: flex; align-items: center; gap: 16px; }
.footer-brand { font-size: 16px; line-height: 32px; gap: 8px; color: var(--ink); }
.footer-brand img { width: 24px; height: 24px; }
.footer nav { display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: flex-end; }
.footer > p { grid-column: 1 / -1; }
@media (max-width: 760px) { .footer { grid-template-columns: 1fr; } .footer nav { justify-content: flex-start; } }

/* Text pages (privacy, licences) */
.page { padding-block: 32px 64px; max-width: 760px; }
.page h1 { font-size: 32px; line-height: 48px; margin-bottom: 24px; }
.page h2 { font-size: 16px; margin-block: 32px 8px; }
.page p, .page ul { margin-bottom: 16px; }
.page code { font-family: Consolas, monospace; font-size: 14px; }
