/* ===========================================================
   CANISTER — a private viewing log
   Design tokens
   =========================================================== */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,300;0,9..144,500;0,9..144,600;1,9..144,400;1,9..144,500&family=Work+Sans:wght@400;500;600&family=Space+Mono:wght@400;700&display=swap');

:root{
  --paper: #F6F1E4;
  --paper-dim: #EFE8D6;
  --ink-green: #16241C;
  --ink-green-2: #223626;
  --ink-green-3: #2E4634;
  --brass: #A8813F;
  --brass-light: #C9A567;
  --wine: #6D2331;
  --charcoal: #2B2A26;
  --charcoal-soft: #58554C;
  --line: #D9CEB4;
  --line-dark: #3C4E41;

  --display: 'Fraunces', serif;
  --body: 'Work Sans', sans-serif;
  --mono: 'Space Mono', monospace;

  --sidebar-w: 248px;
  --radius: 2px;
}

*{ box-sizing: border-box; }

html{ scroll-behavior: smooth; }

body{
  margin: 0;
  background: var(--paper);
  color: var(--charcoal);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a{ color: inherit; text-decoration: none; }

::selection{ background: var(--brass-light); color: var(--ink-green); }

:focus-visible{
  outline: 2px solid var(--brass);
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce){
  *{ animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* ===========================================================
   Layout
   =========================================================== */

.layout{
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr;
  min-height: 100vh;
}

/* ---------- Sidebar ---------- */

.sidebar{
  background: var(--ink-green);
  color: var(--paper);
  padding: 34px 28px;
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--line-dark);
}

.brand{
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 4px;
}

.brand-mark{ flex: none; }
.brand-mark circle{ stroke: var(--brass-light); }
.brand-mark circle.dot{ fill: var(--brass-light); stroke: none; }

.brand-name{
  font-family: var(--display);
  font-weight: 600;
  font-size: 20px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.brand-tag{
  font-family: var(--mono);
  font-size: 11px;
  color: var(--brass-light);
  letter-spacing: 0.03em;
  margin: 6px 0 34px;
  padding-left: 30px;
}

.nav-list{
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.nav-link{
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 9px 10px;
  border-radius: var(--radius);
  font-size: 15px;
  color: #D9D2BE;
  position: relative;
  transition: background 0.15s ease, color 0.15s ease, padding-left 0.15s ease;
}

.nav-link .idx{
  font-family: var(--mono);
  font-size: 11px;
  color: var(--brass);
  width: 16px;
}

.nav-link:hover{
  background: var(--ink-green-2);
  color: var(--paper);
  padding-left: 14px;
}

.nav-link.is-active{
  background: var(--ink-green-3);
  color: var(--paper);
}

.nav-link.is-active .idx{ color: var(--brass-light); }

.sidebar-footer{
  margin-top: auto;
  padding-top: 22px;
  border-top: 1px solid var(--line-dark);
  font-family: var(--mono);
  font-size: 11px;
  color: #8A9488;
  line-height: 1.7;
}

/* ---------- Main ---------- */

.main{
  padding: 56px 64px 80px;
  max-width: 1180px;
}

.page-header{
  margin-bottom: 44px;
  padding-bottom: 26px;
  border-bottom: 1px solid var(--line);
}

.eyebrow{
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--wine);
  display: flex;
  align-items: center;
  gap: 10px;
}

.eyebrow .rule{
  flex: 1;
  height: 1px;
  background: var(--line);
  max-width: 60px;
}

.page-title{
  font-family: var(--display);
  font-style: italic;
  font-weight: 500;
  font-size: clamp(34px, 4.4vw, 52px);
  margin: 10px 0 12px;
  color: var(--ink-green);
}

.page-desc{
  max-width: 58ch;
  color: var(--charcoal-soft);
  font-size: 15.5px;
}

.count-line{
  font-family: var(--mono);
  font-size: 12px;
  color: var(--brass);
  margin-top: 14px;
}

/* ===========================================================
   Ticket-stub cards (films)
   =========================================================== */

.grid{
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 26px;
}

.stub{
  position: relative;
  background: var(--paper-dim);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px 22px 20px 30px;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.stub:hover{
  transform: translateY(-3px);
  box-shadow: 0 14px 28px -18px rgba(22, 36, 28, 0.45);
  border-color: var(--brass);
}

/* perforated stub edge */
.stub::before{
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 10px;
  background-image: repeating-linear-gradient(
    to bottom,
    var(--paper) 0px,
    var(--paper) 6px,
    transparent 6px,
    transparent 13px
  );
  background-position: left center;
  background-size: 10px 13px;
  background-repeat: repeat-y;
}
.stub::after{
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 9px;
  width: 1px;
  background: repeating-linear-gradient(
    to bottom,
    var(--line) 0 4px,
    transparent 4px 9px
  );
}

.stub-favorite{ border-top: 3px solid var(--wine); }

.stub-head{
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 6px;
}

.stub-title{
  font-family: var(--display);
  font-weight: 600;
  font-size: 19px;
  color: var(--ink-green);
  line-height: 1.25;
}

.stub-year{
  font-family: var(--mono);
  font-size: 12px;
  color: var(--brass);
  white-space: nowrap;
}

.stub-director{
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--charcoal-soft);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin-bottom: 12px;
}

.dots{
  display: flex;
  gap: 5px;
  margin-bottom: 12px;
}

.dot{
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: 1.3px solid var(--brass);
  background: transparent;
}
.dot.filled{ background: var(--brass); }

.stub-note{
  font-size: 13.5px;
  font-style: italic;
  color: var(--charcoal-soft);
  line-height: 1.5;
  margin-bottom: 12px;
}

.stub-meta{
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-green-3);
  padding-top: 10px;
  border-top: 1px dashed var(--line);
}

.stub-meta span b{
  font-weight: 700;
  color: var(--wine);
}

/* ===========================================================
   Actor cards
   =========================================================== */

.actor-grid{
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 22px;
}

.actor-card{
  background: var(--paper-dim);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  text-align: left;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.actor-card:hover{
  transform: translateY(-3px);
  box-shadow: 0 14px 28px -18px rgba(22, 36, 28, 0.45);
  border-color: var(--brass);
}

.avatar{
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--display);
  font-weight: 600;
  font-size: 17px;
  color: var(--paper);
  margin-bottom: 16px;
}

.avatar.c1{ background: var(--ink-green-3); }
.avatar.c2{ background: var(--brass); color: var(--ink-green); }
.avatar.c3{ background: var(--wine); }

.actor-name{
  font-family: var(--display);
  font-weight: 600;
  font-size: 18px;
  color: var(--ink-green);
  margin-bottom: 4px;
}

.actor-role{
  font-family: var(--mono);
  font-size: 11px;
  color: var(--brass);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin-bottom: 12px;
}

.chip-list{
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.chip{
  font-size: 12px;
  padding: 4px 9px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 20px;
  color: var(--charcoal-soft);
}

/* ===========================================================
   Section dividers (Journal / home page groups)
   =========================================================== */

.section-heading{
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin: 46px 0 20px;
}

.section-heading:first-of-type{ margin-top: 0; }

.section-heading h2{
  font-family: var(--display);
  font-style: italic;
  font-weight: 500;
  font-size: 22px;
  color: var(--ink-green);
  margin: 0;
}

.section-heading .rule{
  flex: 1;
  height: 1px;
  background: var(--line);
}

.section-heading .see-all{
  font-family: var(--mono);
  font-size: 11px;
  color: var(--wine);
  text-transform: uppercase;
}
.section-heading .see-all:hover{ text-decoration: underline; }

/* ===========================================================
   Responsive
   =========================================================== */

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

  .sidebar{
    position: relative;
    height: auto;
    padding: 22px 20px;
    border-right: none;
    border-bottom: 1px solid var(--line-dark);
  }

  .brand-tag{ margin-bottom: 18px; }

  .nav-list{ flex-direction: row; flex-wrap: wrap; }

  .sidebar-footer{ display: none; }

  .main{ padding: 40px 22px 60px; }
}
