/* =========================================================================
   StreamThenOwn — Showcase Site Styles
   Fonts: Space Grotesk (headings) + DM Sans (body) — Google Fonts (OFL)
   ========================================================================= */

/* --- Reset & Base -------------------------------------------------------- */

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
}

body {
  font-family:
    "DM Sans",
    system-ui,
    -apple-system,
    "Segoe UI",
    Roboto,
    Helvetica,
    Arial,
    sans-serif;
  color: #e4e4e7;
  background: #0c0a13;
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Hide content until translations are applied to prevent flash of untranslated text */
body:not(.i18n-ready) [data-i18n],
body:not(.i18n-ready) [data-i18n-html] {
  visibility: hidden;
}

main {
  flex: 1;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: "Space Grotesk", "DM Sans", system-ui, sans-serif;
}

a {
  color: #e07a5f;
  text-decoration: none;
  transition: color 0.2s;
}

a:hover {
  color: #f0a08a;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

code {
  font-family: "Fira Code", "JetBrains Mono", "Cascadia Code", monospace;
  font-size: 0.9em;
  background: rgba(224, 122, 95, 0.12);
  padding: 0.15em 0.4em;
  border-radius: 4px;
}

/* --- Skip link (keyboard only) ------------------------------------------- */

.skip-link {
  position: absolute;
  top: -100%;
  left: 50%;
  transform: translateX(-50%);
  z-index: 999;
  padding: 0.6rem 1.5rem;
  background: #c9403e;
  color: #fff;
  font-weight: 600;
  font-size: 0.9rem;
  border-radius: 0 0 8px 8px;
  text-decoration: none;
  transition: top 0.2s;
}

.skip-link:focus {
  top: 0;
  color: #fff;
}

/* --- Focus styles -------------------------------------------------------- */

:focus-visible {
  outline: 2px solid #e07a5f;
  outline-offset: 3px;
  border-radius: 3px;
}

/* Remove outline for mouse / touch clicks */
:focus:not(:focus-visible) {
  outline: none;
}

/* --- External link indicator --------------------------------------------- */

a[target="_blank"]::after {
  content: "";
  display: inline-block;
  width: 0.7em;
  height: 0.7em;
  margin-left: 0.25em;
  vertical-align: baseline;
  background-color: currentColor;
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6'/%3E%3Cpolyline points='15 3 21 3 21 9'/%3E%3Cline x1='10' y1='14' x2='21' y2='3'/%3E%3C/svg%3E");
  mask-size: contain;
  mask-repeat: no-repeat;
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6'/%3E%3Cpolyline points='15 3 21 3 21 9'/%3E%3Cline x1='10' y1='14' x2='21' y2='3'/%3E%3C/svg%3E");
  -webkit-mask-size: contain;
  -webkit-mask-repeat: no-repeat;
}

/* Don't show external icon on footer copyright link (too small/inline) */
.site-footer__copy a[target="_blank"]::after {
  display: none;
}

/* --- Container ----------------------------------------------------------- */

.container {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* --- Header -------------------------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(12, 10, 19, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(224, 122, 95, 0.12);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.site-header__brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.site-header__name {
  font-family: "Space Grotesk", "DM Sans", system-ui, sans-serif;
  font-weight: 700;
  font-size: 1.15rem;
  color: #fff;
}

.site-header__nav {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.site-header__link {
  color: #a1a1aa;
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.2s;
}

.site-header__link:hover,
.site-header__link--active {
  color: #fff;
}

/* --- Language Switcher --------------------------------------------------- */

.lang-switcher {
  position: relative;
}

.lang-switcher__btn {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(224, 122, 95, 0.15);
  border-radius: 6px;
  padding: 0.35rem 0.7rem;
  color: #a1a1aa;
  font-family: "DM Sans", system-ui, sans-serif;
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  transition:
    border-color 0.2s,
    color 0.2s;
}

.lang-switcher__btn:hover {
  border-color: rgba(224, 122, 95, 0.35);
  color: #fff;
}

.lang-switcher__icon {
  flex-shrink: 0;
}

.lang-switcher__list {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 160px;
  max-height: 320px;
  overflow-y: auto;
  background: #1a1825;
  border: 1px solid rgba(224, 122, 95, 0.15);
  border-radius: 8px;
  padding: 0.35rem 0;
  list-style: none;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  z-index: 200;
}

.lang-switcher__list--open {
  display: block;
}

.lang-switcher__item {
  padding: 0.45rem 0.85rem;
  font-size: 0.85rem;
  color: #a1a1aa;
  cursor: pointer;
  transition:
    background 0.15s,
    color 0.15s;
}

.lang-switcher__item:hover {
  background: rgba(224, 122, 95, 0.1);
  color: #fff;
}

.lang-switcher__item--active {
  color: #e07a5f;
  font-weight: 600;
}

/* --- Hero ---------------------------------------------------------------- */

.hero {
  text-align: center;
  padding: 6rem 0 5rem;
  background: radial-gradient(
    ellipse 60% 50% at 50% 0%,
    rgba(201, 64, 62, 0.15),
    transparent
  );
}

.hero__logo {
  margin: 0 auto 2rem;
}

.hero__title {
  font-size: clamp(2rem, 5vw, 3.25rem);
  font-weight: 800;
  color: #fff;
  line-height: 1.15;
  margin-bottom: 1.25rem;
}

.hero__title strong {
  background: linear-gradient(135deg, #e07a5f, #c9403e);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero__subtitle {
  max-width: 560px;
  margin: 0 auto 2.5rem;
  font-size: 1.15rem;
  color: #a1a1aa;
}

.hero__cta {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.hero__github-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 1rem;
  font-size: 0.9rem;
  color: #a1a1aa;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.hero__github-link:hover {
  color: #e4e4e7;
}

.link-icon {
  display: inline-block;
  vertical-align: middle;
  flex-shrink: 0;
}

.site-header__link--icon,
.site-footer__link--icon {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

/* --- Buttons ------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.75rem;
  border-radius: 8px;
  font-family: "DM Sans", system-ui, sans-serif;
  font-weight: 600;
  font-size: 0.95rem;
  transition:
    background 0.2s,
    box-shadow 0.2s,
    transform 0.15s;
}

.btn__icon {
  flex-shrink: 0;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn--primary {
  background: #c9403e;
  color: #fff;
}

.btn--primary:hover {
  background: #a83230;
  color: #fff;
  box-shadow: 0 4px 20px rgba(201, 64, 62, 0.35);
}

.btn--secondary {
  background: rgba(224, 122, 95, 0.1);
  color: #f0a08a;
  border: 1px solid rgba(224, 122, 95, 0.25);
}

.btn--secondary:hover {
  background: rgba(224, 122, 95, 0.18);
  color: #fff;
}

.btn--chrome {
  background: #c9403e;
  color: #fff;
}

.btn--chrome:hover {
  background: #a83230;
  color: #fff;
  box-shadow: 0 4px 20px rgba(201, 64, 62, 0.35);
}

.btn--edge {
  background: rgba(224, 122, 95, 0.1);
  color: #f0a08a;
  border: 1px solid rgba(224, 122, 95, 0.25);
}

.btn--edge:hover {
  background: rgba(224, 122, 95, 0.18);
  color: #fff;
}

/* --- Section title ------------------------------------------------------- */

.section-title {
  text-align: center;
  font-size: 1.75rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 2.5rem;
}

/* --- Features ------------------------------------------------------------ */

.features {
  padding: 5rem 0;
}

.features__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
}

.feature-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(224, 122, 95, 0.1);
  border-radius: 12px;
  padding: 2rem 1.5rem;
  transition:
    border-color 0.25s,
    background 0.25s;
}

.feature-card:hover {
  border-color: rgba(224, 122, 95, 0.3);
  background: rgba(255, 255, 255, 0.05);
}

.feature-card__icon {
  margin-bottom: 0.75rem;
  color: #e07a5f;
}

.feature-card__icon svg {
  display: block;
}

.feature-card__title {
  font-size: 1.05rem;
  font-weight: 600;
  color: #fff;
  margin-bottom: 0.5rem;
}

.feature-card__text {
  font-size: 0.9rem;
  color: #a1a1aa;
  line-height: 1.5;
}

/* --- Platforms ----------------------------------------------------------- */

.platforms {
  padding: 4rem 0 5rem;
}

.platforms__grid {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
}

.platform-badge {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(224, 122, 95, 0.12);
  border-radius: 9999px;
  padding: 0.6rem 1.4rem;
  font-size: 0.95rem;
  font-weight: 500;
  color: #e4e4e7;
}

.platform-badge__icon {
  flex-shrink: 0;
  color: #e07a5f;
}

/* --- How it works -------------------------------------------------------- */

.how-it-works {
  padding: 4rem 0 6rem;
}

.steps {
  list-style: none;
  max-width: 560px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.steps__item {
  display: flex;
  gap: 1.25rem;
  align-items: flex-start;
}

.steps__number {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(201, 64, 62, 0.15);
  border: 1px solid rgba(224, 122, 95, 0.3);
  font-family: "Space Grotesk", "DM Sans", system-ui, sans-serif;
  font-weight: 700;
  font-size: 1rem;
  color: #e07a5f;
}

.steps__title {
  font-size: 1.05rem;
  font-weight: 600;
  color: #fff;
  margin-bottom: 0.2rem;
}

.steps__text {
  font-size: 0.9rem;
  color: #a1a1aa;
}

/* --- Legal pages (Privacy / License) ------------------------------------- */

.legal {
  padding: 4rem 0 6rem;
}

.legal h1 {
  font-size: 2rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: 0.5rem;
}

.legal__updated {
  color: #71717a;
  margin-bottom: 2.5rem;
}

.legal h2 {
  font-size: 1.3rem;
  font-weight: 700;
  color: #fff;
  margin-top: 2.5rem;
  margin-bottom: 0.75rem;
}

.legal p {
  margin-bottom: 1rem;
}

.legal ul {
  margin-bottom: 1rem;
  padding-left: 1.5rem;
}

.legal ul li {
  margin-bottom: 0.35rem;
}

.legal__table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1.5rem;
  font-size: 0.9rem;
}

.legal__table th,
.legal__table td {
  text-align: left;
  padding: 0.65rem 0.85rem;
  border-bottom: 1px solid rgba(224, 122, 95, 0.1);
}

.legal__table th {
  color: #fff;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.03);
}

.legal__table td {
  color: #a1a1aa;
}

.legal__pre {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(224, 122, 95, 0.1);
  border-radius: 8px;
  padding: 1.5rem;
  font-family: "Fira Code", "JetBrains Mono", "Cascadia Code", monospace;
  font-size: 0.85rem;
  line-height: 1.6;
  white-space: pre-wrap;
  word-wrap: break-word;
  overflow-x: auto;
  color: #d4d4d8;
  margin-top: 1.5rem;
}

/* --- Footer -------------------------------------------------------------- */

.site-footer {
  border-top: 1px solid rgba(224, 122, 95, 0.1);
  padding: 2rem 0;
  text-align: center;
}

.site-footer__links {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  margin-bottom: 0.75rem;
}

.site-footer__links a {
  color: #71717a;
  font-size: 0.85rem;
}

.site-footer__links a:hover {
  color: #e07a5f;
}

.site-footer__copy {
  font-size: 0.8rem;
  color: #52525b;
}

.site-footer__copy a {
  color: #71717a;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.site-footer__copy a:hover {
  color: #e07a5f;
}

.site-footer__badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: 0.75rem;
  padding: 0.3rem 0.75rem;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: #e07a5f;
  border: 1px solid rgba(224, 122, 95, 0.35);
  border-radius: 9999px;
  background: rgba(224, 122, 95, 0.08);
}

/* --- Responsive ---------------------------------------------------------- */

@media (max-width: 640px) {
  .site-header .container {
    flex-direction: column;
    height: auto;
    padding: 0.75rem 1rem;
    gap: 0.5rem;
  }

  .site-header__nav {
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
  }

  .hero {
    padding: 4rem 0 3.5rem;
  }

  .features__grid {
    grid-template-columns: 1fr;
  }
}
