/* ── K-emoji site — minimal dark theme matching iOS app ── */

:root {
  --bg: #000;
  --surface: #141414;
  --border: rgba(255,255,255,0.08);
  --text-primary: #f5f5f5;
  --text-secondary: rgba(255,255,255,0.65);
  --text-tertiary: rgba(255,255,255,0.4);
  --primary-blue: #1B87EA;
  --primary-blue-soft: rgba(27,135,234,0.15);
  --max-w: 880px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text-primary);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--primary-blue); text-decoration: none; transition: opacity 0.15s; }
a:hover { opacity: 0.75; }

/* ── Layout ── */
.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
}

.nav {
  padding: 20px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: var(--max-w);
  margin: 0 auto;
}

.nav-brand {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}

.nav-links { display: flex; gap: 24px; }
.nav-links a {
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
}
.nav-links a:hover { color: var(--text-primary); }

.lang-switcher {
  appearance: none;
  -webkit-appearance: none;
  background: var(--surface);
  color: var(--text-secondary);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 6px 28px 6px 10px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  font-family: inherit;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'><path d='M1 1l4 4 4-4' stroke='%23999' stroke-width='1.5' fill='none' stroke-linecap='round'/></svg>");
  background-repeat: no-repeat;
  background-position: right 10px center;
  transition: border-color 0.15s, color 0.15s;
}
.lang-switcher:hover { border-color: var(--primary-blue); color: var(--text-primary); }
.lang-switcher:focus { outline: none; border-color: var(--primary-blue); }
/* RTL: flip dropdown arrow position */
[dir="rtl"] .lang-switcher {
  padding: 6px 10px 6px 28px;
  background-position: left 10px center;
}

/* ── Hero ── */
.hero {
  padding: 64px 24px 48px;
  text-align: center;
  max-width: var(--max-w);
  margin: 0 auto;
}

.hero-icon {
  width: 120px;
  height: 120px;
  border-radius: 26px;          /* iOS app icon corner curve */
  margin-bottom: 24px;
  box-shadow: 0 12px 40px rgba(27,135,234,0.35), 0 4px 12px rgba(0,0,0,0.4);
  image-rendering: -webkit-optimize-contrast;
}

h1 {
  font-size: clamp(36px, 6vw, 56px);
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.1;
  margin-bottom: 16px;
}

.hero-sub {
  font-size: clamp(16px, 2.5vw, 20px);
  color: var(--text-secondary);
  max-width: 540px;
  margin: 0 auto 32px;
}

.cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  background: var(--primary-blue);
  color: white;
  border-radius: 12px;
  font-weight: 600;
  font-size: 16px;
  transition: transform 0.15s, box-shadow 0.15s;
}
.cta:hover {
  opacity: 1;
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(27,135,234,0.4);
}

/* Official Apple "Download on the App Store" badge */
.app-store-link {
  display: inline-block;
  transition: transform 0.18s ease, opacity 0.18s ease;
  border-radius: 10px;
  outline-offset: 4px;
}
.app-store-link:hover { transform: translateY(-2px); opacity: 0.92; }
.app-store-link:active { transform: translateY(0); opacity: 1; }
.app-store-link img {
  height: 56px;
  width: auto;
  display: block;
}
@media (max-width: 480px) {
  .app-store-link img { height: 50px; }
}

/* ── Screenshots gallery ── */
.screenshots {
  padding: 16px 0 8px;
  max-width: 100%;
  overflow: hidden;
}
.screenshots-scroll {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  padding: 8px 24px 24px;
  scrollbar-width: none;
}
.screenshots-scroll::-webkit-scrollbar { display: none; }

/* ── Mode showcase (row 2) ── */
.modes {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 24px 24px 72px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.mode-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 24px;
  display: flex;
  align-items: center;
  gap: 22px;
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.mode-card:hover {
  border-color: rgba(27,135,234,0.3);
  transform: translateY(-2px);
}
.mode-card .screenshot {
  width: 180px;
  flex: 0 0 180px;
  aspect-ratio: 1242 / 2688;
  margin: 0;
  box-shadow: 0 8px 22px rgba(0,0,0,0.5);
}
.mode-card .screenshot:hover {
  transform: none;
  box-shadow: 0 8px 22px rgba(0,0,0,0.5);
}
.mode-card .screenshot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.mode-text { flex: 1; min-width: 0; }
.mode-title {
  font-size: 19px;
  font-weight: 700;
  margin-bottom: 8px;
  letter-spacing: -0.01em;
  color: var(--text-primary);
}
.mode-desc {
  font-size: 14px;
  line-height: 1.55;
  color: var(--text-secondary);
}
@media (max-width: 720px) {
  .modes { grid-template-columns: 1fr; gap: 14px; padding: 16px 16px 56px; }
}
@media (max-width: 420px) {
  .mode-card { flex-direction: column; text-align: center; padding: 22px 20px; gap: 18px; }
  .mode-card .screenshot { width: 200px; flex-basis: auto; }
}
.screenshot {
  flex: 0 0 auto;
  border-radius: 22px;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: 0 12px 32px rgba(0,0,0,0.5);
  scroll-snap-align: center;
  cursor: zoom-in;
  transition: transform 0.22s cubic-bezier(0.2,0.85,0.25,1), box-shadow 0.22s ease;
  -webkit-tap-highlight-color: transparent;
}
.screenshot:hover {
  transform: translateY(-6px) scale(1.02);
  box-shadow: 0 24px 48px rgba(0,0,0,0.7), 0 0 0 1px rgba(27,135,234,0.4);
}
.screenshot:active { transform: scale(0.97); }
.screenshot img {
  display: block;
  pointer-events: none;
}
/* Lifestyle row — natural aspect ratio per image, consistent height */
.screenshots-scroll .screenshot { height: 380px; }
.screenshots-scroll .screenshot img {
  height: 100%;
  width: auto;
}
@media (max-width: 480px) {
  .screenshots-scroll .screenshot { height: 320px; }
  .screenshots-scroll { padding: 8px 16px 24px; gap: 12px; }
}
@media (min-width: 720px) {
  .screenshots-scroll {
    justify-content: flex-start;
    flex-wrap: nowrap;
    padding: 8px 32px 32px;
  }
  .screenshots-scroll .screenshot { height: 440px; }
}
@media (hover: none) {
  .screenshot:hover { transform: none; box-shadow: 0 12px 32px rgba(0,0,0,0.5); }
}

/* ── Lightbox ── */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: clamp(16px, 4vw, 48px);
  transition: background 0.36s ease, backdrop-filter 0.36s ease;
  -webkit-backdrop-filter: blur(0);
  backdrop-filter: blur(0);
}
.lightbox.lightbox-show {
  background: rgba(0,0,0,0.92);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
}
.lightbox-img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  border-radius: 18px;
  box-shadow: 0 30px 80px rgba(0,0,0,0.8);
  transform-origin: center center;
  will-change: transform, opacity;
}
.lightbox-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 40px;
  height: 40px;
  border-radius: 20px;
  background: rgba(255,255,255,0.15);
  color: #fff;
  font-size: 24px;
  line-height: 1;
  border: 0;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s, transform 0.15s;
  -webkit-tap-highlight-color: transparent;
}
.lightbox-close:hover { background: rgba(255,255,255,0.25); transform: scale(1.05); }
.lightbox-close:active { transform: scale(0.95); }
[dir="rtl"] .lightbox-close { right: auto; left: 16px; }

/* ── Features grid ── */
.features {
  padding: 48px 24px 64px;
  max-width: var(--max-w);
  margin: 0 auto;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}

.feature-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px;
}
.feature-icon {
  width: 36px; height: 36px;
  border-radius: 10px;
  background: var(--primary-blue-soft);
  color: var(--primary-blue);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; font-weight: 700;
  margin-bottom: 14px;
}
.feature-title {
  font-size: 17px; font-weight: 600;
  margin-bottom: 6px;
}
.feature-desc {
  font-size: 14px; color: var(--text-secondary);
}

/* ── Article (Privacy / Support) ── */
.article {
  padding: 48px 24px 96px;
  max-width: 720px;
  margin: 0 auto;
}

.article h1 {
  font-size: 36px;
  margin-bottom: 8px;
}
.article .updated {
  color: var(--text-tertiary);
  font-size: 14px;
  margin-bottom: 32px;
}
.article h2 {
  font-size: 22px;
  font-weight: 700;
  margin: 32px 0 12px;
  color: var(--text-primary);
}
.article h3 {
  font-size: 17px;
  font-weight: 600;
  margin: 20px 0 8px;
  color: var(--text-primary);
}
.article p, .article li {
  font-size: 16px;
  color: var(--text-secondary);
  margin-bottom: 12px;
}
.article ul { padding-left: 20px; }
.article ul li { margin-bottom: 6px; }
.article strong { color: var(--text-primary); font-weight: 600; }
.article a { font-weight: 500; }

/* ── Footer ── */
.footer {
  border-top: 1px solid var(--border);
  padding: 32px 24px;
  text-align: center;
  font-size: 13px;
  color: var(--text-tertiary);
}
.footer-links {
  display: flex; gap: 18px;
  justify-content: center;
  margin-bottom: 12px;
}
.footer-links a {
  color: var(--text-secondary);
  font-weight: 500;
}

@media (max-width: 600px) {
  .nav { padding: 14px 16px; }
  .hero { padding: 40px 20px 28px; }
  .hero-icon { width: 96px; height: 96px; border-radius: 22px; margin-bottom: 18px; }
  .nav-links { gap: 12px; }
  .nav-links a { font-size: 13px; }
  .features { padding: 40px 16px 56px; }
  .feature-card { padding: 20px; }
  .footer-links { gap: 12px; flex-wrap: wrap; }
}
@media (max-width: 480px) {
  .nav-brand { font-size: 16px; }
  .nav-links { gap: 8px; }
  .nav-links a { font-size: 12px; }
  .lang-switcher { font-size: 11px; padding: 5px 22px 5px 8px; }
  .hero { padding: 32px 16px 24px; }
  .hero-icon { width: 84px; height: 84px; border-radius: 19px; margin-bottom: 16px; }
  .hero-sub { margin-bottom: 24px; }
}
@media (max-width: 380px) {
  .nav-links a:nth-child(2) { display: none; } /* hide Terms link, keep Privacy + Support */
}

/* ── Cookie banner (CNIL/EDPB equal-prominence) ── */
.cookie-banner {
  position: fixed;
  left: 16px; right: 16px; bottom: 16px;
  max-width: 640px;
  margin: 0 auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 16px 18px;
  box-shadow: 0 16px 48px rgba(0,0,0,0.5);
  display: flex;
  flex-direction: column;
  gap: 12px;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.25s ease, transform 0.25s ease;
  z-index: 1000;
}
.cookie-banner.show { opacity: 1; transform: translateY(0); }
.cookie-banner.hide { opacity: 0; transform: translateY(20px); }

.cookie-text {
  font-size: 13.5px;
  color: var(--text-secondary);
  line-height: 1.5;
  margin: 0;
}
.cookie-text a { color: var(--primary-blue); font-weight: 500; }

.cookie-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}
.cookie-btn {
  flex: 1;
  max-width: 160px;
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  border: 1px solid var(--border);
  transition: background 0.15s, border-color 0.15s;
}
/* Equal prominence: same size, same weight, same padding. Only color differs. */
.cookie-reject {
  background: transparent;
  color: var(--text-primary);
}
.cookie-reject:hover { background: rgba(255,255,255,0.06); border-color: var(--text-tertiary); }
.cookie-accept {
  background: var(--primary-blue);
  color: white;
  border-color: var(--primary-blue);
}
.cookie-accept:hover { background: #1670c8; border-color: #1670c8; }

@media (min-width: 640px) {
  .cookie-banner {
    flex-direction: row;
    align-items: center;
    padding: 14px 18px;
  }
  .cookie-actions { flex-shrink: 0; }
}
