/*
 * Gatherall's Screech-In form
 * Aesthetic: parchment + maritime, echoing the certificate.
 * Mobile-first; designed primarily for guests on phones.
 */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,400;0,500;0,600;1,400;1,500&family=Karla:wght@400;500;700&display=swap');

.gsi-app {
	--paper-bg:    #f7f1e1;
	--paper:       #fdfaf1;
	--paper-edge:  #e3d8b8;
	--rule:        rgba(184, 107, 31, 0.18);
	--ink:         #1d1c18;
	--ink-soft:    #5a574e;
	--ink-faint:   #8a8676;
	--rum:         #b86b1f;
	--rum-deep:    #8a4d10;
	--ocean:       #1a3a52;
	--ocean-deep:  #122b3e;
	--success:     #4a7548;
	--error:       #a82e1f;
	--error-bg:    #fff5f3;
	--error-edge:  #f0c5be;

	font-family: 'Karla', system-ui, -apple-system, sans-serif;
	color: var(--ink);
	min-height: 100dvh;
	padding: 24px 16px;
	background:
		radial-gradient(circle at 18% 0%,   rgba(184, 107, 31, 0.07) 0%, transparent 55%),
		radial-gradient(circle at 82% 100%, rgba(26, 58, 82, 0.05)  0%, transparent 55%),
		var(--paper-bg);
	display: flex;
	align-items: flex-start;
	justify-content: center;
	box-sizing: border-box;
}

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

.gsi-paper {
	width: 100%;
	max-width: 480px;
	padding: 36px 28px 32px;
	background: var(--paper);
	border: 1px solid var(--paper-edge);
	box-shadow:
		0 1px 0 rgba(0, 0, 0, 0.02),
		0 12px 32px rgba(58, 40, 14, 0.10);
	position: relative;
}

/* Inner ruled border, like the parchment certificate */
.gsi-paper::before {
	content: '';
	position: absolute;
	inset: 5px;
	border: 1px solid var(--rule);
	pointer-events: none;
}

.gsi-mark {
	font-family: 'Cormorant Garamond', serif;
	font-style: italic;
	font-size: 18px;
	letter-spacing: 0.04em;
	color: var(--rum-deep);
	text-align: center;
	margin-bottom: 6px;
}

.gsi-title {
	font-family: 'Cormorant Garamond', serif;
	font-weight: 500;
	font-size: 24px;
	line-height: 1.18;
	text-align: center;
	margin: 0 0 14px;
	color: var(--ink);
	letter-spacing: 0.005em;
}

.gsi-title em {
	font-style: italic;
	color: var(--rum-deep);
	font-weight: 600;
	display: block;
	font-size: 1.25em;
	margin-top: 4px;
	letter-spacing: 0.01em;
}

.gsi-lede {
	font-size: 15px;
	line-height: 1.55;
	text-align: center;
	color: var(--ink-soft);
	margin: 0 0 8px;
	font-style: italic;
}

.gsi-lede-aside {
	font-size: 13px;
	line-height: 1.5;
	text-align: center;
	color: var(--ink-faint);
	margin: 0 0 24px;
}

.gsi-lede-aside em {
	font-style: italic;
}

/* Notice blocks — base styling, two modifiers below */
.gsi-notice {
	padding: 14px 16px;
	font-size: 13px;
	line-height: 1.5;
	color: var(--ink-soft);
}

.gsi-notice strong {
	display: block;
	color: var(--ink);
	font-weight: 700;
	font-size: 13.5px;
	letter-spacing: 0.01em;
	margin-bottom: 2px;
}

/* "No fish" reassurance, sits between lede and form */
.gsi-notice--info {
	margin: 0 0 24px;
	background: rgba(26, 58, 82, 0.06);
	border-left: 3px solid var(--ocean);
}

.gsi-notice--info strong {
	color: var(--ocean-deep);
}

/* Fee / pricing notice — pinned at the very bottom of the paper */
.gsi-notice--fee {
	margin: 28px 0 0;
	background: rgba(184, 107, 31, 0.08);
	border-top: 1px solid var(--rum);
	text-align: center;
}

.gsi-notice--fee strong {
	color: var(--rum-deep);
	font-size: 14.5px;
	letter-spacing: 0.02em;
}

.gsi-form {
	display: flex;
	flex-direction: column;
	gap: 18px;
}

.gsi-row {
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.gsi-row label,
.gsi-row .gsi-row-label {
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--ink-soft);
}

.gsi-row input {
	font-family: inherit;
	font-size: 17px;
	padding: 14px 14px;
	border: 1px solid var(--paper-edge);
	background: #fffdf6;
	color: var(--ink);
	-webkit-appearance: none;
	appearance: none;
	border-radius: 0;
	transition: border-color 120ms ease, background 120ms ease, box-shadow 120ms ease;
	min-height: 48px; /* iOS comfortable touch target */
}

.gsi-row input:focus {
	outline: none;
	border-color: var(--rum);
	background: #ffffff;
	box-shadow: 0 0 0 3px rgba(184, 107, 31, 0.14);
}

.gsi-row input::placeholder {
	color: var(--ink-faint);
	font-style: italic;
}

.gsi-row.has-error input {
	border-color: var(--error);
	background: var(--error-bg);
}

/* Beverage radio group — tap-to-toggle, segmented-control style */
.gsi-radio-group {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 8px;
	margin-top: 2px;
}

.gsi-radio {
	position: relative;
	cursor: pointer;
}

.gsi-radio input {
	position: absolute;
	opacity: 0;
	width: 0;
	height: 0;
	pointer-events: none;
}

.gsi-radio-face {
	display: flex;
	flex-direction: row;
	align-items: center;
	gap: 12px;
	padding: 14px 14px;
	min-height: 64px;
	border: 1px solid var(--paper-edge);
	background: #fffdf6;
	transition: all 120ms ease;
}

.gsi-radio-box {
	flex-shrink: 0;
	width: 26px;
	height: 26px;
	border: 2px solid var(--ink);
	background: #ffffff;
	transition: all 120ms ease;
	position: relative;
	box-shadow: 0 1px 0 rgba(0, 0, 0, 0.04);
}

.gsi-radio-text {
	display: flex;
	flex-direction: column;
	gap: 2px;
}

.gsi-radio-title {
	font-size: 15px;
	font-weight: 700;
	letter-spacing: 0.01em;
	color: var(--ink);
	line-height: 1.2;
}

.gsi-radio-sub {
	font-size: 12px;
	font-style: italic;
	color: var(--ink-faint);
	line-height: 1.2;
}

.gsi-radio input:checked + .gsi-radio-face {
	background: var(--ocean);
	border-color: var(--ocean);
	box-shadow: inset 0 0 0 1px var(--ocean);
}

.gsi-radio input:checked + .gsi-radio-face .gsi-radio-box {
	background: #ffffff;
	border-color: #ffffff;
}

.gsi-radio input:checked + .gsi-radio-face .gsi-radio-box::after {
	content: '';
	position: absolute;
	left: 7px;
	top: 2px;
	width: 8px;
	height: 14px;
	border: solid var(--ocean);
	border-width: 0 3px 3px 0;
	transform: rotate(45deg);
}

.gsi-radio input:checked + .gsi-radio-face .gsi-radio-title { color: var(--paper); }
.gsi-radio input:checked + .gsi-radio-face .gsi-radio-sub   { color: rgba(253, 250, 241, 0.78); }

.gsi-radio input:focus-visible + .gsi-radio-face {
	outline: 2px solid var(--rum);
	outline-offset: 2px;
}

/* Age confirmation checkbox */
.gsi-checkbox {
	display: flex;
	align-items: flex-start;
	gap: 12px;
	cursor: pointer;
	padding: 8px 0 0;
	position: relative;
}

.gsi-checkbox input {
	position: absolute;
	opacity: 0;
	width: 0;
	height: 0;
	pointer-events: none;
}

.gsi-checkbox-mark {
	width: 22px;
	height: 22px;
	flex-shrink: 0;
	border: 1.5px solid var(--ink-soft);
	background: #fffdf6;
	transition: all 120ms ease;
	margin-top: 1px;
	position: relative;
}

.gsi-checkbox input:checked ~ .gsi-checkbox-mark {
	background: var(--ocean);
	border-color: var(--ocean);
}

.gsi-checkbox input:checked ~ .gsi-checkbox-mark::after {
	content: '';
	position: absolute;
	left: 6px;
	top: 2px;
	width: 6px;
	height: 12px;
	border: solid var(--paper);
	border-width: 0 2px 2px 0;
	transform: rotate(45deg);
}

.gsi-checkbox input:focus-visible ~ .gsi-checkbox-mark {
	outline: 2px solid var(--rum);
	outline-offset: 2px;
}

.gsi-checkbox-label {
	font-size: 14.5px;
	line-height: 1.45;
	color: var(--ink);
}

.gsi-checkbox-label strong {
	font-weight: 700;
}

.gsi-checkbox.has-error .gsi-checkbox-mark {
	border-color: var(--error);
	background: var(--error-bg);
}

.gsi-button {
	margin-top: 14px;
	font-family: inherit;
	font-size: 16px;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	padding: 18px 20px;
	background: var(--ocean);
	color: var(--paper);
	border: none;
	border-radius: 0;
	cursor: pointer;
	transition: transform 80ms ease, background 120ms ease;
	position: relative;
	min-height: 56px;
}

.gsi-button:hover:not(:disabled) {
	background: var(--ocean-deep);
}

.gsi-button:active:not(:disabled) {
	transform: translateY(1px);
}

.gsi-button:disabled {
	opacity: 0.55;
	cursor: not-allowed;
}

.gsi-button-loading { display: none; }
.gsi-button.is-loading .gsi-button-label   { display: none; }
.gsi-button.is-loading .gsi-button-loading { display: inline; }

.gsi-meta {
	font-size: 12px;
	font-style: italic;
	color: var(--ink-faint);
	text-align: center;
	margin: 6px 0 0;
}

/* Success screen */
.gsi-success {
	text-align: center;
	padding: 8px 0 4px;
	animation: gsi-fade-in 360ms ease-out;
}

@keyframes gsi-fade-in {
	from { opacity: 0; transform: translateY(6px); }
	to   { opacity: 1; transform: translateY(0); }
}

.gsi-success-mark {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 60px;
	height: 60px;
	border-radius: 50%;
	background: var(--success);
	color: var(--paper);
	margin-bottom: 18px;
}

.gsi-success-title {
	font-family: 'Cormorant Garamond', serif;
	font-style: italic;
	font-weight: 500;
	font-size: 30px;
	margin: 0 0 12px;
	color: var(--ink);
	line-height: 1.15;
}

.gsi-success-title span {
	color: var(--rum-deep);
	font-weight: 600;
}

.gsi-success-msg {
	font-size: 15px;
	color: var(--ink-soft);
	margin: 0 0 12px;
	line-height: 1.55;
}

.gsi-reference {
	font-family: 'Cormorant Garamond', serif;
	font-weight: 500;
	font-size: 30px;
	letter-spacing: 0.22em;
	color: var(--ocean);
	margin: 14px 0 4px;
	padding: 14px 0;
	border-top: 1px solid var(--paper-edge);
	border-bottom: 1px solid var(--paper-edge);
}

/* Error block */
.gsi-error {
	margin-top: 16px;
	padding: 14px 16px;
	background: var(--error-bg);
	border: 1px solid var(--error-edge);
	color: var(--error);
	font-size: 14px;
}

.gsi-error p { margin: 0; }
.gsi-error p + p { margin-top: 6px; }

.gsi-error-detail {
	font-family: ui-monospace, 'Karla', monospace;
	font-size: 12px;
	color: rgba(168, 46, 31, 0.72);
	word-break: break-word;
}

/* Smaller phones */
@media (max-width: 380px) {
	.gsi-app    { padding: 16px 12px; }
	.gsi-paper  { padding: 28px 20px 24px; }
	.gsi-title  { font-size: 22px; }
	.gsi-lede   { font-size: 14px; margin-bottom: 22px; }
}
