/* Profit Log — Premium Visual Layer */

:root {
  --premium-glow: rgba(16, 185, 129, 0.22);
  --premium-glow-strong: rgba(16, 185, 129, 0.35);
  --glass: rgba(255, 255, 255, 0.06);
  --glass-border: rgba(255, 255, 255, 0.12);
  --frame-titanium: linear-gradient(155deg, #48484a 0%, #2c2c2e 35%, #1c1c1e 70%, #3a3a3c 100%);
  --frame-highlight: rgba(255, 255, 255, 0.14);
  --ease-premium: cubic-bezier(0.22, 1, 0.36, 1);
  --font-display: "Plus Jakarta Sans", var(--font);
  --section-gap: 96px;
}

/* Typography */
h1, h2, .section-header h2, .hero h1 {
  font-family: var(--font-display);
  letter-spacing: -0.035em;
}

.hero h1 {
  font-weight: 800;
  line-height: 1.08;
}

.section-header h2 {
  font-weight: 800;
  letter-spacing: -0.03em;
}

.section-header p {
  font-size: 1.125rem;
  line-height: 1.7;
}

/* Scroll reveal */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s var(--ease-premium), transform 0.7s var(--ease-premium);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-delay-1 { transition-delay: 0.08s; }
.reveal-delay-2 { transition-delay: 0.16s; }
.reveal-delay-3 { transition-delay: 0.24s; }

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .pl-device--float,
  .hero-glow-orb {
    animation: none !important;
  }
}

/* Header glass */
.site-header {
  background: rgba(10, 15, 26, 0.72);
  backdrop-filter: blur(20px) saturate(1.4);
  -webkit-backdrop-filter: blur(20px) saturate(1.4);
}

/* Premium buttons */
.btn-primary {
  background: linear-gradient(135deg, #12c98e 0%, var(--emerald) 45%, var(--emerald-dark) 100%);
  box-shadow: 0 4px 20px var(--premium-glow), inset 0 1px 0 rgba(255,255,255,0.2);
  transition: transform 0.25s var(--ease-premium), box-shadow 0.25s var(--ease-premium), background 0.25s ease;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px var(--premium-glow-strong), inset 0 1px 0 rgba(255,255,255,0.25);
}

.btn-outline {
  backdrop-filter: blur(8px);
  transition: transform 0.25s var(--ease-premium), background 0.25s ease, border-color 0.25s ease;
}

.btn-outline:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.1);
}

/* ——— Hero Premium ——— */

.hero {
  padding: 88px 0 100px;
  background: radial-gradient(ellipse 80% 60% at 70% 20%, rgba(16, 185, 129, 0.12) 0%, transparent 55%),
              radial-gradient(ellipse 50% 40% at 20% 80%, rgba(30, 58, 95, 0.25) 0%, transparent 50%),
              var(--navy);
  overflow: hidden;
}

.hero::before {
  display: none;
}

.hero-glow-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
  animation: orb-drift 12s ease-in-out infinite alternate;
}

.hero-glow-orb--1 {
  width: 420px;
  height: 420px;
  background: var(--premium-glow);
  top: -10%;
  right: 5%;
}

.hero-glow-orb--2 {
  width: 300px;
  height: 300px;
  background: rgba(30, 58, 95, 0.35);
  bottom: 10%;
  left: -5%;
  animation-delay: -4s;
}

@keyframes orb-drift {
  from { transform: translate(0, 0) scale(1); }
  to { transform: translate(-20px, 15px) scale(1.05); }
}

.hero-badge {
  backdrop-filter: blur(12px);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.08);
}

.hero-content {
  position: relative;
  z-index: 2;
}

.hero-visual {
  position: relative;
  z-index: 2;
  min-height: 440px;
}

.hero-devices-premium {
  position: relative;
  width: 100%;
  max-width: 560px;
  height: 420px;
  margin: 0 auto;
}

/* Device frames — iPhone 15 Pro / iPad Pro style */
.pl-device {
  position: absolute;
  background: var(--frame-titanium);
  box-shadow:
    inset 0 1px 0 var(--frame-highlight),
    inset 0 -1px 0 rgba(0,0,0,0.4),
    0 0 0 1px rgba(0,0,0,0.5),
    0 32px 64px -16px rgba(0,0,0,0.55),
    0 0 60px rgba(16, 185, 129, 0.06);
  transition: transform 0.4s var(--ease-premium);
}

.pl-device::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(135deg, rgba(255,255,255,0.12) 0%, transparent 40%, transparent 60%, rgba(255,255,255,0.04) 100%);
  pointer-events: none;
}

.pl-device--iphone {
  width: 220px;
  padding: 11px;
  border-radius: 44px;
  right: 0;
  bottom: 0;
  z-index: 3;
}

.pl-device--ipad {
  width: 380px;
  padding: 14px;
  border-radius: 22px;
  left: 0;
  top: 20px;
  z-index: 1;
}

.pl-device--float {
  animation: device-float 6s ease-in-out infinite;
}

.pl-device--iphone.pl-device--float {
  animation-delay: -1.5s;
}

@keyframes device-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

.pl-device-screen {
  background: #f2f2f7;
  border-radius: inherit;
  overflow: hidden;
  position: relative;
  width: 100%;
}

.device-screenshot {
  display: block;
  width: 100%;
  height: 100%;
  min-height: inherit;
  object-fit: cover;
  object-position: top center;
  transition: opacity 0.35s var(--ease-premium);
}

.pl-device--iphone .pl-device-screen {
  border-radius: 34px;
  min-height: 460px;
}

.pl-device--ipad .pl-device-screen {
  border-radius: 10px;
  min-height: 280px;
}

.pl-dynamic-island {
  position: absolute;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  width: 88px;
  height: 26px;
  background: #000;
  border-radius: 18px;
  z-index: 10;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.06);
}

.pl-device-btn {
  position: absolute;
  background: #2c2c2e;
  border-radius: 2px;
}

.pl-device--iphone .pl-device-btn--power {
  right: -3px;
  top: 120px;
  width: 3px;
  height: 56px;
}

.pl-device--iphone .pl-device-btn--vol-up {
  left: -3px;
  top: 100px;
  width: 3px;
  height: 32px;
}

.pl-device--iphone .pl-device-btn--vol-down {
  left: -3px;
  top: 140px;
  width: 3px;
  height: 32px;
}

.mockup-float-card {
  z-index: 4;
  backdrop-filter: blur(16px);
  background: rgba(255,255,255,0.92);
  border: 1px solid rgba(255,255,255,0.8);
  box-shadow: 0 16px 40px rgba(0,0,0,0.15);
  animation: card-float 5s ease-in-out infinite;
}

@keyframes card-float {
  0%, 100% { transform: translateY(0) rotate(-1deg); }
  50% { transform: translateY(-8px) rotate(0deg); }
}

/* Hero screen content */
.hero-screen-pad {
  padding: 28px 20px 16px;
  background: #f8fafc;
  min-height: 280px;
}

.hero-screen-phone {
  padding: 44px 14px 14px;
  background: #fff;
  min-height: 460px;
}

.hero-ipad-dash {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 10px;
  margin-bottom: 14px;
}

.hero-ipad-stat {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px;
}

.hero-ipad-stat span {
  display: block;
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.hero-ipad-stat strong {
  font-size: 16px;
  font-weight: 800;
  color: var(--text);
}

.hero-ipad-chart {
  height: 100px;
  background: linear-gradient(180deg, rgba(16,185,129,0.2) 0%, transparent 70%);
  border-radius: 10px;
  border: 1px solid var(--border);
  position: relative;
}

.hero-ipad-chart::after {
  content: "";
  position: absolute;
  bottom: 12px;
  left: 12px;
  right: 12px;
  height: 50px;
  background: linear-gradient(90deg, transparent, rgba(16,185,129,0.4) 30%, rgba(16,185,129,0.7) 70%, var(--emerald));
  clip-path: polygon(0 100%, 10% 70%, 25% 75%, 40% 45%, 55% 55%, 70% 30%, 85% 40%, 100% 15%, 100% 100%);
  border-radius: 0 0 4px 4px;
}

.hero-ipad-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 12px;
}

/* ——— Simulator Premium ——— */

.simulator-section {
  background: linear-gradient(180deg, #f8fafc 0%, #eef2f7 50%, #f8fafc 100%);
  position: relative;
  overflow: hidden;
}

.simulator-section::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 80%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(16,185,129,0.3), transparent);
}

.simulator-layout-premium {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 40px;
  align-items: start;
}

.simulator-nav-premium {
  display: flex;
  flex-direction: column;
  gap: 4px;
  position: sticky;
  top: 100px;
  padding: 8px;
  background: rgba(255,255,255,0.7);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.sim-nav-btn-premium {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 12px 14px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  text-align: left;
  color: var(--text-soft);
  background: transparent;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s var(--ease-premium);
  position: relative;
}

.sim-nav-btn-premium:hover {
  background: rgba(16,185,129,0.06);
  color: var(--emerald-dark);
}

.sim-nav-btn-premium.active {
  background: linear-gradient(135deg, rgba(16,185,129,0.14), rgba(16,185,129,0.06));
  color: var(--emerald-dark);
  font-weight: 600;
  box-shadow: inset 3px 0 0 var(--emerald);
}

.sim-nav-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  opacity: 0.7;
}

.sim-nav-btn-premium.active .sim-nav-icon {
  opacity: 1;
  color: var(--emerald);
}

.simulator-stage {
  position: relative;
}

.simulator-devices-row {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 32px;
  padding: 24px 0 16px;
  min-height: 520px;
}

.simulator-devices-row .pl-device {
  position: relative;
  left: auto;
  right: auto;
  top: auto;
  bottom: auto;
}

.simulator-devices-row .pl-device--ipad {
  width: 440px;
}

.simulator-devices-row .pl-device--iphone {
  width: 260px;
}

.simulator-devices-row .pl-device--iphone .pl-device-screen {
  min-height: 520px;
}

.simulator-devices-row .pl-device--ipad .pl-device-screen {
  min-height: 320px;
}

/* Screen transitions */
.sim-screens-wrap {
  position: relative;
  width: 100%;
  height: 100%;
}

.sim-screen-panel {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity 0.35s var(--ease-premium), transform 0.35s var(--ease-premium), visibility 0.35s;
}

.sim-screen-panel.active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  position: relative;
}

.sim-screen-panel[hidden] {
  display: none;
}

.sim-screens-phone,
.sim-screens-ipad {
  position: relative;
  min-height: 480px;
}

.sim-screens-phone .sim-screen-panel,
.sim-screens-ipad .sim-screen-panel {
  min-height: 480px;
  display: flex;
  flex-direction: column;
}

.template-modal[hidden] {
  display: none !important;
}

.template-modal.open {
  display: flex !important;
}

/* Mobile device toggle */
.device-toggle-mobile {
  display: none;
  justify-content: center;
  gap: 8px;
  margin-bottom: 20px;
  padding: 4px;
  background: rgba(255,255,255,0.8);
  border: 1px solid var(--border);
  border-radius: 100px;
  width: fit-content;
  margin-left: auto;
  margin-right: auto;
}

.device-toggle-btn {
  padding: 10px 20px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  border: none;
  border-radius: 100px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}

.device-toggle-btn.active {
  background: var(--emerald);
  color: #fff;
  box-shadow: 0 4px 12px var(--premium-glow);
}

.simulator-device-mobile-only {
  display: none;
}

/* iPad app UI */
.pad-ui {
  padding: 20px 18px 14px;
  background: #f2f2f7;
  min-height: 100%;
  font-size: 11px;
}

.pad-ui-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.pad-ui-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
}

.pad-ui-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 12px;
}

.pad-ui-grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.pad-stat {
  background: #fff;
  border-radius: 10px;
  padding: 12px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.pad-stat .label {
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
}

.pad-stat .value {
  font-size: 15px;
  font-weight: 800;
  color: var(--text);
}

.pad-chart-wide {
  height: 90px;
  background: linear-gradient(180deg, rgba(16,185,129,0.18), transparent);
  border-radius: 10px;
  margin-bottom: 12px;
}

.pad-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.pad-card {
  background: #fff;
  border-radius: 10px;
  padding: 12px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.pad-table-row {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 80px;
  gap: 8px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  font-size: 10px;
  align-items: center;
}

.pad-table-head {
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  font-size: 8px;
  letter-spacing: 0.04em;
}

.pad-template-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.pad-template-tile {
  height: 64px;
  border-radius: 8px;
  display: flex;
  align-items: flex-end;
  padding: 6px;
  font-size: 9px;
  font-weight: 700;
  color: #fff;
}

/* ——— Feature cards premium ——— */

.feature-card {
  background: linear-gradient(145deg, rgba(255,255,255,0.06) 0%, rgba(255,255,255,0.02) 100%);
  backdrop-filter: blur(8px);
  transition: transform 0.3s var(--ease-premium), border-color 0.3s ease, box-shadow 0.3s ease;
}

.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.2);
  border-color: rgba(16, 185, 129, 0.35);
}

.feature-icon {
  background: linear-gradient(135deg, rgba(16,185,129,0.2), rgba(16,185,129,0.08));
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.1);
}

/* ——— Template cards premium ——— */

.template-card {
  border-radius: var(--radius-lg);
  transition: transform 0.35s var(--ease-premium), box-shadow 0.35s var(--ease-premium);
  cursor: pointer;
  position: relative;
}

.template-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(135deg, rgba(16,185,129,0.08), transparent 60%);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
  z-index: 1;
}

.template-card:hover {
  transform: translateY(-6px) scale(1.01);
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.15);
}

.template-card:hover::before {
  opacity: 1;
}

.template-preview {
  height: 160px;
  transition: transform 0.35s var(--ease-premium);
}

.template-card:hover .template-preview {
  transform: scale(1.02);
}

.template-doc-frame {
  position: absolute;
  top: 12px;
  left: 12px;
  right: 12px;
  bottom: 28px;
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: 4px;
  opacity: 0.4;
}

.template-expand-hint {
  position: absolute;
  bottom: 10px;
  right: 12px;
  font-size: 10px;
  font-weight: 600;
  color: rgba(255,255,255,0.8);
  opacity: 0;
  transition: opacity 0.25s ease;
  z-index: 2;
}

.template-card:hover .template-expand-hint {
  opacity: 1;
}

/* Template modal */
.template-modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(10, 15, 26, 0.75);
  backdrop-filter: blur(12px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.template-modal.open {
  opacity: 1;
  visibility: visible;
}

.template-modal-inner {
  background: var(--surface);
  border-radius: var(--radius-lg);
  max-width: 480px;
  width: 100%;
  overflow: hidden;
  box-shadow: 0 32px 80px rgba(0,0,0,0.35);
  transform: scale(0.95) translateY(12px);
  transition: transform 0.35s var(--ease-premium);
}

.template-modal.open .template-modal-inner {
  transform: scale(1) translateY(0);
}

.template-modal-preview {
  height: 220px;
}

.template-modal-body {
  padding: 24px;
}

.template-modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 50%;
  background: rgba(255,255,255,0.9);
  font-size: 20px;
  cursor: pointer;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow);
}

/* ——— Pricing premium ——— */

.pricing-card {
  border-radius: 20px;
  transition: transform 0.35s var(--ease-premium), box-shadow 0.35s ease;
  overflow: hidden;
}

.pricing-card:hover {
  transform: translateY(-4px);
}

.pricing-card.popular {
  background: linear-gradient(180deg, #fff 0%, #f0fdf8 100%);
  box-shadow: 0 0 0 1px var(--emerald), 0 24px 48px rgba(16, 185, 129, 0.15);
  transform: scale(1.03);
}

.pricing-card.popular:hover {
  transform: scale(1.03) translateY(-4px);
  box-shadow: 0 0 0 1px var(--emerald), 0 32px 64px rgba(16, 185, 129, 0.2);
}

.pricing-badge {
  box-shadow: 0 4px 12px var(--premium-glow);
}

.pricing-save {
  background: linear-gradient(135deg, rgba(16,185,129,0.15), rgba(16,185,129,0.08));
}

.pricing-trial-note {
  background: linear-gradient(135deg, rgba(16,185,129,0.1), rgba(16,185,129,0.04));
  border: 1px solid rgba(16,185,129,0.2);
  border-radius: var(--radius);
}

/* ——— Workflow / privacy cards ——— */

.workflow-card,
.privacy-card {
  transition: transform 0.3s var(--ease-premium), box-shadow 0.3s ease;
}

.workflow-card:hover,
.privacy-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

/* ——— FAQ premium ——— */

.faq-item {
  border-radius: var(--radius);
  transition: box-shadow 0.25s ease;
}

.faq-item[open] {
  box-shadow: var(--shadow-lg);
}

.faq-item summary {
  transition: color 0.2s ease;
}

.faq-item[open] summary {
  color: var(--emerald-dark);
}

/* ——— CTA section ——— */

.cta-section {
  background: radial-gradient(ellipse 70% 80% at 50% 120%, var(--premium-glow) 0%, transparent 55%),
              linear-gradient(135deg, var(--navy) 0%, var(--navy-3) 100%);
  border: 1px solid var(--glass-border);
}

/* ——— Section spacing ——— */

.section {
  padding: var(--section-gap) 0;
}

/* ——— Responsive ——— */

@media (max-width: 1100px) {
  .simulator-layout-premium {
    grid-template-columns: 1fr;
  }

  .simulator-nav-premium {
    position: static;
    flex-direction: row;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory;
  }

  .sim-nav-btn-premium {
    flex-shrink: 0;
    scroll-snap-align: start;
    white-space: nowrap;
  }

  .simulator-devices-row {
    flex-direction: column;
    align-items: center;
    gap: 24px;
    min-height: auto;
  }

  .simulator-devices-row .pl-device--ipad {
    width: 100%;
    max-width: 480px;
  }

  .simulator-devices-row .pl-device--iphone {
    width: 100%;
    max-width: 280px;
  }
}

@media (max-width: 768px) {
  .hero-devices-premium {
    height: 380px;
    max-width: 100%;
  }

  .pl-device--ipad {
    width: 72%;
    left: 0;
    top: 10px;
  }

  .pl-device--iphone {
    width: 42%;
    right: 4%;
  }

  .device-toggle-mobile {
    display: flex;
  }

  .simulator-devices-row .pl-device--hidden-mobile {
    display: none;
  }

  .simulator-devices-row .pl-device--visible-mobile {
    display: block;
  }

  .pricing-card.popular {
    transform: none;
  }

  .pricing-card.popular:hover {
    transform: translateY(-4px);
  }

  :root {
    --section-gap: 72px;
  }
}

@media (min-width: 769px) {
  .simulator-devices-row .pl-device--ipad,
  .simulator-devices-row .pl-device--iphone {
    display: block;
  }
}
