/* ============================================================================
   demo.huntlog.xyz — HuntLog, incubatore di sviluppo frontend.
   ----------------------------------------------------------------------------
   Single-screen, minimal, black & white. Content block left-aligned, vertically
   centred; the word "FRONTEND" runs vertically on the right. Isolated under
   demos/_home/: shares nothing with the dashboard design system or the static/
   minify pipeline (served raw).
   ========================================================================== */

:root {
  /* surfaces — Paper mode (ink unified with the maintenance Ink mode) */
  --bg:       #ffffff;            /* paper */
  --fg:       #0b0b0d;            /* ink */
  --fg-mut:   rgba(11, 11, 13, 0.56);
  --line:     rgba(11, 11, 13, 0.14);

  /* signal red — the claw. Bright red for large marks/graphics; the deepened
     red keeps small red type AA-legible on paper (~6:1 vs ~3.9:1). */
  --red:      #ff1013;            /* claw, arrow, graphic marks */
  --red-ink:  #c20e14;            /* small red on white (links, hovers) */

  --font-display: "Archivo", system-ui, "Segoe UI", sans-serif;
  --font-mono:    "Space Mono", "Courier New", monospace;

  --shell: 1240px;
  --gutter: clamp(1.5rem, 5vw, 4.5rem);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-display);
  font-size: 17px;
  line-height: 1.6;
  letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
svg { display: block; }
::selection { background: var(--red); color: var(--bg); }
:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; border-radius: 2px; }

.shell { width: 100%; max-width: var(--shell); margin-inline: auto; padding-inline: var(--gutter); }

/* mono micro-label */
.label {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--fg-mut);
  margin: 0;
}
.label::before { content: ""; width: 1.8rem; height: 2px; background: var(--red); }

/* animated-underline link */
.link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  background-image: linear-gradient(var(--red-ink), var(--red-ink));
  background-position: 0 100%;
  background-repeat: no-repeat;
  background-size: 0% 1.5px;
  transition: background-size 0.4s var(--ease);
  padding-bottom: 2px;
}
.link:hover, .link:focus-visible { background-size: 100% 1.5px; }

/* ---------------------------------------------------------------- header -- */
.site-head {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 10;
  background: color-mix(in srgb, var(--bg) 72%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.site-head__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding-block: 1.05rem;
}
.brand { color: var(--fg); display: inline-flex; align-items: center; gap: 0.5rem; }
.brand__mark { height: 1.5rem; width: auto; color: var(--red); }
.brand__logo { height: 1.1rem; width: auto; }
.site-head__contact { font-weight: 600; border-bottom: 1.5px solid var(--fg); padding-bottom: 1px; transition: border-color 0.2s var(--ease); }
.site-head__contact:hover { border-color: var(--red-ink); }

/* ------------------------------------------------------------------ hero -- */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;            /* stage vertically centred */
  overflow: hidden;
  padding-block: clamp(5rem, 11vh, 7rem) clamp(4.5rem, 10vh, 6.5rem);
}

/* centred stage: content on the left, vertical word on the right */
.hero__stage {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.hero__content { max-width: 30rem; }
.hero__label { margin-bottom: clamp(1.5rem, 4vh, 2.5rem); }

/* headline = black marker block, white type (one black bar per line) */
.hero__title { margin: 0; }
.hero__title .hl {
  font-weight: 900;
  font-size: clamp(2.1rem, 5.2vw, 3.5rem);
  line-height: 1.42;
  letter-spacing: -0.035em;
  background: var(--fg);
  color: var(--bg);
  padding: 0.1em 0.3em;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}
.hero__sub {
  margin: clamp(1.5rem, 3.5vh, 2.25rem) 0 0;
  font-size: clamp(1.05rem, 1.5vw, 1.3rem);
  color: var(--fg-mut);
  max-width: 34ch;
}
/* Centered box matching the header shell (max-width + auto margins), so the
   arrow shares the shell's coordinate space and tracks "Scrivici" at every
   width — on wide screens the link is at the shell edge, not the viewport edge. */
.hero__guide {
  position: absolute;
  inset: 0;
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  pointer-events: none;
  z-index: 1;
}
/* single elegant curved arrow: tip just below "Scrivici", pointing up at it */
.hero__arrows {
  position: absolute;
  top: 3.4rem;                            /* just below the fixed header */
  right: calc(var(--gutter) + 0.4rem);    /* aligns the tip under "Scrivici" */
  width: 13rem;                           /* fixed → tip-to-link offset stays constant */
  height: auto;
  color: var(--red);
}
/* draw-on: the arrow sketches itself toward the CTA, once */
.hero__arrows path {
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  animation: draw 1.3s var(--ease) 0.45s forwards;
}
@keyframes draw { to { stroke-dashoffset: 0; } }

/* vertical "FRONTEND" on the right */
.hero__word {
  flex: none;
  writing-mode: vertical-rl;
  text-orientation: mixed;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.6rem, 3.2vw, 2.9rem);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--fg);
  user-select: none;
}

/* baseline row, pinned to the bottom */
.hero__base { position: absolute; inset: auto 0 0 0; }
.hero__base-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem 2rem;
  flex-wrap: wrap;
  padding-block: clamp(0.9rem, 2vh, 1.3rem);
  border-top: 1px solid var(--line);
}
.hero__services, .hero__mail {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  color: var(--fg-mut);
  margin: 0;
}
.hero__mail:hover { color: var(--red-ink); }

/* ------------------------------------------------------------- entrance -- */
@keyframes rise  { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@keyframes riseX { from { opacity: 0; transform: translateX(14px); } to { opacity: 1; transform: none; } }

.a1, .a2, .a3, .a4 { animation: rise 0.9s var(--ease) both; }
.a1 { animation-delay: 0.05s; }
.a2 { animation-delay: 0.15s; }
.a3 { animation-delay: 0.25s; }
.a4 { animation-delay: 0.35s; }
.hero__word { animation: riseX 1s var(--ease) 0.4s both; }
/* once drawn, the arrow bobs gently upward toward the CTA (vertical only, so the
   horizontal aim at "Scrivici" stays exact) */
.hero__arrows { animation: drift 3.6s ease-in-out 1.7s infinite; }
@keyframes drift { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }

/* ----------------------------------------------------------- responsive -- */
@media (max-width: 700px) {
  .hero__word { display: none; }                   /* vertical word would clash with centred text */
  .hero__arrows { width: 10rem; top: 4.6rem; }     /* shown on mobile; lower so the tip clears "Scrivici" */
}
@media (max-width: 560px) {
  body { font-size: 16px; }
  .hero__base-inner { gap: 0.4rem 1.5rem; }
}

@media (prefers-reduced-motion: reduce) {
  .a1, .a2, .a3, .a4, .hero__word, .hero__arrows, .hero__arrows path { animation: none; }
  .hero__arrows path { stroke-dashoffset: 0; }
  .link { transition: none; }
}
