/* ===========================================================
   Rae.Noted — site styles (NotedSuite family)
   Based on quality.notedsuite.app. Theme follows the visitor's system.
   Brand: cobalt #1E4FB8 (light) / #6F9BF2 (dark) for brand text and labels.
   Buttons: action blue #1F5ED1 (hover #194FB2) with white text.
   No scroll animation: all text is visible on load. Reduced motion respected.
   =========================================================== */

@font-face {
  font-family: "Space Grotesk";
  src: url("fonts/space-grotesk-latin-500-normal.woff2") format("woff2");
  font-weight: 500; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Space Grotesk";
  src: url("fonts/space-grotesk-latin-700-normal.woff2") format("woff2");
  font-weight: 700; font-style: normal; font-display: swap;
}

:root {
  /* Light palette (default) */
  --bg:         #faf9f7;
  --bg-soft:    #f2efe9;
  --text:       #10162e;
  --text-dim:   #50586f;
  --brand:      #1E4FB8;   /* Rae.Noted cobalt: ".Noted", eyebrows, labels */
  --brand-tint: rgba(30, 79, 184, 0.09);
  --action:     #1F5ED1;   /* buttons */
  --action-hover: #194FB2;
  --on-action:  #ffffff;
  --link:       #1E4FB8;
  --focus:      #1E4FB8;
  --card:       #ffffff;
  --card-line:  rgba(16, 22, 46, 0.12);
  --code-bg:    #f0ede6;
  --header-bg:  rgba(250, 249, 247, 0.9);
  --nav-bg:     rgba(250, 249, 247, 0.97);
  --shadow:     rgba(16, 22, 46, 0.08);

  --radius: 16px;
  --font-display: "Space Grotesk", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg:         #0e1326;
    --bg-soft:    #141a32;
    --text:       #f2f4fb;
    --text-dim:   #aeb6cf;
    --brand:      #6F9BF2;
    --brand-tint: rgba(111, 155, 242, 0.12);
    --action:     #1F5ED1;
    --action-hover: #194FB2;
    --on-action:  #ffffff;
    --link:       #6F9BF2;
    --focus:      #6F9BF2;
    --card:       #141a32;
    --card-line:  rgba(255, 255, 255, 0.14);
    --code-bg:    #1b2240;
    --header-bg:  rgba(14, 19, 38, 0.88);
    --nav-bg:     rgba(14, 19, 38, 0.96);
    --shadow:     rgba(0, 0, 0, 0.35);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 5rem; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
img { max-width: 100%; height: auto; }
h1, h2, h3 { font-family: var(--font-display); line-height: 1.2; }
a { color: var(--link); }
code, kbd {
  font-family: var(--font-mono);
  font-size: 0.88em;
  background: var(--code-bg);
  border: 1px solid var(--card-line);
  border-radius: 6px;
  padding: 0.08em 0.38em;
  overflow-wrap: anywhere;
}
kbd { white-space: nowrap; }

:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 6px; }

.skip-link {
  position: absolute; left: 1rem; top: -4rem; z-index: 100;
  background: var(--action); color: var(--on-action);
  padding: 0.6rem 1rem; border-radius: 8px; text-decoration: none;
}
.skip-link:focus { top: 1rem; }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

/* ---------- SITE HEADER (matches notedsuite.app) ---------- */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  padding: 0.7rem 1.25rem;
  background: transparent;
}
.site-header.is-solid {
  background: var(--header-bg);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  box-shadow: 0 1px 0 var(--card-line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.wordmark {
  font-family: var(--font-display); font-weight: 700; font-size: 1.4rem;
  letter-spacing: -0.02em; color: var(--text); text-decoration: none;
}
.wordmark span { color: var(--brand); }

.site-nav {
  position: fixed; top: 0; right: 0; height: 100svh; width: min(78vw, 320px);
  display: flex; flex-direction: column; overflow-y: auto;
  padding: 5.5rem 2rem 2rem;
  background: var(--nav-bg);
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
  border-left: 1px solid var(--card-line);
  box-shadow: -20px 0 50px rgba(16, 22, 46, 0.12);
  transform: translateX(100%);
  visibility: hidden;
  transition: transform 0.28s ease, visibility 0s linear 0.28s;
  z-index: -1;
}
.site-nav.is-open { transform: translateX(0); visibility: visible; transition: transform 0.28s ease; }
.site-nav a {
  color: var(--text-dim); text-decoration: none; padding: 0.9rem 0; font-size: 1.1rem;
  border-bottom: 1px solid var(--card-line);
}
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--text); }
.nav-heading {
  font-family: var(--font-display); font-size: 0.75rem; font-weight: 700;
  letter-spacing: 0.12em; text-transform: uppercase; color: var(--brand);
  margin: 1.6rem 0 0.3rem;
}
.nav-heading:first-child { margin-top: 0; }
.nav-toggle {
  display: flex; flex-direction: column; justify-content: center; gap: 5px;
  width: 42px; height: 42px; padding: 9px;
  background: transparent; border: 1px solid var(--card-line); border-radius: 10px; cursor: pointer;
}
.nav-toggle span {
  display: block; height: 2px; width: 100%; background: var(--text); border-radius: 2px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- BUTTONS (same shape as Quality.Noted and Tab.Noted) ---------- */
.btn-row { display: flex; flex-wrap: wrap; gap: 0.75rem; justify-content: center; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  height: 46px; padding: 0 1.15rem; border-radius: 10px;
  background: var(--action); color: var(--on-action);
  border: 2px solid var(--action);
  font-weight: 600; font-size: 0.95rem; text-decoration: none; cursor: pointer;
}
.btn:hover { background: var(--action-hover); border-color: var(--action-hover); }
.btn svg { width: 18px; height: 18px; flex: none; }

/* ---------- LAYOUT ---------- */
.section { max-width: 1040px; margin: 0 auto; padding: 3.5rem 1.25rem; text-align: center; }
.section.narrow { max-width: 760px; }
.section > h2 {
  font-size: clamp(1.6rem, 3.6vw, 2.1rem); letter-spacing: -0.02em; margin: 0 0 1.25rem;
}
.section p, .section li { color: var(--text-dim); }
.section strong { color: var(--text); }
.fine { color: var(--text-dim); font-size: 0.92rem; }
.eyebrow {
  display: block; font-family: var(--font-display); font-size: 0.75rem; font-weight: 700;
  letter-spacing: 0.12em; text-transform: uppercase; color: var(--brand); margin: 0 0 0.6rem;
}
.section .eyebrow { color: var(--brand); }

/* ---------- HERO ---------- */
.hero {
  max-width: 1100px; margin: 0 auto;
  padding: clamp(6rem, 11vw, 8rem) 1.25rem 2rem;
  display: grid; gap: 2.5rem; grid-template-columns: minmax(0, 1fr);
  text-align: center;
}
.hero-copy { max-width: 640px; margin: 0 auto; }
.hero .app-icon {
  display: block; margin: 0 auto;
  width: 108px; height: 108px; border-radius: 24px;
  box-shadow: 0 16px 40px rgba(16, 22, 46, 0.25);
}
.hero h1 {
  font-size: clamp(2.25rem, 6vw, 3.2rem);
  font-weight: 700; letter-spacing: -0.03em;
  margin: 1.25rem 0 0.25rem;
}
.hero h1 .suite { color: var(--brand); }
.hero .subhead {
  font-family: var(--font-display);
  font-size: clamp(1.1rem, 2.5vw, 1.3rem);
  font-weight: 600; color: var(--brand);
  margin: 0 0 1rem;
}
.hero .lead { color: var(--text-dim); font-size: 1.05rem; max-width: 46ch; margin: 0 auto 1.75rem; }
.hero .hero-req { margin: 0.75rem 0 0; }
.shot { margin: 0 auto; max-width: 1000px; width: 100%; }
/* Screenshots have transparent rounded corners: shadow follows the window shape */
.shot img {
  display: block; width: 100%; height: auto;
  filter: drop-shadow(0 18px 36px var(--shadow)) drop-shadow(0 2px 6px var(--shadow));
}

/* ---------- STRENGTHS (3 × 2 → 2 → 1) ---------- */
.strengths {
  list-style: none; margin: 0; padding: 0;
  display: grid; gap: 1rem; grid-template-columns: repeat(3, minmax(0, 1fr));
}
@media (max-width: 900px) { .strengths { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .strengths { grid-template-columns: minmax(0, 1fr); } }
.strengths li {
  position: relative; overflow: hidden; text-align: center;
  background: var(--card); border: 1px solid var(--card-line); border-radius: var(--radius);
  padding: 1.4rem; box-shadow: 0 6px 18px var(--shadow);
}
.strengths svg { display: block; width: 28px; height: 28px; color: var(--brand); margin: 0 auto 0.6rem; }
.strengths h3 { font-size: 1.05rem; margin: 0 0 0.35rem; color: var(--text); }
.strengths p { margin: 0; font-size: 0.95rem; }
.strengths li::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: radial-gradient(200px circle at var(--mx, 50%) var(--my, 50%), var(--brand-tint), transparent 70%);
  opacity: 0; transition: opacity 0.25s ease;
}
.strengths li:hover::before { opacity: 1; }

/* ---------- HOW IT WORKS ---------- */
.steps { list-style: none; counter-reset: step; margin: 0; padding: 0; display: grid; gap: 1rem; }
.steps li {
  counter-increment: step;
  padding: 1.1rem 1.25rem; text-align: center;
  background: var(--card); border: 1px solid var(--card-line); border-radius: var(--radius);
}
.steps li::before {
  content: counter(step); display: grid; place-items: center; margin: 0 auto 0.6rem;
  width: 1.9rem; height: 1.9rem; border-radius: 50%;
  font-family: var(--font-display); font-weight: 700; font-size: 0.95rem;
  background: var(--brand-tint); color: var(--brand); border: 1px solid var(--brand);
}

/* ---------- FEATURE TABS ---------- */
.tablist {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 0.4rem;
  margin: 0 auto 1.5rem; padding: 0.3rem; max-width: max-content;
  background: var(--bg-soft); border: 1px solid var(--card-line); border-radius: 12px;
}
.tablist [role="tab"] {
  font: inherit; font-size: 0.92rem; font-weight: 600; cursor: pointer;
  padding: 0.5rem 0.95rem; border-radius: 9px; border: 1px solid transparent;
  background: transparent; color: var(--text-dim);
}
.tablist [role="tab"]:hover { color: var(--text); }
.tablist [role="tab"][aria-selected="true"] {
  background: var(--card); color: var(--brand); border-color: var(--card-line);
  box-shadow: 0 2px 8px var(--shadow);
}
.tabpanel { margin: 0; }
.tabpanel h3 { font-size: 1.15rem; margin: 0 0 0.4rem; color: var(--text); }
.tabpanel > p { max-width: 62ch; margin: 0 auto 1.5rem; }
.tabpanel[hidden] { display: none; }
/* Without JavaScript every panel shows, one after another */
.no-js .tablist { display: none; }
.no-js .tabpanel { margin-bottom: 3rem; }

.feature-list {
  list-style: none; padding: 0; margin: 2.5rem auto 0; max-width: 640px;
  display: grid; gap: 0.6rem; text-align: left;
}
.feature-list li {
  position: relative; padding: 0.7rem 1rem 0.7rem 2.6rem;
  background: var(--card); border: 1px solid var(--card-line); border-radius: 12px;
}
.feature-list li::before {
  content: ""; position: absolute; left: 1rem; top: 1.15rem;
  width: 0.55rem; height: 0.55rem; border-radius: 50%; background: var(--brand);
}

/* ---------- TABLES (scroll in their own box) ---------- */
.table { overflow-x: auto; border: 1px solid var(--card-line); border-radius: var(--radius); background: var(--card); text-align: left; }
.table table { width: 100%; border-collapse: collapse; }
.table th, .table td { text-align: left; padding: 0.7rem 1rem; border-bottom: 1px solid var(--card-line); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table th { font-family: var(--font-display); color: var(--text); font-size: 0.95rem; background: var(--bg-soft); }
.table td { color: var(--text-dim); }
.table td:first-child { color: var(--text); font-weight: 600; }
.shortcuts td:last-child, .shortcuts th:last-child { text-align: right; white-space: nowrap; }

/* ---------- FAQ ---------- */
.faq details { border-bottom: 1px solid var(--card-line); }
.faq summary {
  cursor: pointer; list-style: none; padding: 1rem 2rem; position: relative; text-align: center;
  font-family: var(--font-display); font-weight: 700; font-size: 1.08rem; color: var(--text);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 0.25rem; top: 0.9rem; color: var(--brand); font-size: 1.3rem; }
.faq details[open] summary::after { content: "\2212"; }
.faq details p { margin: 0 0 1.1rem; }

/* ---------- GET RAE.NOTED ---------- */
.get .slogan { font-family: var(--font-display); font-weight: 600; font-size: 1.15rem; color: var(--brand); margin: 0 0 1.25rem; }
.brew { margin: 1.75rem auto 0; max-width: 620px; }
.brew p { margin: 0 0 0.5rem; }
.cmd {
  display: flex; align-items: center; gap: 0.5rem;
  background: var(--code-bg); border: 1px solid var(--card-line); border-radius: 12px;
  padding: 0.5rem 0.5rem 0.5rem 1rem; text-align: left;
}
.cmd code { flex: 1; min-width: 0; background: none; border: 0; padding: 0; font-size: 0.92rem; color: var(--text); }
.copy-btn {
  flex: none; font: inherit; font-size: 0.85rem; font-weight: 600; cursor: pointer;
  padding: 0.45rem 0.9rem; border-radius: 8px;
  background: var(--action); color: var(--on-action); border: 0;
}
.copy-btn:hover { background: var(--action-hover); }
.brew .brew-note { margin: 0.6rem 0 0; font-size: 0.85rem; }

/* ---------- FOOTER ---------- */
footer.site-footer {
  border-top: 1px solid var(--card-line); padding: 2.5rem 1.25rem 3rem;
  text-align: center; color: var(--text-dim); font-size: 0.9rem;
}
.site-footer nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.4rem 1.2rem; margin-bottom: 1rem; }
.site-footer nav a { color: var(--text); text-decoration: none; font-weight: 600; }
.site-footer nav a:hover { text-decoration: underline; }
.site-footer p { margin: 0.4rem auto; max-width: 70ch; }
.site-footer a { color: var(--link); }
.footer-social { display: flex; justify-content: center; gap: 0.9rem; margin-top: 1.2rem; }
.footer-social a {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border: 1px solid var(--card-line); border-radius: 50%;
  color: var(--text-dim); text-decoration: none;
}
.footer-social a:hover { color: var(--text); border-color: var(--text); }
.footer-social svg { width: 18px; height: 18px; fill: currentColor; }

/* ---------- Reduced motion: no animation at all ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
