@import url("https://fonts.googleapis.com/css2?family=DM+Serif+Display:ital@0;1&display=swap");
@import url("https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500&display=swap");

/* ── Claude light theme tokens ───────────────────────────────── */
:root {
  --bg:               #f5f0e8;
  --bg-surface:       #faf8f4;
  --bg-input:         #ffffff;
  --bg-btn:           #f0ede6;
  --bg-btn-hover:     #e8e3d8;

  --border:           #ddd8ce;
  --border-hover:     #c8c2b6;
  --border-focus:     #8b7355;

  --text:             #1a1816;
  --text-muted:       #6b6560;
  --text-subtle:      #a09890;
  --text-placeholder: #b0a898;

  --coral:            #d97757;
  --coral-hover:      #c86a48;
  --coral-active:     #b85e3e;

  --amber:            #8b6a3e;
  --amber-light:      #c49a4a;
  --amber-pale:       #e8c87a;

  --radius-input:     14px;
  --radius-btn:       10px;

  --font-display:     "DM Serif Display", Georgia, serif;
  --font-ui:          "Inter", "Helvetica Neue", Arial, sans-serif;

  --ease:             cubic-bezier(0.4, 0, 0.2, 1);
  --shadow-input:     0 1px 3px rgba(0,0,0,0.06), 0 4px 16px rgba(0,0,0,0.05);
  --shadow-focus:     0 0 0 3px rgba(139,107,62,0.15), 0 2px 8px rgba(0,0,0,0.08);
}

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

body {
  font-family: var(--font-ui);
  margin: 0;
  background: var(--bg);
  color: var(--text);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background-image: radial-gradient(ellipse 90% 60% at 50% 0%, rgba(255,255,255,0.6) 0%, transparent 70%);
}

.flex-center   { display: flex; justify-content: center; }
.header-center { align-items: center; flex-direction: column; margin-top: 13vh; }
.left-margin   { margin: 0 16px; }

#sj-frame {
  border: none;
  position: absolute;
  top: 0; left: 0;
  width: 100vw; height: 100vh;
  background: var(--bg);
}

/* ── Wordmark — plain ────────────────────────────────────────── */
.logo-wrapper h1 {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(52px, 8vw, 82px);
  letter-spacing: -0.03em;
  line-height: 1;
  margin: 0 0 8px;
  color: var(--text);
}

/* ── Tagline ─────────────────────────────────────────────────── */
.tagline {
  font-family: var(--font-ui);
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin: 0 0 32px;
}

.tagline .brand {
  color: var(--amber);
  font-weight: 500;
}

/* ── Search box ──────────────────────────────────────────────── */
#sj-form { margin: 0; }

.search-box {
  width: min(580px, 92vw);
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-input);
  box-shadow: var(--shadow-input);
  padding: 12px 12px 10px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: border-color 0.18s var(--ease), box-shadow 0.18s var(--ease);
}

.search-box:focus-within {
  border-color: var(--border-focus);
  box-shadow: var(--shadow-focus);
}

#sj-address {
  width: 100%;
  background: transparent;
  border: none;
  outline: none;
  font-family: var(--font-ui);
  font-size: 15px;
  font-weight: 400;
  color: var(--text);
  line-height: 1.5;
  caret-color: var(--amber);
  padding: 0;
  height: 28px;
}

#sj-address::placeholder { color: var(--text-placeholder); }

/* ── Send button row ─────────────────────────────────────────── */
.search-actions {
  display: flex;
  justify-content: flex-end;
}

.send-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: none;
  background: var(--coral);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.15s var(--ease), transform 0.1s var(--ease), box-shadow 0.15s var(--ease);
}

.send-btn:hover {
  background: var(--coral-hover);
  box-shadow: 0 2px 10px rgba(217,119,87,0.4);
}

.send-btn:active {
  background: var(--coral-active);
  transform: scale(0.92);
}

/* ── Quick-link buttons ──────────────────────────────────────── */
.quicklinks {
  margin-top: 16px;
  gap: 8px;
  flex-wrap: wrap;
  width: min(580px, 92vw);
  /* align with search box */
  margin-left: auto;
  margin-right: auto;
}

.ql-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  /* square-ish: equal padding all around */
  padding: 8px 14px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg-input);
  color: var(--text-muted);
  font-family: var(--font-ui);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  letter-spacing: 0.01em;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
  transition:
    background    0.15s var(--ease),
    border-color  0.15s var(--ease),
    color         0.15s var(--ease),
    box-shadow    0.15s var(--ease),
    transform     0.1s  var(--ease);
}

.ql-btn svg {
  flex-shrink: 0;
  color: var(--amber);
  transition: color 0.15s var(--ease);
}

.ql-btn:hover {
  background: var(--bg-btn-hover);
  border-color: var(--border-hover);
  color: var(--text);
  animation: btn-pulse 0.6s ease;
}

@keyframes btn-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(139,107,62,0.25); }
  50%  { box-shadow: 0 0 0 6px rgba(139,107,62,0); }
  100% { box-shadow: 0 0 0 0 rgba(139,107,62,0); }
}

.ql-btn:active {
  background: var(--bg-btn);
}

/* ── Errors ──────────────────────────────────────────────────── */
.desc { flex-direction: column; align-items: center; margin-top: 12px; }

#sj-error {
  color: #c0392b !important;
  white-space: pre-wrap;
  background: rgba(192,57,43,0.06);
  border: 1px solid rgba(192,57,43,0.18);
  border-radius: 8px;
  padding: 10px 16px;
  font-size: 13px;
  line-height: 1.6;
}
#sj-error:empty { display: none; }

#sj-error-code {
  font-size: 11px;
  color: var(--text-muted);
  font-family: "Courier New", monospace;
}
#sj-error-code:empty { display: none; }

/* ── Footer ──────────────────────────────────────────────────── */
footer {
  margin: 0 20px;
  margin-top: auto;
  margin-bottom: 20px;
  border-top: 1px solid var(--border);
  padding-top: 14px;
}

footer > div { display: flex; align-items: center; }

footer span {
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--text-subtle);
}

/* ── Scrollbar ───────────────────────────────────────────────── */
::-webkit-scrollbar       { width: 5px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--border-hover); }

/* ── Selection ───────────────────────────────────────────────── */
::selection {
  background: rgba(139,107,62,0.15);
  color: var(--text);
}
