/* ---------------------------------------------------------------------------
   hdco.css: the previews site's own pages, the front page, the password page
   and the 404.

   Always night, in the colours of hannahdesignco.com's dark mode, so it reads
   as a sister to the studio's site: the gradient wordmark on top, a big
   headline over a search-bar shaped box, and the tagline in the lifted
   gradient at the foot.
   --------------------------------------------------------------------------- */

@font-face{
  font-family:"Manrope";
  font-style:normal;
  font-weight:400 800;
  font-display:swap;
  src:url("/_hdco/manrope.woff2") format("woff2");
}

:root{
  --night:#0E0B1A;
  --panel:#16122A;
  --rule:#2B2640;
  --ink:#F4F2FA;
  --body:#CFCBDC;
  --muted:#A9A4BC;
  --lilac:#CF95F3;
  --grad:linear-gradient(110deg,#CF95F3 0%,#B69BFA 25%,#86AEFF 50%,#5CCAE0 75%,#59DC8A 100%);
  --font:"Manrope","Helvetica Neue",Arial,sans-serif;
  color-scheme:dark;
}

*,*::before,*::after{box-sizing:border-box}
html,body{margin:0;min-height:100%}
body{
  display:flex;
  flex-direction:column;
  min-height:100vh;
  min-height:100dvh;
  background:radial-gradient(70% 520px at 50% 0,rgba(207,149,243,.16),rgba(134,174,255,.05) 50%,rgba(14,11,26,0) 80%),var(--night);
  color:var(--ink);
  font-family:var(--font);
  -webkit-font-smoothing:antialiased;
}
a{color:inherit;text-decoration:none}
:focus-visible{outline:2px solid var(--lilac);outline-offset:3px;border-radius:4px}

.hd-rule{flex:none;height:3px;background:var(--grad)}

.hd-top{padding:20px max(26px,env(safe-area-inset-right,0px)) 20px max(26px,env(safe-area-inset-left,0px))}
.hd-top img{display:block;width:min(250px,60vw);height:auto}

/* ---- The middle: the headline and the box ---------------------------- */
.hd-main{
  flex:1;
  display:grid;
  place-items:center;
  padding:32px max(20px,env(safe-area-inset-right,0px)) 48px max(20px,env(safe-area-inset-left,0px));
  text-align:center;
}
.hd-main > div{width:min(780px,100%)}
.hd-ey{margin:0;font-size:11px;font-weight:800;letter-spacing:.18em;text-transform:uppercase;color:var(--lilac)}
.hd-main h1{margin:12px 0 0;font-size:clamp(42px,8.6vw,88px);line-height:.95;font-weight:800;letter-spacing:-.06em;text-wrap:balance}
.hd-for{margin:16px 0 0;font-size:16.5px;line-height:1.5;color:var(--body)}
.hd-for b{color:var(--ink)}
.hd-text{margin:18px auto 0;max-width:46ch;font-size:16.5px;line-height:1.6;color:var(--body)}

/* The password box is drawn as a search bar, a sister to the SEO page:
   the gradient shows through the border round the panel. */
.hd-pill{
  display:flex;
  align-items:center;
  gap:12px;
  max-width:540px;
  margin:28px auto 0;
  padding:8px 8px 8px 22px;
  border:2px solid transparent;
  border-radius:999px;
  background:linear-gradient(var(--panel),var(--panel)) padding-box,var(--grad) border-box;
  box-shadow:0 30px 60px -30px rgba(207,149,243,.45);
  text-align:left;
}
.hd-pill:focus-within{box-shadow:0 0 0 4px rgba(207,149,243,.22),0 30px 60px -30px rgba(207,149,243,.45)}
.hd-pill.is-wrong{box-shadow:0 0 0 3px rgba(255,138,160,.45),0 30px 60px -30px rgba(207,149,243,.45)}
.hd-pill > svg{flex:none;width:18px;height:18px;color:var(--lilac)}
.hd-pill input{
  flex:1;
  min-width:0;
  min-height:46px;
  border:0;
  background:transparent;
  color:var(--ink);
  font:600 17px var(--font);
}
.hd-pill input::placeholder{color:var(--muted)}
.hd-pill input:focus{outline:none}
.hd-pill button{
  flex:none;
  display:grid;
  place-items:center;
  width:46px;
  height:46px;
  border:0;
  border-radius:50%;
  background:var(--grad);
  color:var(--night);
  cursor:pointer;
  transition:transform .18s ease;
}
.hd-pill button:hover{transform:translateX(2px)}
.hd-pill button:focus-visible{outline-offset:4px;border-radius:50%}

.hd-help{margin:16px 0 0;font-size:13.5px;line-height:1.6;color:var(--muted)}
.hd-help a{color:var(--lilac);font-weight:700;text-decoration:underline;text-underline-offset:3px}
.hd-error{margin:16px auto 0;max-width:44ch;font-size:14px;line-height:1.55;font-weight:600;color:#FFB3C1}
.hd-error a{color:inherit;text-decoration:underline;text-underline-offset:3px}

/* For a screen reader only: the box's label. */
.hd-sr{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;border:0}

/* ---- The foot: the tagline and the copyright on the left, Maximin Design
   and the way back on the right ---------------------------------------- */
.hd-foot{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  align-items:center;
  gap:20px 32px;
  padding:28px max(26px,env(safe-area-inset-right,0px)) calc(24px + env(safe-area-inset-bottom,0px)) max(26px,env(safe-area-inset-left,0px));
  border-top:1px solid var(--rule);
}
.hd-left{display:grid;grid-template-columns:minmax(0,1fr);gap:8px;min-width:0}
/* As wide as its words, so the whole gradient runs across them. */
.hd-tagline{
  width:fit-content;
  max-width:100%;
  margin:0;
  padding-bottom:.08em;
  font-size:clamp(24px,3.4vw,40px);
  line-height:1.12;
  font-weight:800;
  letter-spacing:-.045em;
  background:var(--grad);
  -webkit-background-clip:text;
  background-clip:text;
  color:transparent;
  text-wrap:balance;
}
.hd-left small{font-size:12px;color:var(--muted)}
.hd-right{display:flex;flex-wrap:wrap;align-items:center;justify-content:flex-end;gap:16px 20px}
.hd-sep{width:1px;height:20px;background:var(--rule)}

/* Maximin Design lifts a touch, with a soft lilac glow behind it. */
.hd-mx{display:block;padding:4px 0;transition:transform .3s ease,filter .3s ease}
.hd-mx img{display:block;width:auto;height:22px}
.hd-mx:is(:hover,:focus-visible){transform:translateY(-2px);filter:drop-shadow(0 6px 14px rgba(207,149,243,.45))}

/* The way back: white words, and a gradient hairline that wipes in under
   them while the arrow nudges back, the way the links do on the studio's site. */
.hd-back{position:relative;display:inline-flex;align-items:center;gap:6px;padding:4px 0;font-size:14px;font-weight:800;color:var(--ink);white-space:nowrap}
.hd-back::after{content:"";position:absolute;left:0;right:0;bottom:0;height:1.5px;background:var(--grad);transform:scaleX(0);transform-origin:right;transition:transform .3s ease}
.hd-back span{display:inline-block;transition:transform .25s ease}
.hd-back:is(:hover,:focus-visible)::after{transform:scaleX(1);transform-origin:left}
.hd-back:is(:hover,:focus-visible) span{transform:translateX(-3px)}
.hd-back:focus-visible{outline-offset:6px}

@media (max-width:640px){
  .hd-top{padding-top:16px;padding-bottom:16px}
  .hd-pill{padding-left:16px}
  .hd-pill input{font-size:16px}
  .hd-foot{grid-template-columns:1fr}
  .hd-right{flex-direction:column;align-items:flex-start;gap:14px}
  .hd-sep{display:none}
}

@media (prefers-reduced-motion:reduce){
  .hd-mx,.hd-back::after,.hd-back span,.hd-pill button{transition:none}
}
