/* ────────────────────────────────────────────────
   Leren — Contact form widget styles
   Drop-in stylesheet for the contact form module.

   The form expects the following CSS custom properties
   to be defined on :root (or any ancestor). If your app
   already defines a design system, override these or map
   them to your own tokens. Defaults below are Leren's.
   ──────────────────────────────────────────────── */

:root {
  --leren-bg-page:    #FBF8F1;
  --leren-bg-input:   #F5F1E7;
  --leren-border:     #E2DAC5;
  --leren-placeholder:#C9BEA4;
  --leren-text-muted: #8A8170;
  --leren-text-soft:  #615A4C;
  --leren-text-deep:  #3D3830;
  --leren-text:       #1F1C18;
  --leren-accent:     #C2410C;
  --leren-accent-hot: #EA580C;

  --leren-serif: 'Fraunces', Georgia, serif;
  --leren-sans:  'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --leren-mono:  'JetBrains Mono', 'SF Mono', monospace;
  --leren-ease:  cubic-bezier(0.22, 1, 0.36, 1);
}

/* Layout container */
.lc-section {
  max-width: 640px;
  margin: 40px auto 80px;
  padding: 0 32px;
  font-family: var(--leren-sans);
  color: var(--leren-text);
}

.lc-eyebrow {
  font-family: var(--leren-mono);
  font-size: 11px; font-weight: 500;
  text-transform: uppercase; letter-spacing: 0.12em;
  color: var(--leren-accent); margin-bottom: 24px;
  display: flex; align-items: center; gap: 12px;
}
.lc-eyebrow::before {
  content: ''; display: block; width: 24px; height: 1px;
  background: var(--leren-accent);
}

.lc-headline {
  font-family: var(--leren-serif); font-weight: 300;
  font-size: clamp(40px, 6vw, 64px);
  line-height: 1.05; letter-spacing: -0.02em;
  color: var(--leren-text);
  margin: 0 0 20px;
  font-variation-settings: "opsz" 96;
}
.lc-headline .lc-accent {
  color: var(--leren-accent); font-style: italic;
}

.lc-sub {
  font-size: 17px; font-weight: 400;
  color: var(--leren-text-soft); line-height: 1.6;
  margin: 0 0 48px;
  max-width: 520px;
}

.lc-form {
  display: flex; flex-direction: column; gap: 28px;
}

.lc-field {
  display: flex; flex-direction: column; gap: 8px;
}
.lc-label {
  font-family: var(--leren-mono);
  font-size: 11px; font-weight: 500;
  text-transform: uppercase; letter-spacing: 0.1em;
  color: var(--leren-text-muted);
}

.lc-input, .lc-textarea {
  width: 100%;
  background: var(--leren-bg-input);
  border: 1px solid var(--leren-border);
  border-radius: 6px;
  padding: 14px 16px;
  font-family: var(--leren-sans);
  /* 16px, not less: iOS Safari zooms the whole page into any smaller field on focus. */
  font-size: 16px;
  color: var(--leren-text);
  transition: border-color 0.25s var(--leren-ease),
              background 0.25s var(--leren-ease);
  outline: none;
  resize: none;
  box-sizing: border-box;
}
.lc-input::placeholder, .lc-textarea::placeholder {
  color: var(--leren-placeholder);
}
.lc-input:focus, .lc-textarea:focus {
  border-color: var(--leren-accent);
  background: #fff;
}
.lc-textarea {
  min-height: 160px;
  line-height: 1.55;
  font-family: var(--leren-serif);
  font-size: 16px;
  font-variation-settings: "opsz" 14;
}

.lc-message-row {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 12px;
}

.lc-counter {
  font-family: var(--leren-mono);
  font-size: 11px;
  color: var(--leren-text-muted);
  letter-spacing: 0.05em;
  transition: color 0.2s var(--leren-ease);
}
.lc-counter.lc-warn { color: var(--leren-accent-hot); }
.lc-counter.lc-over { color: #B91C1C; }

.lc-actions {
  margin-top: 12px;
  display: flex; align-items: center; gap: 16px;
}

.lc-btn {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--leren-sans); font-weight: 500; font-size: 14px;
  padding: 13px 24px;
  border-radius: 999px;
  border: 1px solid var(--leren-text);
  background: var(--leren-text);
  color: var(--leren-bg-page);
  cursor: pointer;
  transition: all 0.3s var(--leren-ease);
  letter-spacing: 0.005em;
}
/* Hover styles only where there is a real pointer: on a phone a tap leaves :hover stuck,
   so a button stayed orange, lifted and glowing after its popup closed. */
@media (hover: hover) { .lc-btn:hover {
  background: var(--leren-accent-hot);
  border-color: var(--leren-accent-hot);
  color: #fff;
} }
.lc-btn:disabled {
  opacity: 0.4; cursor: not-allowed;
  background: var(--leren-text);
  border-color: var(--leren-text);
  color: var(--leren-bg-page);
}
.lc-btn svg { transition: transform 0.3s var(--leren-ease); }
@media (hover: hover) { .lc-btn:hover:not(:disabled) svg { transform: translateX(3px); } }

.lc-hint {
  font-family: var(--leren-mono);
  font-size: 11px;
  color: var(--leren-text-muted);
  letter-spacing: 0.04em;
}

.lc-legal {
  margin: -12px 0 0;
  font-size: 13px; line-height: 1.55;
  color: var(--leren-text-muted);
}
.lc-legal a { color: var(--leren-text-soft); text-underline-offset: 2px; }
.lc-legal a:hover { color: var(--leren-accent); }

.lc-success, .lc-error {
  display: none;
  margin-top: 28px;
  padding: 16px 18px;
  border-radius: 6px;
  font-size: 14px;
}
.lc-success {
  border: 1px solid rgba(21,128,61,0.3);
  background: rgba(21,128,61,0.06);
  color: var(--leren-text-deep);
}
.lc-error {
  border: 1px solid rgba(185,28,28,0.3);
  background: rgba(185,28,28,0.06);
  color: #B91C1C;
}
.lc-success.lc-show, .lc-error.lc-show { display: block; }

/* Spam trap: off screen and out of the tab order, so only a bot fills it in. */
.lc-hp {
  position: absolute; left: -10000px;
  width: 1px; height: 1px; overflow: hidden;
}

@media (max-width: 600px) {
  .lc-section {
    padding: 0 24px;
    margin-top: 24px;
  }
  .lc-headline { font-size: 40px; }
  .lc-sub { font-size: 16px; margin-bottom: 36px; }
}
