/* Templates catalogue. Same visual identity as /hookjar/, because it is the
   same site and should not feel like a different one. */

:root {
  --bg:      #0c0d0e;
  --panel:   #141617;
  --panel-2: #1b1e1f;
  --line:    #262a2b;
  --text:    #e8e9e7;
  --muted:   #8f9694;
  --accent:  #60a5fa;
  --accent-ink: #0a1424;   /* text peste accent */
  --good:    #6fcf8e;
  --bad:     #e0785f;

  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas,
          "Liberation Mono", monospace;
  --sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto,
          "Helvetica Neue", Arial, sans-serif;

  --wrap: 1000px;
  --gut: clamp(1.25rem, 5vw, 2rem);
  --ease: cubic-bezier(.16, 1, .3, 1);
}

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

body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: var(--sans); font-size: 16px; line-height: 1.62;
  -webkit-font-smoothing: antialiased;
}

h1, h2 { margin: 0; font-weight: 550; letter-spacing: -.025em; line-height: 1.15; }
p { margin: 0; }
ul, dl, dd, dt { margin: 0; padding: 0; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

.skip { position: absolute; left: -9999px; background: var(--accent); color: var(--accent-ink);
        padding: .7rem 1rem; border-radius: 8px; }
.skip:focus { left: 1rem; top: 1rem; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip-path: inset(50%); white-space: nowrap;
}

.wrap { max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gut); }
code { font-family: var(--mono); font-size: .92em; color: var(--accent); }

section { padding-block: clamp(3rem, 7vw, 5rem); }
section + section { border-top: 1px solid var(--line); }

/* ------------------------------------------------------------ header */

.top {
  border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--bg) 90%, transparent);
  backdrop-filter: blur(10px);
}
.top__inner { display: flex; align-items: center; gap: 1.5rem; height: 58px; }
.brand { display: inline-flex; align-items: center; gap: .5rem;
  text-decoration: none; font-family: var(--mono); font-size: .95rem; color: var(--accent); text-decoration: none; }
.top nav { margin-left: auto; display: flex; gap: 1.35rem; font-size: .9rem; }
.top nav a { color: var(--muted); text-decoration: none; transition: color .18s var(--ease); }
.top nav a:hover { color: var(--text); }

/* -------------------------------------------------------------- hero */

.hero h1 { font-size: clamp(1.9rem, 5vw, 2.9rem); max-width: 18ch; letter-spacing: -.035em; }
.lede { margin-top: 1.4rem; color: var(--muted); max-width: 64ch; }

/* ------------------------------------------------------------- items */

.grid .wrap { display: grid; gap: clamp(2rem, 5vw, 3.5rem); }

.item {
  display: grid; grid-template-columns: 1.05fr 1fr;
  gap: clamp(1.5rem, 4vw, 3rem); align-items: start;
}
.item__shot {
  display: block; border: 1px solid var(--line); border-radius: 12px;
  overflow: hidden; background: var(--panel);
  transition: border-color .2s var(--ease);
}
.item__shot:hover { border-color: var(--muted); }
.item__shot img { width: 100%; }

.item h2 { font-size: 1.5rem; }
.item__what { margin-top: .4rem; color: var(--accent); font-size: .95rem; }
.item__desc { margin-top: 1rem; color: var(--muted); font-size: .96rem; }

.specs { margin-top: 1.15rem; display: grid; gap: .4rem; list-style: none; font-size: .9rem; }
.specs li { position: relative; padding-left: 1.15rem; color: var(--muted); }
.specs li::before {
  content: ""; position: absolute; left: 0; top: .62em;
  width: 5px; height: 5px; border-radius: 50%; background: var(--accent); opacity: .6;
}

.item__actions { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1.6rem; }

@media (max-width: 800px) {
  .item { grid-template-columns: 1fr; }
}

/* ----------------------------------------------------------- buttons */

.btn {
  display: inline-flex; align-items: center; gap: .45rem;
  font: inherit; font-size: .92rem; font-weight: 550;
  background: var(--accent); color: var(--accent-ink);
  border: 1px solid transparent; border-radius: 8px;
  padding: .55rem 1.05rem; cursor: pointer; text-decoration: none;
  white-space: nowrap;
  transition: filter .18s var(--ease), transform .12s var(--ease),
              border-color .18s var(--ease);
}
.btn:hover { filter: brightness(1.08); }
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: .55; cursor: default; }
.btn span { font-weight: 400; opacity: .7; font-size: .85em; }

.btn--ghost { background: transparent; color: var(--text); border-color: var(--line); }
.btn--ghost:hover { border-color: var(--muted); filter: none; }

/* ------------------------------------------------------------- facts */

.facts { display: grid; gap: 1.5rem; margin-top: 1.75rem; }
.facts dt { font-weight: 500; }
.facts dd { margin-top: .35rem; color: var(--muted); max-width: 72ch; }

/* --------------------------------------------------------- subscribe */

.sub__inner { max-width: 46rem; }
.sub p { margin-top: .9rem; color: var(--muted); max-width: 58ch; }

.subform { display: flex; gap: .6rem; margin-top: 1.6rem; flex-wrap: wrap; }
/* A class beats the browser's own [hidden] rule, so hiding the form from
   JavaScript needs saying explicitly. */
.subform[hidden] { display: none; }
.subform input {
  flex: 1; min-width: 15rem;
  font: inherit; font-size: .95rem;
  background: var(--panel); color: var(--text);
  border: 1px solid var(--line); border-radius: 8px;
  padding: .55rem .85rem;
}
.subform input::placeholder { color: #6d7472; }
.subform input:focus-visible { border-color: var(--accent); }
.subform input[aria-invalid="true"] { border-color: var(--bad); }

.formnote { margin-top: .9rem; font-size: .88rem; color: var(--muted); }
.formnote[data-state="ok"]  { color: var(--good); }
.formnote[data-state="bad"] { color: var(--bad); }

/* ------------------------------------------------------------ footer */

.foot { border-top: 1px solid var(--line); padding-block: 1.5rem; }
.foot__inner {
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: .75rem;
  color: var(--muted); font-size: .85rem;
}
.foot a { color: var(--accent); }

.brand img { width: 20px; height: 20px; }
