/* Creative Church graphic request form. Season look: high-church art beside deep earth green,
   warm gold accents, cream type. Headings The Picnic Club, body Public Sans. */

@font-face { font-family: "Picnic Club"; src: url(fonts/ThePicnicClub-Regular.woff2) format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Picnic Club"; src: url(fonts/ThePicnicClub-Italic.woff2) format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Public Sans"; src: url(fonts/PublicSans-Regular.woff2) format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Public Sans"; src: url(fonts/PublicSans-Medium.woff2) format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Public Sans"; src: url(fonts/PublicSans-SemiBold.woff2) format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Public Sans"; src: url(fonts/PublicSans-Bold.woff2) format("woff2"); font-weight: 700; font-display: swap; }

:root {
  color-scheme: dark;
  --ground: #1c251c;
  --ground-deep: #161e16;
  --field: #222d22;
  --field-hover: #263226;
  --gold: #d1a96e;
  --gold-bright: #e0bd88;
  --gold-wash: rgba(209, 169, 110, 0.12);
  --cream: #f2e9d8;
  --cream-dim: rgba(242, 233, 216, 0.7);
  --cream-faint: rgba(242, 233, 216, 0.45);
  --line: rgba(242, 233, 216, 0.16);
  --line-strong: rgba(242, 233, 216, 0.3);
  --error: #f2a488;
  --radius: 6px;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --display: "Picnic Club", "Iowan Old Style", Georgia, serif;
  --body: "Public Sans", "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--ground);
  color: var(--cream);
  font: 400 1.0625rem/1.55 var(--body);
  -webkit-font-smoothing: antialiased;
}
/* Aged plaster: a very light grain over the whole ground. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.09;
  mix-blend-mode: soft-light;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 .95 0 0 0 0 .85 0 0 0 1.2 -.1'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
/* A soft, broad mottling on top of the grain so the flat green reads as a wall, not a screen. */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(60% 45% at 85% 10%, rgba(209, 169, 110, 0.05), transparent 70%),
    radial-gradient(70% 60% at 20% 100%, rgba(0, 0, 0, 0.22), transparent 70%);
}

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
[hidden] { display: none !important; }

/* Layout: art on top for phones (like the tall formats), art beside the form from 960px. */
.page { position: relative; z-index: 1; min-height: 100vh; }
.art { margin: 0; height: 34vh; min-height: 200px; max-height: 300px; overflow: hidden; border-bottom: 1px solid rgba(209, 169, 110, 0.35); }
.art img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; }
.main { padding: 0 16px; max-width: 680px; margin: 0 auto; }

@media (min-width: 960px) {
  .page { display: grid; grid-template-columns: minmax(340px, 37%) 1fr; }
  .art { position: sticky; top: 0; height: 100vh; max-height: none; border-bottom: 0; border-right: 1px solid rgba(209, 169, 110, 0.35); }
  .art img { object-position: 50% 40%; }
  .main { padding: 0 clamp(40px, 6vw, 96px); max-width: 760px; margin: 0; width: 100%; justify-self: center; }
}

/* Masthead */
.masthead { text-align: center; padding: 36px 0 8px; }
.smiley {
  display: inline-block; width: 44px; height: 44px; background: var(--gold);
  -webkit-mask: url(img/cc-smiley.png) center / contain no-repeat; mask: url(img/cc-smiley.png) center / contain no-repeat;
}
.poster {
  font-family: var(--display); font-weight: 400; text-transform: uppercase; color: var(--gold);
  font-size: clamp(2.6rem, 11vw, 4.4rem); line-height: 0.95; letter-spacing: 0.005em; margin: 18px 0 14px;
}
.rule { display: block; width: 72px; height: 1px; background: var(--gold); margin: 0 auto; opacity: 0.9; }
.quiet { font-family: var(--display); font-style: italic; color: var(--gold); font-size: 1.2rem; margin: 14px 0 0; }
@media (min-width: 960px) {
  .masthead { padding-top: 72px; }
  .smiley { width: 52px; height: 52px; }
}
@media (prefers-reduced-motion: no-preference) {
  .masthead { animation: rise 700ms var(--ease) both; }
  @keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
}

.form-intro { color: var(--cream-dim); font-size: 0.98rem; text-align: center; max-width: 34em; margin: 26px auto 8px; }
.req-mark { color: var(--gold); font-weight: 600; }

/* Groups */
.group { padding: 34px 0 6px; border-top: 1px solid var(--line); margin-top: 26px; }
.group:first-of-type { border-top: 0; margin-top: 8px; }
.group-title {
  font-family: var(--display); font-weight: 400; font-size: 1.85rem; line-height: 1.1;
  color: var(--cream); margin: 0 0 20px; padding: 0;
}
.group-title:focus { outline: none; }

.field { margin: 0 0 22px; }
label, .label, .field-legend { display: block; font-weight: 600; font-size: 1rem; margin: 0 0 8px; color: var(--cream); }
.hint { color: var(--cream-dim); font-size: 0.92rem; margin: 8px 0 0; }
.hint-lead { margin: -10px 0 18px; font-size: 1rem; }
.error { color: var(--error); font-size: 0.95rem; font-weight: 500; margin: 8px 0 0; display: flex; gap: 8px; align-items: flex-start; }
.error::before { content: "!"; flex: none; display: inline-grid; place-items: center; width: 18px; height: 18px; margin-top: 2px; border-radius: 50%; border: 1.5px solid currentColor; font-size: 0.75rem; font-weight: 700; }

input[type="text"], input[type="email"], input[type="date"], select, textarea {
  display: block; width: 100%; min-height: 54px; padding: 13px 15px;
  font: inherit; font-size: 1.0625rem; color: var(--cream);
  background: var(--field); border: 1px solid var(--line-strong); border-radius: var(--radius);
  transition: border-color 160ms var(--ease), background-color 160ms var(--ease), box-shadow 160ms var(--ease);
  appearance: none; -webkit-appearance: none;
}
textarea { resize: vertical; min-height: 96px; line-height: 1.5; }
input::placeholder, textarea::placeholder { color: var(--cream-faint); }
input:hover, select:hover, textarea:hover { background: var(--field-hover); border-color: rgba(242, 233, 216, 0.42); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(209, 169, 110, 0.28); background: var(--field-hover); }
input[type="date"] { max-width: 260px; }
input[type="date"]::-webkit-calendar-picker-indicator { filter: invert(0.85) sepia(0.4); cursor: pointer; }
.select-wrap { position: relative; }
.select-wrap::after {
  content: ""; position: absolute; right: 18px; top: 50%; width: 9px; height: 9px; margin-top: -7px;
  border-right: 2px solid var(--gold); border-bottom: 2px solid var(--gold); transform: rotate(45deg); pointer-events: none;
}
select { padding-right: 46px; cursor: pointer; }
select option { background: var(--ground); color: var(--cream); }
.field.has-error input, .field.has-error select, .field.has-error textarea { border-color: var(--error); }

/* Where will it be used: picture tiles */
fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
legend.group-title { float: none; width: 100%; }
.tiles-sub {
  font: 600 0.8rem/1 var(--body); letter-spacing: 0.14em; text-transform: uppercase; color: var(--gold);
  margin: 24px 0 12px; display: flex; align-items: center; gap: 12px;
}
.tiles-sub::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
@media (min-width: 600px) { .tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; } }

.tile { position: relative; margin: 0; font-weight: inherit; cursor: pointer; }
.tile input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.tile-face {
  position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 4px;
  height: 100%; min-height: 132px; padding: 16px 14px 14px;
  background: var(--field); border: 1px solid var(--line); border-radius: 8px;
  transition: border-color 180ms var(--ease), background-color 180ms var(--ease), transform 180ms var(--ease);
}
.tile-icon {
  width: 40px; height: 40px; margin-bottom: 8px; background: var(--cream-dim);
  -webkit-mask: var(--icon) center / contain no-repeat; mask: var(--icon) center / contain no-repeat;
  transition: background-color 180ms var(--ease);
}
.tile-name { font-weight: 600; font-size: 1rem; line-height: 1.25; color: var(--cream); padding-right: 22px; }
.tile-note { font-size: 0.85rem; line-height: 1.35; color: var(--cream-dim); }
.tile-check {
  position: absolute; top: 12px; right: 12px; width: 24px; height: 24px; border-radius: 50%;
  border: 1.5px solid var(--line-strong); transition: background-color 180ms var(--ease), border-color 180ms var(--ease);
}
.tile-check::after {
  content: ""; position: absolute; left: 7.5px; top: 4px; width: 6px; height: 11px;
  border-right: 2.5px solid var(--ground); border-bottom: 2.5px solid var(--ground);
  transform: rotate(45deg) scale(0.4); opacity: 0; transition: transform 180ms var(--ease), opacity 120ms;
}
.tile:hover .tile-face { background: var(--field-hover); border-color: var(--line-strong); }
.tile:hover .tile-icon { background: var(--cream); }
.tile input:checked + .tile-face { background: var(--gold-wash); border-color: var(--gold); box-shadow: inset 0 0 0 1px var(--gold); }
.tile input:checked + .tile-face .tile-icon { background: var(--gold); }
.tile input:checked + .tile-face .tile-check { background: var(--gold); border-color: var(--gold); }
.tile input:checked + .tile-face .tile-check::after { opacity: 1; transform: rotate(45deg) scale(1); }
.tile input:focus-visible + .tile-face { outline: 2px solid var(--gold-bright); outline-offset: 3px; }
.tile:active .tile-face { transform: scale(0.985); }
.tiles-set.has-error .tile-face { border-color: rgba(242, 164, 136, 0.55); }

/* Printed? */
.choice-set { margin-top: 30px; }
.choices { display: flex; flex-wrap: wrap; gap: 10px; }
.choice { position: relative; margin: 0; font-weight: 500; cursor: pointer; }
.choice input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.choice span {
  display: inline-flex; align-items: center; gap: 10px; min-height: 52px; padding: 12px 18px 12px 14px;
  background: var(--field); border: 1px solid var(--line-strong); border-radius: 999px;
  transition: border-color 160ms var(--ease), background-color 160ms var(--ease);
}
.choice span::before {
  content: ""; width: 18px; height: 18px; border-radius: 50%; border: 1.5px solid var(--cream-dim); flex: none;
  transition: box-shadow 160ms var(--ease), border-color 160ms var(--ease);
}
.choice:hover span { background: var(--field-hover); }
.choice input:checked + span { border-color: var(--gold); background: var(--gold-wash); }
.choice input:checked + span::before { border-color: var(--gold); box-shadow: inset 0 0 0 4px var(--ground), inset 0 0 0 9px var(--gold); }
.choice input:focus-visible + span { outline: 2px solid var(--gold-bright); outline-offset: 3px; }

/* Files */
.drop {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; text-align: center;
  min-height: 150px; padding: 22px 16px; margin: 0; cursor: pointer; font-weight: 400;
  border: 1.5px dashed rgba(209, 169, 110, 0.55); border-radius: 10px; background: rgba(0, 0, 0, 0.12);
  transition: background-color 180ms var(--ease), border-color 180ms var(--ease);
}
.drop:hover, .drop.is-over { background: var(--gold-wash); border-color: var(--gold); }
#files:focus-visible + .hint, .field:has(#files:focus-visible) .drop { outline: 2px solid var(--gold-bright); outline-offset: 3px; }
.drop-icon {
  width: 34px; height: 34px; background: var(--gold);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 48' fill='none' stroke='%23000' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M24 31V9M15 17l9-9 9 9'/%3E%3Cpath d='M8 30v8a3 3 0 003 3h26a3 3 0 003-3v-8'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 48' fill='none' stroke='%23000' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M24 31V9M15 17l9-9 9 9'/%3E%3Cpath d='M8 30v8a3 3 0 003 3h26a3 3 0 003-3v-8'/%3E%3C/svg%3E") center / contain no-repeat;
}
.drop-text strong { color: var(--gold); font-weight: 600; font-size: 1.05rem; }
.drop-or { color: var(--cream-dim); }
.drop-note { color: var(--cream-dim); font-size: 0.9rem; }
@media (hover: none) { .drop-or { display: none; } }

.file-list, .progress-list { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 8px; }
.file-row {
  display: grid; grid-template-columns: 44px 1fr auto; gap: 12px; align-items: center;
  padding: 10px 10px 10px 10px; background: var(--field); border: 1px solid var(--line); border-radius: var(--radius);
}
.file-thumb { width: 44px; height: 44px; border-radius: 4px; object-fit: cover; background: rgba(0, 0, 0, 0.25); display: grid; place-items: center; font: 700 0.62rem/1 var(--body); letter-spacing: 0.06em; color: var(--gold); text-transform: uppercase; }
.file-meta { min-width: 0; }
.file-name { display: block; font-weight: 500; font-size: 0.95rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-sub { display: block; font-size: 0.85rem; color: var(--cream-dim); }
.file-row.is-bad { border-color: rgba(242, 164, 136, 0.5); }
.file-row.is-bad .file-sub { color: var(--error); white-space: normal; }
.icon-button {
  min-width: 44px; min-height: 44px; padding: 0 12px; border-radius: var(--radius); cursor: pointer;
  font: 600 0.9rem var(--body); color: var(--cream-dim); background: transparent; border: 1px solid transparent;
  transition: color 160ms var(--ease), border-color 160ms var(--ease), background-color 160ms var(--ease);
}
.icon-button:hover { color: var(--cream); border-color: var(--line-strong); }
.icon-button:focus-visible { outline: 2px solid var(--gold-bright); outline-offset: 2px; }

/* Progress rows while files upload */
.prog-row { padding: 12px 14px; background: var(--field); border: 1px solid var(--line); border-radius: var(--radius); }
.prog-top { display: flex; align-items: center; gap: 12px; }
.prog-name { flex: 1; min-width: 0; font-weight: 500; font-size: 0.95rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.prog-status { font-size: 0.88rem; color: var(--cream-dim); white-space: nowrap; }
.prog-bar { margin-top: 10px; height: 4px; border-radius: 4px; background: rgba(242, 233, 216, 0.1); overflow: hidden; }
.prog-fill { height: 100%; width: 0; background: var(--gold); transition: width 200ms linear; }
.prog-row.is-done .prog-status { color: var(--gold); }
.prog-row.is-failed { border-color: rgba(242, 164, 136, 0.5); }
.prog-row.is-failed .prog-fill { background: var(--error); }
.prog-row .error { margin-top: 10px; }
.prog-row .icon-button { color: var(--gold); border-color: rgba(209, 169, 110, 0.5); }

/* Send */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.send { padding: 30px 0 10px; border-top: 1px solid var(--line); margin-top: 26px; }
.form-error { margin: 0 0 16px; }
.button {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%; min-height: 58px; padding: 14px 28px; cursor: pointer;
  font: 700 1.05rem var(--body); letter-spacing: 0.01em; color: var(--ground-deep);
  background: var(--gold); border: 0; border-radius: var(--radius);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.25) inset, 0 10px 24px -14px rgba(0, 0, 0, 0.7);
  transition: background-color 180ms var(--ease), transform 180ms var(--ease), box-shadow 180ms var(--ease);
}
.button:hover { background: var(--gold-bright); box-shadow: 0 1px 0 rgba(255, 255, 255, 0.3) inset, 0 14px 28px -14px rgba(0, 0, 0, 0.8); }
.button:active { transform: translateY(1px); }
.button:focus-visible { outline: 2px solid var(--cream); outline-offset: 3px; }
.button[disabled] { cursor: progress; opacity: 0.75; }
.button.is-busy .button-label::before {
  content: ""; display: inline-block; width: 16px; height: 16px; margin-right: 10px; vertical-align: -3px;
  border: 2px solid rgba(22, 30, 22, 0.35); border-top-color: var(--ground-deep); border-radius: 50%;
  animation: spin 800ms linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.button-quiet { width: auto; background: transparent; color: var(--gold); border: 1px solid rgba(209, 169, 110, 0.6); box-shadow: none; }
.button-quiet:hover { background: var(--gold-wash); border-color: var(--gold); box-shadow: none; }
@media (min-width: 600px) { .send .button { width: auto; min-width: 260px; } }

/* Uploading and done */
.uploading { padding: 40px 0 10px; }
.uploading-actions { margin-top: 20px; }
.uploading-actions .button { margin-top: 12px; }
.done { text-align: center; padding: 56px 0 24px; }
.smiley-lg { width: 64px; height: 64px; }
.poster-done { font-size: clamp(3.2rem, 15vw, 5.6rem); margin: 22px 0 18px; }
.poster-done:focus { outline: none; }
.done-text { font-size: 1.15rem; line-height: 1.6; max-width: 26em; margin: 22px auto 30px; color: var(--cream); }

.foot {
  text-align: center; padding: 40px 0 36px; margin-top: 30px;
  font: 500 0.78rem/1 var(--body); letter-spacing: 0.22em; text-transform: uppercase; color: var(--gold);
}
