/* guillotineapp.com. Palette from the app Theme. No third-party fonts, no gradients, no shadows. */

/* Lacquer (SIL Open Font Licence), self-hosted. Wordmark and titles only. */
@font-face {
  font-family: "Lacquer";
  src: url("/assets/fonts/lacquer.woff") format("woff");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

/* DM Sans (SIL Open Font Licence), self-hosted. Body text. */
@font-face {
  font-family: "DM Sans";
  src: url("/assets/fonts/dm-sans.woff") format("woff");
  font-weight: 400 600;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #1B1B1B;
  --bg-raised: #252525;
  --bg-control: #2F2F2F;
  --hairline: rgba(255, 255, 255, 0.09);
  --border: rgba(255, 255, 255, 0.14);
  --text: #F0F0F0;
  --text-2: #9E9E9E;
  --text-3: #707070;
  --accent: #E64233; /* link hover and markers. Never a fill. */
  --gutter: clamp(20px, 4vw, 40px);
  --font-body: "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --font-display: "Lacquer", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --content: 1000px; /* video and feature grid width */
  color-scheme: dark;
}

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

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

body {
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font: 14px/1.5 var(--font-body);
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }

:focus-visible { outline: 2px solid rgba(255, 255, 255, 0.5); outline-offset: 2px; }

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

.site-head {
  min-height: 80px; /* same height with or without the App Store badge, so the page below doesn't shift */
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px var(--gutter);
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 18px;
  color: var(--text);
  text-decoration: none;
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 400;
  letter-spacing: 0.02em;
  line-height: 1;
  margin-left: -5px; /* 5px further left */
}

/* Blade outline. Colour comes from here: var(--text) for white, var(--accent) for red. */
.logo-mark { display: block; position: relative; top: 3px; width: 24px; height: 16.6px; color: var(--text); }

/* Main ------------------------------------------------------------------ */

main { flex: 1; }

.hero {
  width: min(var(--content), 100% - 2 * var(--gutter));
  margin: 0 auto;
  text-align: center;
}

.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;
}

/* Demo video. Set the aspect ratio to the real file's (e.g. 16 / 10). */
.demo {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border: 1px solid var(--hairline);
  border-radius: 10px;
  background: var(--bg-raised);
}

.demo video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Screenshot: 80% of the content width, centred in the window on load.
   The shadow is a pre-rendered, dithered image (media/screenshot-shadow.png) rather than a CSS
   shadow, because a dark CSS shadow on a dark page bands into visible steps. The image is the
   window plus 100px on every side, so it is positioned 100/800 = 12.5% out left and right and
   100/534 = 18.73% out top and bottom. Regenerate it if the screenshot's shape changes. */
.shot {
  /* Centred vertically in the window on load: half the window height, less the 80px header,
     less half the screenshot's height (80% of the content width x 1336/2000). Never closer
     than 12px to the header on short windows. */
  --head-h: 80px;
  --shot-h: calc(min(var(--content), 100vw - 2 * var(--gutter)) * 0.8 * 0.668);
  position: relative;
  display: block;
  width: 80%;
  margin: max(12px, calc(50vh - var(--head-h) - var(--shot-h) / 2 - 36px)) auto 0; /* 36px above centre */
}
.shot::before {
  content: "";
  position: absolute;
  inset: -18.73% -12.5%;
  background: url("/media/screenshot-shadow.png") 0 0 / 100% 100% no-repeat;
  image-rendering: pixelated; /* keep the dither pattern crisp on Retina */
  pointer-events: none;
}
.shot img {
  position: relative;
  display: block;
  width: 100%;
  height: auto;
}

/* Phones and narrow windows: full width, sitting just under the header rather than centred. */
@media (max-width: 700px) {
  .shot { width: 100%; margin-top: 16px; }
  .shot::before { inset: -18.73% -12.5%; }
  .lede { margin-top: 36px; }
}

/* Badge. Apple asks for clear space of at least 1/4 of the badge height. */
.store {
  display: block;
  flex: none;
  position: relative;
  top: 5.5px; /* optical alignment with the blade and wordmark */
  margin: -10px -15px -10px -10px; /* clear space sits outside the header's padding; 5px further right */
  padding: 10px; /* = 1/4 of 40px badge height */
  line-height: 0;
}

.store img { display: block; height: 40px; width: auto; }

.lede {
  margin: 44px auto 0; /* 28px + the 16px the screenshot moved up, so the text stays put */
  max-width: max(60vw, 34em); /* 60% of the window, never narrower than 34em */
  color: var(--text-2);
  font-size: 15px;
}

.req {
  margin: 6px 0 0;
  color: var(--text-3);
  font-size: 12px;
}

/* Features -------------------------------------------------------------- */

.features {
  width: min(var(--content), 100% - 2 * var(--gutter));
  margin: clamp(56px, 10vh, 96px) auto clamp(56px, 10vh, 96px);
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px 40px;
}

.features li {
  padding-top: 14px;
  border-top: 1px solid var(--hairline);
}

.features h2 {
  margin: 0 0 6px;
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 400;
  letter-spacing: 0.02em;
}

.features p {
  margin: 0;
  color: var(--text-2);
  font-size: 13px;
}

@media (max-width: 860px) { .features { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 540px) { .features { grid-template-columns: 1fr; gap: 24px; } }

/* Prose (privacy) ------------------------------------------------------- */

.prose {
  width: min(640px, 100% - 2 * var(--gutter));
  margin: clamp(24px, 6vh, 56px) auto clamp(56px, 10vh, 96px);
}

.prose h1 {
  margin: 0 0 6px;
  font-family: var(--font-display);
  font-size: 36px;
  font-weight: 400;
  letter-spacing: 0.02em;
}

.prose .meta { margin: 0 0 32px; color: var(--text-3); font-size: 12px; }

.prose h2 {
  margin: 32px 0 8px;
  font-size: 14px;
  font-weight: 600;
}

.prose p, .prose li { color: var(--text-2); }
.prose p { margin: 0 0 12px; }
.prose ul { margin: 0 0 12px; padding-left: 18px; }
.prose li { margin-bottom: 4px; }
.prose strong { color: var(--text); font-weight: 500; }
.prose a { color: var(--text); text-underline-offset: 2px; text-decoration-color: var(--border); }
.prose a:hover { color: var(--accent); text-decoration-color: currentColor; }

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

.site-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 18px var(--gutter);
  color: var(--text-3);
  font-size: 12px;
}

.site-foot nav { display: flex; gap: 20px; }
.site-foot nav a { color: var(--text-2); text-decoration: none; }
.site-foot nav a[aria-current="page"] { color: var(--text); }
.site-foot nav a:hover { color: var(--accent); }

/* Email addresses stored reversed (see email.js); flipped back for people without JavaScript. */
.rev { unicode-bidi: bidi-override; direction: rtl; }
