/* suboptimal.uk — shared theme: very deep grey / very pale grey */
:root {
  --ink: #0d0d0e;
  --ink-2: #141416;
  --ink-3: #1c1c1f;
  --line: #2a2a2e;
  --paper: #f2f2ef;
  --paper-dim: rgba(242, 242, 239, 0.55);
  --paper-faint: rgba(242, 242, 239, 0.28);
  --display: 'Bebas Neue', 'Arial Narrow', sans-serif;
  --serif: 'Iowan Old Style', Georgia, serif;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  background: var(--ink);
  color: var(--paper);
  font-family: var(--serif);
  font-size: 17px;
  line-height: 1.55;
  min-height: 100vh;
}
a { color: inherit; }
img { display: block; max-width: 100%; }

/* -------- masthead -------- */
.masthead {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 1rem; padding: 1.4rem clamp(1rem, 4vw, 3rem);
  border-bottom: 1px solid var(--line);
}
.brand {
  font-family: var(--display);
  font-size: clamp(1.6rem, 3.4vw, 2.2rem);
  letter-spacing: 0.14em;
  text-decoration: none;
  color: var(--paper);
}
.brand span { color: var(--paper-faint); }

/* -------- buttons / fields -------- */
.btn {
  font-family: var(--display); letter-spacing: 0.18em; text-transform: uppercase;
  background: transparent; color: var(--paper); border: 1px solid var(--line);
  padding: 0.55em 1.4em; cursor: pointer; font-size: 0.95rem; transition: all .18s ease;
}
.btn:hover { border-color: var(--paper); background: var(--paper); color: var(--ink); }
.btn-quiet { border-color: transparent; color: var(--paper-dim); }
.btn-quiet:hover { color: var(--ink); }
.field {
  width: 100%; background: var(--ink-2); border: 1px solid var(--line);
  color: var(--paper); font-family: var(--serif); font-size: 1.05rem;
  padding: 0.7em 0.9em; outline: none; transition: border-color .15s ease;
}
.field:focus { border-color: var(--paper-dim); }
.field::placeholder { color: var(--paper-faint); }

/* -------- gate (password) -------- */
.gate { max-width: 22rem; margin: 12vh auto 0; padding: 0 1.2rem; text-align: center; }
.vault-icon { width: 3rem; height: 3rem; margin: 0 auto 1.4rem; opacity: .5;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='1.4'%3E%3Crect x='4' y='10' width='16' height='11' rx='1'/%3E%3Cpath d='M8 10V7a4 4 0 0 1 8 0v3'/%3E%3Ccircle cx='12' cy='15.5' r='1.6' fill='white' stroke='none'/%3E%3C/svg%3E") center/contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='1.4'%3E%3Crect x='4' y='10' width='16' height='11' rx='1'/%3E%3Cpath d='M8 10V7a4 4 0 0 1 8 0v3'/%3E%3Ccircle cx='12' cy='15.5' r='1.6' fill='white' stroke='none'/%3E%3C/svg%3E") center/contain no-repeat;
  background: var(--paper); }
.gate .field { text-align: center; }
.gate-opts { display: flex; align-items: center; justify-content: space-between; margin: 0.9rem 0 1.1rem; }
.check { display: flex; align-items: center; gap: 0.5em; color: var(--paper-dim); font-size: 0.85rem; cursor: pointer; user-select: none; }
.check input { accent-color: var(--paper); }
.gate-error { min-height: 1.4em; color: #b46a6a; font-size: 0.88rem; margin-top: 0.7rem; }

/* -------- home -------- */
.hero { text-align: center; padding: clamp(3rem, 9vh, 6rem) 1rem 2rem; }
.hero h1 { font-family: var(--display); font-weight: 400; font-size: clamp(3rem, 9vw, 6.5rem); letter-spacing: 0.1em; line-height: 0.95; }
.hero .sub { color: var(--paper-dim); margin-top: 0.9rem; font-style: italic; }
.album-count { color: var(--paper-faint); font-size: 0.8rem; letter-spacing: 0.22em; text-transform: uppercase; margin: 2.5rem 0 0; }
.card-grid {
  display: grid; gap: clamp(1rem, 2.5vw, 2rem);
  grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr));
  max-width: 72rem; margin: 2.5rem auto 5rem; padding: 0 clamp(1rem, 4vw, 3rem);
}
.card {
  display: block; text-decoration: none; text-align: left;
  border: 1px solid transparent; transition: transform .25s ease;
}
.card:hover { transform: translateY(-4px); }
.card figure { aspect-ratio: 3/2; overflow: hidden; background: var(--ink-3); }
.card img { width: 100%; height: 100%; object-fit: cover; }
.card .cover-ph { width: 100%; height: 100%;
  background: repeating-linear-gradient(45deg, var(--ink-2) 0 14px, var(--ink-3) 14px 28px); }
.card h2 { font-family: var(--display); font-weight: 400; font-size: 1.7rem; letter-spacing: .1em; margin-top: 0.8rem; }
.card .meta { color: var(--paper-dim); font-size: 0.85rem; }
.card { position: relative; }
.share-btn { position: absolute; top: .45rem; right: .45rem; width: 2.1rem; height: 2.1rem;
  display: flex; align-items: center; justify-content: center;
  background: rgba(13,13,14,.72); border: 1px solid var(--line); color: var(--paper-dim);
  font-size: 1.05rem; cursor: pointer; border-radius: 2px; line-height: 1;
  opacity: 0; transition: opacity .18s ease, color .15s ease, border-color .15s ease; }
.card:hover .share-btn, .share-btn:focus-visible { opacity: 1; }
.share-btn:hover { color: var(--paper); border-color: var(--paper-dim); }
.share-btn:disabled { opacity: 1; }
@media (hover: none) { .share-btn { opacity: .85; } }

/* -------- shared bits -------- */
.status { text-align: center; color: var(--paper-dim); padding: 4rem 1rem; font-style: italic; }
.status.fade { opacity: 0; transition: opacity .4s ease; height: 0; padding: 0; overflow: hidden; }
footer { border-top: 1px solid var(--line); padding: 1.6rem; text-align: center; color: var(--paper-faint); font-size: 0.78rem; letter-spacing: 0.14em; }
footer a { color: var(--paper-dim); text-decoration: none; }
