/* Eyenapse website — shared styles.
   Two themes: the company pages (.theme-eyenapse) and app pages (.theme-picture-loops).
   Colours are tokens so dark mode only redefines variables. */

@font-face {
  font-family: "Pompiere";
  src: url("/fonts/Pompiere-Regular.woff2") format("woff2");
  font-display: swap;
}

:root {
  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial,
               "Hiragino Sans", "Noto Sans CJK JP", "PingFang SC", "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  --font-display: "Pompiere", var(--font-body);

  --bg: #f7f7f5;
  --surface: #ffffff;
  --text: #22282b;
  --muted: #5b666b;
  --line: #e2e4e3;
  --shadow: 0 1px 2px rgba(0,0,0,.06), 0 8px 24px rgba(0,0,0,.08);

  --brand-dark: #202020;   /* matches the logo PNG background */
  --brand-blue: #54c0fc;
  --link: #0a7bbd;

  --pl-teal: #4d8585;
  --pl-teal-soft: #dfeaea;
  --pl-wall: #d4d4d2;
  --frame: #fbfbf9;

  --radius: 14px;
  --page: min(1100px, calc(100% - 32px));
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #141617;
    --surface: #1d2022;
    --text: #e8ecec;
    --muted: #a3adb0;
    --line: #2d3234;
    --shadow: 0 1px 2px rgba(0,0,0,.4), 0 8px 24px rgba(0,0,0,.45);
    --link: #6cc9ff;
    --pl-teal: #8cc2c2;
    --pl-teal-soft: #22302f;
    --pl-wall: #2a2c2c;
    --frame: #e9e8e4;
  }
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.6 var(--font-body);
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--link); }
a:focus-visible, summary:focus-visible { outline: 3px solid var(--brand-blue); outline-offset: 3px; border-radius: 4px; }

.wrap { width: var(--page); margin: 0 auto; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ── Header / footer (company) ─────────────────────────────────────────── */

.site-header { background: var(--brand-dark); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 72px; }
.site-header .brand img { height: 56px; width: auto; }
.site-header nav { display: flex; gap: 20px; flex-wrap: wrap; }
.site-header nav a { color: #e6e6e6; text-decoration: none; font-size: 15px; }
.site-header nav a:hover { color: var(--brand-blue); }

.site-footer { margin-top: 72px; padding: 32px 0 40px; background: var(--brand-dark); color: #a8a8a8; font-size: 14px; }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 24px 48px; justify-content: space-between; }
.site-footer a { color: #d8d8d8; }
.site-footer address { font-style: normal; }
.site-footer p { margin: 0 0 6px; }

/* ── Company landing ───────────────────────────────────────────────────── */

.intro { padding: 56px 0 24px; }
.intro h1 { margin: 0; font-size: clamp(32px, 5vw, 46px); line-height: 1.15; letter-spacing: -.01em; }
.intro p { margin: 10px 0 0; color: var(--muted); font-size: 19px; max-width: 40em; }

.section-title { font-size: 22px; margin: 56px 0 18px; }

.app-feature {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden;
}
.app-feature__art {
  display: grid; place-items: center; padding: 32px;
  background: var(--feature-bg, var(--pl-wall)) center / cover;
}
/* Size the <picture> itself (not just the img) so the centred grid item is exactly the frame's width. */
.app-feature__art picture { display: block; width: min(420px, 100%); }
.app-feature__art img { width: 100%; filter: drop-shadow(0 10px 18px rgba(0,0,0,.28)); }
.app-feature__body { padding: 36px 40px; align-self: center; }
.app-feature__body h2 { margin: 0; font-size: 34px; line-height: 1.2; }

.tagline { margin: 4px 0 14px; color: var(--muted); font-size: 19px; }
.platforms { margin: 14px 0 18px; font-size: 14px; color: var(--muted); letter-spacing: .02em; }
.more { display: inline-block; margin-top: 16px; font-weight: 600; text-decoration: none; }
.more:hover { text-decoration: underline; }

.app-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr)); gap: 24px; }
.app-card { display: flex; flex-direction: column; background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.app-card__image { display: block; background: #fff; }
.app-card__image img { width: 100%; aspect-ratio: 16 / 9; object-fit: contain; }
.app-card__body { padding: 20px 22px 24px; display: flex; flex-direction: column; flex: 1; }
.app-card__body h3 { margin: 0; font-size: 22px; }
.app-card__body .tagline { font-size: 16px; }
.app-card__body p { margin: 0 0 10px; }
.app-card__body .badges { margin-top: auto; }

/* ── Store badges ──────────────────────────────────────────────────────── */

.badges { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.badges a { display: inline-block; line-height: 0; }
.badges img { height: 48px; width: auto; }
.badges--center { justify-content: center; }

/* ── Legal pages ───────────────────────────────────────────────────────── */

.legal { width: min(760px, calc(100% - 32px)); margin: 40px auto 0; }
.legal h1 { font-size: clamp(28px, 4vw, 38px); line-height: 1.2; margin: 0 0 4px; }
.legal .updated { color: var(--muted); margin: 0 0 28px; font-size: 15px; }
.legal h2 { font-size: 20px; margin: 32px 0 8px; }
.legal p, .legal li { max-width: 42em; }
.legal .summary { background: var(--surface); border-left: 4px solid var(--brand-blue); padding: 14px 18px; border-radius: 8px; box-shadow: var(--shadow); }

/* ── Picture Loops ─────────────────────────────────────────────────────── */

.theme-picture-loops { --link: var(--pl-teal); }

.pl-bar { background: var(--surface); border-bottom: 1px solid var(--line); font-size: 15px; }
.pl-bar .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 52px; }
.pl-bar a { text-decoration: none; }
.pl-bar .home { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); }
.pl-bar .home img { width: 28px; height: 28px; border-radius: 7px; }

.lang { position: relative; }
.lang summary { list-style: none; cursor: pointer; padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px; color: var(--text); }
.lang summary::-webkit-details-marker { display: none; }
.lang summary::after { content: " ▾"; color: var(--muted); }
.lang ul { position: absolute; right: 0; z-index: 5; margin: 6px 0 0; padding: 6px; list-style: none; min-width: 190px;
           background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); }
.lang li a { display: block; padding: 7px 12px; border-radius: 8px; color: var(--text); }
.lang li a:hover, .lang li a[aria-current] { background: var(--pl-teal-soft); }

.pl-hero {
  text-align: center; padding: 48px 16px 56px;
  background: var(--pl-wall) url("/img/picture-loops/wallpaper.webp") center / cover no-repeat;
  box-shadow: inset 0 -30px 40px -30px rgba(0,0,0,.25);
}
@media (prefers-color-scheme: dark) {
  .pl-hero { background-blend-mode: multiply; }
}
.pl-hero h1 { margin: 0 auto; width: min(460px, 86%); }
.pl-hero h1 img { width: 100%; filter: drop-shadow(0 14px 22px rgba(0,0,0,.3)); }
.pl-hero .tagline { font-family: var(--font-display); font-size: clamp(30px, 5vw, 42px); color: #2c3a3c; margin: 22px 0 22px; line-height: 1.2; }
@media (prefers-color-scheme: dark) { .pl-hero .tagline { color: #f1f4f4; text-shadow: 0 2px 8px rgba(0,0,0,.6); } }

.pl-section { width: min(820px, calc(100% - 32px)); margin: 56px auto 0; }
.pl-section h2 { font-family: var(--font-display); font-weight: normal; font-size: clamp(32px, 5vw, 42px); line-height: 1.15; margin: 0 0 12px; color: var(--pl-teal); }
.pl-lead { font-size: 19px; }

.gallery { width: var(--page); margin: 28px auto 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(230px, 100%), 1fr)); gap: 28px; }
.gallery figure { margin: 0; text-align: center; }
.gallery .frame { background: var(--frame); padding: 12px; border-radius: 3px;
                  box-shadow: 0 2px 3px rgba(0,0,0,.18), 0 12px 26px rgba(0,0,0,.16); }
.gallery img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.gallery figcaption { font-family: var(--font-display); font-size: 26px; margin-top: 8px; color: var(--muted); }
.gallery-intro { text-align: center; }
.gallery-intro h2, .gallery-intro p { text-align: center; }

.features { list-style: none; padding: 0; margin: 16px 0 0; display: grid; gap: 12px; }
.features li { position: relative; padding: 14px 18px 14px 52px; background: var(--surface); border-radius: 12px; box-shadow: var(--shadow); }
.features li::before { content: ""; position: absolute; left: 18px; top: 18px; width: 18px; height: 18px; border-radius: 50%;
                       border: 3px solid var(--pl-teal); border-right-color: transparent; transform: rotate(45deg); }

.pl-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.pl-pair > div { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 24px 26px; }
.pl-pair h2 { font-size: 32px; }

.pl-cta { text-align: center; margin: 64px auto 0; padding: 40px 16px 48px; background: var(--pl-teal-soft); }
.pl-cta h2 { font-family: var(--font-display); font-weight: normal; font-size: clamp(34px, 5vw, 46px); margin: 0 0 8px; color: var(--pl-teal); }
.pl-cta p { max-width: 40em; margin: 0 auto 22px; }

.pl-footer { padding: 28px 0 40px; font-size: 14px; color: var(--muted); text-align: center; }
.pl-footer p { margin: 4px 0; }

/* ── Small screens ─────────────────────────────────────────────────────── */

@media (max-width: 760px) {
  body { font-size: 16px; }
  .app-feature { grid-template-columns: 1fr; }
  .app-feature__body { padding: 24px 22px 28px; }
  .pl-pair { grid-template-columns: 1fr; }
  .site-header .brand img { height: 44px; }
  .site-header nav { gap: 14px; }
  .badges img { height: 44px; }
}
