/* Bovy design system.
 *
 * One file, shared by the landing page, the admin tool and the viewer, so the three
 * cannot drift apart. Everything downstream should reach for a token rather than a
 * literal value; if a value is missing here, add it here.
 *
 * The palette is warm rather than neutral-grey on purpose. Property photography is
 * full of wood, textile and lamplight, and a cool-grey UI fights it. Paper and ink,
 * with a single ochre accent picked to sit alongside interior light rather than
 * against it.
 */

@font-face {
  font-family: "Instrument Serif";
  src: url("/static/vendor/fonts/instrument-serif-normal.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Instrument Serif";
  src: url("/static/vendor/fonts/instrument-serif-italic.woff2") format("woff2");
  font-weight: 400; font-style: italic; font-display: swap;
}
@font-face {
  font-family: "Instrument Sans";
  src: url("/static/vendor/fonts/instrument-sans-normal.woff2") format("woff2");
  font-weight: 400 700; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Instrument Sans";
  src: url("/static/vendor/fonts/instrument-sans-italic.woff2") format("woff2");
  font-weight: 400 700; font-style: italic; font-display: swap;
}

:root {
  /* Surfaces, light */
  --paper:      #FBF9F5;
  --paper-sunk: #F2EDE3;
  --card:       #FFFFFF;
  --line:       #E6DFD1;
  --line-soft:  #F0EADE;

  /* Ink */
  --ink:    #14120E;
  --ink-2:  #4B463B;
  --ink-3:  #6F6A5B;   /* 5.14:1 on paper, 4.63:1 on paper-sunk — AA at small sizes */

  /* Accent: ochre, the colour of a lit room seen from outside at dusk */
  --accent:      #C17D2B;
  --accent-hi:   #E0A33C;
  --accent-deep: #8A5313;   /* accent as text on paper; meets 4.5:1 */
  --accent-soft: #F7EBD8;

  /* Support */
  --ok:    #2C6E49;
  --ok-bg: #E4F0E7;
  --bad:   #A32B21;
  --bad-bg:#F8E5E2;

  /* Surfaces, dark — the viewer, where the splat is the subject */
  --void:    #0B0A08;
  --void-2:  #17150F;
  --snow:    #F8F5EF;
  --glass:   rgba(20, 18, 13, .62);
  --glass-line: rgba(248, 245, 239, .14);

  --serif: "Instrument Serif", ui-serif, Georgia, serif;
  --sans:  "Instrument Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --mono:  ui-monospace, SFMono-Regular, Menlo, monospace;

  /* Fluid type. Display sizes lean large: this is a product about space. */
  --t-display: clamp(2.75rem, 1.2rem + 6.4vw, 6rem);
  --t-h1:      clamp(2rem, 1.1rem + 3.6vw, 3.5rem);
  --t-h2:      clamp(1.5rem, 1.1rem + 1.6vw, 2.25rem);
  --t-h3:      clamp(1.125rem, 1rem + .5vw, 1.375rem);
  --t-lead:    clamp(1.0625rem, 1rem + .45vw, 1.3125rem);
  --t-body:    1rem;
  --t-sm:      .875rem;
  --t-xs:      .78125rem;

  --r-sm: 6px;
  --r-md: 11px;
  --r-lg: 18px;
  --r-xl: 26px;
  --r-pill: 999px;

  /* Warm-tinted shadows: a neutral black shadow on bone paper reads grey and dirty. */
  --sh-1: 0 1px 2px rgba(31, 24, 10, .05), 0 2px 6px rgba(31, 24, 10, .04);
  --sh-2: 0 2px 6px rgba(31, 24, 10, .06), 0 12px 28px rgba(31, 24, 10, .07);
  --sh-3: 0 8px 24px rgba(31, 24, 10, .10), 0 32px 64px rgba(31, 24, 10, .10);

  --ease: cubic-bezier(.16, 1, .3, 1);
  --ease-soft: cubic-bezier(.4, 0, .2, 1);
  --t-fast: .16s;
  --t-med: .32s;
  --t-slow: .7s;

  --gutter: clamp(1.25rem, 4vw, 3rem);
  --measure: 34rem;      /* comfortable reading width */
  --wide: 76rem;
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--sans);
  font-size: var(--t-body);
  line-height: 1.55;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 { margin: 0; font-weight: 400; line-height: 1.08; letter-spacing: -.015em; }
p { margin: 0; }
a { color: inherit; }

/* ---------- wordmark ---------- */

.wordmark {
  font-family: var(--serif);
  font-size: 1.5rem;
  letter-spacing: -.01em;
  line-height: 1;
  display: inline-flex;
  align-items: baseline;
  gap: .12em;
  text-decoration: none;
  white-space: nowrap;
}
/* The dot is the whole mark: a room seen from above, a pin on a map, a full stop
   after a sentence that does not need finishing. */
.wordmark::after {
  content: "";
  width: .3em; height: .3em;
  border-radius: 50%;
  background: var(--accent);
  transform: translateY(-.02em);
}

/* ---------- buttons ---------- */

.btn {
  --btn-bg: var(--ink);
  --btn-fg: var(--paper);
  font: inherit;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .55em;
  padding: .78em 1.4em;
  border: 1px solid transparent;
  border-radius: var(--r-pill);
  background: var(--btn-bg);
  color: var(--btn-fg);
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  transition: transform var(--t-fast) var(--ease-soft),
              box-shadow var(--t-fast) var(--ease-soft),
              background var(--t-fast) var(--ease-soft),
              border-color var(--t-fast) var(--ease-soft);
}
.btn:hover { transform: translateY(-1px); box-shadow: var(--sh-2); }
.btn:active { transform: translateY(0); box-shadow: var(--sh-1); }
.btn:focus-visible { outline: 2px solid var(--accent-deep); outline-offset: 3px; }

.btn--accent { --btn-bg: var(--accent-hi); --btn-fg: var(--ink); font-weight: 600; }
.btn--ghost {
  --btn-bg: transparent; --btn-fg: var(--ink);
  border-color: var(--line);
}
.btn--ghost:hover { border-color: var(--ink-3); background: var(--card); }
.btn--sm { padding: .5em 1em; font-size: var(--t-sm); }
.btn[disabled] { opacity: .45; pointer-events: none; }

/* ---------- layout ---------- */

.wrap { width: min(100% - var(--gutter) * 2, var(--wide)); margin-inline: auto; }
.stack > * + * { margin-top: var(--gap, 1rem); }
.eyebrow {
  font-size: var(--t-xs);
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink-3);
  font-weight: 600;
}
.lead { font-size: var(--t-lead); color: var(--ink-2); line-height: 1.5; max-width: var(--measure); }
.serif { font-family: var(--serif); letter-spacing: -.02em; }

/* A hairline that fades out, rather than a hard rule edge to edge. */
.rule {
  height: 1px; border: 0;
  background: linear-gradient(90deg, var(--line), transparent);
}

/* ---------- motion ---------- */

/* Reveal on scroll. Elements start hidden only when JS is present to reveal them,
   so the page is still readable with scripting off. */
.js [data-reveal] {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity var(--t-slow) var(--ease), transform var(--t-slow) var(--ease);
  transition-delay: var(--reveal-delay, 0ms);
}
.js [data-reveal].in { opacity: 1; transform: none; }
/* Printing (and full-page capture tools) never scroll, so nothing would be revealed. */
@media print { .js [data-reveal] { opacity: 1; transform: none; transition: none; } }

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

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