/* ===== Colors and fonts ===== */
:root {
  --bg: #0e0e0e;
  --text: #f2efe9;
  --muted: #8a8780;
  --line: #3a3936;
  --red: #e60023;       /* Pinterest red */
  --red-dark: #ad081b;  /* Save button on hover */
  --sans: "Inter Tight", system-ui, sans-serif;
  --serif: "Instrument Serif", Georgia, serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  line-height: 1.5;
}

/* ===== Header ===== */
header {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--line);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

header h1,
header p {
  margin: 0;
  font-size: inherit;
  font-weight: 400;
}

/* ===== Page content ===== */
main {
  max-width: 44rem;
  margin: 0 auto;
  padding: 3rem 1.5rem 4rem;
}

h2 {
  margin: 0 0 1rem;
  font-size: 1.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: -0.02em;
}

section {
  padding: 2.5rem 0;
  border-top: 1px solid var(--line);
}

hr {
  display: none; /* sections already have a border line */
}

ul {
  margin: 0;
  padding-left: 1.25rem;
}

li {
  margin: 0.25rem 0;
}

li li {
  color: #c9c6bf;
}

b {
  font-weight: 700;
  color: var(--text);
}

a {
  color: var(--text);
}

/* ===== The Pin (microinteraction) ===== */
#demo {
  border-top: none;
  padding-top: 0;
  text-align: center;
}

.eyebrow {
  margin: 0 0 0.5rem;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
}

.title {
  margin: 0 0 2rem;
  font-size: clamp(2.25rem, 8vw, 3.5rem);
  line-height: 0.95;
}

.title em {
  font-family: var(--serif);
  font-weight: 400;
  text-transform: none;
}

.pin {
  position: relative;
  width: 100%;
  max-width: 320px;
  margin: 0 auto;   /* centers the pin */
  border-radius: 16px;
  overflow: hidden;
  cursor: zoom-in;
}

.pin img {
  display: block;
  width: 100%;
  height: 420px;
  object-fit: cover;
}

/* Dark overlay: hidden until the pin is hovered */
.overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  opacity: 0;
  transition: opacity 0.15s;
}

/* TRIGGER: hover ON the pin shows the overlay */
.pin:hover .overlay {
  opacity: 1;
}

/* Board button, top left */
.board {
  position: absolute;
  top: 10px;
  left: 10px;
  padding: 0.7rem 1rem;
  border-radius: 16px;
  font-size: 0.95rem;
  font-weight: 700;
  color: #fff;
  cursor: pointer;
  transition: background 0.15s;
}

/* TRIGGER: hover ON the Board button shows a gray background */
.board:hover {
  background: rgba(80, 80, 80, 0.85);
}

/* Red Save button, top right */
.save-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 0.7rem 1rem;
  border-radius: 16px;
  background: var(--red);
  color: #fff;
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  transition: background 0.15s;
}

/* TRIGGER: hover ON the Save button makes it darker red */
.save-btn:hover {
  background: var(--red-dark);
}

/* Share icon, bottom right */
.share {
  position: absolute;
  right: 12px;
  bottom: 12px;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: #fff;
  color: #000;
  font-weight: 700;
  line-height: 32px;
  text-align: center;
}

/* Hidden checkbox: this is what remembers the "saved" state */
.save-check {
  position: absolute;
  top: 0;
  left: 0;
  margin: 0;
  opacity: 0;
  pointer-events: none;
}

/* "Saved" text is hidden until the pin is saved */
.saved-text {
  display: none;
}

/* TRIGGER: click ON the Save button checks the checkbox */
.save-check:checked + .overlay .save-btn {
  background: #000;
}

.save-check:checked + .overlay .save-text {
  display: none;
}

.save-check:checked + .overlay .saved-text {
  display: inline;
}

.save-check:checked + .overlay .arrow {
  display: none;
}

.save-check:checked + .overlay .board {
  text-decoration: underline;
}

/* Keyboard users: Tab to the pin shows the overlay too */
.save-check:focus-visible + .overlay {
  opacity: 1;
}

.save-check:focus-visible + .overlay .save-btn {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

/* MODE: touch screens have no hover, so always show the overlay */
@media (hover: none) {
  .overlay {
    opacity: 1;
  }
}

.hint {
  margin: 1rem 0 0;
  font-size: 0.8rem;
  color: var(--muted);
}
