:root {
  --ivory: #F5F1E8;
  --ink: #1A1A1A;
  --brass: #A8875A;
  --slate: #2B2E31;
  --panel: #1C1D1F;
  --eggshell: #F0EAD6;
  --eggshell-soft: rgba(240, 234, 214, 0.78);
  --eggshell-faint: rgba(240, 234, 214, 0.58);
  --eggshell-line: rgba(240, 234, 214, 0.3);
  --error: #EBC1AE;

  /* Work Sans throughout, matching the original Google Sites page. */
  --sans: "Work Sans", "Helvetica Neue", Arial, sans-serif;

  --gutter: clamp(1.25rem, 5vw, 3rem);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

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

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

body {
  margin: 0;
  background: var(--ink);
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 300;
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

[hidden] { display: none !important; }

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

a { color: inherit; text-underline-offset: 0.25em; text-decoration-thickness: 1px; }

::selection { background: var(--eggshell); color: var(--slate); }

:focus-visible { outline: 1px solid currentColor; outline-offset: 4px; }

/* Pill, sized like the Soho House "Subscribe" button: ~40px tall. */

.pill {
  display: inline-block;
  padding: 0.75rem 1.6rem;
  border: 0;
  border-radius: 999px;
  font: 500 1rem/1.1 var(--sans);
  letter-spacing: 0.01em;
  text-transform: lowercase;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.4s var(--ease-out), transform 0.4s var(--ease-out);
}

.pill:active { transform: scale(0.98); }
.pill:disabled { opacity: 0.6; cursor: progress; }

/* Hero: the whole page. One photograph, one name, one action. */

.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: 6rem var(--gutter) 5rem;
  text-align: center;
  overflow: hidden;
  isolation: isolate;
  background: var(--ink);
}

.hero__photo,
.hero__photo img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hero__photo { z-index: -2; }

.hero__photo img {
  object-fit: cover;
  object-position: 50% 42%;
  animation: settle 3.2s var(--ease-out) both;
}

/* Graded, not flat: lighter through the middle so the ivy keeps its colour,
   deeper at the edges where the type and the footer line sit. */
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(ellipse 60% 40% at 50% 50%, rgba(10, 12, 12, 0.42), rgba(10, 12, 12, 0) 80%),
    linear-gradient(180deg, rgba(10, 12, 12, 0.42) 0%, rgba(10, 12, 12, 0.22) 38%, rgba(10, 12, 12, 0.26) 62%, rgba(10, 12, 12, 0.62) 100%);
}

.hero__content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(2rem, 4vw, 2.75rem);
}

/* The title copies the original Google Sites page: Work Sans 200, white,
   sized to the window. A little tracking gives it a masthead's air. */
.hero__title {
  margin: 0;
  font-weight: 200;
  font-size: clamp(2.1rem, 5.34vw, 4.5rem);
  line-height: 1.05;
  letter-spacing: 0.06em;
  color: #fff;
  text-transform: uppercase;
  text-wrap: balance;
  text-shadow: 0 1px 24px rgba(0, 0, 0, 0.18);
  animation: arrive 1.8s var(--ease-out) 0.25s both;
}

.hero .pill {
  background: rgba(245, 241, 232, 0.94);
  color: var(--ink);
  animation: arrive 1.4s var(--ease-out) 0.9s both;
}

.hero .pill:hover { background: #fff; }

.hero__foot {
  position: absolute;
  bottom: clamp(1.5rem, 4vh, 2.25rem);
  left: 0;
  right: 0;
  margin: 0;
  font-size: 0.6875rem;
  font-weight: 400;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.78);
  animation: arrive 1.4s var(--ease-out) 1.2s both;
}

@keyframes settle {
  from { transform: scale(1.06); }
  to { transform: scale(1); }
}

@keyframes arrive {
  from { opacity: 0; filter: blur(6px); transform: translateY(8px); }
  to { opacity: 1; filter: none; transform: none; }
}

/* Application: full-screen slate panel, opened by the hero button. */

body:has(.apply[open]) { overflow: hidden; }

.apply {
  position: fixed;
  inset: 0;
  width: 100%;
  max-width: none;
  height: 100%;
  max-height: none;
  margin: 0;
  border: 0;
  padding: clamp(5rem, 11vh, 8rem) var(--gutter) clamp(4rem, 8vh, 6rem);
  background: var(--panel);
  color: var(--eggshell);
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: var(--eggshell-line) transparent;
  caret-color: var(--eggshell);
}

.apply[open] { animation: sheet 0.7s var(--ease-out) both; }

.apply::backdrop { background: var(--panel); }

.apply ::selection { background: var(--eggshell); color: var(--slate); }

.apply__close {
  position: fixed;
  top: clamp(1.25rem, 3vw, 2rem);
  right: var(--gutter);
  z-index: 2;
  padding: 0.6rem 0;
  border: 0;
  background: none;
  color: var(--eggshell);
  font: 400 0.6875rem/1 var(--sans);
  letter-spacing: 0.28em;
  text-transform: uppercase;
  cursor: pointer;
}

.apply__close:focus,
.apply__close:focus-visible { outline: none; }

.apply__title:focus { outline: none; }

@keyframes sheet {
  from { opacity: 0; }
  to { opacity: 1; }
}

.apply__inner {
  max-width: 42rem;
  margin: 0 auto;
}

.apply__head { margin-bottom: 3rem; }

.label {
  margin: 0 0 1.25rem;
  font-weight: 400;
  font-size: 0.75rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--eggshell-soft);
}

.rule {
  display: block;
  width: 3.5rem;
  height: 1px;
  margin-bottom: 1.75rem;
  background: var(--brass);
}

.apply__title {
  margin: 0 0 1.25rem;
  font-weight: 200;
  font-size: clamp(2.75rem, 5.5vw, 4.25rem);
  line-height: 1;
  letter-spacing: 0.01em;
}

.apply__intro {
  max-width: 24rem;
  margin: 0;
  font-size: 1rem;
  line-height: 1.65;
  color: var(--eggshell-soft);
}

.form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.75rem 2.25rem;
}

.field { display: flex; flex-direction: column; min-width: 0; }
.field--wide { grid-column: 1 / -1; }

.field label {
  margin-bottom: 0.25rem;
  font-weight: 400;
  font-size: 0.6875rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--eggshell-soft);
}

.field input,
.field textarea {
  width: 100%;
  padding: 0.55rem 0;
  border: 0;
  border-bottom: 1px solid var(--eggshell-line);
  border-radius: 0;
  background: transparent;
  color: var(--eggshell);
  font: 300 1.0625rem/1.5 var(--sans);
  transition: border-color 0.3s var(--ease-out);
}

.field textarea { resize: vertical; min-height: 6rem; }

.field input::placeholder,
.field textarea::placeholder { color: var(--eggshell-faint); }

.field input:hover,
.field textarea:hover { border-bottom-color: var(--eggshell-faint); }

.field input:focus,
.field textarea:focus { outline: none; border-bottom-color: var(--eggshell); }

.field input:-webkit-autofill {
  -webkit-text-fill-color: var(--eggshell);
  -webkit-box-shadow: 0 0 0 100px var(--panel) inset;
  caret-color: var(--eggshell);
}

.field [aria-invalid="true"] { border-bottom-color: var(--error); }

.field__error {
  min-height: 1.1rem;
  margin: 0.35rem 0 0;
  font-size: 0.8125rem;
  line-height: 1.35;
  color: var(--error);
}

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

.form__actions {
  grid-column: 1 / -1;
  margin-top: 0.75rem;
}

.form .pill { background: #D6D0BE; color: var(--slate); }
.form .pill:hover { background: #E3DDCC; }
.form .pill:focus-visible { outline-color: var(--eggshell); }

.form__status {
  grid-column: 1 / -1;
  margin: 0;
  font-size: 0.9375rem;
  color: var(--error);
}

.form__status:empty { display: none; }

.thanks:focus { outline: none; }

.thanks__title {
  margin: 0 0 1rem;
  font-weight: 200;
  font-size: clamp(2rem, 4vw, 2.75rem);
  line-height: 1.15;
}

.thanks p { max-width: 28rem; margin: 0; color: var(--eggshell-soft); }

@media (max-width: 640px) {
  .hero__title { letter-spacing: 0.04em; }

  /* Whole application fits one phone screen, no scrolling. */
  .apply { padding: 3.25rem var(--gutter) 1rem; }
  .apply__head { margin-bottom: 1rem; }
  .apply__title { margin-bottom: 0.5rem; font-size: 2.4rem; }
  .apply__intro { font-size: 0.9375rem; line-height: 1.5; }
  .form { grid-template-columns: 1fr; gap: 0.8rem; }
  .field label { margin-bottom: 0.1rem; font-size: 0.75rem; }
  .field input, .field textarea { padding: 0.35rem 0; font-size: 1.0625rem; line-height: 1.3; }
  .field textarea { min-height: 3rem; }
  .field__error { min-height: 0; margin-top: 0.2rem; font-size: 0.75rem; }
  .form__actions { margin-top: 0.4rem; }
}
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
