/**
 * FileDesk — marketing site.
 *
 * Deliberately NOT the default SaaS blue-on-near-black. The palette is a
 * professional practice: deep ledger green, warm parchment paper, brass
 * accents. Display type is a serif so the product reads as an established
 * practice tool rather than a weekend app; UI type stays a clean sans.
 *
 * Fonts are system stacks only — no external requests, so the site is fast
 * everywhere and needs no cookie banner.
 */
:root {
  --green-900: #0E2C24;
  --green-800: #123A2F;
  --green-700: #17493B;
  --green-600: #1F5D4C;
  --green-500: #2C7A63;
  --green-100: #DCEAE3;
  --green-50: #EFF6F2;

  --brass-600: #9A7538;
  --brass-500: #B98F4E;
  --brass-400: #CBA063;
  --brass-300: #E3C08A;
  --brass-100: #F5E7CE;

  --paper: #FBF8F1;
  --paper-2: #F4EFE4;
  --ink: #16211D;
  --ink-2: #3D4B45;
  --ink-3: #6B7A73;
  --line: #E2DCCD;

  --danger: #A6402C;

  --serif: 'Iowan Old Style', 'Palatino Linotype', Palatino, Georgia, 'Times New Roman', serif;
  --sans: 'Segoe UI', system-ui, -apple-system, 'Helvetica Neue', Arial, sans-serif;

  --wrap: 1140px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --radius: 12px;
  --radius-lg: 20px;
  --shadow-sm: 0 1px 3px rgba(14, 44, 36, 0.08);
  --shadow: 0 10px 30px rgba(14, 44, 36, 0.10);
  --shadow-lg: 0 26px 70px rgba(14, 44, 36, 0.18);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}

img, svg { max-width: 100%; }

a { color: var(--green-600); text-decoration: none; }
a:hover { color: var(--green-500); text-decoration: underline; text-underline-offset: 3px; }

h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 600;
  line-height: 1.16;
  letter-spacing: -0.015em;
  margin: 0 0 0.5em;
  color: var(--green-900);
}
h1 { font-size: clamp(2.5rem, 5.2vw, 4rem); }
h2 { font-size: clamp(1.9rem, 3.4vw, 2.7rem); }
h3 { font-size: 1.32rem; }
p { margin: 0 0 1.1em; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.narrow { max-width: 760px; }

.eyebrow {
  font-family: var(--sans);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--brass-600);
  margin-bottom: 14px;
}

.lede { font-size: 1.2rem; color: var(--ink-2); }
.muted { color: var(--ink-3); }
.small { font-size: 0.92rem; }

/* --------------------------------------------------------------- buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--sans);
  font-size: 1rem;
  font-weight: 600;
  padding: 13px 26px;
  border-radius: 999px;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: transform 160ms var(--ease), box-shadow 160ms var(--ease),
              background-color 160ms var(--ease), color 160ms var(--ease);
}
.btn-primary { background: var(--green-600); color: var(--paper); box-shadow: var(--shadow-sm); }
.btn-primary:hover {
  background: var(--green-700); color: var(--paper);
  transform: translateY(-2px); box-shadow: var(--shadow); text-decoration: none;
}
.btn-ghost { background: transparent; color: var(--green-800); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--green-600); color: var(--green-700); text-decoration: none; transform: translateY(-2px); }
.btn-brass { background: var(--brass-300); color: var(--green-900); }
.btn-brass:hover { background: var(--brass-100); color: var(--green-900); text-decoration: none; transform: translateY(-2px); }
.btn-lg { padding: 16px 34px; font-size: 1.06rem; }

/* ----------------------------------------------------------------- header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(251, 248, 241, 0.86);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.nav { display: flex; align-items: center; gap: 30px; height: 74px; }
.brand { display: flex; align-items: center; gap: 11px; font-family: var(--serif); font-size: 1.35rem; font-weight: 600; color: var(--green-900); }
.brand:hover { text-decoration: none; }
.brand img { width: 38px; height: 38px; border-radius: 10px; }
.nav-links { display: flex; gap: 26px; margin-left: auto; align-items: center; }
.nav-links a { font-size: 0.97rem; font-weight: 500; color: var(--ink-2); }
.nav-links a:hover, .nav-links a[aria-current='page'] { color: var(--green-700); text-decoration: none; }
/* The nav CTA is a button: the plain-link colour rule above (higher
   specificity than .btn-primary) must not turn its text dark on green. */
.nav-links a.btn-primary { color: var(--paper); }
.nav-links a.btn-primary:hover { color: var(--paper); text-decoration: none; }
.nav-toggle { display: none; background: none; border: 1px solid var(--line); border-radius: 8px; padding: 8px 11px; cursor: pointer; font-size: 1.1rem; }

@media (max-width: 880px) {
  .nav-toggle { display: block; margin-left: auto; }
  .nav-links {
    display: none; position: absolute; top: 74px; left: 0; right: 0;
    flex-direction: column; align-items: flex-start; gap: 0;
    background: var(--paper); border-bottom: 1px solid var(--line); padding: 8px 24px 18px;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 12px 0; width: 100%; border-bottom: 1px solid var(--line); }
  .nav-links .btn { margin-top: 12px; }
}

/* ------------------------------------------------------------------- hero */
.hero {
  position: relative; overflow: hidden;
  background:
    radial-gradient(900px 460px at 12% -12%, rgba(44, 122, 99, 0.13), transparent 62%),
    radial-gradient(760px 420px at 96% 8%, rgba(185, 143, 78, 0.14), transparent 60%),
    var(--paper);
  padding: 84px 0 70px;
}
/* Faint ledger ruling — the paper the product is named after. */
.hero::before {
  content: ''; position: absolute; inset: 0;
  background-image: repeating-linear-gradient(to bottom, transparent 0 37px, rgba(23, 73, 59, 0.055) 37px 38px);
  mask-image: radial-gradient(ellipse at 50% 30%, #000 25%, transparent 72%);
  pointer-events: none;
}
.hero > * { position: relative; }
.hero-grid { display: grid; grid-template-columns: 1.06fr 0.94fr; gap: 54px; align-items: center; }
@media (max-width: 980px) { .hero-grid { grid-template-columns: 1fr; gap: 40px; } }
.hero h1 { margin-bottom: 0.42em; }
.hero .lede { max-width: 44ch; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 30px; }
.hero-note { margin-top: 22px; font-size: 0.92rem; color: var(--ink-3); }

/* --------------------------------------------------------------- sections */
section { padding: 84px 0; }
section.tight { padding: 60px 0; }
.section-dark {
  background: linear-gradient(165deg, var(--green-900), var(--green-800) 60%, var(--green-700));
  color: var(--green-100);
}
.section-dark h2, .section-dark h3 { color: var(--paper); }
.section-dark .eyebrow { color: var(--brass-300); }
/* Body copy on the dark panels: kept close to white — the earlier muted
   green (#BFD5CB) read as low-contrast on card fills. */
.section-dark p { color: #E4EEE8; }
.section-dark .muted, .section-dark .small { color: #C2D4CB; }
.section-paper { background: var(--paper-2); }

.section-head { max-width: 720px; margin-bottom: 46px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }

/* ------------------------------------------------------------------ cards */
.grid { display: grid; gap: 22px; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(310px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(285px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(215px, 1fr)); }

.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 30px;
  transition: transform 220ms var(--ease), box-shadow 220ms var(--ease), border-color 220ms var(--ease);
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: var(--green-100); }
.card h3 { margin-bottom: 8px; }
.card p { margin-bottom: 0; color: var(--ink-2); font-size: 0.99rem; }
.section-dark .card { background: rgba(255,255,255,0.075); border-color: rgba(255,255,255,0.16); }
.section-dark .card:hover { border-color: rgba(227,192,138,0.45); }
.section-dark .card p { color: #DDE9E2; }

.icon {
  width: 46px; height: 46px; border-radius: 13px;
  background: var(--green-50); color: var(--green-600);
  display: grid; place-items: center; font-size: 1.3rem; margin-bottom: 18px;
  border: 1px solid var(--green-100);
}
.section-dark .icon { background: rgba(227,192,138,0.14); border-color: rgba(227,192,138,0.3); color: var(--brass-300); }

/* Numbered stat block */
.stat { text-align: center; }
.stat .n { font-family: var(--serif); font-size: 2.7rem; color: var(--green-700); line-height: 1; }
.section-dark .stat .n { color: var(--brass-300); }
.stat .l { font-size: 0.9rem; color: var(--ink-2); margin-top: 8px; font-weight: 500; }
.section-dark .stat .l { color: #C9DAD1; }

/* Ghost button placed on a dark panel — enough border and text contrast to
   actually read as a button. */
.btn-ghost.on-dark { color: #F0F6F2; border-color: rgba(255, 255, 255, 0.45); }
.btn-ghost.on-dark:hover { color: #fff; border-color: var(--brass-300); }

/* ------------------------------------------------------------ device frame */
.device {
  border-radius: 16px; border: 1px solid var(--line); background: #fff;
  box-shadow: var(--shadow-lg); overflow: hidden;
}
/* A slow, barely-there float gives the hero screenshot a premium, alive feel
   without ever distracting. Disabled under reduced motion. */
.hero .device { animation: fd-float 7s var(--ease) infinite; }
@keyframes fd-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}
@media (prefers-reduced-motion: reduce) { .hero .device { animation: none; } }
.device-bar {
  height: 38px; background: var(--paper-2); border-bottom: 1px solid var(--line);
  display: flex; align-items: center; gap: 7px; padding: 0 14px;
}
.dot { width: 10px; height: 10px; border-radius: 50%; background: #D8D0BE; }
.device-body { padding: 0; line-height: 0; }

/* ------------------------------------------------------------------ forms */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 700px) { .form-grid { grid-template-columns: 1fr; } }
.field { display: flex; flex-direction: column; gap: 7px; }
.field.full { grid-column: 1 / -1; }
label { font-size: 0.9rem; font-weight: 600; color: var(--ink-2); }
input, select, textarea {
  font: inherit; font-size: 1rem; padding: 12px 14px;
  border: 1.5px solid var(--line); border-radius: 10px;
  background: var(--paper); color: var(--ink); width: 100%;
  transition: border-color 140ms var(--ease), box-shadow 140ms var(--ease);
}
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--green-500);
  box-shadow: 0 0 0 4px rgba(44, 122, 99, 0.13);
}
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-note { font-size: 0.88rem; color: var(--ink-3); }
.alert { padding: 14px 16px; border-radius: 12px; margin-bottom: 18px; font-size: 0.96rem; }
.alert-ok { background: var(--green-50); border: 1px solid var(--green-100); color: var(--green-700); }
.alert-err { background: #FBEDE9; border: 1px solid #F0CFC6; color: var(--danger); }

/* ------------------------------------------------------------------ misc */
.checklist { list-style: none; padding: 0; margin: 0; display: grid; gap: 13px; }
.checklist li { display: flex; gap: 13px; align-items: flex-start; }
.tick {
  flex-shrink: 0; width: 23px; height: 23px; border-radius: 7px; margin-top: 2px;
  background: var(--green-50); border: 1px solid var(--green-100); color: var(--green-600);
  display: grid; place-items: center; font-size: 0.76rem; font-weight: 800;
}
.section-dark .tick { background: rgba(227,192,138,0.16); border-color: rgba(227,192,138,0.32); color: var(--brass-300); }

.pill {
  display: inline-block; padding: 5px 13px; border-radius: 999px;
  background: var(--green-50); color: var(--green-700);
  font-size: 0.82rem; font-weight: 600; border: 1px solid var(--green-100);
}

.quote {
  font-family: var(--serif); font-size: 1.45rem; line-height: 1.5;
  color: var(--green-900); border-left: 3px solid var(--brass-400);
  padding-left: 26px; margin: 0;
}

/* --------------------------------------------------------------- about */
.about-grid {
  display: grid; grid-template-columns: 0.82fr 1.18fr; gap: 54px; align-items: center;
}
@media (max-width: 900px) {
  .about-grid { grid-template-columns: 1fr; gap: 34px; }
  .about-photo { max-width: 380px; }
}
.about-photo { position: relative; }
.about-photo img {
  width: 100%; height: auto; display: block;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-lg);
}
/* Brass corner accent, echoing the logo rule. */
.about-photo::before {
  content: ''; position: absolute; inset: -14px auto auto -14px;
  width: 74px; height: 74px; border-top: 3px solid var(--brass-500);
  border-left: 3px solid var(--brass-500); border-radius: 6px 0 0 0;
  z-index: -1;
}
.about-badge {
  position: absolute; left: 18px; bottom: 18px;
  background: rgba(14, 44, 36, 0.86); backdrop-filter: blur(8px);
  color: #fff; padding: 11px 16px; border-radius: 12px;
  display: flex; flex-direction: column; line-height: 1.3;
  box-shadow: var(--shadow);
}
.about-badge-name { font-family: var(--serif); font-size: 1.05rem; font-weight: 600; }
.about-badge-role { font-size: 0.78rem; color: var(--brass-300); letter-spacing: 0.03em; }
.about-tags { display: flex; flex-wrap: wrap; gap: 9px; margin: 22px 0 20px; }
.about-brand { margin-bottom: 0; }
.about-brand strong { color: var(--green-700); }

.faq { border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); padding: 20px 0; }
.faq summary { cursor: pointer; font-weight: 600; font-size: 1.08rem; color: var(--green-900); list-style: none; display: flex; justify-content: space-between; gap: 20px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; color: var(--brass-600); font-size: 1.4rem; line-height: 1; transition: transform 200ms var(--ease); }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq p { margin: 14px 0 0; color: var(--ink-2); }

/* --------------------------------------------------------------- articles */
.article-body { font-size: 1.08rem; }
.article-body h2 { margin-top: 1.8em; }
.article-body h3 { margin-top: 1.5em; }
.article-body ul, .article-body ol { padding-left: 24px; margin-bottom: 1.1em; }
.article-body li { margin-bottom: 0.5em; }
.article-body blockquote {
  margin: 1.6em 0; padding: 4px 0 4px 24px;
  border-left: 3px solid var(--brass-500); color: var(--ink-2); font-style: italic;
}
.article-meta { color: var(--ink-3); font-size: 0.94rem; margin-bottom: 30px; }

.post-list { display: grid; gap: 20px; }
.post {
  display: block; padding: 28px 30px; border: 1px solid var(--line);
  border-radius: var(--radius-lg); background: var(--paper);
  transition: transform 200ms var(--ease), box-shadow 200ms var(--ease), border-color 200ms var(--ease);
}
.post:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--green-100); text-decoration: none; }
.post h3 { margin-bottom: 6px; }
.post p { color: var(--ink-2); margin-bottom: 0; }

/* ----------------------------------------------------------------- footer */
.site-footer { background: var(--green-900); color: #9FBAB0; padding: 62px 0 34px; font-size: 0.95rem; }
.site-footer h4 { color: var(--paper); font-family: var(--sans); font-size: 0.82rem; letter-spacing: 0.12em; text-transform: uppercase; margin-bottom: 16px; }
.site-footer a { color: #C4D8D0; display: block; padding: 5px 0; }
.site-footer a:hover { color: var(--brass-300); text-decoration: none; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 34px; }
@media (max-width: 800px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
.footer-bottom { margin-top: 44px; padding-top: 22px; border-top: 1px solid rgba(255,255,255,0.1); display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: 0.88rem; }

/* -------------------------------------------------------------- animation */
/**
 * Progressive enhancement: content is visible by default and only starts
 * hidden when JavaScript has confirmed it is running (the `js` class is set
 * by an inline script in <head>). A marketing page must never be blank
 * because a script failed to load.
 */
.js .reveal { opacity: 0; transform: translateY(22px); transition: opacity 700ms var(--ease), transform 700ms var(--ease); }
.js .reveal.in { opacity: 1; transform: none; }
.reveal.d1 { transition-delay: 90ms; }
.reveal.d2 { transition-delay: 180ms; }
.reveal.d3 { transition-delay: 270ms; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
  .js .reveal { opacity: 1; transform: none; }
}

.skip {
  position: absolute; left: -9999px; top: 0; background: var(--green-800); color: #fff;
  padding: 12px 20px; z-index: 100; border-radius: 0 0 10px 0;
}
.skip:focus { left: 0; }
