/* Colors sampled from raymonbrothers.com: navy headings, blue links, pale-blue banner, light-gray panels */
:root {
    --bg: #ffffff;
    --surface: #f1f4fa;          /* pale blue-gray panel */
    --field: #ffffff;
    --text: #111111;
    --muted: #444444;
    --heading: #000080;          /* site navy */
    --border: #abbedf;           /* banner blue */
    --border-strong: #7f94bd;
    --primary: #000080;
    --primary-hover: #1a1ab3;
    --danger: #b00020;
    --danger-bg: #fdecef;
    --success: #14663b;
    --success-bg: #e4f4ea;
    --radius: 4px;
}

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

body {
    margin: 0;
    font-family: Verdana, Geneva, Tahoma, sans-serif;
    font-size: 15px;
    background: var(--bg);
    color: var(--text);
    line-height: 1.5;
}

.page {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: clamp(1rem, 4vw, 2.5rem) 1rem;
}

.card {
    width: 100%;
    max-width: 760px;
    /* Notepad photo behind the form; the white wash keeps text readable (raise .35 for a fainter image) */
    background:
        linear-gradient(rgba(255, 255, 255, .35), rgba(255, 255, 255, .35)),
        url("notepad.jpg") center / cover no-repeat,
        var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: clamp(1rem, 3vw, 1.75rem);
}

.card__header h1 { margin: 0 0 .25rem; font-size: 1.3rem; color: var(--heading); }
.card__header p  { margin: 0 0 1.25rem; color: var(--muted); }

/* Layout */
.grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .9rem 1.25rem;
    margin-bottom: 1.25rem;
}
.field--full { grid-column: 1 / -1; }
@media (max-width: 600px) { .grid { grid-template-columns: 1fr; } }

/* Fields */
label { display: block; font-weight: bold; font-size: .9rem; margin-bottom: .3rem; color: var(--heading); }
label span { color: var(--danger); }

input, textarea {
    width: 100%;
    padding: .55rem .7rem;
    font: inherit;
    color: var(--text);
    background: var(--field);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius);
}
textarea { resize: vertical; min-height: 110px; }
::placeholder { color: #777; }

input:focus, textarea:focus {
    outline: 2px solid #0000cc;
    outline-offset: 0;
    border-color: #0000cc;
}
input[aria-invalid="true"], textarea[aria-invalid="true"] { border-color: var(--danger); }

/* Error text reserves space so nothing jumps */
.error { margin: .25rem 0 0; min-height: 1.1rem; font-size: .8rem; color: var(--danger); }
.meta { display: flex; justify-content: space-between; gap: 1rem; }
.counter { font-size: .78rem; color: var(--muted); margin-top: .25rem; white-space: nowrap; }

/* Honeypot (off-screen) */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Button */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .6rem;
    width: 100%;
    padding: .65rem 1.4rem;
    font: inherit;
    font-weight: bold;
    color: #fff;
    background: var(--primary);
    border: 0;
    border-radius: var(--radius);
    cursor: pointer;
}
@media (min-width: 601px) { .btn { width: auto; min-width: 180px; } }
.btn:hover:not(:disabled) { background: var(--primary-hover); }
.btn:disabled { opacity: .7; cursor: not-allowed; }
.btn:focus-visible { outline: 3px solid #0000cc55; outline-offset: 2px; }

.btn__spinner {
    display: none;
    width: 1rem; height: 1rem;
    border: 2px solid rgba(255, 255, 255, .45);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin .7s linear infinite;
}
.btn.is-loading .btn__spinner { display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Status banner */
.status {
    margin: 0 0 1rem;
    padding: .7rem .9rem;
    border-radius: var(--radius);
    font-weight: bold;
    border-left: 4px solid;
}
.status[hidden] { display: none; }
.status--success { color: var(--success); background: var(--success-bg); border-color: var(--success); }
.status--error   { color: var(--danger);  background: var(--danger-bg);  border-color: var(--danger); }

@media (prefers-reduced-motion: reduce) {
    * { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* Embedded in an iframe on raymonbrothers.com */
html.embedded body { background: transparent; font-size: 14px; }
html.embedded .page { min-height: 0; padding: 0; display: block; }
html.embedded .card { max-width: none; }
html.embedded .card__header { display: none; }   /* your page already has an intro; delete this line to show the form's own heading */

/* Compact fields when embedded */
html.embedded .card { padding: .9rem 1.1rem; }
html.embedded .grid { gap: .5rem 1rem; margin-bottom: .75rem; }
html.embedded label { font-size: 13px; margin-bottom: .15rem; }
html.embedded input,
html.embedded textarea { padding: .3rem .5rem; font-size: 13px; }
html.embedded textarea { min-height: 70px; }
html.embedded .error { min-height: .9rem; margin-top: .1rem; font-size: 12px; }
html.embedded .counter { margin-top: .1rem; font-size: 12px; }
html.embedded .btn { padding: .45rem 1.2rem; font-size: 13px; }

/* ---- Embedded size controls: adjust these numbers to taste ---- */
html.embedded { --embed-width: 520px; --box-pad-y: .2rem; --box-pad-x: .4rem; --box-font: 12px; }
html.embedded .card { max-width: var(--embed-width); margin: 0; padding: .7rem .9rem; }   /* margin: 0 = left-aligned; use "0 auto" to center */
html.embedded .grid { gap: .35rem .75rem; margin-bottom: .5rem; }
html.embedded label { font-size: 12px; margin-bottom: .1rem; }
html.embedded input,
html.embedded textarea { padding: var(--box-pad-y) var(--box-pad-x); font-size: var(--box-font); line-height: 1.3; }
html.embedded textarea { min-height: 52px; }
html.embedded .error { min-height: .8rem; font-size: 11px; }
html.embedded .counter { font-size: 11px; }
html.embedded .btn { padding: .35rem 1rem; font-size: 12px; min-width: 0; }
