/* ============================================
   Open Note — GitHub Pages
   Premium Design · Nautical Blue
   ============================================ */

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

:root {
  /* Nautical Blue Palette */
  --navy-950: #0a1628;
  --navy-900: #0f2140;
  --navy-800: #162d54;
  --navy-700: #1e3a6e;
  --navy-600: #274a8a;
  --navy-500: #2e5eaa;
  --navy-400: #4a7ec4;
  --navy-300: #7ba3d8;
  --navy-200: #a8c4e8;
  --navy-100: #d4e2f4;
  --navy-50: #eef3fa;

  /* Accent */
  --accent: #3b82f6;
  --accent-hover: #2563eb;
  --accent-subtle: rgba(59, 130, 246, 0.08);

  /* Neutrals */
  --white: #ffffff;
  --gray-50: #f8fafc;
  --gray-100: #f1f5f9;
  --gray-200: #e2e8f0;
  --gray-300: #cbd5e1;
  --gray-400: #94a3b8;
  --gray-500: #64748b;
  --gray-600: #475569;
  --gray-700: #334155;
  --gray-800: #1e293b;
  --gray-900: #0f172a;

  /* Typography */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', 'Cascadia Code', monospace;

  /* Spacing */
  --section-padding: 6rem 0;
  --container-width: 1120px;
  --border-radius: 12px;
  --border-radius-lg: 20px;
  --border-radius-xl: 28px;

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-md: 0 4px 12px rgba(15, 23, 42, 0.06);
  --shadow-lg: 0 8px 30px rgba(15, 23, 42, 0.08);
  --shadow-xl: 0 16px 48px rgba(15, 23, 42, 0.10);
  --shadow-glow: 0 0 40px rgba(59, 130, 246, 0.15);

  /* Transitions */
  --transition: 200ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 400ms cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.7;
  color: var(--gray-700);
  background: var(--white);
  overflow-x: hidden;
}

a {
  color: var(--navy-600);
  text-decoration: none;
  transition: color var(--transition);
}

a:hover {
  color: var(--navy-500);
}

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

/* --- Layout --- */
.container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* --- Header / Navbar --- */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 1rem 0;
  transition: all var(--transition);
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  border-bottom: 1px solid rgba(226, 232, 240, 0.6);
}

.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.navbar-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--navy-900);
}

.navbar-brand img {
  width: 36px;
  height: 36px;
}

.navbar-nav {
  display: flex;
  align-items: center;
  gap: 2rem;
  list-style: none;
}

.navbar-nav a {
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--gray-600);
  transition: color var(--transition);
}

.navbar-nav a:hover {
  color: var(--navy-700);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.625rem 1.5rem;
  font-family: var(--font-sans);
  font-size: 0.9375rem;
  font-weight: 600;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
}

.btn-primary,
a.btn-primary {
  background: var(--navy-700);
  color: #ffffff;
  box-shadow: 0 1px 3px rgba(30, 58, 110, 0.3);
}

.btn-primary:hover {
  background: var(--navy-600);
  color: var(--white);
  box-shadow: 0 4px 12px rgba(30, 58, 110, 0.3);
  transform: translateY(-1px);
}

.btn-secondary {
  background: var(--navy-50);
  color: var(--navy-700);
  border: 1px solid var(--navy-200);
}

.btn-secondary:hover {
  background: var(--navy-100);
  color: var(--navy-800);
  transform: translateY(-1px);
}

.btn-ghost {
  background: transparent;
  color: var(--navy-700);
}

.btn-ghost:hover {
  background: var(--navy-50);
}

.btn-lg {
  padding: 0.875rem 2rem;
  font-size: 1.0625rem;
  border-radius: 12px;
}

/* --- Hero --- */
.hero {
  padding: 10rem 0 6rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background:
    radial-gradient(ellipse 60% 50% at 50% 0%, rgba(59, 130, 246, 0.06) 0%, transparent 70%),
    radial-gradient(ellipse 40% 30% at 80% 20%, rgba(30, 58, 110, 0.04) 0%, transparent 70%);
  pointer-events: none;
}

.hero .container {
  position: relative;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.375rem 1rem;
  background: var(--accent-subtle);
  color: var(--navy-700);
  font-size: 0.8125rem;
  font-weight: 600;
  border-radius: 100px;
  margin-bottom: 1.5rem;
  border: 1px solid rgba(59, 130, 246, 0.12);
}

.hero-badge span {
  display: inline-block;
  width: 6px;
  height: 6px;
  background: var(--navy-500);
  border-radius: 50%;
}

.hero h1 {
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 800;
  line-height: 1.15;
  color: var(--navy-900);
  letter-spacing: -0.025em;
  margin-bottom: 1.25rem;
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
}

.hero h1 .gradient-text {
  background: linear-gradient(135deg, var(--navy-600) 0%, var(--accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero p {
  font-size: 1.1875rem;
  color: var(--gray-500);
  max-width: 540px;
  margin: 0 auto 2.5rem;
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.hero-visual {
  margin-top: 4rem;
  position: relative;
}

.hero-visual img {
  border-radius: var(--border-radius-xl);
  box-shadow: var(--shadow-xl), var(--shadow-glow);
  border: 1px solid var(--gray-200);
}

/* --- Features Section --- */
.features {
  padding: var(--section-padding);
}

.section-header {
  text-align: center;
  margin-bottom: 4rem;
}

.section-header .label {
  display: inline-block;
  font-size: 0.8125rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--navy-500);
  margin-bottom: 0.75rem;
}

.section-header h2 {
  font-size: clamp(1.75rem, 3.5vw, 2.5rem);
  font-weight: 800;
  color: var(--navy-900);
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
}

.section-header p {
  font-size: 1.0625rem;
  color: var(--gray-500);
  max-width: 560px;
  margin: 0 auto;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.feature-card {
  padding: 2rem;
  border-radius: var(--border-radius-lg);
  background: var(--white);
  border: 1px solid var(--gray-200);
  transition: all var(--transition);
}

.feature-card:hover {
  border-color: var(--navy-200);
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

.feature-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: var(--navy-50);
  color: var(--navy-600);
  margin-bottom: 1.25rem;
  font-size: 1.5rem;
}

.feature-card h3 {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--navy-900);
  margin-bottom: 0.5rem;
}

.feature-card p {
  font-size: 0.9375rem;
  color: var(--gray-500);
  line-height: 1.65;
}

/* --- Open Format Section --- */
.open-format {
  padding: var(--section-padding);
  background: var(--gray-50);
}

.open-format-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.open-format-text h2 {
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  font-weight: 800;
  color: var(--navy-900);
  margin-bottom: 1rem;
  letter-spacing: -0.02em;
}

.open-format-text p {
  color: var(--gray-500);
  margin-bottom: 1.5rem;
  font-size: 1.0625rem;
}

.open-format-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.open-format-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  font-size: 0.9375rem;
  color: var(--gray-600);
}

.open-format-list .check {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--navy-100);
  color: var(--navy-600);
  font-size: 0.75rem;
  margin-top: 2px;
}

.code-preview {
  background: var(--navy-950);
  border-radius: var(--border-radius-lg);
  padding: 2rem;
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  line-height: 1.8;
  color: var(--gray-300);
  overflow-x: auto;
  box-shadow: var(--shadow-xl);
}

.code-preview .token-key {
  color: var(--navy-300);
}

.code-preview .token-string {
  color: #7dd3a8;
}

.code-preview .token-punct {
  color: var(--gray-500);
}

.code-preview .token-comment {
  color: var(--gray-600);
  font-style: italic;
}

/* --- CTA Section --- */
.cta {
  padding: var(--section-padding);
  text-align: center;
}

.cta-card {
  background: linear-gradient(135deg, var(--navy-900) 0%, var(--navy-700) 100%);
  border-radius: var(--border-radius-xl);
  padding: 4rem 3rem;
  color: var(--white);
  position: relative;
  overflow: hidden;
}

.cta-card::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.2), transparent 70%);
  pointer-events: none;
}

.cta-card h2 {
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  font-weight: 800;
  margin-bottom: 1rem;
  position: relative;
}

.cta-card p {
  font-size: 1.0625rem;
  color: var(--navy-200);
  max-width: 480px;
  margin: 0 auto 2rem;
  position: relative;
}

.cta-card .btn-primary {
  background: var(--white);
  color: var(--navy-800);
  position: relative;
}

.cta-card .btn-primary:hover {
  background: var(--navy-50);
  color: var(--navy-900);
}

/* --- Footer --- */
.footer {
  padding: 3rem 0;
  border-top: 1px solid var(--gray-200);
}

.footer .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  font-weight: 700;
  font-size: 1rem;
  color: var(--navy-900);
}

.footer-brand img {
  width: 28px;
  height: 28px;
}

.footer-links {
  display: flex;
  align-items: center;
  gap: 2rem;
  list-style: none;
}

.footer-links a {
  font-size: 0.875rem;
  color: var(--gray-500);
}

.footer-links a:hover {
  color: var(--navy-600);
}

.footer-copy {
  font-size: 0.8125rem;
  color: var(--gray-400);
}

/* --- Legal Pages --- */
.legal-hero {
  padding: 8rem 0 3rem;
  text-align: center;
  background: var(--gray-50);
  border-bottom: 1px solid var(--gray-200);
}

.legal-hero h1 {
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: 800;
  color: var(--navy-900);
  margin-bottom: 0.5rem;
}

.legal-hero .date {
  font-size: 0.9375rem;
  color: var(--gray-500);
}

.legal-content {
  padding: 3rem 0 5rem;
}

.legal-content .container {
  max-width: 760px;
}

.legal-content h2 {
  font-size: 1.375rem;
  font-weight: 700;
  color: var(--navy-900);
  margin-top: 2.5rem;
  margin-bottom: 0.75rem;
  letter-spacing: -0.01em;
}

.legal-content h3 {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--navy-800);
  margin-top: 2rem;
  margin-bottom: 0.5rem;
}

.legal-content p {
  margin-bottom: 1rem;
  color: var(--gray-600);
  font-size: 0.9375rem;
}

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

.legal-content li {
  margin-bottom: 0.5rem;
  color: var(--gray-600);
  font-size: 0.9375rem;
}

.legal-content strong {
  color: var(--gray-800);
}

.legal-content a {
  color: var(--navy-500);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.legal-content a:hover {
  color: var(--navy-700);
}

.legal-toc {
  background: var(--navy-50);
  border: 1px solid var(--navy-100);
  border-radius: var(--border-radius);
  padding: 1.5rem 2rem;
  margin-bottom: 2rem;
}

.legal-toc h4 {
  font-size: 0.8125rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--navy-600);
  margin-bottom: 0.75rem;
}

.legal-toc ol {
  padding-left: 1.25rem;
}

.legal-toc li {
  margin-bottom: 0.375rem;
  font-size: 0.875rem;
}

.legal-toc a {
  color: var(--navy-600);
  text-decoration: none;
}

.legal-toc a:hover {
  color: var(--navy-500);
  text-decoration: underline;
}

/* --- Responsive --- */
@media (max-width: 768px) {
  .navbar-nav {
    display: none;
  }

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

  .open-format-content {
    grid-template-columns: 1fr;
  }

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

  .hero h1 {
    font-size: 2.25rem;
  }

  .hero p {
    font-size: 1.0625rem;
  }

  .cta-card {
    padding: 3rem 1.5rem;
  }

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

  .footer-links {
    flex-direction: column;
    gap: 1rem;
  }

  .legal-hero {
    padding: 7rem 0 2rem;
  }
}

@media (max-width: 480px) {
  .hero-actions {
    flex-direction: column;
  }

  .btn-lg {
    width: 100%;
  }
}
