/* =========================================================================
   Tool Wall — light, papery, exhibition feel
   --------------------------------------------------------------------------
   The "show-and-tell" face of the session. Cream paper, generous whitespace,
   Georgia headlines, cards as pinned Polaroid-ish notes with subtle
   rotations and a small green pin in the top-right of each.
   --------------------------------------------------------------------------
   Colour: CQU primary (Dark Green / Hero Green) anchors. Tertiary colours
           used as category tints so the wall scans visually. Body on cream.
   ========================================================================= */

:root {
  --green-dark:  #1f4040;
  --green-hero:  #c7db5c;
  --green-pale:  #dfe99a;
  --grey-body:   #575756;
  --paper:       #faf7ed;
  --paper-line:  rgba(31, 64, 64, 0.06);

  /* Category tints (CQU tertiary palette) */
  --cat-study:        #c7e7e4;
  --cat-writing:      #ffd36c;
  --cat-coding:       #d92d4b;
  --cat-coding-text:  #ffffff;
  --cat-research:     #b2d9f4;
  --cat-creative:     #a85b8b;
  --cat-creative-text:#ffffff;
  --cat-productivity: #f9a261;
  --cat-other:        #dcc4df;

  --serif: Georgia, "Fields", "Times New Roman", serif;
  --sans:  Tahoma, "Noto Sans", Verdana, sans-serif;
  --mono:  ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  background: var(--paper);
  color: var(--green-dark);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Faint horizontal-rule paper texture (matches the landing page) */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: repeating-linear-gradient(
    to bottom,
    transparent 0,
    transparent 31px,
    var(--paper-line) 31px,
    var(--paper-line) 32px
  );
  z-index: 0;
}

main.page {
  position: relative;
  z-index: 1;
  max-width: 1280px;
  margin: 0 auto;
  padding: 32px 32px 48px;
}

/* ---------- masthead ---------- */

.back-link {
  display: inline-block;
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--green-dark);
  text-decoration: none;
  margin-bottom: 32px;
  padding: 6px 12px 6px 6px;
  border-radius: 999px;
  transition: background 0.2s;
}

.back-link:hover {
  background: var(--green-hero);
}

.masthead {
  margin-bottom: 56px;
}

.masthead-grid {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 32px;
  align-items: end;
}

.eyebrow {
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--green-dark);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
}

.eyebrow .dot {
  width: 7px;
  height: 7px;
  background: var(--green-hero);
  border-radius: 50%;
  box-shadow: 0 0 0 0 rgba(199, 219, 92, 0.7);
  animation: pulse 2.4s ease-out infinite;
}

@keyframes pulse {
  0%   { box-shadow: 0 0 0 0    rgba(199, 219, 92, 0.7); }
  70%  { box-shadow: 0 0 0 10px rgba(199, 219, 92, 0);   }
  100% { box-shadow: 0 0 0 0    rgba(199, 219, 92, 0);   }
}

.title {
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(56px, 10vw, 132px);
  line-height: 0.92;
  letter-spacing: -0.02em;
  color: var(--green-dark);
  margin-bottom: 18px;
}

.title em {
  font-style: italic;
  font-weight: 400;
  color: var(--green-dark);
  -webkit-text-stroke: 1px var(--green-dark);
  paint-order: stroke fill;
}

.lede {
  font-family: var(--serif);
  font-size: clamp(16px, 1.4vw, 19px);
  line-height: 1.5;
  color: var(--grey-body);
  max-width: 520px;
}

.lede strong {
  color: var(--green-dark);
  font-weight: 700;
}

.counter {
  text-align: right;
  font-family: var(--serif);
  color: var(--green-dark);
  border: 1px solid var(--green-dark);
  border-radius: 4px;
  padding: 16px 24px;
  background: #ffffff;
  position: relative;
  transform: rotate(2deg);
}

.counter::before {
  /* Pin */
  content: "";
  position: absolute;
  top: -6px;
  right: 18px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #ffffff 0%, var(--green-hero) 55%, var(--green-dark) 90%);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.counter-num {
  font-size: 64px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.04em;
}

.counter-label {
  font-family: var(--sans);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--grey-body);
  margin-top: 4px;
  line-height: 1.2;
}

@media (max-width: 720px) {
  .masthead-grid { grid-template-columns: 1fr; }
  .counter { justify-self: start; transform: rotate(-1.5deg); }
}

/* ---------- two-column layout ---------- */

.layout {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 40px;
  align-items: start;
  margin-bottom: 56px;
}

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

/* ---------- composer (left column, sticky) ---------- */

.composer {
  position: sticky;
  top: 24px;
  background: #ffffff;
  border: 1px solid rgba(31, 64, 64, 0.18);
  border-radius: 6px;
  padding: 28px 26px 22px;
  box-shadow: 0 12px 24px -16px rgba(31, 64, 64, 0.25),
              0 1px 0 rgba(31, 64, 64, 0.04);
}

.composer-title {
  font-family: var(--serif);
  font-size: 28px;
  font-weight: 700;
  color: var(--green-dark);
  margin-bottom: 6px;
}

.composer-blurb {
  font-family: var(--serif);
  font-size: 14px;
  font-style: italic;
  color: var(--grey-body);
  margin-bottom: 22px;
  line-height: 1.45;
}

.form { display: flex; flex-direction: column; gap: 14px; }

.field { display: flex; flex-direction: column; gap: 6px; }

.field label {
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--green-dark);
}

.field label .optional {
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
  color: var(--grey-body);
  font-size: 11px;
}

.field input,
.field textarea {
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.5;
  color: var(--green-dark);
  background: var(--paper);
  border: 1px solid rgba(31, 64, 64, 0.22);
  border-radius: 4px;
  padding: 10px 12px;
  outline: none;
  transition: border-color 0.18s, background 0.18s, box-shadow 0.18s;
  width: 100%;
  resize: vertical;
}

.field input:focus,
.field textarea:focus {
  border-color: var(--green-dark);
  background: #ffffff;
  box-shadow: 0 0 0 3px var(--green-hero);
}

.field input::placeholder,
.field textarea::placeholder {
  color: rgba(87, 87, 86, 0.7);
  font-style: italic;
}

.submit-btn {
  margin-top: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  padding: 14px 20px;
  background: var(--green-dark);
  color: #ffffff;
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.18s, transform 0.18s;
}

.submit-btn:hover:not(:disabled) {
  background: var(--green-hero);
  color: var(--green-dark);
}

.submit-btn:hover:not(:disabled) .submit-arrow {
  transform: translateX(4px);
}

.submit-btn:disabled {
  background: var(--grey-body);
  cursor: wait;
}

.submit-btn .submit-arrow {
  font-size: 18px;
  transition: transform 0.18s;
}

.status {
  font-family: var(--serif);
  font-size: 13px;
  font-style: italic;
  line-height: 1.4;
  min-height: 1.4em;
  margin-top: 4px;
  color: var(--grey-body);
}

.status.polishing {
  color: var(--green-dark);
  position: relative;
  padding-left: 18px;
}
.status.polishing::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--green-hero);
  animation: polishing-pulse 1s ease-in-out infinite;
}
@keyframes polishing-pulse {
  0%, 100% { transform: translateY(-50%) scale(1);   opacity: 0.5; }
  50%      { transform: translateY(-50%) scale(1.4); opacity: 1; }
}

.status.posted {
  color: var(--green-dark);
  font-style: normal;
  font-weight: 700;
}
.status.rejected,
.status.error {
  color: #d92d4b;
}

.composer-fineprint {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px dashed rgba(31, 64, 64, 0.2);
  font-family: var(--sans);
  font-size: 11px;
  line-height: 1.5;
  color: var(--grey-body);
}

@media (max-width: 900px) {
  .composer { position: static; }
}

/* ---------- wall (right column, masonry) ---------- */

.wall { min-height: 200px; }

.wall-grid {
  column-width: 280px;
  column-gap: 20px;
  /* Padding so rotated cards never clip at the column edges */
  padding: 6px;
}

.empty-state {
  font-family: var(--serif);
  font-size: 18px;
  line-height: 1.6;
  color: var(--grey-body);
  text-align: center;
  padding: 48px 24px;
  border: 2px dashed rgba(31, 64, 64, 0.2);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.5);
}

.empty-state em {
  display: block;
  font-size: 22px;
  color: var(--green-dark);
  margin-bottom: 4px;
}

.empty-state.error em { color: #d92d4b; }

/* Each card is rendered with --rot set inline (-2 to +2 deg). */

.card {
  --rot: 0deg;
  position: relative;
  display: inline-block;
  width: 100%;
  break-inside: avoid;
  margin: 0 0 22px;
  background: #ffffff;
  border: 1px solid rgba(31, 64, 64, 0.16);
  border-radius: 4px;
  padding: 18px 18px 16px;
  box-shadow: 0 1px 0 rgba(31, 64, 64, 0.04),
              0 8px 18px -10px rgba(31, 64, 64, 0.25);
  transform: rotate(var(--rot));
  transition: transform 0.3s cubic-bezier(0.2, 0.7, 0.2, 1),
              box-shadow 0.3s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.card:hover {
  transform: rotate(0deg) translateY(-2px);
  box-shadow: 0 1px 0 rgba(31, 64, 64, 0.04),
              0 14px 26px -10px rgba(31, 64, 64, 0.32);
  z-index: 2;
}

/* Pin on every card */
.card::before {
  content: "";
  position: absolute;
  top: -5px;
  right: 18px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #ffffff 0%, var(--green-hero) 55%, var(--green-dark) 90%);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.35),
              inset -1px -1px 1px rgba(0, 0, 0, 0.15);
  z-index: 3;
}

.cat-pill {
  display: inline-block;
  padding: 3px 10px;
  font-family: var(--sans);
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  border-radius: 999px;
  background: var(--green-pale);
  color: var(--green-dark);
  margin-bottom: 10px;
}

.card-name {
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 700;
  line-height: 1.15;
  color: var(--green-dark);
  margin-bottom: 6px;
  word-break: break-word;
}

.card-tagline {
  font-family: var(--serif);
  font-style: italic;
  font-size: 14px;
  line-height: 1.45;
  color: var(--grey-body);
  margin-bottom: 10px;
}

.card-usecase {
  font-family: var(--sans);
  font-size: 12px;
  line-height: 1.5;
  color: var(--grey-body);
  padding-top: 8px;
  border-top: 1px dashed rgba(31, 64, 64, 0.18);
  margin-bottom: 8px;
}

.card-usecase::before {
  content: "used for ";
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-size: 10px;
  color: var(--green-dark);
}

.card-link {
  display: inline-block;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--green-dark);
  text-decoration: none;
  word-break: break-all;
  margin-top: 4px;
  padding: 2px 0;
  border-bottom: 1px solid var(--green-hero);
  transition: background 0.15s;
}
.card-link:hover {
  background: var(--green-hero);
}

/* Pin-in animation for newly-posted cards. */

.card--new {
  animation: pin-in 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) backwards;
}

@keyframes pin-in {
  0% {
    opacity: 0;
    transform: rotate(0deg) scale(0.6) translateY(-40px);
  }
  55% {
    opacity: 1;
    transform: rotate(calc(var(--rot) * 1.6)) scale(1.06) translateY(0);
  }
  100% {
    opacity: 1;
    transform: rotate(var(--rot)) scale(1);
  }
}

@media (prefers-reduced-motion: reduce) {
  .card { transition: none; }
  .card--new { animation: none; }
  .eyebrow .dot { animation: none; }
  .status.polishing::before { animation: none; }
}

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

.page-foot {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px dashed var(--green-dark);
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: space-between;
  align-items: baseline;
  font-size: 13px;
  color: var(--grey-body);
}

.page-foot a {
  color: var(--green-dark);
  font-weight: 700;
  text-decoration: underline;
  text-decoration-color: var(--green-hero);
  text-underline-offset: 3px;
  text-decoration-thickness: 2px;
}

.accreditation {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.06em;
}
