/* Nicky.dk — night sea. Dark, quiet, a little bit alive. */

:root {
  --ink: #dbe4ee;
  --ink-dim: #8b99ab;
  --ink-faint: #667386;
  --hair: rgba(190, 210, 230, .10);
  --glass: rgba(5, 10, 24, .40);
  --serif: ui-serif, 'Iowan Old Style', 'Palatino Linotype', Palatino, Georgia, serif;
  --sans: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

* { box-sizing: border-box; }

html {
  background: #010205;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 300;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}

/* ---- Content ----------------------------------------------------------- */

main {
  position: relative;
  z-index: 3;
}

.hero {
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: max(5.5rem, 18vh) 1.25rem 6rem; /* the box starts just under the moon */
  text-align: center;
}

.menu-panel {
  width: min(92vw, 520px);
  padding: 2.6rem 2rem 2.3rem;
  background: var(--glass);
  border: 1px solid var(--hair);
  border-radius: 3px;
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  box-shadow: 0 30px 80px rgba(0, 0, 0, .35);
}

/* The name, written by hand: every letter is an SVG path that gets traced
   with a pen-like stroke, then fills in. Timings are set per letter inline. */
.signature {
  margin: 0;
  line-height: 0;
  font-size: 0;
}

.signature-svg {
  display: block;
  width: min(100%, 410px);
  height: auto;
  margin: 0 auto;
  overflow: visible;
  filter: drop-shadow(0 0 14px rgba(120, 160, 255, .18));
}

.signature-svg path {
  fill: #eef3f9;
  fill-opacity: 0;
  stroke: #eef3f9;
  stroke-width: 1.4;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  animation:
    ink var(--t, .8s) cubic-bezier(.45, .05, .35, 1) var(--d, 0s) forwards,
    ink-fill .8s ease calc(var(--d, 0s) + var(--t, .8s) * .6) forwards;
}

@keyframes ink {
  to { stroke-dashoffset: 0; }
}

@keyframes ink-fill {
  to { fill-opacity: 1; stroke-width: .35; }
}

.rule {
  width: 64px;
  height: 1px;
  margin: 1.5rem auto 1rem;
  background: linear-gradient(90deg, transparent, rgba(190, 210, 230, .45), transparent);
}

.tagline {
  margin: 0;
  font-size: .72rem;
  letter-spacing: .28em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.menu {
  list-style: none;
  margin: 2.1rem 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .35rem;
}

.menu a {
  display: inline-block;
  padding: .5rem 1rem;
  font-size: .8rem;
  letter-spacing: .34em;
  text-indent: .34em; /* keeps tracked text optically centred */
  text-transform: uppercase;
  text-decoration: none;
  color: var(--ink-dim);
  transition: color .5s ease, letter-spacing .5s ease, text-shadow .5s ease;
}

.menu a:hover,
.menu a:focus-visible {
  color: #fff;
  letter-spacing: .42em;
  text-shadow: 0 0 18px rgba(140, 180, 255, .45);
  outline: none;
}



/* ---- Sections (they sit down in the water) ------------------------------ */

.panel {
  width: min(92vw, 680px);
  margin: 0 auto 22vh;
  padding: 2.6rem 2.4rem;
  background: var(--glass);
  border: 1px solid var(--hair);
  border-radius: 3px;
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  scroll-margin-top: 14vh;
}

.panel:last-of-type { margin-bottom: 16vh; }

.panel h2 {
  margin: 0 0 1.2rem;
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  font-size: 1.7rem;
  letter-spacing: .02em;
  color: #eef3f9;
}

.panel p {
  margin: 0 0 1rem;
  color: #b4c0ce;
}

.panel p:last-child { margin-bottom: 0; }

.footer {
  position: relative;
  z-index: 3;
  padding: 0 1rem 2.2rem;
  text-align: center;
  font-size: .72rem;
  letter-spacing: .18em;
  color: #8a8372; /* sits on the sand */
}

.footer p { margin: 0; }

@media (max-width: 520px) {
  .menu-panel { padding: 2.2rem 1.25rem 2rem; }
  .panel { padding: 2rem 1.4rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .signature-svg path {
    animation: none;
    fill-opacity: 1;
    stroke-dashoffset: 0;
    stroke-width: .35;
  }
}


/* ---- Pages inside the glass box (Personlig, Domæner, Kontakt) ------------- */

.deep { height: calc(831px + 60vh); } /* keeps the sea as deep as it was */
@media (max-width: 700px) { .deep { height: calc(960px + 60vh); } }

.page-view { text-align: left; width: 100%; align-self: start; }
.pv-head {
  display: flex; align-items: baseline; justify-content: space-between;
  margin: 0 0 1rem; padding-bottom: .6rem; border-bottom: 1px solid var(--hair);
}
.pv-title {
  margin: 0; font-family: var(--serif); font-style: italic; font-weight: 400;
  font-size: 1.35rem; letter-spacing: .02em; color: #eef3f9;
}
.pv-text { margin: 0; font-size: .9rem; line-height: 1.7; color: #b4c0ce; }
.pv-links { list-style: none; margin: 0; padding: 0; display: grid; gap: .15rem; }
.pv-links a {
  display: inline-block; padding: .35rem 0; font-size: 1rem; letter-spacing: .04em;
  color: var(--ink); text-decoration: none; transition: letter-spacing .4s ease, text-shadow .4s ease;
}
.pv-links a:hover, .pv-links a:focus-visible { letter-spacing: .1em; text-shadow: 0 0 16px rgba(140, 180, 255, .45); outline: none; }

/* the contact form */
.cform { display: grid; gap: .7rem; }
.cform label { display: grid; gap: .25rem; font-size: .66rem; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-faint); }
.cform label em { text-transform: none; letter-spacing: .04em; font-style: normal; opacity: .7; }
.cf-row { display: grid; grid-template-columns: 1fr 1fr; gap: .7rem; }
.cform input, .cform textarea {
  width: 100%; padding: .5rem .65rem; font: inherit; font-size: .9rem; letter-spacing: .01em; text-transform: none;
  color: var(--ink); background: rgba(255, 255, 255, .035); border: 1px solid var(--hair); border-radius: 2px;
  transition: border-color .3s ease, background .3s ease;
}
.cform textarea { resize: vertical; min-height: 4.2rem; line-height: 1.5; }
.cform input:focus, .cform textarea:focus { outline: none; border-color: rgba(190, 210, 230, .45); background: rgba(255, 255, 255, .06); }
.hp { position: absolute; left: -9999px; top: auto; width: 1px; height: 1px; overflow: hidden; }
.cf-foot { display: flex; align-items: center; gap: .9rem; margin-top: .2rem; }
.cf-send {
  appearance: none; padding: .55rem 1.5rem; font: inherit; font-size: .72rem; letter-spacing: .28em; text-transform: uppercase;
  color: var(--ink); background: rgba(140, 180, 255, .08); border: 1px solid rgba(190, 210, 230, .3); border-radius: 2px; cursor: pointer;
  transition: background .3s ease, border-color .3s ease, letter-spacing .4s ease;
}
.cf-send:hover, .cf-send:focus-visible { background: rgba(140, 180, 255, .18); border-color: rgba(190, 210, 230, .6); outline: none; }
.cf-send:disabled { opacity: .5; cursor: default; }
.cf-msg { margin: 0; font-size: .78rem; line-height: 1.4; color: var(--ink-dim); }
.cf-msg.is-ok { color: #9be8c0; }
.cf-msg.is-err { color: #ffa7a0; }

/* ---- Phones: fold the menu out of the way ---------------------------------- */
.menu-fold { display: none; }
@media (max-width: 700px) {
  .menu-panel { position: relative; transition: background .4s ease, border-color .4s ease, box-shadow .4s ease; }
  .menu-fold {
    display: block; position: absolute; z-index: 2; top: .5rem; right: .6rem; padding: .25rem .5rem;
    appearance: none; font: inherit; font-size: .62rem; letter-spacing: .18em; text-transform: uppercase;
    color: var(--ink-faint); background: none; border: 0; cursor: pointer;
  }
  .menu-fold .f-show { display: none; }
  .menu-panel > :not(.menu-fold) { transition: opacity .4s ease; }
  html.menu-folded .menu-panel { background: transparent; border-color: transparent; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; pointer-events: none; }
  html.menu-folded .menu-panel > :not(.menu-fold) { opacity: 0; visibility: hidden; transition: opacity .4s ease, visibility 0s .4s; }
  html.menu-folded .menu-fold {
    pointer-events: auto; top: 50%; right: auto; left: 50%; transform: translate(-50%, -50%);
    padding: .6rem 1.4rem; font-size: .72rem; color: var(--ink); background: var(--glass);
    border: 1px solid rgba(190, 210, 230, .3); border-radius: 999px;
    -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  }
  html.menu-folded .menu-fold .f-hide { display: none; }
  html.menu-folded .menu-fold .f-show { display: inline; }
  .cf-row { grid-template-columns: 1fr; }
}

/* the Personlig page: a line about me, the text on the left and a framed photo on the right */
.pv-tag { margin: -.2rem 0 1rem; font-size: .7rem; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-faint); }
.pv-profile { display: grid; grid-template-columns: 1fr 156px; gap: 1.2rem; align-items: start; }
.pv-bio .pv-text + .pv-text { margin-top: .75rem; }
.pv-profile .pv-text { font-size: .85rem; line-height: 1.6; }
.pf { margin: 0; }
.pf-frame {
  position: relative; aspect-ratio: 1; padding: 5px;
  background: var(--glass); border: 1px solid rgba(190, 210, 230, .22); border-radius: 18px;
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, .35);
}
.pf-img {
  position: absolute; inset: 5px; width: calc(100% - 10px); height: calc(100% - 10px); object-fit: cover;
  border-radius: 13px; opacity: 0; transition: opacity .5s ease;
}
.pf-img.is-on { opacity: 1; }
.pf-nav { display: flex; align-items: center; justify-content: space-between; gap: .4rem; margin-top: .55rem; }
.pf-name { flex: 1; text-align: center; font-family: var(--serif); font-style: italic; font-size: .95rem; color: var(--ink); }
.pf-arrow {
  appearance: none; width: 1.9rem; height: 1.9rem; display: grid; place-items: center; padding: 0;
  font: inherit; font-size: .95rem; color: var(--ink-dim); background: rgba(255, 255, 255, .035);
  border: 1px solid var(--hair); border-radius: 999px; cursor: pointer; transition: color .3s ease, border-color .3s ease;
}
.pf-arrow:hover, .pf-arrow:focus-visible { color: #fff; border-color: rgba(190, 210, 230, .45); outline: none; }
@media (max-width: 520px) { .pv-profile { grid-template-columns: 1fr; } .pf { width: min(190px, 100%); margin: 0 auto; } } /* fixed width: the frame must not follow the length of the name below it */

/* the front menu sits near the top of the box, not in the middle */
.menu-view { align-self: start; }
.menu-view .menu { margin-top: 1.4rem; }

/* the menu box follows the height of the page that is open */
.menu-stage { transition: height .4s ease; }

/* the "?" with tips, bottom right */
.help { position: fixed; z-index: 50; right: 1rem; bottom: 1rem; }
.help-btn {
  appearance: none; width: 2rem; height: 2rem; padding: 0; display: grid; place-items: center;
  font: inherit; font-size: .9rem; color: var(--ink-dim); background: var(--glass);
  border: 1px solid rgba(190, 210, 230, .25); border-radius: 50%; cursor: help;
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  transition: color .3s ease, border-color .3s ease;
}
.help-btn:hover, .help-btn:focus-visible { color: #fff; border-color: rgba(190, 210, 230, .6); outline: none; }
.help-tip {
  position: absolute; right: 0; bottom: calc(100% + .6rem); width: min(78vw, 300px); padding: 1rem 1.1rem;
  text-align: left; background: rgba(6, 12, 26, .92); border: 1px solid var(--hair); border-radius: 10px;
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); box-shadow: 0 14px 40px rgba(0, 0, 0, .45);
  opacity: 0; visibility: hidden; transform: translateY(6px); pointer-events: none;
  transition: opacity .25s ease, transform .25s ease, visibility 0s .25s;
}
.help:hover .help-tip, .help:focus-within .help-tip { opacity: 1; visibility: visible; transform: none; transition: opacity .25s ease, transform .25s ease; }
.help-title { margin: 0 0 .5rem; font-family: var(--serif); font-style: italic; font-size: 1rem; color: #eef3f9; }
.help-tip ul { margin: 0; padding-left: 1.1rem; font-size: .78rem; line-height: 1.55; color: #b4c0ce; }
.help-tip li + li { margin-top: .3rem; }

/* while something is being dragged (an item, a lure, a jellyfish, a duck) the menu box steps aside */
.menu-panel { transition: opacity .25s ease, background .4s ease, border-color .4s ease, box-shadow .4s ease; }
html.dragging-lure .menu-panel, html.carrying .menu-panel { opacity: 0; pointer-events: none; }
