/* ============================================
   Notemia — Landing Page Styles
   UI styles
   ============================================ */

/* 1. Variables & Reset
   -------------------------------------------- */
:root {
  --bg: #F1F5F9;
  --surface: #FFFFFF;
  --text: #0F172A;
  --muted: #475569;
  --border: #E2E8F0;
  --accent: #38667B;
  --accent-hover: #2d5466;
  --accent-2: #0D9488;
  --sidebar: #1E293B;
  --gradient-dark: linear-gradient(135deg, #1a2535 0%, #2a3f50 50%, #38667B 100%);
  --radius: 12px;
  --font: Roboto, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.08);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.10);
  --transition: 200ms ease-out;
  --container: 1100px;
}

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

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

body {
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--accent-hover); }

.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* 2. Typography
   -------------------------------------------- */
h1, h2, h3, h4 { line-height: 1.25; font-weight: 600; color: var(--text); }
h1 { font-size: 2.5rem; letter-spacing: -0.02em; }
h2 { font-size: 1.75rem; letter-spacing: -0.01em; }
h3 { font-size: 1.125rem; }
p { color: var(--muted); }

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

.section {
  padding: 80px 0;
}

.section-title {
  text-align: center;
  margin-bottom: 48px;
}

.section-title p {
  margin-top: 12px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

/* 4. Components
   -------------------------------------------- */

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border: none;
  border-radius: var(--radius);
  font-family: var(--font);
  font-size: 0.9375rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
  line-height: 1.4;
}

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

.btn-outline {
  background: transparent;
  color: var(--accent);
  border: 1.5px solid var(--border);
}
.btn-outline:hover {
  border-color: var(--accent);
  background: rgba(56,102,123,0.04);
  color: var(--accent);
}

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

/* Cards */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 24px;
  transition: all var(--transition);
}
.card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.card-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(56,102,123,0.08);
  border-radius: 10px;
  margin-bottom: 16px;
  color: var(--accent);
}

.card-icon svg { width: 24px; height: 24px; }

.card h3 { margin-bottom: 8px; }

/* Grid */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }

/* 5. Navigation
   -------------------------------------------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--gradient-dark);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 1.125rem;
  color: #fff;
}
.nav-logo:hover { color: #fff; }
.nav-logo img { height: 44px; width: auto; filter: brightness(1.6) contrast(0.8); }

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

.nav-links a {
  font-size: 0.875rem;
  font-weight: 500;
  color: rgba(255,255,255,0.7);
}
.nav-links a:hover { color: #fff; }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  color: #fff;
}

/* 6. Hero
   -------------------------------------------- */
.hero {
  position: relative;
  display: flex;
  align-items: center;
  background: url('assets/hero-office-wide.jpg') center/cover no-repeat;
}

.hero .container {
  max-width: none;
  margin-left: 0;
  margin-right: 0;
  padding-left: clamp(200px, 2vw, 24px);
  padding-right: clamp(200px, 2vw, 24px);
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(30,41,59,0.6) 0%, rgba(30,41,59,0.3) 35%, transparent 55%);
}

.hero-inner {
  position: relative;
  z-index: 1;
  max-width: 520px;
  padding: 112px 0;
  margin-left: 0;
}

.hero-text h1 {
  margin-bottom: 16px;
  color: #fff;
}

.hero-text p {
  font-size: 1.125rem;
  margin-bottom: 32px;
  color: rgba(255,255,255,0.8);
  max-width: 480px;
}

.hero-btn-outline {
  border-color: rgba(255,255,255,0.3) !important;
  color: #fff !important;
}
.hero-btn-outline:hover {
  border-color: rgba(255,255,255,0.5) !important;
  background: rgba(255,255,255,0.08) !important;
  color: #fff !important;
}

/* 7. Features
   -------------------------------------------- */
/* Uses .grid-3 + .card */

/* 8. Workflow
   -------------------------------------------- */
.workflow-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  counter-reset: step;
}

.workflow-step {
  text-align: center;
  padding: 32px 16px;
  position: relative;
}

.workflow-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  font-size: 1.125rem;
  margin-bottom: 16px;
}

.workflow-step h3 { margin-bottom: 8px; }

.workflow-img {
  margin-top: 48px;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}
.workflow-img img {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
}

/* 9. Testimonials
   -------------------------------------------- */
.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.testimonial {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 24px;
}

.testimonial-text {
  font-style: italic;
  margin-bottom: 20px;
  line-height: 1.7;
}

.testimonial-author {
  display: flex;
  align-items: center;
  gap: 12px;
}

.testimonial-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 0.875rem;
  flex-shrink: 0;
}

.testimonial-name { font-weight: 600; font-size: 0.875rem; color: var(--text); }
.testimonial-role { font-size: 0.8125rem; color: var(--muted); }

/* 10. About
   -------------------------------------------- */
.about-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}

.about-text p {
  margin-bottom: 16px;
}

.about-img {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}
.about-img img {
  width: 100%;
  aspect-ratio: 8/5;
  object-fit: cover;
}

/* 11. Contact
   -------------------------------------------- */
.contact-inner {
  text-align: center;
  max-width: 600px;
  margin: 0 auto;
}

.contact-links {
  display: flex;
  justify-content: center;
  gap: 32px;
  margin-top: 24px;
  flex-wrap: wrap;
}

.contact-link {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 500;
}

.contact-link svg { width: 20px; height: 20px; color: var(--accent); }

/* 12. Download
   -------------------------------------------- */
.download {
  background: var(--gradient-dark);
  color: #fff;
  padding: 64px 0;
}

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

.download h2 { color: #fff; margin-bottom: 8px; }
.download p { color: rgba(255,255,255,0.65); margin-bottom: 32px; }

.download .btn-outline {
  border-color: rgba(255,255,255,0.2);
  color: rgba(255,255,255,0.8);
}
.download .btn-outline:hover {
  border-color: rgba(255,255,255,0.4);
  background: rgba(255,255,255,0.05);
  color: #fff;
}

.download-builds-link {
  margin-top: 20px;
  font-size: 0.875rem;
}
.download-builds-link a {
  color: rgba(255,255,255,0.55);
}
.download-builds-link a:hover {
  color: rgba(255,255,255,0.85);
}

/* 13. Footer
   -------------------------------------------- */
.footer {
  background: #1a2535;
  border-top: 1px solid rgba(255,255,255,0.06);
  padding: 32px 0;
}

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

.footer-copy {
  font-size: 0.8125rem;
  color: rgba(255,255,255,0.45);
}

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

.footer-links a {
  font-size: 0.8125rem;
  color: rgba(255,255,255,0.45);
}
.footer-links a:hover {
  color: rgba(255,255,255,0.75);
}

/* 14. Password Gate
   -------------------------------------------- */
html.gate-open { overflow: hidden; }

.gate-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  transition: opacity 300ms ease;
}

.gate-hidden { display: none !important; }

.gate-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 40px 32px;
  max-width: 380px;
  width: 100%;
  text-align: center;
  box-shadow: var(--shadow-lg);
}

.gate-title {
  font-size: 1.5rem;
  margin-bottom: 8px;
}

.gate-text {
  font-size: 0.875rem;
  color: var(--muted);
  margin-bottom: 24px;
}

.gate-form {
  display: flex;
  gap: 8px;
}

.gate-input {
  flex: 1;
  padding: 10px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  font-family: var(--font);
  font-size: 0.9375rem;
  background: var(--bg);
  color: var(--text);
  outline: none;
  transition: border-color var(--transition);
}
.gate-input:focus {
  border-color: var(--accent);
}

.gate-btn {
  padding: 10px 20px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  font-family: var(--font);
  font-size: 0.9375rem;
  font-weight: 500;
  cursor: pointer;
  transition: background var(--transition);
}
.gate-btn:hover { background: var(--accent-hover); }

.gate-error {
  margin-top: 12px;
  font-size: 0.8125rem;
  color: #b53128;
  opacity: 0;
  transition: opacity var(--transition);
}
.gate-error.visible { opacity: 1; }

/* 15. Subpages (legal, builds)
   -------------------------------------------- */
.page-wrap {
  max-width: 820px;
  margin: 0 auto;
  padding: 48px 24px 96px;
}

.page-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

.page-top a {
  font-size: 0.875rem;
  font-weight: 500;
}

.page-nav {
  display: flex;
  gap: 16px;
  font-size: 0.875rem;
}

.page-nav span { color: var(--border); }

.page-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 40px 36px;
  box-shadow: var(--shadow-sm);
}

.page-card h1 { font-size: 1.5rem; margin-bottom: 24px; }
.page-card h2 { font-size: 1.25rem; margin-top: 32px; margin-bottom: 12px; }
.page-card h3 { margin-top: 24px; margin-bottom: 8px; }
.page-card p { margin-bottom: 12px; line-height: 1.65; }
.page-card li { color: var(--muted); line-height: 1.6; margin-bottom: 4px; margin-left: 20px; }
.page-card hr { border: none; border-top: 1px solid var(--border); margin: 24px 0; }
.page-card ul { margin-bottom: 12px; }
.page-card strong { color: var(--text); }

/* Builds page download buttons */
.builds-buttons {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin: 20px 0;
}

.builds-list {
  list-style: none;
  padding: 0;
}
.builds-list li {
  margin-left: 0;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.875rem;
}
.builds-list li:last-child { border-bottom: none; }

/* 16. Responsive
   -------------------------------------------- */
@media (max-width: 900px) {
  h1 { font-size: 2rem; }
  .hero-inner { max-width: 100%; }
  .grid-3 { grid-template-columns: 1fr 1fr; }
  .workflow-grid { grid-template-columns: 1fr 1fr; }
  .testimonials-grid { grid-template-columns: 1fr 1fr; }
  .about-inner { grid-template-columns: 1fr; }
  .about-img { max-width: 520px; margin: 0 auto; }
}

@media (max-width: 600px) {
  h1 { font-size: 1.625rem; }
  h2 { font-size: 1.375rem; }
  .section { padding: 56px 0; }
  .hero::before { background: rgba(30,41,59,0.65); }
  .hero-inner { padding: 56px 0; }
  .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .workflow-grid { grid-template-columns: 1fr; }
  .testimonials-grid { grid-template-columns: 1fr; }
  .nav-links { display: none; }
  .nav-toggle { display: block; }
  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: #1a2535;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    padding: 16px 24px;
    box-shadow: var(--shadow-md);
  }
  .footer-inner { flex-direction: column; text-align: center; }
  .page-card { padding: 24px 20px; }
}

/* 17. Reduced Motion
   -------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
  html { scroll-behavior: auto; }
}

/* 18. Dark Theme
   -------------------------------------------- */
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0F172A;
    --surface: #1E293B;
    --text: #E2E8F0;
    --muted: #94A3B8;
    --border: #334155;
    --accent: #5B9DB3;
    --accent-hover: #7CB8CC;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.2);
    --shadow-md: 0 4px 16px rgba(0,0,0,0.3);
    --shadow-lg: 0 8px 32px rgba(0,0,0,0.4);
  }

  .nav { background: linear-gradient(135deg, #0a1018 0%, #162030 50%, #1E293B 100%); }

  .download { background: linear-gradient(135deg, #0a1018 0%, #162030 50%, #1E293B 100%); }
  .footer { background: #0a1018; }

  .gate-overlay { background: var(--bg); }

  .card-icon { background: rgba(91,157,179,0.12); }

  .testimonial-avatar { background: var(--accent); }

  .hero-img img, .about-img img, .workflow-img img { opacity: 0.9; }
}
