/* ============================================================
   Plen Website — Shared Stylesheet
   v0.1.0
   ============================================================ */

/* --- CSS Custom Properties --- */
:root {
  --color-primary: #4a90d9;
  --color-primary-hover: #3a7bc8;
  --color-primary-light: #e8f0fb;
  --color-text: #1a1d23;
  --color-text-secondary: #5f6368;
  --color-text-muted: #8a8f98;
  --color-bg: #ffffff;
  --color-bg-alt: #f8f9fb;
  --color-border: #e0e2e6;
  --color-success: #27ae60;
  --color-error: #e74c3c;

  --font-stack: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
    Oxygen, Ubuntu, Cantarell, 'Helvetica Neue', sans-serif;

  --max-width: 960px;
  --max-width-narrow: 640px;

  --radius: 8px;
  --radius-lg: 12px;
  --radius-pill: 999px;

  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.1);

  --transition: 0.2s ease;
}

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-stack);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.6;
  font-size: 16px;
}

img,
video,
iframe {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

ul {
  list-style: none;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

/* --- Typography --- */
h1 {
  font-size: 2.75rem;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

h2 {
  font-size: 2rem;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.015em;
}

h3 {
  font-size: 1.375rem;
  font-weight: 600;
  line-height: 1.3;
}

p {
  line-height: 1.7;
  color: var(--color-text-secondary);
}

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

.container--narrow {
  max-width: var(--max-width-narrow);
}

.section {
  padding: 80px 0;
}

.section--alt {
  background: var(--color-bg-alt);
}

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

/* ============================================================
   BETA BANNER
   ============================================================ */
.beta-banner {
  background: #fef9e7;
  border-bottom: 1px solid #f9e79f;
  padding: 8px 24px;
  text-align: center;
  font-size: 0.8125rem;
  color: #7d6608;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.beta-banner__text {
  flex: 1;
}

.beta-banner__close {
  background: none;
  border: none;
  color: #b7950b;
  font-size: 1.125rem;
  cursor: pointer;
  padding: 0 4px;
  line-height: 1;
  flex-shrink: 0;
}

.beta-banner__close:hover {
  color: #7d6608;
}

/* ============================================================
   NAVIGATION
   ============================================================ */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-border);
}

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

.nav__logo {
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--color-text);
  text-decoration: none;
}

.nav__links {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav__link {
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--color-text-secondary);
  text-decoration: none;
  transition: color var(--transition);
}

.nav__link:hover {
  color: var(--color-text);
}

.nav__buy {
  display: inline-flex;
  align-items: center;
  padding: 8px 20px;
  background: var(--color-primary);
  color: #fff;
  font-size: 0.9375rem;
  font-weight: 600;
  border-radius: var(--radius-pill);
  transition: background var(--transition), transform var(--transition);
  cursor: pointer;
  border: none;
}

.nav__buy:hover {
  background: var(--color-primary-hover);
  transform: translateY(-1px);
}

/* Mobile nav */
.nav__toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 4px;
  cursor: pointer;
}

.nav__toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--color-text);
  border-radius: 2px;
  transition: var(--transition);
}

@media (max-width: 768px) {
  .nav__toggle {
    display: flex;
  }

  .nav__links {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--color-bg);
    border-bottom: 1px solid var(--color-border);
    flex-direction: column;
    padding: 24px;
    gap: 20px;
    box-shadow: var(--shadow-md);
  }

  .nav__links.open {
    display: flex;
  }
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 28px;
  font-size: 1rem;
  font-weight: 600;
  border-radius: var(--radius-pill);
  transition: all var(--transition);
  cursor: pointer;
  border: none;
  text-decoration: none;
}

.btn--primary {
  background: var(--color-primary);
  color: #fff;
}

.btn--primary:hover {
  background: var(--color-primary-hover);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn--secondary {
  background: var(--color-bg);
  color: var(--color-text);
  border: 2px solid var(--color-border);
}

.btn--secondary:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
  transform: translateY(-1px);
}

.btn--small {
  padding: 8px 20px;
  font-size: 0.875rem;
}

.btn--large {
  padding: 16px 36px;
  font-size: 1.125rem;
}

.btn-group {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.btn-group--center {
  justify-content: center;
}

/* ============================================================
   HERO
   ============================================================ */
.hero {
  padding: 60px 0 40px;
  text-align: center;
}

.hero__video-wrap {
  max-width: 800px;
  margin: 0 auto 40px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  aspect-ratio: 16 / 9;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero__video-wrap video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero__ctas {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ============================================================
   FEATURE SECTIONS
   ============================================================ */
.feature-section {
  padding: 80px 0;
}

.feature-section__inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

.feature-section__header {
  text-align: center;
  margin-bottom: 48px;
}

.feature-section__header h2 {
  margin-bottom: 12px;
}

.feature-section__header p {
  font-size: 1.125rem;
  max-width: 560px;
  margin: 0 auto;
}

/* Alternating feature rows */
.feature-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
  margin-bottom: 64px;
}

.feature-row:last-child {
  margin-bottom: 0;
}

.feature-row--reverse {
  direction: rtl;
}

.feature-row--reverse > * {
  direction: ltr;
}

.feature-row__text h3 {
  margin-bottom: 12px;
}

.feature-row__text p {
  font-size: 1rem;
}

.feature-row__visual {
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  aspect-ratio: 4 / 3;
  display: flex;
  align-items: center;
  justify-content: center;
}

@media (max-width: 768px) {
  .feature-row {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .feature-row--reverse {
    direction: ltr;
  }
}

/* ============================================================
   GANTT BAR ILLUSTRATIONS (Home page decorative bars)
   ============================================================ */
.gantt-bars {
  display: flex;
  gap: 8px;
  align-items: flex-end;
  padding: 24px 0;
}

.gantt-bar {
  height: 28px;
  border-radius: 6px;
  flex-shrink: 0;
}

.gantt-bar--blue {
  background: var(--color-primary);
}

.gantt-bar--green {
  background: var(--color-success);
}

.gantt-bar--orange {
  background: #e67e22;
}

.gantt-bar--gray {
  background: var(--color-border);
}

/* ============================================================
   INTERACTIVE DEMO EMBED
   ============================================================ */
.demo-embed {
  max-width: 800px;
  margin: 0 auto;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-lg);
  background: #fff;
}

.demo-embed iframe {
  width: 100%;
  height: 500px;
  border: none;
}

/* ============================================================
   PERSONA CARDS (Who is it for?)
   ============================================================ */
.persona-grid {
  display: grid;
  gap: 24px;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

.persona-card {
  display: flex;
  gap: 20px;
  align-items: flex-start;
}

.persona-card__icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius);
  background: var(--color-primary);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.persona-card__icon svg {
  width: 20px;
  height: 20px;
  fill: #fff;
}

.persona-card__text h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 4px;
}

.persona-card__text p {
  font-size: 0.9375rem;
  line-height: 1.5;
}

/* ============================================================
   COMPARISON TABLE
   ============================================================ */
.comparison-table {
  width: 100%;
  border-collapse: collapse;
  margin: 32px 0;
  font-size: 0.9375rem;
}

.comparison-table th,
.comparison-table td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid var(--color-border);
}

.comparison-table th {
  font-weight: 600;
  font-size: 0.8125rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text-muted);
  background: var(--color-bg-alt);
}

.comparison-table td:nth-child(2),
.comparison-table td:nth-child(3),
.comparison-table th:nth-child(2),
.comparison-table th:nth-child(3) {
  text-align: center;
  width: 120px;
}

.comparison-table .check {
  color: var(--color-success);
  font-size: 1.125rem;
}

.comparison-table .cross {
  color: var(--color-error);
  font-size: 1.125rem;
}

.comparison-table .dash {
  color: var(--color-text-muted);
}

/* ============================================================
   FAQ
   ============================================================ */
.faq-list {
  max-width: var(--max-width-narrow);
  margin: 0 auto;
}

.faq-item {
  border-bottom: 1px solid var(--color-border);
  padding: 24px 0;
}

.faq-item__question {
  font-size: 1.0625rem;
  font-weight: 600;
  color: var(--color-text);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  width: 100%;
  text-align: left;
  padding: 0;
  background: none;
  border: none;
  font-family: inherit;
}

.faq-item__question::after {
  content: '+';
  font-size: 1.25rem;
  font-weight: 400;
  color: var(--color-text-muted);
  transition: transform var(--transition);
  flex-shrink: 0;
}

.faq-item.open .faq-item__question::after {
  content: '\2212';
}

.faq-item__answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s ease;
}

.faq-item.open .faq-item__answer {
  max-height: 500px;
  padding-top: 12px;
}

.faq-item__answer p {
  font-size: 0.9375rem;
  line-height: 1.7;
}

/* ============================================================
   FORMS
   ============================================================ */
.form {
  max-width: 480px;
  margin: 0 auto;
}

.form__group {
  margin-bottom: 20px;
}

.form__label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 6px;
  color: var(--color-text);
}

.form__input,
.form__textarea {
  width: 100%;
  padding: 12px 16px;
  font-size: 1rem;
  font-family: inherit;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: var(--color-bg);
  color: var(--color-text);
  transition: border-color var(--transition), box-shadow var(--transition);
}

.form__input:focus,
.form__textarea:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(74, 144, 217, 0.15);
}

.form__input::placeholder,
.form__textarea::placeholder {
  color: var(--color-text-muted);
}

.form__textarea {
  min-height: 160px;
  resize: vertical;
}

.form__submit {
  width: 100%;
}

/* Form messages */
.form__message {
  margin-top: 20px;
  padding: 14px 18px;
  border-radius: var(--radius);
  font-size: 0.9375rem;
  display: none;
}

.form__message--success {
  display: block;
  background: #eafaf1;
  color: #1e8449;
  border: 1px solid #a9dfbf;
}

.form__message--error {
  display: block;
  background: #fdedec;
  color: #c0392b;
  border: 1px solid #f5b7b1;
}

.form__message--info {
  display: block;
  background: var(--color-primary-light);
  color: #2471a3;
  border: 1px solid #aed6f1;
}

/* ============================================================
   VIDEO PLACEHOLDER
   ============================================================ */
.video-placeholder {
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  aspect-ratio: 16 / 9;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-muted);
  font-size: 0.9375rem;
  font-style: italic;
}

/* ============================================================
   TUTORIAL SECTIONS
   ============================================================ */
.tutorial-section {
  margin-bottom: 48px;
}

.tutorial-section h3 {
  margin-bottom: 16px;
}

/* ============================================================
   PAGE HEADER (for interior pages)
   ============================================================ */
.page-header {
  padding: 60px 0 40px;
  text-align: center;
}

.page-header h1 {
  margin-bottom: 12px;
}

.page-header p {
  font-size: 1.125rem;
  max-width: 560px;
  margin: 0 auto;
}

/* ============================================================
   ABOUT PAGE — Story
   ============================================================ */
.about-story {
  max-width: var(--max-width-narrow);
  margin: 0 auto;
  padding: 0 24px 60px;
}

.about-story p {
  margin-bottom: 20px;
  font-size: 1.0625rem;
  line-height: 1.8;
}

.about-story .signature {
  font-weight: 600;
  color: var(--color-text);
  margin-top: 32px;
}

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  padding: 60px 0 40px;
  text-align: center;
  border-top: 1px solid var(--color-border);
}

.footer h2 {
  font-size: 1.5rem;
  margin-bottom: 24px;
}

.footer__buttons {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 32px;
}

.footer__terms {
  font-size: 0.875rem;
  color: var(--color-text-muted);
}

.footer__terms a {
  color: var(--color-text-secondary);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.footer__terms a:hover {
  color: var(--color-text);
}

/* ============================================================
   UTILITIES
   ============================================================ */
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mt-32 { margin-top: 32px; }
.mt-48 { margin-top: 48px; }
.mb-8 { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.mb-32 { margin-bottom: 32px; }
.mb-48 { margin-bottom: 48px; }

/* ============================================================
   FADE-IN ON SCROLL ANIMATION
   ============================================================ */
.fade-up {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 768px) {
  h1 {
    font-size: 2rem;
  }

  h2 {
    font-size: 1.5rem;
  }

  .section {
    padding: 48px 0;
  }

  .hero {
    padding: 40px 0 24px;
  }

  .page-header {
    padding: 40px 0 24px;
  }

  .feature-section {
    padding: 48px 0;
  }

  .demo-embed iframe {
    height: 350px;
  }

  .comparison-table {
    font-size: 0.8125rem;
  }

  .comparison-table th,
  .comparison-table td {
    padding: 10px 8px;
  }
}

@media (max-width: 480px) {
  h1 {
    font-size: 1.75rem;
  }

  .hero__ctas {
    flex-direction: column;
    align-items: center;
  }

  .btn-group {
    flex-direction: column;
    align-items: center;
  }
}
