@import url('fonts.css');

/* ============================================================================
   MindBuilder — www.mindbuilder.tech

   The aesthetic is taken from the app itself: its default canvas is warm linen
   paper with ink text and colour-coded nodes joined by curved branches. So the
   site is that canvas. Accents are the six node colours, used sparingly and
   always as a set, never as a gradient wash.
   ========================================================================== */

:root {
  /* Ground: the app's paper canvas, two shades for banding sections */
  --paper:       #EFE9DA;
  --paper-deep:  #E7E0CE;
  --card:        #FBF8F1;

  /* Ink */
  --ink:         #241F18;
  --ink-soft:    #5A5144;
  --ink-faint:   #8B8272;
  --rule:        #D5CCB6;

  /* The node palette, straight out of the icon */
  --amber:  #E9971A;
  --cyan:   #1AAEBC;
  --green:  #24A96C;
  --pink:   #E0526F;
  --orange: #E0722C;
  --violet: #7B5CE0;
  --brand:  #4A5BD8;

  --measure: 34rem;
  --gutter: clamp(1.25rem, 4vw, 3rem);
  --radius: 14px;

  --shadow-sm: 0 1px 2px rgba(53, 42, 24, .08), 0 3px 8px rgba(53, 42, 24, .05);
  --shadow-lg: 0 2px 6px rgba(53, 42, 24, .07), 0 18px 44px rgba(53, 42, 24, .14);
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background-color: var(--paper);
  /* A faint fibre grain, drawn rather than fetched — keeps the page one request. */
  background-image:
    radial-gradient(circle at 18% 12%, rgba(255,255,255,.55), transparent 42%),
    radial-gradient(circle at 82% 78%, rgba(255,255,255,.32), transparent 46%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.82' numOctaves='3'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)' opacity='.045'/%3E%3C/svg%3E");
  color: var(--ink);
  font-family: 'Karla', ui-sans-serif, "Helvetica Neue", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

/* --- Type ----------------------------------------------------------------- */

h1, h2, h3 {
  font-family: 'Fraunces', Iowan Old Style, "Palatino Linotype", Georgia, serif;
  font-weight: 600;
  letter-spacing: -.015em;
  line-height: 1.1;
  margin: 0;
  /* Fraunces is optically sized: large text wants the display cut, small text
     the text cut. Set per level rather than leaving it at the default. */
  font-variation-settings: 'opsz' 72, 'SOFT' 0, 'WONK' 1;
}
h1 { font-size: clamp(2.6rem, 6.4vw, 4.4rem); }
h2 { font-size: clamp(1.9rem, 3.6vw, 2.7rem); font-variation-settings: 'opsz' 48, 'WONK' 1; }
h3 { font-size: 1.2rem; font-variation-settings: 'opsz' 20, 'WONK' 0; letter-spacing: -.005em; }

p { margin: 0 0 1.1em; }
a { color: var(--brand); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--violet); }

.lede {
  font-size: clamp(1.1rem, 1.9vw, 1.3rem);
  color: var(--ink-soft);
  max-width: var(--measure);
}

.eyebrow {
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin: 0 0 .9rem;
}

code, .mono {
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  font-size: .88em;
  background: rgba(74, 91, 216, .09);
  padding: .12em .4em;
  border-radius: 5px;
}

/* --- Shell ---------------------------------------------------------------- */

.wrap { max-width: 1120px; margin: 0 auto; padding-inline: var(--gutter); }
.narrow { max-width: 46rem; }

section { padding-block: clamp(3.5rem, 8vw, 6.5rem); }
.band { background: var(--paper-deep); border-block: 1px solid var(--rule); }

/* --- Header --------------------------------------------------------------- */

.site-head {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--paper) 86%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--rule);
}
.site-head .wrap {
  display: flex; align-items: center; gap: .4rem 1rem;
  flex-wrap: wrap;
  min-height: 62px;
  padding-block: .5rem;
}
.brand {
  display: flex; align-items: center; gap: .6rem;
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 700; font-size: 1.12rem; letter-spacing: -.02em;
  color: var(--ink); text-decoration: none;
  font-variation-settings: 'opsz' 24, 'WONK' 1;
}
.brand img { width: 30px; height: 30px; }
.site-nav { margin-left: auto; display: flex; gap: clamp(.9rem, 2.5vw, 1.8rem); align-items: center; }
.site-nav a {
  color: var(--ink-soft); text-decoration: none; font-weight: 500; font-size: .95rem;
}
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--ink); }
.site-nav a[aria-current="page"] { text-decoration: underline; text-underline-offset: 5px; }

/* Below this the three links plus the wordmark no longer fit on one line, and a
   nav that cannot fit is what pushes a page wider than the phone holding it. */
@media (max-width: 560px) {
  .site-nav { margin-left: 0; width: 100%; gap: 1.1rem; font-size: .9rem; padding-bottom: .15rem; }
}

/* --- Hero: laid out as a mind map ---------------------------------------- */

.hero { padding-block: clamp(3rem, 7vw, 5.5rem) clamp(2.5rem, 6vw, 4.5rem); position: relative; }
.hero h1 { max-width: 15ch; }
.hero .lede { margin-top: 1.4rem; }

.hero-map {
  margin-top: clamp(2.5rem, 5vw, 3.5rem);
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(1rem, 3vw, 2.5rem);
  align-items: stretch;
}
.hero-branches { display: none; }
@media (min-width: 860px) {
  .hero-map { grid-template-columns: 116px 1fr; column-gap: 0; }
  /* Stretched to the height of the node stack so each branch lands on the
     middle of its card. preserveAspectRatio="none" does the stretching;
     non-scaling-stroke keeps the line weight even after it. */
  .hero-branches { display: block; width: 116px; height: 100%; }
  .hero-branches path {
    fill: none; stroke-width: 3.5; stroke-linecap: round;
    vector-effect: non-scaling-stroke;
    stroke-dasharray: 260; stroke-dashoffset: 260;
    animation: draw .9s cubic-bezier(.3,.8,.4,1) forwards;
  }
  .hero-branches circle { fill: var(--ink); }
}
@keyframes draw { to { stroke-dashoffset: 0; } }

.nodes { display: grid; gap: .85rem; }
.node {
  background: var(--card);
  border: 1px solid var(--rule);
  border-left: 5px solid var(--n, var(--brand));
  border-radius: var(--radius);
  padding: .95rem 1.2rem;
  box-shadow: var(--shadow-sm);
  opacity: 0;
  animation: rise .55s cubic-bezier(.2,.75,.3,1) forwards;
}
.node h3 { margin-bottom: .15rem; }
.node p { margin: 0; color: var(--ink-soft); font-size: .97rem; }
.node:nth-child(1) { animation-delay: .10s; }
.node:nth-child(2) { animation-delay: .22s; }
.node:nth-child(3) { animation-delay: .34s; }

@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  .node { opacity: 1; animation: none; }
  .hero-branches path { stroke-dashoffset: 0; animation: none; }
}

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

.actions { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 1.8rem; align-items: center; }
.btn {
  display: inline-flex; align-items: center; gap: .5rem;
  font-weight: 700; font-size: .98rem;
  padding: .72rem 1.35rem;
  border-radius: 999px;
  text-decoration: none;
  border: 1px solid transparent;
  transition: transform .16s ease, box-shadow .16s ease, background-color .16s ease;
}
.btn-primary { background: var(--ink); color: var(--paper); box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: #100D09; color: var(--paper); transform: translateY(-1px); box-shadow: var(--shadow-lg); }
.btn-ghost { border-color: var(--rule); color: var(--ink); background: transparent; }
.btn-ghost:hover { border-color: var(--ink-faint); color: var(--ink); transform: translateY(-1px); }
.note { color: var(--ink-faint); font-size: .9rem; }

/* --- Screenshot plates ---------------------------------------------------- */

/* App windows are captured with their rounded corners transparent, so they are
   dropped straight onto the paper with a shadow that follows the alpha shape.
   A bordered box around them would read as a screenshot of a screenshot. */
.shot {
  filter: drop-shadow(0 2px 5px rgba(53, 42, 24, .10))
          drop-shadow(0 20px 40px rgba(53, 42, 24, .17));
}
.shot-wide { margin-top: clamp(2.2rem, 5vw, 3.2rem); }
.shot-round img { border-radius: 16px; }

figure { margin: 0; }
figcaption { color: var(--ink-faint); font-size: .88rem; margin-top: .7rem; }

/* --- Feature grid --------------------------------------------------------- */

.grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(15.5rem, 1fr));
  margin-top: clamp(2rem, 4vw, 2.8rem);
}
.card {
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 1.3rem 1.4rem;
}
.card h3 { display: flex; align-items: center; gap: .55rem; margin-bottom: .45rem; }
.card p { margin: 0; color: var(--ink-soft); font-size: .96rem; }
.dot { width: .62rem; height: .62rem; border-radius: 50%; background: var(--n, var(--brand)); flex: none; }

/* --- Split ---------------------------------------------------------------- */

.split { display: grid; gap: clamp(1.8rem, 5vw, 3.5rem); align-items: center; }
@media (min-width: 880px) { .split { grid-template-columns: 1fr 1fr; } .split.wide-left { grid-template-columns: 1.15fr .85fr; } }

/* --- Prose (support + privacy) ------------------------------------------- */

/* Section headings in a long prose page are signposts, not billboards — the
   page-level h2 scale is far too loud once there are eight of them. */
.prose h2 {
  font-size: clamp(1.3rem, 2vw, 1.55rem);
  font-variation-settings: 'opsz' 30, 'WONK' 1;
  margin-top: 2.4rem; padding-top: 1.7rem; border-top: 1px solid var(--rule);
}
.prose h2:first-of-type { border-top: 0; padding-top: 0; margin-top: 1.6rem; }
.prose h3 { margin-top: 1.6rem; margin-bottom: .3rem; }
.prose ul { padding-left: 1.25rem; }
.prose li { margin: .35rem 0; }
.prose { max-width: 42rem; }

.callout {
  background: var(--card);
  border: 1px solid var(--rule);
  border-left: 4px solid var(--brand);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 1rem 1.3rem;
  margin: 1.6rem 0;
}
.callout p:last-child { margin-bottom: 0; }

dl.faq dt { font-weight: 700; margin-top: 1.4rem; }
dl.faq dd { margin: .3rem 0 0; color: var(--ink-soft); }

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

.site-foot {
  border-top: 1px solid var(--rule);
  padding-block: 2.6rem 3.2rem;
  color: var(--ink-faint);
  font-size: .92rem;
}
.site-foot .wrap { display: flex; flex-wrap: wrap; gap: 1rem 2rem; align-items: center; }
.site-foot nav { margin-left: auto; display: flex; gap: 1.4rem; flex-wrap: wrap; }
.site-foot a { color: var(--ink-soft); text-decoration: none; }
.site-foot a:hover { color: var(--ink); text-decoration: underline; }

/* --- Utilities ------------------------------------------------------------ */

.skip {
  position: absolute; left: -9999px;
  background: var(--ink); color: var(--paper);
  padding: .6rem 1rem; border-radius: 0 0 8px 0; z-index: 100;
}
.skip:focus { left: 0; top: 0; }

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