/* ==========================================================================
   Recalcitrant Muse Software — Grove Design
   No external font dependencies. All type is system-native.
   ========================================================================== */

:root {
  --bg:        #faf8f4;
  --bg2:       #f3f0ea;
  --bg3:       #ece8e0;
  --ink:       #1a1714;
  --ink2:      #3d3830;
  --ink3:      #8a8070;
  --amber:     #c4731a;
  --amber-bg:  #fdf2e3;
  --border:    #ddd8ce;
  --radius:    8px;

  /* System font stacks — no web fonts, no external requests */
  --serif: Georgia, "Times New Roman", serif;
  --sans:  -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;

  /* Per-app accent colors */
  --notebook-fg:   #3a6ea5;
  --notebook-bg:   #eaf0f9;
  --photos-fg:     #c4731a;
  --photos-bg:     #fdf2e3;
  --calendar-fg:   #2e7d5e;
  --calendar-bg:   #e6f4ee;
  --contacts-fg:   #7b4ea0;
  --contacts-bg:   #f3ecfa;
}

/* ------------------------------------------------------------------
   Reset & Base
   ------------------------------------------------------------------ */

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

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

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

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

a:hover {
  text-decoration: underline;
}

/* ------------------------------------------------------------------
   Typography
   ------------------------------------------------------------------ */

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: normal;
  letter-spacing: -0.02em;
  line-height: 1.12;
  color: var(--ink);
}

h1 { font-size: clamp(36px, 5.5vw, 58px); margin-bottom: 1rem; }
h2 { font-size: clamp(26px, 4vw, 40px);   margin-bottom: 0.75rem; }
h3 { font-size: clamp(20px, 2.5vw, 26px); margin-bottom: 0.5rem; }

p  { margin-bottom: 1rem; }
p:last-child { margin-bottom: 0; }

ul, ol { padding-left: 1.5rem; margin-bottom: 1rem; }
li { margin-bottom: 0.35rem; line-height: 1.6; }

strong { font-weight: 600; }

/* ------------------------------------------------------------------
   Navigation
   ------------------------------------------------------------------ */

.site-nav {
  position: sticky;
  top: 0;
  z-index: 200;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  padding: 0 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
}

.nav-logo {
  font-family: var(--serif);
  font-size: 17px;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: -0.01em;
  white-space: nowrap;
}

.nav-logo em {
  color: var(--amber);
  font-style: italic;
}

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

.nav-links a {
  color: var(--ink3);
  text-decoration: none;
  font-size: 14px;
  padding: 6px 12px;
  border-radius: var(--radius);
  transition: color 0.12s, background 0.12s;
}

.nav-links a:hover {
  color: var(--ink);
  background: var(--bg2);
  text-decoration: none;
}

.nav-links a.active {
  color: var(--ink);
}

/* ------------------------------------------------------------------
   Footer
   ------------------------------------------------------------------ */

.site-footer {
  border-top: 1px solid var(--border);
  padding: 40px 60px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
}

.footer-logo {
  font-family: var(--serif);
  font-size: 15px;
  color: var(--ink3);
}

.footer-links {
  display: flex;
  gap: 24px;
}

.footer-links a {
  font-size: 13px;
  color: var(--ink3);
  text-decoration: none;
}

.footer-links a:hover {
  color: var(--ink);
  text-decoration: none;
}

/* ------------------------------------------------------------------
   Buttons
   ------------------------------------------------------------------ */

.btn {
  display: inline-block;
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 500;
  padding: 12px 28px;
  border-radius: var(--radius);
  text-decoration: none;
  transition: background 0.12s, color 0.12s, border-color 0.12s;
  cursor: pointer;
  line-height: 1;
}

.btn-dark {
  background: var(--ink);
  color: var(--bg);
}

.btn-dark:hover {
  background: var(--ink2);
  text-decoration: none;
  color: var(--bg);
}

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

.btn-outline:hover {
  border-color: var(--ink3);
  color: var(--ink);
  text-decoration: none;
}

.btn-amber {
  background: var(--amber);
  color: #fff;
}

.btn-amber:hover {
  opacity: 0.88;
  text-decoration: none;
  color: #fff;
}

/* App Store button */
.btn-appstore {
  display: inline-block;
  background: var(--ink);
  color: var(--bg);
  font-size: 14px;
  font-weight: 600;
  padding: 12px 24px;
  border-radius: var(--radius);
  text-decoration: none;
  transition: background 0.12s;
}

.btn-appstore:hover {
  background: var(--ink2);
  text-decoration: none;
  color: var(--bg);
}

/* ------------------------------------------------------------------
   Home: Hero
   ------------------------------------------------------------------ */

.home-hero {
  padding: 96px 60px;
  max-width: 1200px;
  margin: 0 auto;
  border-bottom: 1px solid var(--border);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}

.home-hero-kicker {
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--amber);
  font-weight: 600;
  margin-bottom: 24px;
}

.home-hero h1 {
  margin-bottom: 24px;
}

.home-hero-sub {
  font-size: 17px;
  color: var(--ink2);
  line-height: 1.75;
  margin-bottom: 40px;
  max-width: 460px;
}

.hero-cta {
  display: flex;
  gap: 16px;
  align-items: center;
  flex-wrap: wrap;
}

.btn-text-link {
  color: var(--amber);
  font-size: 15px;
  text-decoration: none;
  border-bottom: 1px solid rgba(196, 115, 26, 0.4);
  padding-bottom: 1px;
  transition: opacity 0.12s;
}

.btn-text-link:hover {
  opacity: 0.75;
  text-decoration: none;
}

.hero-principles {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 40px;
}

.hero-principles h3 {
  font-family: var(--serif);
  font-size: 20px;
  font-weight: normal;
  margin-bottom: 28px;
  color: var(--ink);
  letter-spacing: -0.01em;
}

.principle {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}

.principle:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.principle-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--amber);
  margin-top: 7px;
  flex-shrink: 0;
}

.principle-text {
  font-size: 15px;
  color: var(--ink2);
  line-height: 1.55;
}

/* ------------------------------------------------------------------
   Home: Prose intro
   ------------------------------------------------------------------ */

.home-prose {
  max-width: 700px;
  margin: 0 auto;
  padding: 72px 60px;
  border-bottom: 1px solid var(--border);
}

.home-prose p {
  font-size: 18px;
  line-height: 1.8;
  color: var(--ink2);
  margin-bottom: 20px;
}

/* ------------------------------------------------------------------
   Home: Apps list
   ------------------------------------------------------------------ */

.home-apps {
  padding: 72px 60px;
  max-width: 1200px;
  margin: 0 auto;
}

.section-head {
  display: flex;
  align-items: baseline;
  gap: 20px;
  margin-bottom: 48px;
}

.section-head h2 {
  font-family: var(--serif);
  font-size: 32px;
  font-weight: normal;
  letter-spacing: -0.02em;
}

.section-head-sub {
  font-size: 13px;
  color: var(--ink3);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.apps-list {
  display: flex;
  flex-direction: column;
}

.app-row {
  display: grid;
  grid-template-columns: 220px 1fr 80px;
  align-items: start;
  gap: 36px;
  padding: 28px 16px;
  border-bottom: 1px solid var(--border);
  text-decoration: none;
  transition: background 0.1s;
  border-radius: 6px;
}

.app-row:first-child {
  border-top: 1px solid var(--border);
}

.app-row:hover {
  background: var(--bg2);
  text-decoration: none;
}

.app-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 3px 9px;
  border-radius: 4px;
  margin-bottom: 8px;
}

.app-badge.notebook  { background: var(--notebook-bg);  color: var(--notebook-fg); }
.app-badge.photos    { background: var(--photos-bg);    color: var(--photos-fg); }
.app-badge.calendar  { background: var(--calendar-bg);  color: var(--calendar-fg); }
.app-badge.contacts  { background: var(--contacts-bg);  color: var(--contacts-fg); }

.app-row-name-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 6px;
}

.app-row-icon {
  width: 40px;
  height: 40px;
  border-radius: 9px;
  flex-shrink: 0;
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.1);
}

.app-row-name {
  font-family: var(--serif);
  font-size: 21px;
  font-weight: normal;
  color: var(--ink);
  letter-spacing: -0.01em;
}

.app-row-desc {
  font-size: 15px;
  color: var(--ink3);
  line-height: 1.6;
  padding-top: 4px;
}

.app-row-price {
  text-align: right;
  font-size: 14px;
  color: var(--ink3);
  padding-top: 4px;
  white-space: nowrap;
}

/* ------------------------------------------------------------------
   Home: About teaser
   ------------------------------------------------------------------ */

.home-about {
  background: var(--bg2);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 72px 60px;
}

.home-about-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 72px;
}

.home-about h2 {
  margin-bottom: 20px;
}

.home-about p {
  font-size: 16px;
  color: var(--ink2);
  line-height: 1.75;
  margin-bottom: 16px;
}

.about-quote {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 36px;
  align-self: start;
}

.about-quote blockquote {
  font-family: var(--serif);
  font-size: 20px;
  line-height: 1.65;
  font-style: italic;
  color: var(--ink);
  margin-bottom: 20px;
}

.about-quote cite {
  font-size: 13px;
  color: var(--ink3);
  font-style: normal;
}

/* ------------------------------------------------------------------
   App pages
   ------------------------------------------------------------------ */

.app-hero {
  border-bottom: 1px solid var(--border);
  padding: 72px 60px 60px;
}

.app-hero-inner {
  max-width: 800px;
}

.app-hero .app-badge {
  margin-bottom: 20px;
}

.app-hero-title {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 20px;
}

.app-hero-icon {
  width: 72px;
  height: 72px;
  border-radius: 16px;
  flex-shrink: 0;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.12);
}

.app-hero-title h1 {
  margin-bottom: 0;
}

.app-hero-tagline {
  font-size: 20px;
  color: var(--ink2);
  line-height: 1.6;
  margin-bottom: 28px;
  max-width: 600px;
  font-family: var(--serif);
  font-style: italic;
}

.app-hero-meta {
  display: flex;
  gap: 24px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 32px;
}

.app-hero-price {
  font-size: 18px;
  font-weight: 600;
  color: var(--ink);
}

.app-hero-platforms {
  font-size: 14px;
  color: var(--ink3);
}

.app-content {
  max-width: 800px;
  width: 100%;
  padding: 60px 60px;
}

/* App page section formatting */
.app-content h2 {
  font-size: 26px;
  margin-top: 52px;
  margin-bottom: 16px;
  padding-top: 52px;
  border-top: 1px solid var(--border);
}

.app-content h2:first-child {
  border-top: none;
  padding-top: 0;
  margin-top: 0;
}

.app-content p {
  font-size: 16px;
  color: var(--ink2);
  line-height: 1.75;
  margin-bottom: 16px;
}

.app-content ul {
  color: var(--ink2);
  font-size: 16px;
  line-height: 1.7;
  margin-bottom: 20px;
}

.app-content li {
  margin-bottom: 6px;
}

.app-content strong {
  color: var(--ink);
}

/* ------------------------------------------------------------------
   Screenshot sections (text + app screenshot side by side)
   ------------------------------------------------------------------ */

.screenshot-section {
  display: flex;
  flex-direction: row;
  gap: 44px;
  align-items: flex-start;
  padding-top: 52px;
  margin-top: 52px;
  border-top: 1px solid var(--border);
}

/* Image on the left, text on the right */
.screenshot-section.flip {
  flex-direction: row-reverse;
}

/* First section needs no top border (replaces h2:first-child rule) */
.app-content > .screenshot-section:first-child {
  border-top: none;
  padding-top: 0;
  margin-top: 0;
}

/* h2 inside a screenshot section is already separated by the section border */
.screenshot-section h2 {
  border-top: none;
  padding-top: 0;
  margin-top: 0;
}

.screenshot-text {
  flex: 1 1 0;
  min-width: 0;
}

.screenshot-img {
  flex: 0 0 220px;
  width: 220px;
}

.screenshot-img img {
  width: 100%;
  border-radius: 20px;
  box-shadow: 0 6px 28px rgba(0, 0, 0, 0.12);
  border: 1px solid var(--border);
  display: block;
}

@media (max-width: 640px) {
  .screenshot-section,
  .screenshot-section.flip {
    flex-direction: column;
  }
  /* Always show image after text on small screens */
  .screenshot-section.flip .screenshot-img {
    order: 1;
  }
  .screenshot-section.flip .screenshot-text {
    order: 0;
  }
  .screenshot-img {
    flex: 0 0 auto;
    width: 100%;
    max-width: 280px;
  }
}

/* Per-app accent on headings */
body.app-notebook .app-content h2 { color: var(--notebook-fg); }
body.app-photos   .app-content h2 { color: var(--photos-fg); }
body.app-calendar .app-content h2 { color: var(--calendar-fg); }
body.app-contacts .app-content h2 { color: var(--contacts-fg); }

body.app-notebook .app-hero h1 { color: var(--ink); }
body.app-photos   .app-hero h1 { color: var(--ink); }
body.app-calendar .app-hero h1 { color: var(--ink); }
body.app-contacts .app-hero h1 { color: var(--ink); }

/* ------------------------------------------------------------------
   Privacy policy pages
   ------------------------------------------------------------------ */

.policy-header {
  border-bottom: 1px solid var(--border);
  padding: 48px 60px;
  background: var(--bg2);
}

.policy-header-inner {
  max-width: 760px;
}

.back-link {
  display: inline-block;
  font-size: 14px;
  color: var(--ink3);
  text-decoration: none;
  margin-bottom: 20px;
}

.back-link:hover {
  color: var(--amber);
  text-decoration: none;
}

.policy-header h1 {
  font-size: 36px;
  margin-bottom: 12px;
}

.policy-meta {
  font-size: 14px;
  color: var(--ink3);
  margin: 0;
}

.policy-content {
  padding: 60px 60px;
  max-width: 760px;
}

.policy-content h2 {
  font-size: 22px;
  margin-top: 48px;
  margin-bottom: 14px;
  padding-top: 48px;
  border-top: 1px solid var(--border);
}

.policy-content h2:first-child {
  border-top: none;
  padding-top: 0;
  margin-top: 0;
}

.policy-content p {
  font-size: 16px;
  color: var(--ink2);
  line-height: 1.75;
  margin-bottom: 16px;
}

.policy-content ul {
  color: var(--ink2);
  font-size: 16px;
  line-height: 1.7;
  margin-bottom: 16px;
}

.policy-content li {
  margin-bottom: 6px;
}

.policy-content strong {
  color: var(--ink);
}

/* ------------------------------------------------------------------
   About page
   ------------------------------------------------------------------ */

.about-hero {
  padding: 80px 60px 60px;
  border-bottom: 1px solid var(--border);
}

.about-hero-inner {
  max-width: 760px;
}

.about-hero-kicker {
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--amber);
  font-weight: 600;
  margin-bottom: 20px;
}

.about-content {
  padding: 60px 60px;
  max-width: 760px;
}

.about-content p {
  font-size: 17px;
  color: var(--ink2);
  line-height: 1.8;
  margin-bottom: 20px;
}

.about-content h2 {
  font-size: 26px;
  margin-top: 52px;
  margin-bottom: 14px;
  padding-top: 52px;
  border-top: 1px solid var(--border);
}

.about-content h2:first-child {
  border-top: none;
  padding-top: 0;
  margin-top: 0;
}

/* ------------------------------------------------------------------
   Nextcloud explainer (home page)
   ------------------------------------------------------------------ */

.home-nc {
  padding: 72px 60px;
  max-width: 1200px;
  margin: 0 auto;
  border-top: 1px solid var(--border);
}

.home-nc-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 56px;
  align-items: start;
}

.home-nc-inner h2 {
  margin-bottom: 16px;
}

.home-nc-intro {
  font-size: 16px;
  color: var(--ink2);
  line-height: 1.75;
  margin-bottom: 16px;
}

.nc-steps {
  list-style: none;
  padding: 0;
  margin: 0;
}

.nc-step {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 14px;
  padding: 18px 0;
  border-bottom: 1px solid var(--border);
}

.nc-step:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.nc-step-num {
  font-size: 12px;
  font-weight: 700;
  color: var(--amber);
  background: var(--amber-bg);
  border-radius: 50%;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 2px;
  flex-shrink: 0;
}

.nc-step-body strong {
  display: block;
  font-size: 15px;
  color: var(--ink);
  margin-bottom: 4px;
}

.nc-step-body span {
  font-size: 14px;
  color: var(--ink3);
  line-height: 1.55;
}

/* ------------------------------------------------------------------
   Responsive
   ------------------------------------------------------------------ */

@media (max-width: 900px) {
  .site-nav     { padding: 0 24px; }
  .site-footer  { padding: 32px 24px; flex-direction: column; gap: 20px; align-items: flex-start; }

  .home-hero    { grid-template-columns: 1fr; padding: 60px 24px; gap: 48px; }
  .home-prose   { padding: 56px 24px; }
  .home-apps    { padding: 56px 24px; }
  .home-about   { padding: 56px 24px; }
  .home-about-inner { grid-template-columns: 1fr; gap: 40px; }
  .home-nc      { padding: 56px 24px; }
  .home-nc-inner { grid-template-columns: 1fr; padding: 32px; gap: 40px; }

  .app-row      { grid-template-columns: 1fr; gap: 6px; padding: 24px 12px; }
  .app-row-price { text-align: left; }

  .app-hero     { padding: 56px 24px 40px; }
  .app-content  { padding: 48px 24px; }

  .policy-header { padding: 40px 24px; }
  .policy-content { padding: 48px 24px; }

  .about-hero   { padding: 56px 24px 40px; }
  .about-content { padding: 48px 24px; }

  .nav-links { display: none; }
}

@media (max-width: 600px) {
  .hero-cta { flex-direction: column; align-items: flex-start; }
  .hero-principles { padding: 28px; }
}
