/* Sitesterling — main stylesheet */

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

:root {
  --ink: #111114;
  --ink-2: #1a1a1f;
  --paper: #f4f4f2;
  --paper-2: #eaeae6;
  --white: #ffffff;
  --text: #111114;
  --muted: #4a4a52;
  --muted-on-dark: #a9a9b2;
  --line: rgba(17, 17, 20, 0.12);
  --line-on-dark: rgba(242, 242, 240, 0.16);
  --off-white: #f2f2f0;
  --blue: #3b6fe0;
  --blue-on-dark: #7fa6ff;
  --error-on-dark: #ffb4a8;

  --serif: "Instrument Serif", "Palatino Linotype", "Book Antiqua", "Times New Roman", serif;
  --sans: "Instrument Sans", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --gutter: clamp(20px, 5vw, 48px);
  --max: 1120px;
  --section: clamp(88px, 12vw, 168px);
  --radius: 14px;
}

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--text);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

a {
  color: inherit;
}

h1,
h2,
h3 {
  margin: 0;
  font-weight: 400;
}

p {
  margin: 0;
}

:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 3px;
  border-radius: 4px;
}
.on-dark :focus-visible,
.hero :focus-visible,
.site-footer :focus-visible,
.page-header :focus-visible {
  outline-color: var(--blue-on-dark);
}

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

.skip-link {
  position: absolute;
  left: 12px;
  top: -100px;
  z-index: 10;
  padding: 10px 16px;
  background: var(--off-white);
  color: var(--ink);
  border-radius: 8px;
  font-weight: 600;
  text-decoration: none;
}
.skip-link:focus {
  top: 12px;
}

.wrap {
  width: 100%;
  max-width: calc(var(--max) + 2 * var(--gutter));
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* ---------- Shared type ---------- */

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}
.eyebrow::before {
  content: "";
  width: 9px;
  height: 9px;
  background: var(--blue);
  clip-path: polygon(50% 0, 60% 40%, 100% 50%, 60% 60%, 50% 100%, 40% 60%, 0 50%, 40% 40%);
}
.on-dark .eyebrow {
  color: var(--muted-on-dark);
}
.on-dark .eyebrow::before {
  background: var(--blue-on-dark);
}

.title {
  font-family: var(--serif);
  font-size: clamp(2.6rem, 6.4vw, 4.6rem);
  line-height: 1.02;
  letter-spacing: -0.012em;
  margin-top: 18px;
  text-wrap: balance;
}
.title em {
  font-style: italic;
  color: var(--blue);
}
.on-dark .title em {
  color: var(--blue-on-dark);
}

.lead {
  margin-top: 22px;
  max-width: 34em;
  font-size: 1.125rem;
  color: var(--muted);
  text-wrap: pretty;
}
.on-dark .lead {
  color: var(--muted-on-dark);
}

.text-link {
  color: var(--text);
  text-decoration: underline;
  text-decoration-color: var(--blue);
  text-decoration-thickness: 1.5px;
  text-underline-offset: 3px;
}
.text-link:hover {
  color: #2f5fcc;
}
.on-dark .text-link {
  color: var(--off-white);
  text-decoration-color: var(--blue-on-dark);
}
.on-dark .text-link:hover {
  color: var(--blue-on-dark);
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 0 26px;
  border-radius: 999px;
  border: 1px solid transparent;
  font: 600 1rem/1 var(--sans);
  letter-spacing: 0.005em;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}
.btn-primary {
  background: var(--blue);
  color: var(--white);
}
.btn-primary:hover {
  background: #2f5fcc;
}
.btn-bright {
  background: var(--blue-on-dark);
  color: var(--ink);
}
.btn-bright:hover {
  background: #a3bfff;
}
.btn-ghost {
  background: transparent;
  color: var(--off-white);
  border-color: rgba(242, 242, 240, 0.32);
}
.btn-ghost:hover {
  border-color: var(--off-white);
}
.btn-outline {
  background: transparent;
  color: var(--ink);
  border-color: rgba(17, 17, 20, 0.28);
}
.btn-outline:hover {
  border-color: var(--ink);
}
.btn[disabled] {
  opacity: 0.6;
  cursor: progress;
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  overflow: hidden;
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: 96px var(--gutter) 88px;
  background:
    radial-gradient(ellipse 70% 55% at 50% 46%, rgba(127, 166, 255, 0.075), transparent 70%),
    var(--ink);
  color: var(--off-white);
  isolation: isolate;
}

/* A faint, still field of stars behind the logo. */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: 0.55;
  background-image:
    radial-gradient(1.2px 1.2px at 12% 18%, rgba(242, 242, 240, 0.7), transparent 60%),
    radial-gradient(1px 1px at 27% 72%, rgba(242, 242, 240, 0.45), transparent 60%),
    radial-gradient(1.4px 1.4px at 41% 12%, rgba(242, 242, 240, 0.5), transparent 60%),
    radial-gradient(1px 1px at 58% 84%, rgba(242, 242, 240, 0.4), transparent 60%),
    radial-gradient(1.2px 1.2px at 71% 22%, rgba(242, 242, 240, 0.55), transparent 60%),
    radial-gradient(1px 1px at 86% 64%, rgba(242, 242, 240, 0.45), transparent 60%),
    radial-gradient(1.3px 1.3px at 93% 11%, rgba(242, 242, 240, 0.5), transparent 60%),
    radial-gradient(1px 1px at 6% 52%, rgba(242, 242, 240, 0.4), transparent 60%),
    radial-gradient(1px 1px at 79% 90%, rgba(242, 242, 240, 0.35), transparent 60%),
    radial-gradient(1px 1px at 35% 38%, rgba(242, 242, 240, 0.3), transparent 60%);
}

.hero-inner {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 820px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.mark {
  position: relative;
  width: min(100%, 760px);
  aspect-ratio: 1724 / 280;
  margin: 0;
}
.mark picture,
.mark img,
.mark-star {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.mark-star {
  overflow: visible;
}
.mark-star polygon {
  fill: var(--blue-on-dark);
}

/* When motion is allowed, the star waits for its flight. If the script never runs,
   it simply appears after a moment, resting in place. */
.motion .mark-star {
  opacity: 0;
  animation: star-rest-fallback 0.4s ease 3.2s forwards;
}
.motion .mark-star.is-flying {
  animation: none;
  opacity: 0;
}
.motion .mark-star.is-home {
  animation: none;
  opacity: 1;
}
@keyframes star-rest-fallback {
  to {
    opacity: 1;
  }
}

.hero-canvas {
  position: absolute;
  left: 0;
  top: 0;
  z-index: 2;
  pointer-events: none;
}

.hero-line {
  margin-top: clamp(28px, 4.5vw, 44px);
  max-width: 30em;
  font-size: clamp(1.1rem, 2.2vw, 1.3rem);
  line-height: 1.5;
  color: #c9c9d0;
  text-wrap: balance;
}

.hero-actions {
  margin-top: 36px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

/* ---------- Sections ---------- */

.section {
  padding: var(--section) 0;
}
.section + .section {
  border-top: 1px solid var(--line);
}
.on-dark {
  background: var(--ink);
  color: var(--off-white);
}
.section.on-dark,
.section.on-dark + .section {
  border-top: 0;
}

.section-head {
  max-width: 720px;
}

/* ---------- Sample designs ---------- */

.samples-grid {
  list-style: none;
  margin: clamp(48px, 7vw, 80px) 0 0;
  padding: 0;
  display: grid;
  gap: clamp(40px, 5vw, 56px) 28px;
}
@media (min-width: 900px) {
  .samples-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.sample {
  display: block;
  text-decoration: none;
  color: inherit;
}
.sample:focus-visible {
  outline-offset: 8px;
  border-radius: 16px;
}

.frame {
  border-radius: 12px;
  background: var(--white);
  border: 1px solid var(--line);
  box-shadow: 0 1px 2px rgba(17, 17, 20, 0.04), 0 18px 40px -22px rgba(17, 17, 20, 0.35);
  overflow: hidden;
  transition: border-color 0.18s ease;
}
.sample:hover .frame {
  border-color: rgba(59, 111, 224, 0.55);
}
.frame-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 30px;
  padding: 0 12px;
  border-bottom: 1px solid var(--line);
  background: #fafaf8;
}
.frame-bar i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #d9d9d4;
}
.frame-bar span {
  margin-left: 10px;
  flex: 1;
  height: 14px;
  max-width: 55%;
  border-radius: 7px;
  background: #efefea;
}
.frame img {
  width: 100%;
  height: auto;
  aspect-ratio: 1200 / 696;
  object-fit: cover;
  object-position: top center;
  background: var(--paper-2);
}

.sample-meta {
  margin-top: 18px;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
}
.sample-name {
  font-family: var(--serif);
  font-size: 1.7rem;
  line-height: 1.1;
}
.sample-trade {
  margin-top: 4px;
  font-size: 0.95rem;
  color: var(--muted);
}
.sample-go {
  flex: none;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  text-decoration: underline;
  text-decoration-color: var(--blue);
  text-decoration-thickness: 1.5px;
  text-underline-offset: 3px;
  white-space: nowrap;
}
.sample:hover .sample-go {
  color: #2f5fcc;
}

.samples-note {
  margin-top: clamp(40px, 6vw, 64px);
  font-size: 0.95rem;
  color: var(--muted);
}

/* ---------- How it works ---------- */

.steps-list {
  list-style: none;
  margin: clamp(48px, 7vw, 80px) 0 0;
  padding: 0;
  display: grid;
  gap: 40px;
}
@media (min-width: 820px) {
  .steps-list {
    grid-template-columns: repeat(3, 1fr);
    gap: 48px;
  }
}
.step {
  padding-top: 26px;
  border-top: 1px solid rgba(17, 17, 20, 0.22);
}
.step-num {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.5rem;
  color: var(--blue);
}
.step h3 {
  margin-top: 14px;
  font-family: var(--serif);
  font-size: clamp(1.75rem, 2.8vw, 2.1rem);
  line-height: 1.1;
}
.step p {
  margin-top: 12px;
  color: var(--muted);
  max-width: 26em;
}

/* ---------- Free demo form ---------- */

.demo-grid {
  display: grid;
  gap: 56px;
}
@media (min-width: 960px) {
  .demo-grid {
    grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
    gap: 80px;
    align-items: start;
  }
}

.privacy-line {
  margin-top: 28px;
  max-width: 30em;
  font-size: 0.95rem;
  color: var(--muted-on-dark);
}

.form {
  display: grid;
  gap: 20px;
}
@media (min-width: 600px) {
  .form {
    grid-template-columns: 1fr 1fr;
  }
  .field-wide,
  .form-actions,
  .form-error {
    grid-column: 1 / -1;
  }
}

.field label {
  display: block;
  margin-bottom: 8px;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--off-white);
}
.field label .optional {
  font-weight: 400;
  color: var(--muted-on-dark);
}
.field input,
.field textarea {
  width: 100%;
  min-height: 52px;
  padding: 13px 16px;
  border-radius: 10px;
  border: 1px solid rgba(242, 242, 240, 0.36);
  background: var(--ink-2);
  color: var(--off-white);
  font: 400 1rem/1.4 var(--sans);
  transition: border-color 0.18s ease;
}
.field textarea {
  min-height: 120px;
  resize: vertical;
}
.field input:hover,
.field textarea:hover {
  border-color: rgba(242, 242, 240, 0.5);
}
.field input::placeholder,
.field textarea::placeholder {
  color: #8e8e97;
  opacity: 1;
}
.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--blue-on-dark);
  box-shadow: 0 0 0 3px rgba(127, 166, 255, 0.28);
}
.field input[aria-invalid="true"],
.field textarea[aria-invalid="true"] {
  border-color: var(--error-on-dark);
}
.field-msg {
  margin-top: 8px;
  font-size: 0.9rem;
  color: var(--error-on-dark);
}
.field-msg:empty {
  display: none;
}

.hp-field {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form-actions {
  margin-top: 6px;
}
.form-actions .btn {
  width: 100%;
}
@media (min-width: 600px) {
  .form-actions .btn {
    width: auto;
  }
}

.form-error {
  padding: 14px 16px;
  border-radius: 10px;
  border: 1px solid rgba(255, 180, 168, 0.4);
  background: rgba(255, 180, 168, 0.08);
  color: var(--off-white);
  font-size: 0.95rem;
}
.form-error[hidden],
.form[hidden],
.form-done[hidden] {
  display: none;
}

.form-done {
  padding: 40px 32px;
  border-radius: var(--radius);
  border: 1px solid var(--line-on-dark);
  background: var(--ink-2);
}
.form-done:focus {
  outline: none;
}
.form-done-star {
  width: 26px;
  height: 26px;
  fill: var(--blue-on-dark);
}
.form-done h3 {
  margin-top: 18px;
  font-family: var(--serif);
  font-size: 2.1rem;
  line-height: 1.1;
}
.form-done p {
  margin-top: 10px;
  color: var(--muted-on-dark);
}

/* ---------- Book a call ---------- */

.call-grid {
  display: grid;
  gap: 48px;
}
@media (min-width: 960px) {
  .call-grid {
    grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
    gap: 80px;
    align-items: start;
  }
}

.booking-slot {
  min-height: 240px;
  border-radius: var(--radius);
  border: 1px dashed rgba(17, 17, 20, 0.25);
  background: rgba(255, 255, 255, 0.55);
  padding: clamp(28px, 4vw, 40px);
}
.booking-slot.has-embed {
  border: 1px solid var(--line);
  background: var(--white);
  padding: 0;
  min-height: 680px;
  overflow: hidden;
}
.booking-slot.has-embed .booking-fallback {
  display: none;
}
.booking-slot .meetings-iframe-container,
.booking-slot iframe {
  width: 100%;
  min-height: 680px;
  border: 0;
}
.booking-fallback h3 {
  font-family: var(--serif);
  font-size: 1.8rem;
  line-height: 1.15;
}
.booking-fallback p {
  margin-top: 12px;
  color: var(--muted);
  max-width: 32em;
}
.btn-row {
  margin-top: 24px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

/* ---------- Contact ---------- */

.contact-list {
  list-style: none;
  margin: clamp(40px, 6vw, 64px) 0 0;
  padding: 0;
  display: grid;
  gap: 14px;
}
@media (min-width: 1000px) {
  .contact-list {
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
  }
}
.contact-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  height: 100%;
  padding: 26px 26px 24px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--white);
  text-decoration: none;
  color: var(--text);
  transition: border-color 0.18s ease;
}
.contact-card:hover {
  border-color: rgba(59, 111, 224, 0.6);
}
.contact-card svg {
  width: 22px;
  height: 22px;
  stroke: var(--blue);
  fill: none;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  margin-bottom: 18px;
}
.contact-kind {
  font-size: 0.95rem;
  color: var(--muted);
}
.contact-value {
  font-size: clamp(1.2rem, 2vw, 1.3rem);
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.005em;
  overflow-wrap: break-word;
}

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

.site-footer {
  background: var(--ink);
  color: var(--off-white);
  padding: clamp(64px, 8vw, 96px) 0 40px;
}
.footer-top {
  display: grid;
  gap: 32px;
}
@media (min-width: 820px) {
  .footer-top {
    grid-template-columns: auto 1fr;
    align-items: center;
  }
}
.footer-logo {
  width: 220px;
  height: auto;
}
.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 28px;
  list-style: none;
  margin: 0;
  padding: 0;
}
@media (min-width: 820px) {
  .footer-nav {
    justify-content: flex-end;
  }
}
.footer-nav a {
  color: var(--off-white);
  text-decoration: none;
  display: inline-block;
  padding: 8px 0;
}
.footer-nav a:hover,
.footer-legal a:hover {
  color: var(--blue-on-dark);
}
.footer-bottom {
  margin-top: 44px;
  padding-top: 24px;
  border-top: 1px solid var(--line-on-dark);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 12px 24px;
  font-size: 0.9rem;
  color: var(--muted-on-dark);
}
@media (max-width: 819px) {
  .footer-nav {
    flex-direction: column;
    gap: 0;
  }
}
.footer-legal {
  display: flex;
  gap: 24px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.footer-legal a {
  color: var(--muted-on-dark);
  text-decoration: none;
  display: inline-block;
  padding: 4px 0;
}

/* ---------- Simple pages (privacy, terms, 404) ---------- */

.page-header {
  background: var(--ink);
  padding: 22px 0;
}
.page-header a {
  display: inline-block;
}
.page-header img {
  width: 170px;
  height: auto;
}

.doc {
  padding: clamp(56px, 8vw, 104px) 0 clamp(72px, 10vw, 128px);
}
.doc-inner {
  max-width: 720px;
}
.doc h1 {
  font-family: var(--serif);
  font-size: clamp(2.6rem, 6vw, 3.8rem);
  line-height: 1.05;
}
.doc .updated {
  margin-top: 12px;
  color: var(--muted);
  font-size: 0.95rem;
}
.doc h2 {
  margin-top: 44px;
  font-family: var(--serif);
  font-size: 1.75rem;
  line-height: 1.2;
}
.doc p,
.doc ul {
  margin-top: 14px;
  color: #2c2c33;
}
.doc ul {
  padding-left: 1.2em;
}
.doc li + li {
  margin-top: 6px;
}
.doc .back {
  margin-top: 48px;
}

.notfound {
  min-height: 62vh;
  display: grid;
  align-content: center;
}
