/* Baskervville: SIL Open Font License 1.1, Google Fonts. Self-hosted so the page makes no third-party requests. */
@font-face {
  font-family: "Baskervville";
  src: url("/fonts/baskervville-normal.woff2") format("woff2");
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
}
@font-face {
  font-family: "Baskervville";
  src: url("/fonts/baskervville-italic.woff2") format("woff2");
  font-style: italic;
  font-weight: 400 700;
  font-display: swap;
}

:root {
  --stock: #fbd6dd;
  --ink: #0b0708;
  --line: #fff;
  --serif: "Baskervville", Baskerville, "Libre Baskerville", "Times New Roman", serif;
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  color-scheme: light;
}

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

html {
  background: var(--stock);
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: rgb(11 7 8 / .12);
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: clamp(20px, 4vh, 48px) 20px;
  background: var(--stock);
  color: var(--ink);
  font: 400 1.1875rem/1.5 var(--serif);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

::selection { background: var(--ink); color: var(--stock); }

.card {
  width: 100%;
  max-width: 860px;
  display: grid;
  justify-items: center;
  text-align: center;
}

/* Logo */

.logo {
  display: block;
  width: min(100%, 85vh, 860px);
  width: min(100%, 85svh, 860px);
  height: auto;
  overflow: visible;
}

.logo-line {
  fill: none;
  stroke: var(--line);
  stroke-width: 46;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 10100;
  stroke-dashoffset: 0;
  opacity: 0;
}

.logo-ring,
.logo-gem,
.logo-rays { fill: var(--line); fill-rule: evenodd; }

.logo-word { fill: var(--ink); fill-rule: evenodd; }

/* Text */

.words {
  display: grid;
  justify-items: center;
  margin-top: clamp(16px, 3.4vh, 36px);
}

h1 {
  margin: 0;
  font: italic 400 clamp(2.5rem, 1.75rem + 3vw, 4.25rem)/1.08 var(--serif);
  letter-spacing: -.01em;
  text-wrap: balance;
}

.what {
  margin: .85em 0 0;
  max-width: 31em;
  text-wrap: balance;
}

/* Engraved plate: the one button */

.plate {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 56px;
  min-width: 232px;
  margin-top: clamp(20px, 3.4vh, 32px);
  padding: 0 2.4em;
  background: var(--ink);
  color: var(--stock);
  font: 500 .9375rem/1 var(--serif);
  letter-spacing: .26em;
  text-indent: .26em;
  text-transform: uppercase;
  text-decoration: none;
  transition: background-color .2s ease-out, color .2s ease-out;
}

.plate::after {
  content: "";
  position: absolute;
  inset: 5px;
  border: 1px solid currentcolor;
  opacity: .55;
  pointer-events: none;
}

@media (hover: hover) {
  .plate:hover { background: var(--line); color: var(--ink); }
}
.plate:active { transform: translateY(1px); }

.plate:focus-visible,
.reach a:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}

.reach {
  display: grid;
  justify-items: center;
  gap: .3em;
  margin: .8em 0 0;
  font-size: 1.0625rem;
  line-height: 1.4;
}

.reach a {
  color: inherit;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: .22em;
  transition: text-underline-offset .2s var(--ease-out);
}

.reach a:hover { text-underline-offset: .34em; }

.instagram {
  display: inline-flex;
  align-items: center;
  gap: .45em;
  min-height: 44px;
}

.instagram svg {
  flex: none;
  width: 1.15em;
  height: 1.15em;
  fill: none;
  stroke: currentcolor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

@media (min-width: 640px) and (min-height: 561px) {
  .reach { grid-auto-flow: column; align-items: center; gap: 1.5em; }
}

.email { user-select: all; -webkit-user-select: all; overflow-wrap: anywhere; }

/* The signature: the rings draw themselves as one unbroken line, then the exact
   trace of the client's logo takes over. Without this block the trace simply shows. */

@media (prefers-reduced-motion: no-preference) {
  .logo-line { animation: draw 2.4s cubic-bezier(.6, .04, .28, 1) .15s backwards, linger 2.7s linear backwards; }
  .logo-ring { animation: appear .2s linear 2.5s backwards; }
  .logo-word { animation: appear .9s ease-out .05s backwards; }
  .logo-gem {
    transform-box: fill-box;
    transform-origin: 50% 100%;
    animation: land .8s var(--ease-out) 2.25s backwards;
  }
  .logo-rays {
    transform-box: fill-box;
    transform-origin: 50% 100%;
    animation: glint .9s var(--ease-out) 2.5s backwards;
  }
}

@keyframes draw { from { stroke-dashoffset: 10100; } }
@keyframes linger { 0%, 96% { opacity: 1; } 100% { opacity: 0; } }
@keyframes appear { from { opacity: 0; } }
@keyframes land { from { opacity: 0; transform: translateY(5%) scale(.92); } }
@keyframes glint { from { opacity: 0; transform: scale(.7); } }

/* Phone on its side: logo beside the words so the button stays on screen. */

@media (orientation: landscape) and (max-height: 560px) {
  .card {
    max-width: 900px;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    column-gap: 28px;
  }
  .logo { width: 100%; }
  .words { margin-top: 0; }
  h1 { font-size: 2.25rem; }
  .what { font-size: 1.0625rem; }
  .plate { margin-top: 14px; min-height: 48px; }
  .reach { margin-top: .5em; font-size: 1rem; }
}
