/* Self-hosted fonts (SIL Open Font License, see /assets/fonts) */
@font-face {
  font-family: "Lora";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/assets/fonts/lora-latin-700-normal.woff2") format("woff2");
}

@font-face {
  font-family: "DM Mono";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/assets/fonts/dm-mono-latin-400-normal.woff2") format("woff2");
}

:root {
    --bg: #ffffff;
    --ink: #000000;
    --select: #b5c8f7;
    --spell: #ff3b30;
  }

  * { box-sizing: border-box; }

  html {
    background: var(--bg);
    -webkit-text-size-adjust: 100%;
  }

  @media (prefers-reduced-motion: no-preference) {
    html { scroll-behavior: smooth; }
  }

  body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
    font-size: 1.125rem;
    font-weight: 500;
    line-height: 1.65;
    -webkit-font-smoothing: auto;
    -moz-osx-font-smoothing: auto;
    text-rendering: optimizeLegibility;
  }

  /* Top-left profile header */
  .profile {
    position: absolute;
    top: calc(1.25rem + env(safe-area-inset-top, 0px));
    left: calc(1.25rem + env(safe-area-inset-left, 0px));
    right: calc(1.25rem + env(safe-area-inset-right, 0px));
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
  }

  .who {
    display: flex;
    align-items: center;
    gap: 0.585rem;
    min-width: 0;
  }

  /* Solid black button, pure white text, same font as the body */
  .button {
    flex: none;
    display: inline-block;
    background: #000000;
    color: #ffffff;
    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
    font-size: 1rem;
    font-weight: 500;
    line-height: 1.25;
    text-align: center;
    text-decoration: none;
    padding: 0.7rem 1.1rem;
    border: 0;
    border-radius: 0;
    margin: 0;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
  }

  .button:focus-visible {
    outline: 2px solid #000000;
    outline-offset: 3px;
  }

  .pfp {
    flex: none;
    width: 2.925rem;
    height: 2.925rem;
    border-radius: 50%;
    border: 1px solid rgba(0, 0, 0, 0.14);
    background: #e9e9e9;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12), 0 4px 10px rgba(0, 0, 0, 0.16);
    overflow: hidden;
  }

  /* Full photo. To zoom in, raise scale and adjust origin. */
  .pfp img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    transform: scale(1);
    transform-origin: 72% 79%;
  }

  .name {
    font-family: "Lora", Georgia, "Times New Roman", serif;
    font-size: 1.381rem;
    font-weight: 700;
    line-height: 1;
    letter-spacing: -0.01em;
    white-space: nowrap;
  }

  main {
    max-width: 38rem;
    margin: 0 auto;
    padding: 6rem 1.5rem 6rem;
    padding-top: calc(6rem + env(safe-area-inset-top, 0px));
    padding-bottom: calc(6rem + env(safe-area-inset-bottom, 0px));
  }

  h1 {
    margin: 0 0 0.25rem;
    font-size: 2.125rem;
    line-height: 1.2;
    font-weight: 700;
    letter-spacing: -0.02em;
  }

  .subtitle {
    margin: 0 0 2.75rem;
    font-size: 1.1156rem;
    line-height: 1.4;
    font-weight: 700;
  }

  p {
    margin: 0 0 1.6rem;
  }

  strong {
    font-weight: 700;
  }

  em {
    font-style: italic;
  }

  /* Regular italic made about 25% heavier with a hairline stroke.
     Raise or lower the stroke width to adjust. */
  em.semi {
    font-weight: 400;
    -webkit-text-stroke: 0.37px currentColor;
    paint-order: stroke fill;
  }

  /* Lean about 10% further right (about 1.2 degrees on top of the italic's own slant) */
  em.semi .w {
    display: inline-block;
    transform: skewX(-1.2deg);
    transform-origin: 50% 80%;
  }

  /* Light blue text-selection highlight, black text stays black */
  .select {
    background: var(--select);
    color: var(--ink);
    padding: 0.04em 0;
    -webkit-box-decoration-break: clone;
    box-decoration-break: clone;
  }

  /* Red dotted spellcheck underline, as on Apple devices */
  .spell {
    background-image: radial-gradient(circle at center, var(--spell) 0.95px, transparent 1.15px);
    background-size: 4px 4px;
    background-repeat: repeat-x;
    background-position: left bottom;
    padding-bottom: 3px;
    -webkit-box-decoration-break: clone;
    box-decoration-break: clone;
  }

  .sign {
    margin-top: 2.5rem;
  }

  .ps {
    margin-top: 2.75rem;
    margin-bottom: 1.25rem;
  }

  .ps + .ps {
    margin-top: 0;
  }


  /* Sign-up window (opens from the header button) */
  .signup {
    margin: 3.5rem 0 0;
    scroll-margin-top: 2rem;
  }

  .window {
    background: #ffffff;
    border: 1px solid #000000;
    box-shadow: 7px 7px 0 rgba(0, 0, 0, 0.22);
  }

  .titlebar {
    position: relative;
    display: flex;
    align-items: center;
    height: 33px;
    padding: 0 0 0 8px;
    border-bottom: 1px solid #000000;
    background-image: repeating-linear-gradient(to bottom, #ffffff 0, #ffffff 1.5px, #bdbdbd 1.5px, #bdbdbd 2px);
  }

  .lights {
    display: flex;
    gap: 8px;
    position: relative;
    z-index: 1;
  }

  .light {
    width: 15px;
    height: 15px;
    border: 1px solid #000000;
    border-radius: 0;
    box-shadow: inset 0 0 0 1px var(--light-rim);
  }

  .light.red { background: #d6665d; --light-rim: #552925; }
  .light.yellow { background: #e6c649; --light-rim: #5c4f1d; }
  .light.green { background: #70ba60; --light-rim: #2d4a26; }

  .window-title {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    font-family: "Lora", Georgia, "Times New Roman", serif;
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.4;
    white-space: nowrap;
  }

  .window-body {
    padding: 2.25rem 2.25rem 1.75rem;
  }

  .signup-form {
    margin: 0;
  }

  .field {
    display: block;
    width: 100%;
    height: 3.25rem;
    margin: 0 0 0.75rem;
    padding: 0 1rem;
    background: #ffffff;
    color: #000000;
    border: 1px solid #000000;
    border-radius: 0;
    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
    font-size: 1rem;
    font-weight: 500;
    -webkit-appearance: none;
    appearance: none;
  }

  .field::placeholder {
    color: #767676;
    opacity: 1;
  }

  .field:focus-visible {
    outline: 2px solid #000000;
    outline-offset: 2px;
  }

  .subscribe {
    display: block;
    width: 100%;
    height: 3.25rem;
    padding: 0;
    background: #000000;
    color: #ffffff;
    border: 1px solid #000000;
    border-radius: 0;
    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
    font-size: 0.9375rem;
    font-weight: 500;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
  }

  .subscribe:focus-visible {
    outline: 2px solid #000000;
    outline-offset: 2px;
  }

  .subscribe[disabled] { opacity: 0.6; cursor: default; }

  .form-note {
    margin: 0;
    font-size: 0.875rem;
    line-height: 1.4;
    color: #000000;
  }

  .form-note:not(:empty) {
    margin-top: 0.75rem;
  }

  .success:focus { outline: none; }

  .success-title {
    margin: 0;
    font-size: 1.3125rem;
    line-height: 1.35;
    font-weight: 700;
  }

  .success-copy {
    margin-top: 1rem;
    font-size: 1rem;
    line-height: 1.6;
  }

  .success-copy p {
    margin: 0 0 1rem;
  }

  .success-copy p:last-child {
    margin-bottom: 0;
  }

  .open-email {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 3.25rem;
    margin-top: 1.5rem;
    background: #000000;
    color: #ffffff;
    border: 1px solid #000000;
    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
    font-size: 0.9375rem;
    font-weight: 500;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    text-decoration: none;
  }

  .open-email:focus-visible {
    outline: 2px solid #000000;
    outline-offset: 2px;
  }

  /* Bold italic keeps the bold weight (no extra stroke) */
  strong em.semi {
    font-weight: 700;
    -webkit-text-stroke: 0;
  }

  .footer {
    margin: 2.75rem 0 0;
    padding-left: 10px;
    font-family: "DM Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.75rem;
    font-weight: 400;
    line-height: 1.75;
    letter-spacing: 0.01em;
    color: #5a5a5a;
    overflow-wrap: anywhere;
  }

  /* Links row sits one line below the legal text */
  .footer-links {
    margin-top: 1.75em;
    margin-left: 4px;
  }

  .footer a {
    color: inherit;
    text-decoration: underline;
  }

  .window-links {
    margin-top: 1.25rem;
    padding-top: 1.1rem;
    border-top: 1px dashed #bdbdbd;
    display: flex;
    align-items: baseline;
    justify-content: flex-end;
    gap: 0.65rem;
    font-size: 0.875rem;
    line-height: 1.4;
  }

  /* Small dot between links */
  .window-links .dot {
    flex: none;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: #000000;
    opacity: 1;
    /* sits on the text baseline, then lifted to the middle of the lowercase letters (x-height is about 0.52em) */
    transform: translateY(calc(2px - 0.26em));
  }

  .window-links a {
    color: #0000ee;
    text-decoration: none;
  }

  .window-links a:hover { text-decoration: underline; }


  @media (max-width: 480px) {
    body { font-size: 1.0625rem; }
    .profile { gap: 0.75rem; }
    .who { gap: 0.455rem; }
    .button { font-size: 0.8125rem; padding: 0.5rem 0.75rem; }
    .window-body { padding: 1.5rem 1.25rem 1.25rem; }
    .window { box-shadow: 5px 5px 0 rgba(0, 0, 0, 0.22); }
    .pfp { width: 2.1125rem; height: 2.1125rem; }
    .name { font-size: 0.975rem; }
    h1 { font-size: 1.75rem; }
    .subtitle { font-size: 1.0094rem; }
    main { padding-top: calc(5.5rem + env(safe-area-inset-top, 0px)); }
  }

/* Hidden anti-bot field: kept off-screen (not display:none) so bots still see it; people and screen readers never reach it */
.hp {
  position: absolute;
  left: -10000px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
