/* ==========================================================================
   1. FONT
   ========================================================================== */
@font-face {
  font-family: 'Scto Grotesk A';
  src: url('/css/webfonts/scto-grotesk-a-regular.woff') format('woff');
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

/* ==========================================================================
   2. EDIT THESE VALUES FIRST
   Sizes and spacing for the information section; arrow timing is in milliseconds.
   ========================================================================== */
:root {
  --info-font-size: 18px;
  --info-line-height: 1.7;
  --info-width: 1040px;
  --info-copy-width: 520px;
  --info-label-width: 104px;
  --info-column-gap: clamp(48px, 12vw, 208px);
  --info-paragraph-gap: 32px;
  --info-section-gap: 56px;
  --info-top-space: 72px;
  --info-bottom-space: 144px;

  --arrow-size: 44px;
  --arrow-delay: 700ms;
  --arrow-fade-in: 600ms;
  --arrow-fade-out: 600ms;

  /* First-load movement: rise distance, one round trip, and repetitions. */
  --arrow-hover-height: 7px;
  --arrow-hover-duration: 1000ms;
  --arrow-hover-count: 3;

  --paper: #ffffff;
  --ink: #565655;
  --text: #242424;
  --muted: #92928f;
  --point: #ff6586;
  --guide: #d6d6d1;
  --gutter: clamp(22px, 3.3vw, 56px);
  font-family: 'Scto Grotesk A', Arial, sans-serif;
  color: var(--text);
  background: var(--paper);
  font-synthesis: none;
}

/* ==========================================================================
   3. PAGE DEFAULTS
   ========================================================================== */
* { box-sizing: border-box; }
html { scroll-behavior: auto; }
body { margin: 0; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: underline; text-underline-offset: 5px;}
a:hover { text-decoration: underline; text-underline-offset: 5px; }
a:focus-visible, button:focus-visible {
  outline: 2px solid var(--point);
  outline-offset: 7px;
}
h1, h2, p { margin: 0; font-size: inherit; font-weight: 400; }

/* ==========================================================================
   4. HERO & CONTROLS
   ========================================================================== */
.splash {
  height: 100svh;
  min-height: 360px;
  display: grid;
  grid-template-rows: 36px minmax(0, 1fr) 36px;
  gap: 12px;
  padding: 28px var(--gutter);
}
.specimen-tools { position: relative; display: flex; justify-content: flex-end; align-items: center; }
.scroll-cue-wrap {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  transition: opacity var(--arrow-fade-out) ease;
}
/* Once the visitor scrolls, JS adds this class until the next refresh. */
.scroll-cue-wrap.is-dismissed {
  opacity: 0;
  pointer-events: none;
}
.scroll-cue {
  width: var(--arrow-size);
  height: var(--arrow-size);
  display: grid;
  place-items: center;
  border: 1px solid #dededb;
  border-radius: 50%;
  background: var(--paper);
  color: var(--ink);
  animation:
    arrow-appear var(--arrow-fade-in) ease var(--arrow-delay) both,
    arrow-hover var(--arrow-hover-duration) ease-in-out
      calc(var(--arrow-delay) + var(--arrow-fade-in))
      var(--arrow-hover-count);
  transition: background-color 160ms ease, border-color 160ms ease;
}
.scroll-cue:hover { background: #f5f5f3; border-color: #b9b9b4; }
.scroll-cue:focus-visible { animation: none; }
.scroll-cue svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.25;
  stroke-linecap: round;
  stroke-linejoin: round;
}
@keyframes arrow-appear {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes arrow-hover {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(calc(-1 * var(--arrow-hover-height))); }
}
.type-stage { position: relative; min-height: 0; overflow: hidden; }
.text-control {
  appearance: none;
  border: 0;
  background: none;
  color: var(--text);
  font: 400 16px/1.5 'Scto Grotesk A', Arial, sans-serif;
  padding: 7px 0;
  cursor: pointer;
}
.text-control:hover { color: #858581; }
.reset-control { font-size: 13px; color: var(--muted); }
/* ==========================================================================
   5. INTERACTIVE LETTERING
   The controls are generated by js/bezier.js.
   ========================================================================== */
#type-canvas {
  display: block;
  width: 100%;
  height: 100%;
  overflow: hidden;
  user-select: none;
  -webkit-user-select: none;
}
.letter-outline { fill: var(--ink); }
.guides { pointer-events: none; }
.guides path {
  fill: none;
  stroke: var(--guide);
  stroke-width: 1;
  stroke-dasharray: 4 4;
  vector-effect: non-scaling-stroke;
}
.guides text { fill: var(--muted); }
.handle-line {
  stroke: var(--point);
  stroke-width: .65;
  opacity: .5;
  vector-effect: non-scaling-stroke;
  pointer-events: none;
}
.edit-point { cursor: grab; outline: none; touch-action: none; }
.point-hit { fill: transparent; stroke: none; }
.point-mark {
  fill: var(--point);
  stroke: var(--paper);
  stroke-width: 1.2;
  vector-effect: non-scaling-stroke;
  pointer-events: none;
}
.edit-point:hover .point-mark, .edit-point:focus .point-mark {
  fill: var(--paper);
  stroke: var(--point);
  stroke-width: 2;
}
.point-focus {
  fill: none;
  stroke: var(--point);
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
  opacity: 0;
  pointer-events: none;
}
.edit-point:focus-visible .point-focus { opacity: 1; }
.is-dragging, .is-dragging .edit-point { cursor: grabbing !important; }
/* ==========================================================================
   6. INFO: ABOUT / COLOPHON / EMAIL
   Every row shares the same label column, copy width, and typography.
   Paragraph spacing comes from direct children of .info-copy.
   ========================================================================== */
.info-section {
  padding: var(--info-top-space) var(--gutter) var(--info-bottom-space);
}
.info-section:focus { outline: none; }
.info-layout {
  max-width: var(--info-width);
  margin-inline: auto;
  display: grid;
  row-gap: var(--info-section-gap);
  font-size: var(--info-font-size);
  line-height: var(--info-line-height);
}
.info-row {
  display: grid;
  grid-template-columns: var(--info-label-width) minmax(0, var(--info-copy-width));
  column-gap: var(--info-column-gap);
  align-items: baseline;
}
.info-label { text-align: right; }
.info-copy > * + * { margin-top: var(--info-paragraph-gap); }
.info-copy ul { margin: 0; padding-left: 28px; }
.info-copy li { padding-left: 0; }

/* ==========================================================================
   7. ACCESSIBILITY
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .scroll-cue { animation: none; transition: none; }
  .scroll-cue-wrap { transition: none; }
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.no-script { margin-top: 24px; font-size: 14px; }
/* ==========================================================================
   8. MOBILE
   The same three sections, with each label above its copy.
   ========================================================================== */
@media (max-width: 700px) {
  :root {
    --info-font-size: 16px;
    --info-line-height: 1.6;
    --info-paragraph-gap: 24px;
    --info-section-gap: 40px;
    --info-top-space: 48px;
    --info-bottom-space: 80px;
  }

  .splash { padding: 20px 22px; }
  .type-stage { margin-inline: -10px; }
  .text-control { font-size: 15px; }
  .reset-control { font-size: 13px; }
  .info-section { padding-inline: 24px; }
  .info-row { grid-template-columns: minmax(0, 1fr); row-gap: 16px; }
  .info-label { text-align: left; }
  .info-copy ul { padding-left: 24px; }
}
