/* Patrick — shared base for landing explorations
   Sage field, wheat type, wheat-paper portrait. Fraunces + Inter. */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght,ital@9..144,300..500,0;9..144,300..500,1&family=Inter:wght@300;400;500&display=swap');

:root {
  --sage:        #74836A;
  --sage-deep:   #66745C;
  --sage-edge:   #5A6852;
  --sage-dark:   #4A5644;
  --sage-night:  #3E4A39;   /* deeper field for the atmospheric variant */

  --wheat:        #EDE3C4;
  --wheat-bright: #F4EBD0;
  --wheat-soft:   #D9CFB0;
  --wheat-muted:  #C2B891;
  --wheat-paper:  #E3D9B8;

  --maroon:      #8A4A52;   /* the portrait's ink, pulled for the faintest accent */

  --font-display: 'Fraunces', Georgia, serif;
  --font-body:    'Inter', -apple-system, system-ui, sans-serif;

  --ease-settle: cubic-bezier(0.16, 1, 0.3, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  height: 100%;
  width: 100%;
}

body {
  background: var(--sage);
  color: var(--wheat);
  font-family: var(--font-body);
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow: hidden;
}

/* The faint atmospheric warmth on the field — barely perceptible */
.field-glow {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    radial-gradient(circle at 22% 28%, rgba(244, 235, 208, 0.045) 0%, transparent 46%),
    radial-gradient(circle at 80% 74%, rgba(244, 235, 208, 0.030) 0%, transparent 50%);
}

/* ---- The portrait, on its wheat-paper card ---- */
.portrait {
  position: relative;
  isolation: isolate;
}
.portrait .paper {
  position: absolute;
  inset: 0;
  background: var(--wheat-paper);
  border-radius: 2px;
}
.portrait img {
  position: relative;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 16%;
  display: block;
  mix-blend-mode: multiply;
}

/* Ink-reveal: a soft top-to-bottom settle of the line drawing */
.ink-reveal img {
  -webkit-mask-image: linear-gradient(180deg, #000 0 56%, transparent 80%);
  mask-image: linear-gradient(180deg, #000 0 56%, transparent 80%);
  -webkit-mask-size: 100% 230%;
  mask-size: 100% 230%;
  -webkit-mask-position: 0 100%;
  mask-position: 0 100%;
  animation: inkReveal 1.7s var(--ease-settle) 0.15s forwards;
}
@keyframes inkReveal {
  from { -webkit-mask-position: 0 100%; mask-position: 0 100%; opacity: 0.15; }
  to   { -webkit-mask-position: 0 0%;   mask-position: 0 0%;   opacity: 1; }
}

/* Settle — gentle rise into place */
@keyframes settle {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}
.settle { animation: settle 1.2s var(--ease-settle) both; }

/* Very slow ambient breathing for glows / light */
@keyframes breathe {
  0%, 100% { opacity: var(--b-lo, 0.5); transform: scale(1); }
  50%      { opacity: var(--b-hi, 0.8); transform: scale(1.04); }
}

/* The tagline lockup */
.tagline {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 300;
  color: var(--wheat-soft);
  letter-spacing: 0.01em;
  font-variation-settings: "opsz" 28;
}

/* Editorial underlined message field — the primary invitation */
.invite {
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--wheat-muted);
  transition: border-color 0.4s var(--ease-settle);
}
.invite:focus-within { border-bottom-color: var(--wheat-bright); }
.invite input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--wheat-bright);
  font-family: var(--font-body);
  font-weight: 400;
  letter-spacing: 0.003em;
}
.invite input::placeholder {
  color: var(--wheat-soft);
  opacity: 0.62;
  font-style: italic;
}
.invite .send {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  color: var(--wheat-soft);
  cursor: pointer;
  opacity: 0.5;
  transition: opacity 0.3s var(--ease-settle), color 0.3s var(--ease-settle), transform 0.3s var(--ease-settle);
}
.invite .send:hover { opacity: 1; color: var(--wheat-bright); transform: translateX(2px); }
.invite.has-text .send { opacity: 0.9; }

::selection { background: var(--wheat-soft); color: var(--sage-dark); }

::-webkit-scrollbar { width: 0; height: 0; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .ink-reveal img { -webkit-mask-position: 0 0%; mask-position: 0 0%; opacity: 1; }
}
