@import "https://fonts.googleapis.com/css2?family=EB+Garamond:ital,wght@0,400..800;1,400..800&display=swap";

/* app/theme.css */
:root {
  --primary: #275942;
  --primary-dark: #1d4332;
  --secondary: #f2eef7;
  --background: #fffdf7;
  --text: #1c2e24;
  --text-muted: #6b7c72;
  --border: #c8d5cc;
  --border-light: #e0e9e3;
  --error: #7a2828;
  --error-bg: #fdf4f4;
  --error-border: #e8c4c4;
  --success: #1e4532;
  --success-bg: #eef6f1;
  --success-border: #b3d4be;
  --radius: 4px;
  --radius-lg: 10px;
  --transition: .15s ease;
}

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

body {
  background: var(--background);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  font-family: EB Garamond, Georgia, serif;
  font-size: 18px;
  line-height: 1.65;
}

a {
  color: var(--primary);
}

.page {
  display: flex;
  flex-direction: column;
  align-items:  center;
  min-height: 100vh;
}

.page-header {
  text-align: center;
  padding: 3rem 1.5rem 2rem;
}

.page-header__image {
  object-fit: contain;
  width: 80px;
  height: 80px;
}

.page-header__wordmark {
  letter-spacing: .28em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
  font-size: .8rem;
}

.page-header__title {
  color: var(--primary);
  margin: 0 0 .4rem;
  font-size: 2.6rem;
  font-style: italic;
  font-weight: 500;
}

.page-header__subtitle {
  color: var(--text-muted);
  margin: 0;
  font-size: 1.05rem;
}

.page-main {
  width: 100%;
  max-width: 700px;
  padding: 0 1.5rem 5rem;
}

.page-footer {
  display: flex;
  align-items:  center;
  gap: 1.5rem;
  width: 100%;
  max-width: 700px;
  padding: 0 1.5rem 2.5rem;
}

.card {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: #fff;
  margin-bottom: 1.5rem;
  padding: 1.75rem;
}

.section-title {
  color: var(--primary);
  border-bottom: 1px solid var(--border-light);
  margin-bottom: 1.25rem;
  padding-bottom: .75rem;
  font-size: 1.1rem;
  font-weight: 600;
}

.divider {
  border: none;
  border-top: 1px solid var(--border-light);
  margin: 1.75rem 0;
}

.field {
  margin-bottom: 1.25rem;
}

.field:last-child {
  margin-bottom: 0;
}

.label {
  display: block;
  color: var(--text);
  letter-spacing: .01em;
  margin-bottom: .4rem;
  font-size: .9rem;
  font-weight: 600;
}

.label--required:after {
  content: " *";
  color: var(--error);
}

.input, .textarea {
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
  background: #fff;
  width: 100%;
  padding: .6rem .85rem;
  font-family: inherit;
  font-size: 1rem;
}

.input:focus, .textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px #2759421a;
}

.input--error {
  border-color: var(--error) !important;
}

.textarea {
  resize: vertical;
  min-height: 5.5rem;
}

.field-error {
  color: var(--error);
  margin-top: .3rem;
  font-size: .82rem;
}

.hint {
  color: var(--text-muted);
  margin-top: .3rem;
  font-size: .85rem;
}

.pill-group {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
}

.pill {
  border: 1.5px solid var(--border);
  cursor: pointer;
  color: var(--text-muted);
  transition: border-color var(--transition), background var(--transition), color var(--transition);
  background: #fff;
  border-radius: 999px;
  padding: .4rem 1.1rem;
  font-family: inherit;
  font-size: .95rem;
}

.pill:hover:not(:disabled):not(.pill--active) {
  border-color: var(--primary);
  color: var(--primary);
}

.pill--active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.pill--active:hover {
  background: var(--primary-dark);
  border-color: var(--primary-dark);
  color: #fff;
}

.pill:disabled {
  opacity: .5;
  cursor: default;
}

.check-group {
  display: flex;
  flex-direction: column;
  gap: .15rem;
}

.check-group--inline {
  flex-flow: wrap;
  gap: 1.25rem;
}

.check-label {
  display: flex;
  cursor: pointer;
  color: var(--text);
  align-items:  center;
  gap: .45rem;
  padding: .15rem 0;
  font-size: .95rem;
}

.check-label input[type="checkbox"], .check-label input[type="radio"] {
  accent-color: var(--primary);
  cursor: pointer;
  flex-shrink: 0;
  width: 1rem;
  height: 1rem;
}

.btn {
  display: inline-flex;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background var(--transition), color var(--transition), border-color var(--transition), opacity var(--transition);
  text-decoration: none;
  white-space: nowrap;
  border: 1.5px solid #0000;
  justify-content: center;
  align-items:  center;
  gap: .4rem;
  padding: .6rem 1.5rem;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 500;
}

.btn--primary {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

.btn--primary:hover:not(:disabled) {
  background: var(--primary-dark);
  border-color: var(--primary-dark);
}

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

.btn--secondary {
  color: var(--primary);
  border-color: var(--primary);
  background: none;
}

.btn--secondary:hover {
  background: var(--secondary);
}

.btn--ghost {
  color: var(--text-muted);
  border-color: var(--border);
  background: none;
  padding: .4rem .9rem;
  font-size: .9rem;
}

.btn--ghost:hover {
  color: var(--error);
  border-color: var(--error-border);
}

.btn--sm {
  padding: .3rem .8rem;
  font-size: .88rem;
}

.guest-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.guest-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: #fdfcf8;
  padding: 1.25rem;
}

.guest-card__header {
  display: flex;
  justify-content: space-between;
  align-items:  center;
  margin-bottom: 1rem;
}

.guest-card__num {
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--text-muted);
  font-size: .78rem;
  font-weight: 600;
}

.guest-card__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem 1.5rem;
}

@media (width <= 540px) {
  .guest-card__grid {
    grid-template-columns: 1fr;
  }
}

.guest-card__dietary-expand {
  grid-column: 1 / -1;
}

.banner {
  border-radius: var(--radius);
  display: flex;
  align-items:  flex-start;
  gap: .65rem;
  margin-bottom: 1.25rem;
  padding: .875rem 1.1rem;
  font-size: .92rem;
}

.banner--error {
  background: var(--error-bg);
  border: 1px solid var(--error-border);
  color: var(--error);
}

.banner--success {
  background: var(--success-bg);
  border: 1px solid var(--success-border);
  color: var(--success);
}

.back-link {
  color: var(--text-muted);
  text-decoration: none;
  transition: color var(--transition);
  font-size: .92rem;
}

.back-link:hover {
  color: var(--primary);
}

.faq-section {
  margin-top: 3.5rem;
}

.faq-section__title {
  color: var(--primary);
  margin-bottom: 2rem;
  font-size: 1.8rem;
  font-style: italic;
  font-weight: 500;
}

.faq-group {
  margin-bottom: 2rem;
}

.faq-group__title {
  text-transform: uppercase;
  letter-spacing: .13em;
  color: var(--text-muted);
  margin-bottom: .25rem;
  font-size: .76rem;
  font-weight: 700;
}

.faq-item {
  border-bottom: 1px solid var(--border-light);
}

.faq-item:first-of-type {
  border-top: 1px solid var(--border-light);
}

.faq-item__trigger {
  text-align: left;
  color: var(--text);
  cursor: pointer;
  display: flex;
  transition: color var(--transition);
  background: none;
  border: none;
  justify-content: space-between;
  align-items:  center;
  gap: 1rem;
  width: 100%;
  padding: .9rem 0;
  font-family: inherit;
  font-size: 1rem;
}

.faq-item__trigger:hover {
  color: var(--primary);
}

.faq-item__icon {
  color: var(--primary);
  transition: transform var(--transition);
  flex-shrink: 0;
  font-size: 1.1rem;
  font-style: normal;
}

.faq-item--open .faq-item__icon {
  transform: rotate(45deg);
}

.faq-item__body {
  color: var(--text-muted);
  white-space: pre-wrap;
  padding-bottom: .9rem;
  font-size: .95rem;
  line-height: 1.7;
}

.code-page {
  display: flex;
  text-align: center;
  flex-direction: column;
  justify-content: center;
  align-items:  center;
  min-height: 100vh;
  padding: 2rem;
}

.code-page__wordmark {
  letter-spacing: .35em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 2.5rem;
  font-size: .78rem;
}

.code-page__image {
  object-fit: contain;
  width: 120px;
  height: 120px;
  margin-bottom: 2.5rem;
}

.code-page__title {
  color: var(--primary);
  margin-bottom: .75rem;
  font-size: 3rem;
  font-style: italic;
  font-weight: 400;
  line-height: 1.2;
}

.code-page__sub {
  color: var(--text-muted);
  max-width: 320px;
  margin-bottom: 2.5rem;
  font-size: 1.05rem;
}

.code-page__form {
  display: flex;
  gap: .75rem;
  width: 100%;
  max-width: 340px;
}

.code-page__form .input {
  text-align: center;
  letter-spacing: .12em;
  flex: 1;
  font-size: 1.1rem;
}

.code-page__error {
  color: var(--error);
  margin-top: 1rem;
  font-size: .92rem;
}

.responses-page {
  max-width: 1100px;
  margin: 0 auto;
  padding: 2rem 1.5rem 4rem;
}

.responses-page__title {
  color: var(--primary);
  margin-bottom: .25rem;
  font-size: 2rem;
  font-style: italic;
  font-weight: 500;
}

.responses-page__meta {
  color: var(--text-muted);
  margin-bottom: 2rem;
  font-size: .9rem;
}

.responses-tabs {
  display: flex;
  border-bottom: 2px solid var(--border);
  gap: 0;
  margin-bottom: 1.5rem;
}

.responses-tab {
  cursor: pointer;
  color: var(--text-muted);
  transition: color var(--transition), border-color var(--transition);
  background: none;
  border: none;
  border-bottom: 2.5px solid #0000;
  margin-bottom: -2px;
  padding: .55rem 1.25rem;
  font-family: inherit;
  font-size: .95rem;
}

.responses-tab--active {
  color: var(--primary);
  border-bottom-color: var(--primary);
  font-weight: 600;
}

.responses-toolbar {
  display: flex;
  justify-content: space-between;
  align-items:  center;
  margin-bottom: .75rem;
}

.responses-toolbar__count {
  color: var(--text-muted);
  font-size: .88rem;
}

.table-scroll {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

.data-table {
  border-collapse: collapse;
  width: 100%;
  min-width: 700px;
  font-size: .88rem;
}

.data-table th {
  text-align: left;
  background: var(--secondary);
  border-bottom: 1px solid var(--border);
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--text-muted);
  white-space: nowrap;
  padding: .6rem .85rem;
  font-size: .76rem;
  font-weight: 700;
}

.data-table td {
  border-bottom: 1px solid var(--border-light);
  vertical-align: top;
  max-width: 220px;
  padding: .65rem .85rem;
}

.data-table tr:last-child td {
  border-bottom: none;
}

.data-table tr:hover td {
  background: #fafef9;
}

.data-table .tag {
  display: inline-block;
  background: var(--secondary);
  color: var(--primary);
  border-radius: 999px;
  margin: 1px 2px;
  padding: .1rem .5rem;
  font-size: .78rem;
}

.empty-state {
  text-align: center;
  color: var(--text-muted);
  padding: 3rem;
  font-style: italic;
}

.confirmation {
  text-align: center;
  padding: 2.5rem 1rem;
}

.confirmation__icon {
  margin-bottom: 1rem;
  font-size: 2.5rem;
}

.confirmation__title {
  color: var(--primary);
  margin-bottom: .5rem;
  font-size: 1.9rem;
  font-style: italic;
  font-weight: 500;
}

.confirmation__body {
  color: var(--text-muted);
  font-size: 1rem;
}

.ro-field {
  margin-bottom: 1rem;
}

.ro-field:last-child {
  margin-bottom: 0;
}

.ro-label {
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--text-muted);
  margin-bottom: .2rem;
  font-size: .82rem;
  font-weight: 600;
}

.ro-value {
  color: var(--text);
  font-size: 1rem;
}

.sr-only {
  position: absolute;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
}

.mt-sm {
  margin-top: .5rem;
}

.mt-md {
  margin-top: 1rem;
}

.mt-lg {
  margin-top: 1.75rem;
}

.flex {
  display: flex;
}

.gap-sm {
  gap: .5rem;
}

.gap-md {
  gap: 1rem;
}

.ai-c {
  align-items:  center;
}

.jc-sb {
  justify-content: space-between;
}

.w-full {
  width: 100%;
}

.text-muted {
  color: var(--text-muted);
  font-size: .92rem;
}
