/* ============================================
   STUDIO-ATELIER — Shared design system
   ============================================ */

:root {
  --cream: #ece9db;
  --cream-dark: #dfdccb;
  --ink: #171a26;
  --ink-soft: #454a5c;
  --line: #171a26;
  --accent: #cde6d8;
  --rust: #db7851;
  --serif: Georgia, "Iowan Old Style", "Palatino Linotype", "Book Antiqua", serif;
  --tracking-wide: 0.04em;
  --max-width: 1200px;
}

* {
  box-sizing: border-box;
  accent-color: var(--accent);
}

/* Every highlight state on the site — text selection, focus rings, native
   form-control accents, editable-field outlines — uses this one light
   seafoam color, never a browser-default blue. */
::selection {
  background: var(--accent);
  color: var(--ink);
}

html, body {
  margin: 0;
  padding: 0;
}

body {
  background: var(--cream);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

img {
  max-width: 100%;
  display: block;
}

.wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 40px;
}

/* ---------- Header ---------- */

.site-header {
  padding: 60px 40px 20px;
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0;
}

.logo {
  display: flex;
  align-items: center;
  gap: 14px;
}

.logo-mark {
  width: 20px;
  height: 26px;
  flex-shrink: 0;
}

.logo-word {
  font-style: italic;
  font-weight: 700;
  letter-spacing: var(--tracking-wide);
  font-size: 1.05rem;
  white-space: nowrap;
}

.logo-context {
  font-style: normal;
  font-weight: 400;
  color: var(--ink-soft);
  margin-left: 6px;
}

.main-nav {
  display: flex;
  gap: 40px;
  font-style: italic;
  font-size: 1.05rem;
}

.main-nav a {
  border-bottom: 1px solid transparent;
  padding-bottom: 2px;
  transition: border-color 0.15s ease;
}

.main-nav a:hover,
.main-nav a.active {
  border-bottom-color: var(--ink);
}

.header-rule {
  border: none;
  border-top: 1px solid var(--line);
  margin: 24px 0 0;
}

.header-rule-inset {
  margin-left: 0;
  width: 100%;
}

/* ---------- Section divider with ribbon glyph ---------- */

.section-rule {
  display: flex;
  align-items: center;
  gap: 0;
  margin: 60px 0 40px;
}

.section-rule .rule-line {
  flex: 1;
  border: none;
  border-top: 1px solid var(--line);
}

.section-rule .rule-label {
  font-style: italic;
  font-weight: 700;
  letter-spacing: var(--tracking-wide);
  white-space: nowrap;
  padding: 0 4px;
  text-transform: uppercase;
  font-size: 0.85rem;
}

.section-rule.label-left .rule-label {
  padding-left: 0;
}

.section-rule.label-right .rule-label {
  padding-right: 0;
}

.section-toggle {
  background: none;
  border: none;
  font-family: var(--serif);
  font-size: 1.2rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  color: var(--ink);
  padding: 0 0 0 16px;
  flex-shrink: 0;
}

.ribbon {
  width: 26px;
  height: 26px;
  flex-shrink: 0;
}

/* ---------- Buttons & inputs ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--ink);
  color: var(--cream);
  font-family: var(--serif);
  font-style: italic;
  font-weight: 700;
  letter-spacing: var(--tracking-wide);
  font-size: 0.95rem;
  padding: 22px 32px;
  border: none;
  cursor: pointer;
  text-transform: uppercase;
  text-align: center;
}

.btn:hover {
  background: #262b3d;
}

/* A small, deliberately narrow accent — reserved for anything that leads
   to /join (the site's one conversion action), never used elsewhere.
   Text switches to --ink on hover too — cream-on-rust reads too low
   contrast to stay legible. */
.btn[href="join.html"]:hover,
.booking-submit.join-btn:hover {
  background: var(--rust);
  color: var(--ink);
}

a[href="join.html"]:hover {
  color: var(--rust);
}

/* The +/- toggles on join.html's Become a Creator / Become a Collector
   sections — scoped to just this page via .join-toggle, not all
   .section-toggle buttons site-wide. */
.join-toggle:hover {
  color: var(--rust);
}

.btn.btn-block {
  width: 100%;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.field {
  width: 100%;
  background: var(--cream);
  border: 1px solid var(--line);
  padding: 20px 18px;
  font-family: var(--serif);
  font-size: 0.95rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--ink);
}

.field::placeholder {
  color: #8b8975;
  text-transform: uppercase;
}

.field:focus {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}

input:focus,
select:focus,
textarea:focus {
  outline-color: var(--accent);
}

/* contenteditable fields (e.g. dashboard "Edit Profile" fields) while
   actively editable — same light seafoam highlight as every other
   focus/accent state on the site. */
.editable-field[contenteditable="true"] {
  outline: 1px dashed var(--accent);
  padding: 6px 8px;
  background: rgba(205, 230, 216, 0.15);
}

/* ---------- Image placeholder block ---------- */

.imgblock {
  background: var(--ink);
  color: var(--cream);
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  font-style: italic;
  font-size: 0.9rem;
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  aspect-ratio: 1 / 1;
}

.imgblock::before,
.imgblock::after {
  content: "";
  position: absolute;
  width: 140%;
  border-top: 1px solid rgba(233, 231, 216, 0.6);
  left: -20%;
}

.imgblock::before {
  top: 30%;
  transform: rotate(-32deg);
}

.imgblock::after {
  bottom: 30%;
  transform: rotate(-32deg);
}

.imgblock.tall {
  aspect-ratio: 3 / 4;
}

.imgblock.wide {
  aspect-ratio: 16 / 10;
}

/* ---------- Footer ---------- */

.site-footer {
  padding: 60px 40px 80px;
}

.footer-rule {
  display: flex;
  align-items: center;
  border: none;
  border-top: 1px solid var(--line);
  position: relative;
  margin: 0;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 24px;
  font-style: italic;
}

.mail-icon {
  width: 28px;
  height: 21.5px;
}

/* ---------- Utility ---------- */

.text-soft {
  color: var(--ink-soft);
}

.creator-card {
  display: block;
}

.italic-label {
  font-style: italic;
  font-weight: 700;
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
}

.grid {
  display: grid;
  gap: 24px;
}

.grid-3 {
  grid-template-columns: repeat(3, 1fr);
}

.grid-2 {
  grid-template-columns: repeat(2, 1fr);
}

/* ---------- Custom date / time pickers ----------
   Native <input type="date">/<input type="time"> open an OS-drawn popup
   that ignores page CSS entirely (that's the blue you see on some
   platforms) — these classes back a fully brand-colored replacement. */

.calendar-panel {
  display: none;
  border: 1px solid var(--line);
  padding: 20px 24px 24px;
  background: var(--cream);
  position: relative;
  z-index: 5;
}

.calendar-panel.open { display: block; }

.calendar-month {
  font-weight: bold;
  margin-bottom: 12px;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 10px;
  text-align: center;
  max-width: 420px;
}

.calendar-grid .dow {
  font-weight: bold;
  font-size: 0.85rem;
}

.calendar-grid .day {
  width: 32px;
  height: 32px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border-radius: 50%;
  box-sizing: border-box;
}

.calendar-grid .day.past {
  color: #b9b6a2;
  text-decoration: line-through;
  cursor: default;
}

.calendar-grid .day.selected {
  background: var(--accent);
  color: var(--ink);
  font-weight: bold;
}

.calendar-grid .day.empty { cursor: default; }

/* A day the creator has opened up (dashboard) or that a collector can
   actually pick (profile) — vs. one with no availability at all. */
.calendar-grid .day.unavailable {
  color: #b9b6a2;
  cursor: default;
}

.calendar-grid .day.editing {
  outline: 2px solid var(--ink);
  outline-offset: -2px;
}

/* Per-day time-slot toggles in the dashboard's Availability editor */
.avail-time-chip {
  font-family: var(--serif);
  font-size: 0.8rem;
  letter-spacing: 0.02em;
  border: 1px solid var(--line);
  background: var(--cream);
  color: var(--ink);
  padding: 8px 6px;
  width: 100%;
  text-align: center;
  cursor: pointer;
}

.avail-time-chip.active {
  background: var(--accent);
}

.calendar-actions {
  display: flex;
  justify-content: flex-end;
  gap: 16px;
  margin-top: 20px;
}

.calendar-actions a, .calendar-actions button {
  font-family: var(--serif);
  font-style: italic;
  font-size: 0.9rem;
  background: none;
  border: none;
  cursor: pointer;
}

.calendar-actions button {
  background: var(--ink);
  color: var(--cream);
  padding: 8px 20px;
}

.time-panel {
  display: none;
  border: 1px solid var(--line);
  border-top: none;
  max-height: 240px;
  overflow-y: auto;
  background: var(--cream);
  position: relative;
  z-index: 5;
}

.time-panel.open { display: block; }

.time-panel .time-option {
  padding: 10px 20px;
  cursor: pointer;
  font-family: var(--serif);
  font-size: 0.9rem;
}

.time-panel .time-option:hover,
.time-panel .time-option.selected {
  background: var(--accent);
}

@media (max-width: 900px) {
  .grid-3, .grid-2 {
    grid-template-columns: 1fr;
  }
  .main-nav {
    gap: 20px;
    font-size: 0.9rem;
  }
  .site-header, .site-footer {
    padding-left: 20px;
    padding-right: 20px;
  }
  .wrap {
    padding: 0 20px;
  }
}
