/*  Quoth — site styles.
    Light only: the paper aesthetic from the brand page, carried over verbatim.
    One small script (reveal.js) settles sections in as you scroll; the only
    external resource is Google Fonts (Literata).  */

/* ---------------------------------------------------------------- tokens */

:root {
  /* brand, light values only */
  --ground:     #FAF3E4;
  --surface:    #FFFCF3;
  --ink:        #33291E;
  --ink-soft:   #6b5d4b;
  --hair:       #e2d5ba;
  --cream:      #E9DEC9;
  --ochre:      #B67A2E;
  --ochre-lift: #D69A4A;

  --serif: "Literata", Georgia, "Times New Roman", serif;
  --sans:  system-ui, -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;

  /* the centred column; prose pages narrow it (see .page-prose) */
  --wrap:  68rem;
  --prose: 36rem;
  --shot:  860px;   /* device renders never grow past this */

  --pad:    clamp(1.25rem, 5vw, 3rem);
  --shadow: 0 18px 50px rgba(51, 41, 30, .12);

  color-scheme: light;
}

/* ------------------------------------------------------------------ base */

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--serif);
  font-optical-sizing: auto;
  font-size: 18px;
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection { background: var(--ochre); color: var(--ground); }

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

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

a { color: var(--ochre); text-decoration-thickness: 1px; text-underline-offset: .18em; }
a:hover { color: var(--ink); }

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

.wrap {
  max-width: 86rem;
  margin: 0 auto;
  padding: 0 var(--pad);
}

/* prose pages align chrome and text on the same narrow measure */
.page-prose { --wrap: var(--prose); }

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
}
.skip:focus {
  left: 1rem;
  top: 1rem;
  z-index: 10;
  background: var(--surface);
  border: 1px solid var(--ochre);
  border-radius: 3px;
  padding: .5rem .9rem;
  font-family: var(--sans);
  font-size: .85rem;
}

/* ------------------------------------------------- small sans-serif type */

.eyebrow {
  font-family: var(--sans);
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin: 0 0 1rem;
}

/* the perch: a hairline with a short ochre segment at its left end */
.perch {
  position: relative;
  height: 1px;
  background: var(--hair);
  border: 0;
  margin: 0;
}
.perch::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  height: 1px;
  width: 56px;
  background: var(--ochre);
}

/* --------------------------------------------------------------- the mark */

/* the hidden <symbol> definition at the top of each page */
.svg-defs { position: absolute; width: 0; height: 0; }

.raven {
  display: block;
  width: 100%;
  height: auto;
  color: var(--ink);
}

/* ---------------------------------------------------------------- header */

.site-header {
  border-bottom: 1px solid var(--hair);
  background: var(--ground);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 4.6rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: .65rem;
  color: var(--ink);
  text-decoration: none;
}
.brand .raven { width: 26px; flex: 0 0 auto; }
.brand .wordmark {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.32rem;
  letter-spacing: -.01em;
  line-height: 1;
}
.brand:hover { color: var(--ink); }
.brand:hover .raven { color: var(--ochre); }

.site-nav {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 3vw, 1.9rem);
  font-family: var(--sans);
  font-size: .74rem;
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
}
.site-nav a {
  color: var(--ink-soft);
  text-decoration: none;
  padding-bottom: 2px;
  border-bottom: 1px solid transparent;
}
.site-nav a:hover { color: var(--ink); border-bottom-color: var(--ochre); }
.site-nav a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--ochre); }

/* ------------------------------------------------------------------ hero */

.hero { padding: clamp(3.25rem, 8vw, 6rem) 0 clamp(2.5rem, 6vw, 4rem); }

.hero__grid { display: grid; gap: clamp(2.25rem, 5vw, 3rem); }

.hero h1 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(3.6rem, 11vw, 6.2rem);
  line-height: .92;
  letter-spacing: -.025em;
  margin: 0;
}

.hero .perch-hero {
  height: 1px;
  background: var(--ochre);
  border: 0;
  width: 120px;
  margin: 1.5rem 0 1.6rem;
}

.hero .line {
  font-family: var(--serif);
  font-size: clamp(1.22rem, 2.6vw, 1.5rem);
  line-height: 1.4;
  letter-spacing: -.005em;
  margin: 0 0 1.4rem;
  max-width: 34ch;
  text-wrap: pretty;
}

.hero .blurb {
  font-size: 1.02rem;
  color: var(--ink-soft);
  max-width: 46ch;
}

/* -------------------------------------------------------------- features */

.features { padding-bottom: clamp(1rem, 3vw, 2rem); }

.feature {
  display: grid;
  gap: clamp(2rem, 5vw, 2.75rem);
  padding: clamp(2.75rem, 7vw, 4.75rem) 0;
  border-top: 1px solid var(--hair);
}

.feature h2 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(1.7rem, 3.8vw, 2.35rem);
  line-height: 1.12;
  letter-spacing: -.012em;
  margin: 0 0 1.15rem;
}

.feature__body p { max-width: 46ch; color: var(--ink-soft); }
.feature__body p:first-of-type { color: var(--ink); }

/* ---------------------------------------------------------- screenshots */

.shot { margin: 0; }

/*  Stills and clips share one frame, so a <video> and an <img> sit identically
    in the page and a poster hands over to its clip without moving anything.  */
.shot img,
.shot video {
  display: block;
  width: 100%;
  max-width: var(--shot);
  height: auto;
  aspect-ratio: 3 / 4;          /* holds the layout before the files land */
  object-fit: cover;
  margin-inline: auto;
  background: var(--surface);
  border: 1px solid var(--hair);
  border-radius: 18px;
  box-shadow: var(--shadow);
}

.shot figcaption {
  font-family: var(--sans);
  font-size: .78rem;
  line-height: 1.5;
  color: var(--ink-soft);
  max-width: var(--shot);
  margin: .9rem auto 0;
  text-align: center;
}

.shot--hero img { --shot: 960px; }
.shot--small img,
.shot--small figcaption { --shot: 520px; }

/* a landscape crop, sized by its column rather than by the portrait cap */
.shot--wide img {
  max-width: 100%;
  aspect-ratio: 5 / 4;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

/*  The hero drifts the way a device would in a slow Rotato float: a few pixels of
    rise and a fraction of a degree of tilt over eight seconds, easing both ways.
    Small enough to feel like breathing, not motion.  */
@keyframes hero-float {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50%      { transform: translateY(-6px) rotate(-0.35deg); }
}
.shot--hero.is-visible img {
  animation: hero-float 8s ease-in-out infinite;
  animation-delay: .9s;               /* after the reveal has settled */
  transform-origin: 50% 60%;
}
@media (prefers-reduced-motion: reduce) {
  .shot--hero.is-visible img { animation: none; }
}

/*  A render's paper matches the page to within a level or two, and on a flat ground
    even that can read as a rectangle. Feathering the outer few percent of each device
    figure into the page removes the edge entirely; the feather only ever touches paper,
    since every render keeps a margin around the device and its shadow.  */
.shot--device img,
.shot--device video {
  -webkit-mask-image: radial-gradient(farthest-corner at 50% 50%, #000 84%, transparent 100%);
  mask-image: radial-gradient(farthest-corner at 50% 50%, #000 84%, transparent 100%);
}
/* close-ups feather only the cut edge, where the iPad runs out of frame */
.shot--detail.shot--upper img,
.shot--detail.shot--upper video {
  -webkit-mask-image: linear-gradient(to bottom, #000 93%, transparent 100%);
  mask-image: linear-gradient(to bottom, #000 93%, transparent 100%);
}
.shot--detail.shot--lower img,
.shot--detail.shot--lower video,
.shot--wide img {
  -webkit-mask-image: linear-gradient(to top, #000 93%, transparent 100%);
  mask-image: linear-gradient(to top, #000 93%, transparent 100%);
}

/*  Close-ups of the reading page: the one place the page shows the app's text at a
    size you can actually read. They keep the card frame the device renders gave up.  */
.shot--detail img,
.shot--detail video {
  max-width: 100%;
  aspect-ratio: 5 / 4;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

/*  Rotato renders carry the device, its shadow, and the paper behind it, so the
    page adds no frame of its own: on the ground colour they read as one surface.  */
.shot--device img,
.shot--device video {
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

/* the phone clip keeps phone proportions and stays narrow */
.shot--phone video {
  --shot: 560px;
  aspect-ratio: 2 / 3;
}

/* ------------------------------------------------------------------ band */
/*  A quiet full-width strip between the hero and the tour. No picture: the
    only thing on it is who the app is for.  */

.band {
  background: var(--cream);
  border-top: 1px solid var(--hair);
  padding: clamp(2.5rem, 6vw, 3.75rem) 0;
}

.band .eyebrow { margin-bottom: 1.1rem; }

.band__lead {
  font-family: var(--serif);
  font-size: clamp(1.08rem, 2.1vw, 1.28rem);
  line-height: 1.5;
  color: var(--ink);
  max-width: 54ch;
  text-wrap: pretty;
}

.band__note {
  font-size: .98rem;
  color: var(--ink-soft);
  max-width: 48ch;
  margin-bottom: 0;
}

/* ----------------------------------------------------------- paper panel */
/*  The one section with nothing to photograph yet, so it is set as a card of
    type rather than a device shot.  */

.soon {
  border-top: 1px solid var(--hair);
  padding: clamp(2.75rem, 7vw, 4.5rem) 0;
}

.panel {
  background: var(--surface);
  border: 1px solid var(--hair);
  border-radius: 18px;
  box-shadow: var(--shadow);
  padding: clamp(1.9rem, 5vw, 3.2rem);
  max-width: 44rem;
  margin-inline: auto;
}

.panel h2 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(1.7rem, 3.8vw, 2.35rem);
  line-height: 1.12;
  letter-spacing: -.012em;
  margin: 0 0 1.15rem;
}

.panel p { color: var(--ink-soft); max-width: 52ch; }

/* ----------------------------------------------------------- small things */

.small-things {
  border-top: 1px solid var(--hair);
  padding: clamp(2.75rem, 7vw, 4.5rem) 0;
}

.small-things h2 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(1.7rem, 3.8vw, 2.35rem);
  line-height: 1.12;
  letter-spacing: -.012em;
  margin: 0 0 .55rem;
}

.small-things__intro {
  color: var(--ink-soft);
  max-width: 46ch;
  margin: 0 0 clamp(1.9rem, 4vw, 2.6rem);
}

.small-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: clamp(1.4rem, 3vw, 2rem);
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.small img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  background: var(--surface);
  border: 1px solid var(--hair);
  border-radius: 10px;
  box-shadow: 0 8px 22px rgba(51, 41, 30, .09);
}

.small p {
  font-size: .9rem;
  line-height: 1.5;
  color: var(--ink-soft);
  margin: .85rem 0 0;
}

.small strong { color: var(--ink); font-weight: 600; }

/* --------------------------------------------------------------- closing */

.closing {
  display: grid;
  gap: clamp(2rem, 5vw, 3rem);
  padding: clamp(3rem, 7vw, 4.75rem) 0 clamp(3.5rem, 8vw, 5.5rem);
  border-top: 1px solid var(--hair);
}

.notes { display: grid; gap: 1.9rem; }

.note { position: relative; padding-top: 1.2rem; border-top: 1px solid var(--hair); }
.note::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 0;
  width: 40px;
  height: 2px;
  background: var(--ochre);
}

.note h3 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.16rem;
  letter-spacing: -.005em;
  margin: 0 0 .4rem;
}
.note p {
  font-size: .98rem;
  color: var(--ink-soft);
  max-width: 44ch;
}

/* ------------------------------------------------------------ prose page */

.prose { padding: clamp(2.5rem, 7vw, 4rem) 0 clamp(3rem, 8vw, 4.5rem); }

.prose h1 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(2.1rem, 6vw, 2.9rem);
  line-height: 1.1;
  letter-spacing: -.018em;
  margin: 0 0 .65rem;
}

.prose .standfirst {
  font-size: 1.14rem;
  color: var(--ink-soft);
  margin: 0 0 2.25rem;
  max-width: 42ch;
}

.prose .effective {
  font-family: var(--sans);
  font-size: .8rem;
  letter-spacing: .04em;
  color: var(--ink-soft);
  margin: 0 0 2.25rem;
}

.prose h2 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.28rem;
  letter-spacing: -.005em;
  margin: 2.6rem 0 .7rem;
  padding-top: 1.4rem;
  border-top: 1px solid var(--hair);
}

.prose ul { margin: 0 0 1.05rem; padding-left: 1.2rem; }
.prose li { margin-bottom: .45rem; }
.prose li::marker { color: var(--ochre); }
.prose strong { font-weight: 600; }

/* FAQ */
.faq { margin: 0; }
.faq dt {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.16rem;
  letter-spacing: -.005em;
  margin: 2.2rem 0 .5rem;
  padding-top: 1.3rem;
  border-top: 1px solid var(--hair);
}
.faq dt:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.faq dd { margin: 0; color: var(--ink-soft); }
.faq dd p { max-width: 48ch; }

/* contact card */
.contact {
  background: var(--surface);
  border: 1px solid var(--hair);
  border-left: 2px solid var(--ochre);
  border-radius: 3px;
  padding: 1.5rem 1.5rem 1.6rem;
  margin: 0 0 3rem;
}
.contact .eyebrow { margin-bottom: .6rem; }
.contact p { max-width: 44ch; }
.contact .address {
  font-family: var(--sans);
  font-size: 1.02rem;
  color: var(--ink);
}

/* ---------------------------------------------------------------- footer */

.site-footer { padding: 0 0 clamp(2.5rem, 6vw, 3.5rem); }
.site-footer .perch { margin-bottom: 1.6rem; }

.site-footer__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem 1.5rem;
}

.site-footer .colophon {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
}
.site-footer .raven { width: 22px; color: var(--ochre); flex: 0 0 auto; }
.site-footer .tagline {
  font-family: var(--serif);
  font-style: italic;
  font-size: .96rem;
  color: var(--ink-soft);
  margin: 0;
}

.site-footer__nav {
  display: flex;
  align-items: center;
  gap: .55rem;
  flex-wrap: wrap;
  font-family: var(--sans);
  font-size: .78rem;
  letter-spacing: .04em;
  color: var(--ink-soft);
}
.site-footer__nav a { color: var(--ink-soft); text-decoration: none; }
.site-footer__nav a:hover { color: var(--ink); text-decoration: underline; text-decoration-color: var(--ochre); }
.site-footer__nav .sep { color: var(--hair); }

/* ---------------------------------------------------------- scroll reveal */
/*  Sections settle in once, the first time they are scrolled to (reveal.js).
    The hidden start state hangs off .js on <html>, so with no script — or no
    IntersectionObserver to drive it — the page is simply visible as written.
    Opacity and transform only: nothing here moves a box or reflows a line.  */

.js .reveal {
  opacity: 0;
  transform: translateY(14px);
  transition:
    opacity   .65s cubic-bezier(.2, .7, .2, 1),
    transform .65s cubic-bezier(.2, .7, .2, 1);
  transition-delay: calc(var(--i, 0) * 80ms);   /* --i is set inline, per element */
}

/* pictures beside their text drift in from their own side */
.js .reveal--left  { transform: translateX(-18px); }
.js .reveal--right { transform: translateX(18px); }

/* the lightest one: a short rise, for prose that arrives as you reach it */
.js .reveal--soft { transform: translateY(10px); }

.js .reveal.is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .js .reveal { opacity: 1; transform: none; transition: none; }
}

/* ------------------------------------------------------------ wide screens */

@media (min-width: 62em) {
  .hero__grid {
    grid-template-columns: minmax(0, .7fr) minmax(0, 1.3fr);
    align-items: center;
    gap: clamp(2.5rem, 6vw, 4.5rem);
  }

  .feature {
    grid-template-columns: minmax(0, .65fr) minmax(0, 1.35fr);
    align-items: center;
    gap: clamp(2.5rem, 6vw, 4.5rem);
  }
  /* alternate which side the picture sits on; the wide column follows the picture */
  .feature--flip { grid-template-columns: minmax(0, 1.35fr) minmax(0, .65fr); }
  .feature--flip .feature__media { order: -1; }

  .closing { grid-template-columns: minmax(0, 1fr) minmax(0, .9fr); align-items: center; }

  .small-list { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}

/* between the two: three across rather than five */
@media (min-width: 44em) and (max-width: 61.99em) {
  .small-list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* --------------------------------------------------------- narrow screens */

@media (max-width: 26em) {
  body { font-size: 17px; }
  .site-nav { gap: .95rem; font-size: .68rem; letter-spacing: .12em; }
  .brand .wordmark { font-size: 1.2rem; }
}
