/* PivoTV developer site — tokens from DesignTokens.swift (coral primary) */

:root {
  --ptv-primary: #ff6b4a;
  --ptv-primary-pressed: #e85534;
  --ptv-primary-soft: rgba(255, 107, 74, 0.14);
  --ptv-primary-border: rgba(255, 107, 74, 0.32);
  --ptv-ink: #1a1614;
  --ptv-ink-soft: #4a433e;
  --ptv-muted: #7e756f;
  --ptv-bg: #eceef1;
  --ptv-bg-elevated: #f7f8fa;
  --ptv-bg-secondary: #e2e5ea;
  --ptv-on-primary: #ffffff;
  --ptv-success: #3fb66b;
  --ptv-separator: rgba(26, 22, 20, 0.1);
  --ptv-radius: 18px;
  --ptv-radius-sm: 12px;
  --ptv-shadow: 0 8px 32px rgba(26, 22, 20, 0.08);
  --ptv-max: 1100px;
  /* Local/system stack — no Google Fonts CDN */
  --ptv-font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --ptv-display: ui-rounded, "SF Pro Rounded", "Segoe UI", system-ui, -apple-system, sans-serif;
}

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

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

body {
  font-family: var(--ptv-font);
  background: var(--ptv-bg);
  color: var(--ptv-ink);
  line-height: 1.65;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
}

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

a:hover {
  opacity: 0.85;
}

.container {
  width: min(100% - 40px, var(--ptv-max));
  margin-inline: auto;
}

/* Header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: color-mix(in srgb, var(--ptv-bg) 82%, transparent);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--ptv-separator);
}

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

.header-end {
  display: flex;
  align-items: center;
  gap: 14px;
  position: relative;
}

.lang-select {
  appearance: none;
  background: var(--ptv-bg-elevated);
  border: 1px solid var(--ptv-separator);
  border-radius: 999px;
  padding: 7px 32px 7px 14px;
  font-family: var(--ptv-font);
  font-size: 14px;
  font-weight: 600;
  color: var(--ptv-ink);
  cursor: pointer;
  background-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='%237e756f' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  max-width: 180px;
}

.lang-select:focus {
  outline: none;
  border-color: var(--ptv-primary-border);
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--ptv-display);
  font-weight: 800;
  font-size: 1.3rem;
  color: var(--ptv-ink);
  letter-spacing: -0.03em;
}

.logo:hover {
  opacity: 1;
}

.logo-mark {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: var(--ptv-primary);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.logo-mark svg {
  width: 16px;
  height: 16px;
  fill: var(--ptv-on-primary);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 26px;
  list-style: none;
}

.nav-links a {
  color: var(--ptv-ink-soft);
  font-size: 15px;
  font-weight: 600;
}

.nav-links a:hover {
  color: var(--ptv-ink);
  opacity: 1;
}

.nav-cta {
  padding: 8px 18px;
  background: var(--ptv-primary);
  color: var(--ptv-on-primary) !important;
  border-radius: 999px;
}

.nav-cta:hover {
  background: var(--ptv-primary-pressed);
  opacity: 1;
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  color: var(--ptv-ink);
}

/* Hero — full-bleed cinematic plane */

.hero {
  position: relative;
  min-height: min(92vh, 820px);
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  color: #f7f4f2;
}

.hero-media {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(15, 13, 12, 0.15) 0%, rgba(15, 13, 12, 0.72) 55%, rgba(15, 13, 12, 0.94) 100%),
    radial-gradient(ellipse 80% 60% at 70% 20%, rgba(255, 107, 74, 0.45) 0%, transparent 55%),
    radial-gradient(ellipse 50% 40% at 10% 80%, rgba(255, 140, 90, 0.22) 0%, transparent 50%),
    linear-gradient(135deg, #1b1816 0%, #0f0d0c 45%, #2a1a14 100%);
  animation: heroGlow 14s ease-in-out infinite alternate;
}

.hero-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.06'/%3E%3C/svg%3E");
  opacity: 0.35;
  pointer-events: none;
}

@keyframes heroGlow {
  from {
    filter: saturate(1);
  }
  to {
    filter: saturate(1.15) brightness(1.05);
  }
}

.hero .container {
  position: relative;
  z-index: 1;
  padding: 120px 0 72px;
  max-width: 720px;
}

.hero-brand {
  font-family: var(--ptv-display);
  font-size: clamp(3.4rem, 9vw, 5.5rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 0.95;
  margin-bottom: 22px;
}

.hero-brand span {
  color: var(--ptv-primary);
}

.hero h1 {
  font-family: var(--ptv-display);
  font-size: clamp(1.45rem, 3vw, 1.85rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.25;
  margin-bottom: 14px;
  max-width: 18ch;
}

.hero-lead {
  font-size: 1.08rem;
  color: rgba(247, 244, 242, 0.78);
  max-width: 36ch;
  margin-bottom: 32px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 26px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 16px;
  border: none;
  cursor: pointer;
  transition: transform 0.18s ease, background 0.15s;
  text-decoration: none;
  font-family: var(--ptv-font);
}

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

.btn-primary {
  background: var(--ptv-primary);
  color: var(--ptv-on-primary);
}

.btn-primary:hover {
  background: var(--ptv-primary-pressed);
}

.btn-ghost {
  background: rgba(255, 252, 250, 0.1);
  color: #f7f4f2;
  border: 1px solid rgba(255, 252, 250, 0.22);
}

.btn-ghost:hover {
  background: rgba(255, 252, 250, 0.18);
}

.btn-secondary {
  background: var(--ptv-bg-elevated);
  color: var(--ptv-ink);
  border: 1px solid var(--ptv-separator);
}

.btn-secondary:hover {
  border-color: var(--ptv-primary-border);
}

/* Reveal motion */

[data-reveal] {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s ease var(--reveal-delay, 0ms), transform 0.7s ease var(--reveal-delay, 0ms);
}

[data-reveal].is-revealed {
  opacity: 1;
  transform: none;
}

/* Sections */

section {
  padding: 88px 0;
}

.section-label {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--ptv-primary);
  margin-bottom: 12px;
}

.section-title {
  font-family: var(--ptv-display);
  font-size: clamp(1.7rem, 3vw, 2.2rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 14px;
}

.section-desc {
  color: var(--ptv-muted);
  max-width: 520px;
  margin-bottom: 40px;
  font-size: 1.05rem;
}

/* Features */

.features {
  background: var(--ptv-bg-secondary);
}

.feature-list {
  list-style: none;
  display: grid;
  gap: 0;
  max-width: 640px;
}

.feature-item {
  padding: 22px 0;
}

.feature-item + .feature-item {
  border-top: 1px solid var(--ptv-separator);
}

.feature-item h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 6px;
}

.feature-item p {
  color: var(--ptv-muted);
  font-size: 15.5px;
}

/* Contact */

.contact-section {
  text-align: center;
}

.contact-section .section-desc {
  margin-inline: auto;
  margin-bottom: 28px;
}

.contact-email {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 16px 28px;
  background: var(--ptv-bg-elevated);
  border: 1px solid var(--ptv-separator);
  border-radius: var(--ptv-radius);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--ptv-ink);
  box-shadow: var(--ptv-shadow);
}

.contact-email:hover {
  border-color: var(--ptv-primary-border);
  opacity: 1;
}

.contact-email svg {
  color: var(--ptv-primary);
}

.legal-quick {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
  margin-top: 28px;
}

.legal-quick a {
  font-size: 14px;
  font-weight: 600;
  color: var(--ptv-muted);
}

.legal-quick a:hover {
  color: var(--ptv-primary);
  opacity: 1;
}

/* Footer */

.site-footer {
  border-top: 1px solid var(--ptv-separator);
  padding: 36px 0;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.footer-copy {
  font-size: 14px;
  color: var(--ptv-muted);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  list-style: none;
}

.footer-links a {
  font-size: 14px;
  color: var(--ptv-muted);
  font-weight: 500;
}

.footer-links a:hover {
  color: var(--ptv-primary);
  opacity: 1;
}

/* Legal */

.legal-page,
.dmca-page {
  padding: 48px 0 80px;
}

.legal-page h1,
.dmca-page h1 {
  font-family: var(--ptv-display);
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 8px;
  letter-spacing: -0.02em;
}

.legal-updated {
  color: var(--ptv-muted);
  font-size: 14px;
  margin-bottom: 36px;
}

.legal-content h2 {
  font-size: 1.2rem;
  font-weight: 700;
  margin: 30px 0 10px;
}

.legal-content p,
.legal-content li {
  color: var(--ptv-ink-soft);
  margin-bottom: 12px;
  font-size: 16px;
  line-height: 1.7;
}

.legal-content ul {
  padding-inline-start: 22px;
  margin-bottom: 14px;
}

.legal-content a {
  word-break: break-all;
}

/* DMCA */

.dmca-container {
  max-width: 640px;
}

.dmca-intro {
  color: var(--ptv-muted);
  font-size: 1.05rem;
  margin-bottom: 32px;
}

.dmca-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
  background: var(--ptv-bg-elevated);
  border: 1px solid var(--ptv-separator);
  border-radius: var(--ptv-radius);
  padding: 28px;
}

.form-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-row-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.form-label {
  font-size: 15px;
  font-weight: 600;
}

.form-required {
  color: var(--ptv-primary);
}

.form-input,
.form-textarea {
  width: 100%;
  padding: 12px 14px;
  font-family: var(--ptv-font);
  font-size: 16px;
  color: var(--ptv-ink);
  background: var(--ptv-bg);
  border: 1px solid var(--ptv-separator);
  border-radius: var(--ptv-radius-sm);
}

.form-input:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--ptv-primary-border);
}

.form-textarea {
  resize: vertical;
  min-height: 96px;
}

.form-check {
  flex-direction: row;
  align-items: flex-start;
  gap: 12px;
}

.form-check input {
  width: 18px;
  height: 18px;
  margin-top: 3px;
  accent-color: var(--ptv-primary);
}

.form-check label {
  font-size: 14px;
  color: var(--ptv-muted);
  cursor: pointer;
}

.dmca-submit {
  align-self: flex-start;
  margin-top: 4px;
}

.dmca-success {
  text-align: center;
  background: var(--ptv-bg-elevated);
  border: 1px solid var(--ptv-primary-border);
  border-radius: var(--ptv-radius);
  padding: 48px 28px;
}

.dmca-success-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 18px;
  background: rgba(63, 182, 107, 0.14);
  color: var(--ptv-success);
  border-radius: 50%;
  display: grid;
  place-items: center;
}

.dmca-success h2 {
  font-family: var(--ptv-display);
  font-size: 1.45rem;
  margin-bottom: 10px;
}

.dmca-success p {
  color: var(--ptv-muted);
  max-width: 420px;
  margin: 0 auto 24px;
}

/* Show landing */

.show-landing {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: #0f0d0c;
  color: #f7f4f2;
}

.show-landing main {
  flex: 1;
  display: grid;
  place-items: center;
  padding: 80px 24px;
  text-align: center;
  background:
    radial-gradient(ellipse 70% 50% at 50% 0%, rgba(255, 107, 74, 0.28) 0%, transparent 55%),
    #0f0d0c;
}

.show-landing h1 {
  font-family: var(--ptv-display);
  font-size: clamp(2rem, 6vw, 3rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 12px;
}

.show-landing p {
  color: rgba(247, 244, 242, 0.72);
  margin-bottom: 28px;
  max-width: 36ch;
}

.show-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
}

@media (max-width: 900px) {
  .hero .container {
    padding: 100px 0 56px;
  }
}

@media (max-width: 640px) {
  .nav-links {
    display: none;
    position: absolute;
    top: 64px;
    inset-inline: 0;
    flex-direction: column;
    background: var(--ptv-bg-elevated);
    border-bottom: 1px solid var(--ptv-separator);
    padding: 16px 24px 24px;
    gap: 14px;
    z-index: 99;
  }

  .nav-links.open {
    display: flex;
  }

  .menu-toggle {
    display: block;
  }

  .form-row-split {
    grid-template-columns: 1fr;
  }

  .dmca-form {
    padding: 22px 18px;
  }

  .dmca-submit {
    width: 100%;
    justify-content: center;
  }

  .footer-inner {
    flex-direction: column;
    text-align: center;
  }

  .footer-links {
    justify-content: center;
  }

  section {
    padding: 64px 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-media {
    animation: none;
  }

  [data-reveal] {
    opacity: 1;
    transform: none;
    transition: none;
  }
}


/* RTL (Arabic) */
html[dir="rtl"] .lang-select {
  padding: 7px 14px 7px 32px;
  background-position: left 12px center;
}

html[dir="rtl"] .header-inner,
html[dir="rtl"] .footer-inner,
html[dir="rtl"] .hero-actions,
html[dir="rtl"] .contact-links {
  direction: rtl;
}

html[dir="rtl"] .legal-content {
  text-align: right;
}
