/* ==========================================================================
   alestrcek.com — coming-soon page (2026-11-28), "THE STUDY" v2.0.

   Standalone on purpose: this page is served at / by an internal rewrite and
   links nothing from the main stylesheets. Tokens, the EB Garamond faces and
   the sign-up form styles are copied from assets/study-v5.css and
   assets/paths.css. Every URL is root-absolute.

   Layout
     phone / tablet / any portrait screen: the portrait is a tall block at the
       top; the name and the headline sit on the dark lower part of the image
       (the suit), never on the face; languages and the form follow below.
     desktop (>= 60em wide AND wider than 5:4): the portrait is fixed to the
       left ~3/4 of the screen and fades into the study black; the content is
       one column on the right, over the dark.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. EB Garamond, self-hosted (same files as assets/fonts.css)
   -------------------------------------------------------------------------- */
@font-face {
  font-family: "EB Garamond";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/assets/fonts/eb-garamond-400.woff2") format("woff2");
}

@font-face {
  font-family: "EB Garamond";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/assets/fonts/eb-garamond-500.woff2") format("woff2");
}

@font-face {
  font-family: "EB Garamond";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/assets/fonts/eb-garamond-600.woff2") format("woff2");
}

@font-face {
  font-family: "EB Garamond";
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("/assets/fonts/eb-garamond-400-italic.woff2") format("woff2");
}

@font-face {
  font-family: "EB Garamond";
  font-style: italic;
  font-weight: 500;
  font-display: swap;
  src: url("/assets/fonts/eb-garamond-500-italic.woff2") format("woff2");
}

/* --------------------------------------------------------------------------
   2. Tokens (from study-v5.css). consent.js reads --study-1, --hairline,
      --parchment and --gutter for its bottom strip.
   -------------------------------------------------------------------------- */
:root {
  --study-0: #0D0A08;
  --study-1: #131009;
  --study-2: #181310;
  --mahogany: #2A1B12;
  --hairline: #3A2C21;

  /* The red. The submit button and nothing else. */
  --leather: #722520;
  --leather-deep: #571A17;

  /* Focus ring, measured: #A6473C is 3.37:1 on the study blacks,
     #B14C40 is 3.15:1 on mahogany (study-v5.css values). */
  --focus: #A6473C;
  --focus-panel: #B14C40;

  --parchment: #EAE0CE;
  --muted: #B0A088;
  --rosegold: #CE9A87;

  --gutter: clamp(1.15rem, 5vw, 2.5rem);
  --font: "EB Garamond", Garamond, Georgia, "Times New Roman", serif;

  color-scheme: dark;
}

/* --------------------------------------------------------------------------
   3. Base
   -------------------------------------------------------------------------- */
*,
*::before,
*::after { box-sizing: border-box; }

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

body {
  margin: 0;
  min-height: 100vh;
  background: var(--study-0);
  color: var(--parchment);
  font-family: var(--font);
  font-size: 1.15rem;
  font-weight: 500;          /* 400 serifs vanish on dark (study rulebook) */
  line-height: 1.7;
  overflow-wrap: break-word;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  /* The consent strip is fixed to the bottom; consent.js publishes its
     height as --consent-h on <body>. The page always ends above it. */
  padding-bottom: var(--consent-h, 0px);
}

h1, h2, p { margin: 0; }
a { color: inherit; }
img { display: block; max-width: 100%; }

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

/* --------------------------------------------------------------------------
   4. The portrait (phone first)
   -------------------------------------------------------------------------- */
.backdrop {
  position: relative;
  height: min(122vw, 76vh);
  min-height: 22rem;
  overflow: hidden;
  background: var(--study-0);
}

.backdrop picture { display: contents; }

.backdrop__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 14%;
}

/* Darkening: a light veil over the whole image, then the lower half sinks
   into the study black so the name and headline read on solid dark. */
.backdrop::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(to bottom,
      rgba(13, 10, 8, 0) 34%,
      rgba(13, 10, 8, 0.55) 60%,
      rgba(13, 10, 8, 0.9) 80%,
      var(--study-0) 100%),
    rgba(13, 10, 8, 0.12);
}

/* --------------------------------------------------------------------------
   5. Column
   -------------------------------------------------------------------------- */
.column {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 34rem;
  margin: -9.5rem auto 0;
  padding: 0 var(--gutter) clamp(2.5rem, 8vw, 4rem);
}

.masthead { text-align: center; }

.masthead__name {
  color: var(--rosegold);
  font-size: 1.12rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  line-height: 1.4;
}

.masthead__title {
  margin-top: 0.35rem;
  color: var(--parchment);
  font-size: clamp(3rem, 13vw, 4.6rem);
  font-weight: 500;
  line-height: 1.02;
  letter-spacing: 0.005em;
}

/* Caption with a short hairline rule left and right — the book device the
   study uses for section labels. */
.languages {
  margin-top: 2.1rem;
  text-align: center;
}

.languages__caption {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.7rem;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  white-space: nowrap;
  line-height: 1.5;
  text-transform: uppercase;
}

.languages__caption::before,
.languages__caption::after {
  content: "";
  flex: 0 1 1.6rem;
  min-width: 0.5rem;
  height: 1px;
  background: var(--hairline);
}

.flags {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.7rem;
  margin-top: 0.9rem;
}

/* Plain pictures, not controls: no pointer, no hover, nothing to drag. */
.flags img {
  width: 32px;
  height: 24px;
  border-radius: 1px;
  box-shadow: 0 0 0 1px rgba(234, 224, 206, 0.16);
  cursor: default;
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
}

@media (max-width: 26rem) {
  .languages__caption { letter-spacing: 0.1em; font-size: 0.72rem; gap: 0.55rem; }
}

/* Very small phones: let the caption wrap instead of clipping; drop the rules. */
@media (max-width: 22rem) {
  .languages__caption { white-space: normal; }
  .languages__caption::before,
  .languages__caption::after { display: none; }
}

/* Comparison variant: one class on the container tones the flags down. */
.flags--muted img {
  filter: saturate(0.35) brightness(0.88);
  opacity: 0.78;
}

/* --------------------------------------------------------------------------
   6. The sign-up panel (paths.css + study-v5.css form styles)
   -------------------------------------------------------------------------- */
.path-card {
  position: relative;
  margin-top: 2.4rem;
  border: 1px solid var(--hairline);
  background: var(--mahogany);
  padding: clamp(1.6rem, 6vw, 2.3rem) clamp(1.3rem, 5.5vw, 2.2rem);
}

/* The one classical flourish: a second hairline inset 6px. */
.path-card::before {
  content: "";
  position: absolute;
  inset: 6px;
  border: 1px solid rgba(58, 44, 33, 0.85);
  pointer-events: none;
}

.path-card :focus-visible { outline-color: var(--focus-panel); }

.path-card h2 {
  margin: 0 0 0.9rem;
  color: var(--rosegold);
  font-size: clamp(1.2rem, 4.6vw, 1.45rem);
  font-weight: 600;
  line-height: 1.24;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-align: center;
}

.path-card > p {
  color: var(--parchment);
  font-size: 1.05rem;
  line-height: 1.6;
  text-align: center;
  text-wrap: balance;
}

.signup-form { margin-top: 1.5rem; }

.signup-form > label:first-of-type { display: block; }

.signup-form label > span:first-child {
  display: block;
  margin-bottom: 0.4rem;
  font-size: 1rem;
}

.signup-form input[type="email"] {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--hairline);
  border-radius: 0;
  background: var(--study-0);
  color: var(--parchment);
  font: inherit;
  font-size: 1.05rem;
  padding: 0.65rem 0.8rem;
}

.signup-form input[type="email"]:focus-visible { outline-offset: 2px; }

.signup-form input[type="radio"],
.signup-form input[type="checkbox"] {
  accent-color: var(--rosegold);
  width: 1.05rem;
  height: 1.05rem;
}

.signup-form__choice {
  border: 0;
  margin: 1.2rem 0 0;
  padding: 0;
  min-width: 0;
}

.signup-form__choice legend {
  padding: 0;
  margin-bottom: 0.45rem;
  color: var(--rosegold);
  font-size: 0.82rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.signup-form__choice label {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-right: 1.6rem;
  min-height: 44px;
  cursor: pointer;
}

.signup-form__choice input { margin: 0; }

.signup-form__consent {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.7rem;
  align-items: start;
  margin-block: 0.8rem 1.4rem;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.5;
  cursor: pointer;
}

.signup-form__consent input { margin: 0.25rem 0 0; }
.signup-form__consent span { display: inline; margin: 0; }
.signup-form__consent a { color: inherit; }

/* The submit button — the only leather red on the page. */
.path-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 50px;
  border: 1px solid var(--leather);
  border-radius: 1px;
  background: var(--leather);
  color: var(--parchment);
  padding: 0.85rem 1.1rem;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  line-height: 1.35;
  text-transform: uppercase;
  text-align: center;
  text-wrap: balance;      /* two lines break evenly, never one word alone */
  cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

.path-link:hover {
  background: var(--leather-deep);
  border-color: var(--leather-deep);
}

.path-link:focus-visible { outline-offset: 3px; }

.path-link:disabled { cursor: wait; opacity: 0.58; }

.signup-form__status {
  min-height: 1.5em;
  margin-top: 0.9rem;
  color: var(--muted);
  font-size: 0.98rem;
  text-align: center;
}

.signup-form__status.is-error { color: #D49A90; }

/* Colophon under the panel. Muted on study black = 7.73:1. The body's
   --consent-h padding keeps it above the consent strip. */
.colophon {
  margin-top: 1.6rem;
  color: var(--muted);
  font-size: 0.86rem;
  letter-spacing: 0.02em;
  line-height: 1.5;
  text-align: center;
}

.colophon a { color: inherit; }

/* Honeypot: off-screen, never display:none (bots skip hidden fields). */
.form__trap {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* --------------------------------------------------------------------------
   7. Desktop: portrait left, content column right, over the dark
   -------------------------------------------------------------------------- */
@media (min-width: 60em) and (min-aspect-ratio: 5/4) {
  .backdrop {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    width: 66vw;
    height: auto;
    min-height: 0;
  }

  .backdrop__img { object-position: 50% 18%; }

  .backdrop::after {
    background:
      linear-gradient(to right,
        rgba(13, 10, 8, 0) 58%,
        rgba(13, 10, 8, 0.75) 82%,
        var(--study-0) 100%),
      linear-gradient(to bottom,
        rgba(13, 10, 8, 0) 62%,
        rgba(13, 10, 8, 0.55) 100%),
      rgba(13, 10, 8, 0.1);
  }

  .column {
    display: flex;
    flex-direction: column;
    justify-content: center;
    width: clamp(24rem, 34vw, 31rem);
    max-width: none;
    min-height: calc(100vh - var(--consent-h, 0px));
    margin: 0 clamp(2rem, 6vw, 7.5rem) 0 auto;
    padding: clamp(1.5rem, 4.5vh, 3.5rem) 0;
  }

  .masthead__name { font-size: 1.08rem; }

  .masthead__title { font-size: clamp(3.3rem, 4.3vw, 4.6rem); }

  .languages { margin-top: 1.3rem; }

  .flags { margin-top: 0.75rem; }

  .path-card { margin-top: 1.7rem; padding: 1.9rem 2.1rem 1.4rem; }

  .path-card h2 { margin-bottom: 0.7rem; }

  .path-card > p { font-size: 1.02rem; line-height: 1.55; }

  .signup-form { margin-top: 1.2rem; }

  .signup-form__choice { margin-top: 1rem; }

  .signup-form__choice label { min-height: 2.2rem; }

  .signup-form__consent { font-size: 0.92rem; margin-block: 0.6rem 1.2rem; }

  .signup-form__status { margin-top: 0.6rem; }
}

@media (prefers-reduced-motion: reduce) {
  .path-link { transition: none; }
}
