/* ============================================================
   THE PERIODIC — offerings.css
   ============================================================ */

:root {
  --ink:          #1c1a17;
  --paper:        #f7f4ef;
  --muted:        #6e6860;
  --rule:         #d6d1c8;
  --accent:       #7d4060;
  --accent-light: #f2e8ed;

  --step--2: clamp(0.69rem, 0.66rem + 0.18vw, 0.80rem);
  --step--1: clamp(0.83rem, 0.78rem + 0.29vw, 1.00rem);
  --step-0:  clamp(1.00rem, 0.91rem + 0.43vw, 1.25rem);
  --step-1:  clamp(1.20rem, 1.07rem + 0.63vw, 1.56rem);
  --step-2:  clamp(1.44rem, 1.26rem + 0.89vw, 1.95rem);
  --step-3:  clamp(1.73rem, 1.48rem + 1.24vw, 2.44rem);
  --step-4:  clamp(2.07rem, 1.73rem + 1.70vw, 3.05rem);

  --space-xs:  clamp(0.75rem, 0.69rem + 0.29vw, 0.938rem);
  --space-s:   clamp(1.00rem, 0.91rem + 0.43vw, 1.25rem);
  --space-m:   clamp(1.50rem, 1.36rem + 0.65vw, 1.875rem);
  --space-l:   clamp(2.00rem, 1.82rem + 0.87vw, 2.50rem);
  --space-xl:  clamp(3.00rem, 2.74rem + 1.30vw, 3.75rem);
  --space-2xl: clamp(4.00rem, 3.65rem + 1.74vw, 5.00rem);
}

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

body {
  font-family: 'EB Garamond', Georgia, serif;
  font-size: var(--step-0);
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

h1 { font-size: var(--step-3); font-weight: 500; margin: 0 0 var(--space-xs); line-height: 1.15; }
h2 { font-size: var(--step-1); font-weight: 500; margin: 0 0 var(--space-xs); }
p  { margin: 0 0 var(--space-s); }
a  { color: var(--accent); text-decoration: underline; text-decoration-thickness: 1px; }
a:hover { text-decoration: none; }

.site-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: var(--space-s) var(--space-l);
  border-bottom: 1px solid var(--rule);
}

.wordmark {
  font-family: 'EB Garamond', Georgia, serif;
  font-size: var(--step-1);
  font-style: italic;
  color: var(--ink);
  text-decoration: none;
}

.site-nav {
  display: flex;
  align-items: baseline;
  gap: var(--space-s);
  font-family: 'DM Sans', sans-serif;
  font-size: var(--step--1);
}

.nav-link { color: var(--muted); text-decoration: none; }
.nav-link:hover { color: var(--ink); }
.nav-handle { color: var(--muted); }
.nav-link--button {
  background: none; border: none; padding: 0; cursor: pointer;
  font-family: inherit; font-size: inherit; color: var(--accent);
  text-decoration: underline;
}
.nav-link--button:hover { text-decoration: none; }

.content-wrap {
  flex: 1;
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
  padding: var(--space-2xl) var(--space-l);
}

.site-footer {
  padding: var(--space-m) var(--space-l);
  border-top: 1px solid var(--rule);
  font-family: 'DM Sans', sans-serif;
  font-size: var(--step--2);
  color: var(--muted);
  display: flex;
  gap: var(--space-xs);
}
.site-footer a { color: var(--muted); }

.muted { color: var(--muted); }

.notice {
  font-family: 'DM Sans', sans-serif;
  font-size: var(--step--1);
  padding: 0.75em 1em;
  margin-bottom: var(--space-m);
}
.notice--ok   { background: #eaf4ea; color: #2a5c2a; }
.notice--warn { background: var(--accent-light); color: var(--accent); }

/* --- Shared form --- */
.auth-wrap, .form-wrap { max-width: 440px; }

.auth-sub {
  color: var(--muted);
  margin-bottom: var(--space-l);
}

.auth-form, .work-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-s);
}

.auth-form label,
.work-form .field label {
  font-family: 'DM Sans', sans-serif;
  font-size: var(--step--1);
  color: var(--muted);
}

.auth-form input,
.auth-form textarea,
.work-form .field input,
.work-form .field textarea,
.work-form .field select {
  font-family: 'EB Garamond', Georgia, serif;
  font-size: var(--step-0);
  color: var(--ink);
  background: white;
  border: 1px solid var(--rule);
  padding: 0.5em 0.75em;
  width: 100%;
  border-radius: 0;
  transition: border-color 0.15s;
}
.auth-form input:focus,
.work-form .field input:focus,
.work-form .field textarea:focus { outline: none; border-color: var(--accent); }

.field { display: flex; flex-direction: column; gap: 0.3em; }
.field-row { display: flex; gap: var(--space-s); }
.field-row .field { flex: 1; }
.field-label-sub { font-size: var(--step--2); opacity: 0.8; }

.button {
  font-family: 'DM Sans', sans-serif;
  font-size: var(--step--1);
  letter-spacing: 0.05em;
  color: white;
  background: var(--accent);
  border: none;
  padding: 0.75em 1.5em;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  transition: opacity 0.15s;
  align-self: flex-start;
}
.button:hover { opacity: 0.85; }

.btn-cancel {
  font-family: 'DM Sans', sans-serif;
  font-size: var(--step--1);
  color: var(--muted);
  text-decoration: none;
  align-self: flex-start;
}
.btn-cancel:hover { color: var(--ink); }

/* --- Home --- */
.home-wrap { max-width: 640px; }
.lead { font-size: var(--step-1); margin-bottom: var(--space-xl); }

.call-list { list-style: none; padding: 0; margin: 0 0 var(--space-xl); }
.call-item {
  padding: var(--space-m) 0;
  border-top: 1px solid var(--rule);
}
.call-item:last-child { border-bottom: 1px solid var(--rule); }
.call-title { font-size: var(--step-1); color: var(--ink); text-decoration: none; display: block; margin-bottom: 0.2em; }
.call-title:hover { color: var(--accent); }
.call-date { font-family: 'DM Sans', sans-serif; font-size: var(--step--1); color: var(--muted); }
.call-desc { color: var(--muted); margin-top: 0.4em; }

.how-list { padding-left: var(--space-m); margin-bottom: var(--space-l); }
.how-list li { margin-bottom: var(--space-xs); }

/* --- Portfolio --- */
.portfolio-wrap { max-width: 640px; }
.portfolio-header { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: var(--space-l); }

.work-list { list-style: none; padding: 0; margin: 0; }
.work-item {
  padding: var(--space-m) 0;
  border-top: 1px solid var(--rule);
}
.work-item:last-child { border-bottom: 1px solid var(--rule); }
.work-header { display: flex; gap: var(--space-s); align-items: baseline; margin-bottom: 0.3em; }
.work-title { font-size: var(--step-1); }
.work-year, .work-medium { font-family: 'DM Sans', sans-serif; font-size: var(--step--1); color: var(--muted); }
.work-desc { color: var(--muted); margin-top: 0.3em; }

.file-list { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: var(--space-xs); margin-top: var(--space-xs); }
.file-thumb { max-height: 120px; max-width: 160px; object-fit: cover; display: block; }
.file-link { font-family: 'DM Sans', sans-serif; font-size: var(--step--1); }

/* --- Call detail --- */
.call-wrap { max-width: 640px; }
.call-meta { font-family: 'DM Sans', sans-serif; font-size: var(--step--1); color: var(--muted); margin-bottom: var(--space-l); }
.call-description { margin-bottom: var(--space-l); }
.call-media { font-family: 'DM Sans', sans-serif; font-size: var(--step--1); color: var(--muted); margin-bottom: var(--space-l); }
.label { text-transform: uppercase; letter-spacing: 0.05em; font-size: var(--step--2); }
.call-cta { margin-top: var(--space-l); }

.offering-form-section { margin-top: var(--space-xl); }
.offering-form { display: flex; flex-direction: column; gap: var(--space-m); }
.offering-form button {
  font-family: 'DM Sans', sans-serif; font-size: var(--step--1); letter-spacing: 0.05em;
  color: white; background: var(--accent); border: none; padding: 0.75em 1.5em;
  cursor: pointer; align-self: flex-start; transition: opacity 0.15s;
}
.offering-form button:hover { opacity: 0.85; }

.work-checkbox { display: flex; align-items: center; gap: var(--space-xs); margin-bottom: 0.4em; }
.work-checkbox input[type="checkbox"] { accent-color: var(--accent); }

.checkbox-group { display: flex; flex-wrap: wrap; gap: var(--space-s); margin-top: 0.3em; }
.checkbox-label { display: flex; align-items: center; gap: 0.4em; font-size: var(--step-0); }

/* --- Editor --- */
.editor-wrap { max-width: 860px; }

.editor-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: var(--space-xl);
}

.editor-meta {
  display: flex;
  align-items: center;
  gap: var(--space-m);
  font-family: 'DM Sans', sans-serif;
  font-size: var(--step--1);
}

.editor-section { margin-bottom: var(--space-xl); }
.section-header { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: var(--space-m); }

.back-link {
  font-family: 'DM Sans', sans-serif;
  font-size: var(--step--1);
  color: var(--muted);
  text-decoration: none;
  display: block;
  margin-bottom: var(--space-s);
}
.back-link:hover { color: var(--ink); }

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--step--1);
  font-family: 'DM Sans', sans-serif;
}
.data-table th {
  text-align: left;
  padding: 0.5em var(--space-s);
  border-bottom: 2px solid var(--rule);
  color: var(--muted);
  font-weight: 400;
  letter-spacing: 0.03em;
}
.data-table td {
  padding: 0.6em var(--space-s);
  border-bottom: 1px solid var(--rule);
}
.data-table a { color: var(--ink); }

.status-badge {
  font-family: 'DM Sans', sans-serif;
  font-size: var(--step--2);
  padding: 0.2em 0.6em;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.status-received   { background: #eee; color: #555; }
.status-reviewing  { background: #fef3cd; color: #7a5c00; }
.status-shortlisted{ background: #ddeeff; color: #1a4070; }
.status-accepted   { background: #eaf4ea; color: #2a5c2a; }
.status-declined   { background: #fce8e8; color: #8b2020; }
.status-open       { background: #eaf4ea; color: #2a5c2a; }
.status-draft      { background: #eee; color: #555; }
.status-closed     { background: #fce8e8; color: #8b2020; }

/* --- Offering card --- */
.offering-card {
  padding: var(--space-l) 0;
  border-top: 1px solid var(--rule);
}
.offering-card:last-child { border-bottom: 1px solid var(--rule); }

.offering-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: var(--space-s);
}

.offering-statement {
  background: white;
  border-left: 2px solid var(--rule);
  padding: var(--space-s) var(--space-m);
  margin-bottom: var(--space-s);
  font-style: italic;
}

.offering-work-list { list-style: none; padding: 0; margin: 0 0 var(--space-m); }
.offering-work-item {
  padding: 0.4em 0;
  border-bottom: 1px solid var(--rule);
  font-family: 'DM Sans', sans-serif;
  font-size: var(--step--1);
}

.status-form {
  display: flex;
  gap: var(--space-s);
  align-items: flex-start;
  flex-wrap: wrap;
  margin-top: var(--space-s);
}
.status-form select {
  font-family: 'DM Sans', sans-serif;
  font-size: var(--step--1);
  border: 1px solid var(--rule);
  padding: 0.4em 0.6em;
  background: white;
}
.status-form textarea {
  font-family: 'EB Garamond', Georgia, serif;
  font-size: var(--step-0);
  border: 1px solid var(--rule);
  padding: 0.4em 0.6em;
  flex: 1;
  min-width: 200px;
  resize: vertical;
}
.status-form button {
  font-family: 'DM Sans', sans-serif; font-size: var(--step--1);
  background: var(--accent); color: white; border: none;
  padding: 0.5em 1em; cursor: pointer;
}
