:root {
  --paper: #fbfbf8;
  --ink: #06111f;
  --muted: #657186;
  --night: #003a8c;
  --cyan: #00d6c8;
  --coral: #ff7657;
  --line: rgba(6, 17, 31, 0.12);
  --radius: 8px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
[hidden] { display: none !important; }
body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(90deg, rgba(0, 58, 140, 0.035) 1px, transparent 1px),
    linear-gradient(180deg, #fff 0%, var(--paper) 55%, #effafa 100%);
  background-size: 96px 96px, auto;
  color: var(--ink);
}
button, input, select, textarea { font: inherit; }
button { border: 0; cursor: pointer; }
button:disabled { opacity: 0.62; cursor: wait; }
a { color: inherit; text-decoration: none; }

.site-head {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 22px;
  width: min(1240px, calc(100% - 32px));
  min-height: 68px;
  margin: 0 auto;
  backdrop-filter: blur(18px);
}
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--night); font-weight: 900; }
.brand-mark {
  width: 32px;
  height: 32px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, var(--night) 0 48%, var(--cyan) 48% 74%, var(--coral) 74%);
  box-shadow: 0 16px 38px rgba(0, 58, 140, 0.16);
}
.nav-links { display: flex; justify-content: center; gap: 8px; color: var(--muted); font-size: 0.9rem; font-weight: 760; }
.nav-tab {
  min-height: 34px;
  padding: 0 11px;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-weight: 820;
}
.nav-tab:hover,
.nav-tab.is-active {
  background: rgba(0, 214, 200, 0.12);
  color: var(--night);
}
.head-actions { display: inline-flex; align-items: center; justify-content: flex-end; gap: 8px; }
.language-switch {
  appearance: none;
  min-height: 38px;
  min-width: 68px;
  border: 0;
  border-radius: 999px;
  padding: 0 28px 0 14px;
  background: rgba(255,255,255,0.88);
  color: var(--night);
  font: 800 12px/1 var(--sans);
  letter-spacing: 0.08em;
  box-shadow: inset 0 0 0 1px rgba(0,58,140,0.12), 0 10px 28px rgba(6,17,31,0.08);
  cursor: pointer;
}
.collect-link, .primary-action, .secondary-action {
  min-height: 38px;
  border-radius: var(--radius);
  font-weight: 850;
  transition: transform 180ms ease, background 180ms ease, color 180ms ease, opacity 180ms ease, box-shadow 180ms ease;
}
.collect-link { padding: 0 13px; background: rgba(6, 17, 31, 0.92); color: #fff; box-shadow: 0 10px 24px rgba(6,17,31,0.14); }
.primary-action, .secondary-action { display: inline-flex; align-items: center; justify-content: center; padding: 0 16px; }
.primary-action { background: linear-gradient(135deg, #06111f, #12314d); color: #fff; box-shadow: 0 16px 34px rgba(6,17,31,0.18); }
.secondary-action { background: rgba(255, 255, 255, 0.82); color: var(--night); box-shadow: inset 0 0 0 1px rgba(6,17,31,0.1); }
.compact { min-height: 40px; }
.collect-link:hover, .primary-action:hover, .secondary-action:hover { transform: translateY(-2px); }
.collect-link:active, .primary-action:active, .secondary-action:active { transform: translateY(0); }
.collect-link:disabled, .primary-action:disabled, .secondary-action:disabled {
  cursor: wait;
  opacity: 0.68;
  transform: none;
}

.app-view {
  display: none;
}

.app-view.is-active {
  display: block;
}

.app-page {
  width: min(1240px, calc(100% - 32px));
  min-height: calc(100vh - 68px);
  margin: 0 auto;
  padding: 72px 0 92px;
}

.page-hero {
  margin-bottom: 24px;
}

.compact-hero {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(360px, 0.7fr);
  gap: 34px;
  align-items: end;
}

.page-hero h1 {
  max-width: 820px;
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(3.1rem, 6vw, 6.2rem);
  line-height: 0.9;
  letter-spacing: 0;
}

.page-hero p:not(.eyebrow) {
  max-width: 600px;
  margin: 18px 0 0;
  color: var(--muted);
  line-height: 1.62;
}

.hero-product {
  position: relative;
  min-height: calc(100vh - 68px);
  display: grid;
  align-items: center;
  overflow: hidden;
  isolation: isolate;
}
.hero-image, .hero-shade { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-image { object-fit: cover; filter: saturate(1.03); animation: heroBreathe 18s ease-in-out infinite alternate; }
.hero-shade {
  z-index: 1;
  background:
    radial-gradient(circle at 70% 45%, rgba(0, 214, 200, 0.2), transparent 28%),
    linear-gradient(90deg, rgba(251, 251, 248, 0.96) 0%, rgba(251, 251, 248, 0.82) 36%, rgba(251, 251, 248, 0.14) 76%);
}
.hero-copy { position: relative; z-index: 2; width: min(1240px, calc(100% - 32px)); margin: 0 auto; padding: 72px 0; }
.eyebrow, .argument-kicker {
  margin: 0 0 14px;
  color: var(--night);
  font-size: 0.74rem;
  font-weight: 950;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.hero-copy h1 {
  max-width: 720px;
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(4.2rem, 8vw, 8.2rem);
  line-height: 0.86;
  letter-spacing: 0;
}
.hero-copy p:not(.eyebrow) {
  max-width: 540px;
  margin: 24px 0 0;
  color: #40506a;
  font-size: clamp(1.06rem, 1.5vw, 1.25rem);
  line-height: 1.58;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.floating-source {
  position: absolute;
  z-index: 2;
  width: 150px;
  height: 210px;
  border-radius: var(--radius);
  background: linear-gradient(160deg, rgba(255,255,255,0.74), rgba(255,255,255,0.18)), linear-gradient(90deg, var(--cyan), var(--coral));
  box-shadow: 0 30px 80px rgba(0, 58, 140, 0.16);
  opacity: 0.62;
  animation: floatCard 8s ease-in-out infinite;
}
.source-a { right: 12%; top: 18%; transform: rotate(7deg); }
.source-b { right: 28%; bottom: 12%; transform: rotate(-10deg); animation-delay: -3s; }

.product-arguments { width: min(1240px, calc(100% - 32px)); margin: 0 auto; }
.product-arguments { display: grid; gap: 42px; padding: 92px 0 72px; }
.argument {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(360px, 1.08fr);
  gap: 36px;
  align-items: center;
  min-height: 430px;
}
.argument:nth-child(even) { grid-template-columns: minmax(360px, 1.08fr) minmax(0, 0.92fr); }
.argument img {
  width: 100%;
  min-height: 360px;
  max-height: 520px;
  object-fit: cover;
  border-radius: var(--radius);
  box-shadow: 0 30px 90px rgba(6, 17, 31, 0.12);
}
.argument-copy h2, .section-intro h2 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.4rem, 4.5vw, 5rem);
  line-height: 0.92;
  letter-spacing: 0;
}
.argument-copy p, .section-intro p:not(.eyebrow) {
  max-width: 560px;
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.62;
}
.reveal { opacity: 0; transform: translateY(28px); transition: opacity 700ms ease, transform 700ms ease; }
.reveal.is-visible { opacity: 1; transform: translateY(0); }

.section-intro { margin-bottom: 30px; }
.article-tools { display: grid; grid-template-columns: minmax(260px, 1fr) minmax(160px, 220px) minmax(160px, 220px) minmax(190px, 250px); gap: 12px; align-items: center; margin-bottom: 28px; }
.topic-strip { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 9px; }
.clean-input, .clean-select, .clean-area {
  width: 100%;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: rgba(255, 255, 255, 0.34);
  color: var(--ink);
  outline: none;
}
.clean-input, .clean-select { min-height: 46px; padding: 0 4px; }
.clean-area { min-height: 112px; padding: 12px 4px; resize: vertical; line-height: 1.5; }
.clean-area.small { min-height: 84px; }
.clean-input:focus, .clean-select:focus, .clean-area:focus { border-color: var(--cyan); box-shadow: 0 8px 0 -7px rgba(0, 214, 200, 0.42); }
.topic { min-height: 36px; padding: 0 12px; background: transparent; color: var(--muted); }
.topic.is-active { background: var(--ink); color: #fff; }

.article-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.article-card {
  position: relative;
  min-height: 350px;
  display: grid;
  align-content: end;
  overflow: hidden;
  border-radius: var(--radius);
  background: #eaf4f3;
  box-shadow: 0 22px 58px rgba(6, 17, 31, 0.09);
  isolation: isolate;
  animation: cardIn 460ms ease both;
  cursor: pointer;
  outline: none;
}
.article-card:focus-visible {
  box-shadow: 0 0 0 3px rgba(0, 214, 200, 0.34), 0 22px 58px rgba(6, 17, 31, 0.09);
}
.article-card.has-image { background: #06111f; }
.article-visual {
  position: absolute;
  inset: 0;
  z-index: 0;
  display: block;
  overflow: hidden;
  cursor: pointer;
}
.article-media { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 600ms ease, opacity 500ms ease, filter 500ms ease; }
.article-fallback {
  background:
    radial-gradient(circle at 28% 15%, rgba(0, 214, 200, 0.48), transparent 34%),
    radial-gradient(circle at 80% 10%, rgba(255, 118, 87, 0.28), transparent 28%),
    linear-gradient(145deg, #edfafa 0%, #9fb4b9 52%, #07131f 100%);
}
.article-card.has-image .article-media { opacity: 0.74; }
.article-card:hover .article-media { transform: scale(1.06); filter: saturate(1.08); }
.article-visual::before {
  content: "";
  position: absolute;
  inset: 12px;
  z-index: 2;
  border: 1px solid rgba(255, 255, 255, 0.48);
  border-radius: var(--radius);
  opacity: 0;
  transform: scale(0.985);
  transition: opacity 220ms ease, transform 220ms ease;
  pointer-events: none;
}
.article-card:hover .article-visual::before,
.article-card:focus-within .article-visual::before {
  opacity: 1;
  transform: scale(1);
}
.article-card::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(180deg, transparent 18%, rgba(6, 17, 31, 0.9) 100%);
  opacity: 0.92;
}
.article-card:not(.has-image)::after {
  background: radial-gradient(circle at 20% 12%, rgba(0, 214, 200, 0.22), transparent 32%), linear-gradient(180deg, rgba(255,255,255,0.1), rgba(6,17,31,0.88));
}
.article-content { position: relative; z-index: 2; display: grid; gap: 12px; padding: 20px 20px 118px; color: #fff; pointer-events: none; }
.article-card.is-public .article-content { padding-bottom: 26px; }
.article-source { display: flex; justify-content: space-between; gap: 12px; color: rgba(255,255,255,0.72); font-size: 0.78rem; font-weight: 820; }
.article-title { margin: 0; font-family: Georgia, "Times New Roman", serif; font-size: clamp(1.55rem, 2.1vw, 2.3rem); line-height: 1; }
.article-tags { display: flex; flex-wrap: wrap; gap: 7px; }
.article-tags span { min-height: 25px; padding: 4px 8px; border-radius: var(--radius); background: rgba(255,255,255,0.14); color: rgba(255,255,255,0.86); font-size: 0.73rem; font-weight: 800; }
.language-badge {
  position: absolute;
  left: 16px;
  top: 16px;
  z-index: 3;
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0 11px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  color: var(--ink);
  font-size: 0.72rem;
  font-weight: 950;
  box-shadow: 0 16px 34px rgba(6, 17, 31, 0.14);
}
.language-badge strong {
  font-size: 0.68rem;
  letter-spacing: 0.08em;
}
.flag-icon {
  position: relative;
  width: 18px;
  height: 12px;
  flex: 0 0 18px;
  overflow: hidden;
  border-radius: 2px;
  background: rgba(6, 17, 31, 0.22);
  box-shadow: inset 0 0 0 1px rgba(6, 17, 31, 0.18);
}
.flag-fr { background: linear-gradient(90deg, #1f4fa3 0 33.33%, #fff 33.33% 66.66%, #e43d3d 66.66% 100%); }
.flag-es { background: linear-gradient(180deg, #c60b1e 0 25%, #ffc400 25% 75%, #c60b1e 75% 100%); }
.flag-de { background: linear-gradient(180deg, #111 0 33.33%, #dd0000 33.33% 66.66%, #ffce00 66.66% 100%); }
.flag-zh { background: radial-gradient(circle at 30% 32%, #ffde00 0 13%, transparent 14%), #de2910; }
.flag-ko {
  background:
    radial-gradient(circle at 50% 50%, #fff 0 31%, transparent 32%),
    linear-gradient(90deg, transparent 0 18%, #111 18% 27%, transparent 27% 73%, #111 73% 82%, transparent 82%),
    #f7f8fb;
}
.flag-ja { background: radial-gradient(circle at 50% 50%, #bc002d 0 28%, transparent 29%), #fff; }
.flag-en { background: #123c7c; }
.flag-en::before,
.flag-en::after {
  content: "";
  position: absolute;
  inset: 0;
}
.flag-en::before {
  background:
    linear-gradient(32deg, transparent 42%, #fff 42% 48%, #cf142b 48% 52%, #fff 52% 58%, transparent 58%),
    linear-gradient(-32deg, transparent 42%, #fff 42% 48%, #cf142b 48% 52%, #fff 52% 58%, transparent 58%);
}
.flag-en::after {
  background:
    linear-gradient(90deg, transparent 37%, #fff 37% 44%, #cf142b 44% 56%, #fff 56% 63%, transparent 63%),
    linear-gradient(180deg, transparent 32%, #fff 32% 40%, #cf142b 40% 60%, #fff 60% 68%, transparent 68%);
}
.flag-unknown {
  background:
    radial-gradient(circle at 50% 48%, rgba(255,255,255,0.9) 0 13%, transparent 14%),
    linear-gradient(135deg, rgba(6,17,31,0.28), rgba(0,214,200,0.44));
}
.translation-state {
  margin: -4px 0 0;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.72rem;
  font-weight: 820;
}
.useful-state {
  width: fit-content;
  margin: -2px 0 0;
  padding: 5px 8px;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.18);
  color: rgba(255, 255, 255, 0.88);
  font-size: 0.72rem;
  font-weight: 850;
}
.empty-state { grid-column: 1 / -1; min-height: 260px; display: grid; place-items: center; color: var(--muted); text-align: center; }
.toast {
  position: fixed;
  left: 50%;
  bottom: 22px;
  z-index: 40;
  width: min(560px, calc(100% - 28px));
  padding: 13px 15px;
  border-radius: var(--radius);
  background: rgba(6, 17, 31, 0.94);
  color: #fff;
  box-shadow: 0 22px 58px rgba(6, 17, 31, 0.22);
  transform: translate(-50%, 20px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease, transform 180ms ease;
}
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

@keyframes heroBreathe { from { transform: scale(1); } to { transform: scale(1.055) translateX(1%); } }
@keyframes floatCard { 0%, 100% { translate: 0 0; } 50% { translate: 0 -18px; } }
@keyframes cardIn { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: translateY(0); } }
@keyframes menuIn { from { opacity: 0; transform: translateY(8px) scale(0.98); } to { opacity: 1; transform: translateY(0) scale(1); } }

@media (max-width: 1040px) {
  .site-head { grid-template-columns: 1fr auto; }
  .nav-links { grid-column: 1 / -1; justify-content: flex-start; overflow-x: auto; padding-bottom: 4px; }
  .argument, .argument:nth-child(even), .compact-hero { grid-template-columns: 1fr; }
  .article-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  body {
    background-size: 64px 64px, auto;
  }
  .site-head { width: min(100% - 22px, 520px); grid-template-columns: 1fr; gap: 10px; padding: 12px 0; }
  .brand {
    min-height: 40px;
  }
  .nav-links {
    width: 100%;
    gap: 6px;
    padding: 2px 0 8px;
    scrollbar-width: none;
  }
  .nav-links::-webkit-scrollbar { display: none; }
  .nav-tab {
    min-height: 38px;
    flex: 0 0 auto;
    padding: 0 13px;
    white-space: nowrap;
  }
  .head-actions { width: 100%; display: grid; grid-template-columns: minmax(70px, 0.72fr) minmax(0, 1.2fr); }
  .language-switch { width: 100%; min-width: 0; }
  .collect-link { width: 100%; }
  .collect-link, .primary-action, .secondary-action {
    min-height: 44px;
  }
  .hero-product { min-height: min(760px, calc(100svh - 72px)); }
  .hero-shade { background: linear-gradient(180deg, rgba(251,251,248,0.96), rgba(251,251,248,0.58), rgba(251,251,248,0.18)); }
  .hero-copy h1 { font-size: clamp(3.2rem, 16vw, 5rem); }
  .hero-copy h1 {
    max-width: 100%;
    font-size: clamp(2.85rem, 13vw, 3.8rem);
    line-height: 0.9;
    overflow-wrap: anywhere;
  }
  .floating-source { display: none; }
  .product-arguments, .hero-copy, .app-page { width: min(100% - 22px, 520px); }
  .app-page { min-height: auto; padding: 44px 0 72px; }
  .compact-hero { gap: 22px; }
  .page-hero h1 {
    font-size: clamp(2.55rem, 14vw, 3.8rem);
    line-height: 0.93;
    overflow-wrap: anywhere;
  }
  .page-hero p:not(.eyebrow) {
    margin-top: 14px;
  }
  .argument {
    gap: 20px;
    min-height: 0;
  }
  .argument img {
    min-height: 260px;
    max-height: 340px;
  }
  .argument-copy h2, .section-intro h2 {
    font-size: clamp(2.2rem, 12vw, 3.6rem);
  }
  .article-tools, .article-grid { grid-template-columns: 1fr; }
  .article-tools {
    gap: 10px;
    margin-bottom: 18px;
  }
  .article-card {
    min-height: 360px;
    border-radius: 10px;
  }
  .article-content {
    gap: 10px;
    padding: 76px 18px 86px;
  }
  .article-card.is-public .article-content {
    padding-bottom: 26px;
  }
  .article-title {
    font-size: clamp(1.85rem, 9vw, 2.75rem);
    line-height: 0.97;
    overflow-wrap: anywhere;
  }
  .article-source {
    font-size: 0.74rem;
  }
  .language-badge {
    left: 14px;
    top: 14px;
    min-height: 32px;
  }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; transition-duration: 0.001ms !important; }
}
