/* MindLight — mindlightdimmer.com */

:root {
  --bg: #0a0b0f;
  --bg-elevated: #12141c;
  --bg-card: #161922;
  --border: rgba(255, 255, 255, 0.08);
  --text: #f4f4f5;
  --text-muted: #9ca3af;
  --accent: #f5a623;
  --accent-glow: rgba(245, 166, 35, 0.35);
  --spotlight: rgba(255, 220, 150, 0.12);
  --font-sans: "DM Sans", system-ui, -apple-system, sans-serif;
  --font-display: "Instrument Serif", Georgia, serif;
  --radius: 14px;
  --max: 1120px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

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

/* Layout */
.wrap {
  width: min(var(--max), 100% - 2.5rem);
  margin-inline: auto;
}

/* Nav */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid var(--border);
  background: rgba(10, 11, 15, 0.85);
  backdrop-filter: blur(12px);
}

.site-nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
  font-size: 1.05rem;
}

.brand:hover {
  text-decoration: none;
}

.brand img {
  width: 36px;
  height: 36px;
  border-radius: 8px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  color: var(--text-muted);
  font-size: 0.9375rem;
  font-weight: 500;
  text-decoration: none;
}

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

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.35rem;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.9375rem;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.btn:hover {
  text-decoration: none;
  transform: translateY(-1px);
}

.btn--primary {
  background: linear-gradient(135deg, #f5a623 0%, #e88b0c 100%);
  color: #0a0b0f;
  box-shadow: 0 4px 24px var(--accent-glow);
}

.btn--primary:hover {
  box-shadow: 0 8px 32px var(--accent-glow);
}

.btn--ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}

.btn--ghost:hover {
  background: var(--bg-elevated);
}

/* Hero */
.hero {
  position: relative;
  padding: 4.5rem 0 5rem;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  top: -20%;
  left: 50%;
  transform: translateX(-50%);
  width: 120%;
  height: 80%;
  background: radial-gradient(
    ellipse 50% 40% at 50% 0%,
    var(--spotlight) 0%,
    transparent 70%
  );
  pointer-events: none;
}

.hero__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}

@media (max-width: 900px) {
  .hero__grid {
    grid-template-columns: 1fr;
    text-align: center;
  }
}

.eyebrow {
  display: inline-block;
  margin: 0 0 1rem;
  padding: 0.35rem 0.85rem;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent);
  background: rgba(245, 166, 35, 0.1);
  border: 1px solid rgba(245, 166, 35, 0.25);
  border-radius: 999px;
}

.hero h1 {
  margin: 0 0 1.25rem;
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 5vw, 3.75rem);
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.hero h1 em {
  font-style: italic;
  color: var(--accent);
}

.hero__lede {
  margin: 0 0 2rem;
  font-size: 1.125rem;
  color: var(--text-muted);
  max-width: 32rem;
}

@media (max-width: 900px) {
  .hero__lede {
    margin-inline: auto;
  }
}

.hero__cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

@media (max-width: 900px) {
  .hero__cta {
    justify-content: center;
  }
}

.hero__meta {
  margin-top: 1.5rem;
  font-size: 0.875rem;
  color: var(--text-muted);
}

/* macOS preview mock */
.preview {
  position: relative;
  aspect-ratio: 16 / 10;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: linear-gradient(180deg, #1e2130 0%, #12141c 100%);
  box-shadow:
    0 24px 80px rgba(0, 0, 0, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  overflow: hidden;
}

.preview__menubar {
  height: 28px;
  background: rgba(0, 0, 0, 0.35);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 12px;
  gap: 6px;
}

.preview__dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.preview__dot:nth-child(1) { background: #ff5f57; }
.preview__dot:nth-child(2) { background: #febc2e; }
.preview__dot:nth-child(3) { background: #28c840; }

.preview__dim {
  position: absolute;
  inset: 28px 0 0;
  background: rgba(0, 0, 0, 0.55);
  pointer-events: none;
}

.preview__window {
  position: absolute;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: #252836;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.preview__window--back {
  width: 42%;
  height: 38%;
  top: 18%;
  left: 8%;
  opacity: 0.5;
}

.preview__window--back2 {
  width: 38%;
  height: 32%;
  top: 42%;
  right: 10%;
  opacity: 0.45;
}

.preview__window--front {
  width: 52%;
  height: 48%;
  top: 28%;
  left: 24%;
  z-index: 2;
  border-color: rgba(245, 166, 35, 0.4);
  box-shadow:
    0 0 0 1px rgba(245, 166, 35, 0.2),
    0 16px 48px rgba(0, 0, 0, 0.5),
    0 0 60px var(--accent-glow);
}

.preview__window-bar {
  height: 24px;
  background: rgba(0, 0, 0, 0.25);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 8px;
  gap: 5px;
}

.preview__window-bar span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
}

.preview__window-body {
  padding: 1rem;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.preview__window--front .preview__window-body {
  color: var(--text);
}

.preview__spotlight {
  position: absolute;
  inset: 28px 0 0;
  background: radial-gradient(
    ellipse 45% 50% at 50% 55%,
    transparent 0%,
    rgba(0, 0, 0, 0.65) 100%
  );
  pointer-events: none;
  z-index: 1;
}

/* Sections */
section {
  padding: 4.5rem 0;
}

.section-head {
  text-align: center;
  max-width: 36rem;
  margin: 0 auto 3rem;
}

.section-head h2 {
  margin: 0 0 0.75rem;
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  font-weight: 400;
}

.section-head p {
  margin: 0;
  color: var(--text-muted);
}

.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.25rem;
}

.feature-card {
  padding: 1.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color 0.2s ease;
}

.feature-card:hover {
  border-color: rgba(245, 166, 35, 0.25);
}

.feature-card__icon {
  font-size: 1.5rem;
  margin-bottom: 0.75rem;
}

.feature-card h3 {
  margin: 0 0 0.5rem;
  font-size: 1.0625rem;
  font-weight: 600;
}

.feature-card p {
  margin: 0;
  font-size: 0.9375rem;
  color: var(--text-muted);
}

/* How it works */
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  counter-reset: step;
}

@media (max-width: 768px) {
  .steps {
    grid-template-columns: 1fr;
  }
}

.step {
  position: relative;
  padding-top: 2.5rem;
}

.step::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  top: 0;
  left: 0;
  width: 2rem;
  height: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--accent);
  background: rgba(245, 166, 35, 0.12);
  border-radius: 8px;
}

.step h3 {
  margin: 0 0 0.5rem;
  font-size: 1.0625rem;
}

.step p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.9375rem;
}

/* Compare strip */
.compare {
  background: var(--bg-elevated);
  border-block: 1px solid var(--border);
}

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

.compare p {
  margin: 0;
  color: var(--text-muted);
  max-width: 28rem;
}

.compare strong {
  color: var(--text);
}

/* CTA band */
.cta-band {
  text-align: center;
  padding: 4rem 0;
  background: radial-gradient(
    ellipse 80% 60% at 50% 100%,
    rgba(245, 166, 35, 0.08) 0%,
    transparent 60%
  );
}

.cta-band h2 {
  margin: 0 0 1rem;
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  font-weight: 400;
}

.cta-band p {
  margin: 0 0 1.5rem;
  color: var(--text-muted);
}

/* Footer */
.site-footer {
  padding: 2.5rem 0;
  border-top: 1px solid var(--border);
  font-size: 0.875rem;
  color: var(--text-muted);
}

.site-footer__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.site-footer a {
  color: var(--text-muted);
}

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

.footer-links {
  display: flex;
  gap: 1.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

/* Legal / support pages */
.page-hero {
  padding: 3rem 0 2rem;
  border-bottom: 1px solid var(--border);
}

.page-hero h1 {
  margin: 0 0 0.5rem;
  font-family: var(--font-display);
  font-size: 2.25rem;
  font-weight: 400;
}

.page-hero p {
  margin: 0;
  color: var(--text-muted);
}

.legal {
  padding: 2.5rem 0 4rem;
  max-width: 42rem;
}

.legal h2 {
  margin: 2rem 0 0.75rem;
  font-size: 1.125rem;
}

.legal h2:first-child {
  margin-top: 0;
}

.legal p,
.legal li {
  color: var(--text-muted);
}

.legal ul {
  padding-left: 1.25rem;
}

.legal a {
  color: var(--accent);
}

.faq dt {
  font-weight: 600;
  color: var(--text);
  margin-top: 1.25rem;
}

.faq dd {
  margin: 0.35rem 0 0;
  color: var(--text-muted);
}

.contact-box {
  margin-top: 2rem;
  padding: 1.25rem 1.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.contact-box a {
  font-weight: 600;
}

/* Contact form */
.contact-form-section {
  margin-bottom: 2.5rem;
}

.contact-form-section h2 {
  margin: 0 0 0.35rem;
  font-size: 1.25rem;
}

.contact-form-section > p {
  margin: 0 0 1.25rem;
  color: var(--text-muted);
  font-size: 0.9375rem;
}

.contact-form {
  display: grid;
  gap: 1rem;
  max-width: 32rem;
}

.form-row {
  display: grid;
  gap: 0.35rem;
}

.form-row label {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text);
}

.form-row input,
.form-row textarea,
.form-row select {
  width: 100%;
  padding: 0.65rem 0.85rem;
  font-family: inherit;
  font-size: 0.9375rem;
  color: var(--text);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 10px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.form-row input:focus,
.form-row textarea:focus,
.form-row select:focus {
  outline: none;
  border-color: rgba(245, 166, 35, 0.5);
  box-shadow: 0 0 0 3px rgba(245, 166, 35, 0.12);
}

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

.form-row--honeypot {
  position: absolute;
  left: -9999px;
  opacity: 0;
  height: 0;
  overflow: hidden;
}

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

.form-status {
  margin: 0;
  font-size: 0.875rem;
  min-height: 1.25rem;
}

.form-status--success {
  color: #4ade80;
}

.form-status--error {
  color: #f87171;
}

.form-status--loading {
  color: var(--text-muted);
}

.alert-success {
  padding: 1rem 1.25rem;
  margin-bottom: 1.5rem;
  background: rgba(74, 222, 128, 0.1);
  border: 1px solid rgba(74, 222, 128, 0.3);
  border-radius: var(--radius);
  color: #86efac;
  font-size: 0.9375rem;
}

.alert-success[hidden] {
  display: none;
}

kbd {
  display: inline-block;
  padding: 0.15em 0.45em;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.85em;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 6px;
}

@media (max-width: 640px) {
  .nav-links {
    display: none;
  }

  .site-nav .btn--primary {
    font-size: 0.8125rem;
    padding: 0.55rem 0.9rem;
  }
}
