/* ============================================================= */
/*  Blueprint Builder — A!thera Partners                          */
/*  Visual system pulled verbatim from the A!thera brand tokens.  */
/*  To tweak the look, start with the variables below.            */
/* ============================================================= */

:root {
  /* Primary palette */
  --athera-blue: #5FB8D6;
  --athera-blue-light: #A8D9EC;
  --athera-blue-deep: #2A8FB0;
  --athera-charcoal: #374151;
  --athera-charcoal-light: #4B5563;
  --athera-grey: #6B7280;
  --athera-grey-light: #9CA3AF;
  --athera-navy: #0F172A;
  --athera-navy-mid: #1E2B42;

  /* Surfaces */
  --athera-white: #FFFFFF;
  --athera-off-white: #F8F7F4;
  --athera-surface: #F1EEE8;

  /* Lines */
  --athera-line: rgba(55, 65, 81, 0.12);
  --athera-line-light: rgba(55, 65, 81, 0.06);
  --athera-line-dark: rgba(255, 255, 255, 0.08);

  /* Lovable — the signature heart gradient (orange → pink → violet → blue) */
  --lovable-orange: #FF7A45;
  --lovable-pink: #F857A6;
  --lovable-violet: #8B5CF6;
  --lovable-blue: #5B6CFF;
  --lovable-gradient: linear-gradient(115deg, #FF7A45 0%, #F857A6 38%, #8B5CF6 72%, #5B6CFF 100%);

  /* Typography */
  --athera-display: 'Cormorant Garamond', Georgia, serif;
  --athera-sans: 'DM Sans', system-ui, -apple-system, 'Helvetica Neue', Arial, sans-serif;
  --athera-mono: 'DM Mono', 'Consolas', 'Monaco', monospace;
}

/* ---------- Reset & base ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--athera-off-white);
  color: var(--athera-charcoal);
  font-family: var(--athera-sans);
  font-weight: 400;
  font-size: 15px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

/* Generous horizontal padding is part of the brand's restraint. */
.site-header,
.intro,
.workspace {
  max-width: 1200px;
  margin: 0 auto;
  padding-left: 48px;
  padding-right: 48px;
}

/* ============================================================= */
/*  Header                                                        */
/* ============================================================= */
.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 32px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--athera-line);
}

/* Inline wordmark — the A! is always brand blue, "Partners" smaller and lighter. */
.wordmark {
  font-family: var(--athera-display);
  font-size: 30px;
  font-weight: 300;
  color: var(--athera-charcoal);
  letter-spacing: -0.01em;
}
.wordmark-a { color: var(--athera-blue); }
.wordmark-partners {
  font-family: var(--athera-sans);
  font-size: 0.46em;
  font-weight: 400;
  color: var(--athera-grey);
  letter-spacing: 0.08em;
  margin-left: 2px;
  vertical-align: super;
}

/* Eyebrow label — UPPERCASE, wide tracking, the signature A!thera detail. */
.eyebrow {
  font-family: var(--athera-sans);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--athera-grey);
}
.eyebrow-blue {
  background: var(--lovable-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

/* "Built for [Lovable]" lockup — sits on a navy pill so the cream Lovable
   wordmark and gradient heart stay legible on the light header. */
.header-lovable {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 9px 16px 9px 18px;
  background: var(--athera-navy);
  border-radius: 999px;
  position: relative;
}
.header-lovable::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 999px;
  padding: 1px;
  background: var(--lovable-gradient);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0.55;
  pointer-events: none;
}
.header-lovable .eyebrow {
  color: rgba(255, 255, 255, 0.62);
}
.header-lovable-logo {
  height: 22px;
  width: auto;
  display: block;
}

/* ============================================================= */
/*  Intro                                                         */
/* ============================================================= */
.intro {
  padding-top: 64px;
  padding-bottom: 8px;
}
.page-title {
  font-family: var(--athera-display);
  font-weight: 300;
  font-size: clamp(34px, 5vw, 56px);
  line-height: 1.05;
  letter-spacing: -0.015em;
  margin: 0 0 24px;
  color: var(--athera-charcoal);
  max-width: 760px;
}
/* "Lovable-ready" rendered in the heart gradient */
.title-accent {
  background: var(--lovable-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}
.page-lead {
  font-weight: 300;
  font-size: 18px;
  line-height: 1.7;
  color: var(--athera-charcoal-light);
  max-width: 560px;
  margin: 0 0 32px;
}
/* Thin gradient rule — the single accent that opens the page. */
.blue-rule {
  width: 64px;
  height: 2px;
  border-radius: 2px;
  background: var(--lovable-gradient);
}

/* ============================================================= */
/*  Workspace: two columns on desktop                            */
/* ============================================================= */
.workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 64px;
  padding-top: 64px;
  padding-bottom: 96px;
  align-items: start;
}

/* ---------- Form column ---------- */
.form-column {
  display: flex;
  flex-direction: column;
  gap: 48px;
  min-width: 0;
}

.field {
  display: flex;
  flex-direction: column;
}
.field-group {
  border: none;
  margin: 0;
  padding: 0;
}

.field-label {
  font-family: var(--athera-display);
  font-weight: 400;
  font-size: 23px;
  line-height: 1.2;
  color: var(--athera-charcoal);
  margin-bottom: 4px;
  padding: 0;
}
/* <legend> needs this to align like the other labels. */
legend.field-label { margin-bottom: 4px; }

/* Small "Optional" marker sitting next to a field label. */
.optional-tag {
  display: inline-block;
  vertical-align: middle;
  margin-left: 8px;
  font-family: var(--athera-sans);
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--athera-grey);
  border: 1px solid var(--athera-line);
  border-radius: 2px;
  padding: 3px 7px;
  position: relative;
  top: -2px;
}

.field-helper {
  font-size: 14px;
  font-weight: 300;
  color: var(--athera-grey);
  margin: 0 0 14px;
}

/* ---------- Inputs ---------- */
.input {
  width: 100%;
  font-family: var(--athera-sans);
  font-size: 15px;
  font-weight: 400;
  line-height: 1.6;
  color: var(--athera-charcoal);
  background: var(--athera-white);
  border: 1px solid var(--athera-line);
  border-radius: 4px;
  padding: 13px 15px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.input::placeholder {
  color: var(--athera-grey-light);
  font-weight: 300;
}
.input:focus {
  outline: none;
  border-color: var(--lovable-violet);
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.16);
}
.input-textarea {
  resize: vertical;
  min-height: 96px;
}
.input-large { min-height: 150px; }

/* The Look-and-feel dropdown: same frame as the other inputs, with a custom
   chevron drawn as a background SVG (so it matches the brand on every browser). */
.input-select {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  cursor: pointer;
  padding-right: 42px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%236B7280' stroke-width='1.3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 15px center;
}
/* Grey the placeholder option until a real feel is chosen. */
.input-select:invalid,
.input-select:has(option[value=""]:checked) { color: var(--athera-grey-light); }

/* AI sub-fields */
.subfield {
  display: flex;
  flex-direction: column;
  margin-bottom: 16px;
}
.subfield:last-of-type { margin-bottom: 0; }
.subfield-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--athera-charcoal-light);
  margin-bottom: 7px;
}

/* ---------- "Show me an example" disclosure ---------- */
.example-toggle {
  align-self: flex-start;
  margin-top: 10px;
  padding: 0;
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--athera-sans);
  font-size: 13px;
  font-weight: 500;
  color: var(--lovable-violet);
  letter-spacing: 0.01em;
  transition: opacity 0.2s ease;
}
.example-toggle:hover { opacity: 0.7; }
.example-toggle:focus-visible {
  outline: 2px solid var(--lovable-violet);
  outline-offset: 3px;
}

.example-panel {
  margin-top: 12px;
  padding: 16px 18px;
  background: var(--athera-surface);
  border-left: 2px solid var(--lovable-pink);
  border-radius: 2px;
  font-size: 14px;
  font-weight: 300;
  line-height: 1.65;
  color: var(--athera-charcoal-light);
}
.example-panel strong {
  font-weight: 500;
  color: var(--athera-charcoal);
}

/* ---------- Form actions ---------- */
.form-actions {
  display: flex;
  padding-top: 8px;
  border-top: 1px solid var(--athera-line);
  margin-top: 8px;
}

/* ============================================================= */
/*  Buttons                                                       */
/* ============================================================= */
.btn {
  display: inline-block;
  font-family: var(--athera-sans);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease,
    transform 0.18s ease, box-shadow 0.25s ease;
}
.btn:focus-visible {
  outline: 2px solid var(--lovable-violet);
  outline-offset: 2px;
}
/* Lovable-styled primary action: heart gradient fill + soft glow. */
.btn-primary {
  padding: 12px 24px;
  background: var(--lovable-gradient);
  color: var(--athera-white);
  font-weight: 500;
  border: none;
  box-shadow: 0 8px 22px -8px rgba(248, 87, 166, 0.5);
}
.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 28px -8px rgba(248, 87, 166, 0.6);
}
.btn-primary:active { transform: scale(0.97); }
/* Copy stays disabled until the required fields are filled. */
.btn-primary:disabled,
.btn-primary:disabled:hover {
  background: var(--athera-surface);
  color: var(--athera-grey);
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}
.btn-secondary {
  padding: 11px 22px;
  background: transparent;
  color: var(--athera-charcoal);
  border: 1px solid var(--athera-line);
  font-weight: 400;
}
.btn-secondary:hover { background: var(--athera-white); border-color: var(--athera-grey-light); }

/* ============================================================= */
/*  Preview column                                               */
/* ============================================================= */
.preview-column {
  position: sticky;
  top: 32px;
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.preview-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

/* Tells the user which required fields are still empty. Hidden once complete. */
.copy-hint {
  margin: 0 0 16px;
  font-size: 13px;
  font-weight: 300;
  line-height: 1.5;
  color: var(--athera-grey);
}
.copy-hint:empty { display: none; }

/* The generated prompt lives in a DM Mono box on dark navy — calm, editorial,
   and it reads as the "raw text" you're about to copy. */
.preview-box {
  margin: 0;
  background: var(--athera-navy);
  color: rgba(255, 255, 255, 0.88);
  border: 1px solid var(--athera-line-dark);
  border-radius: 4px;
  padding: 28px 30px;
  font-family: var(--athera-mono);
  font-size: 13px;
  font-weight: 400;
  line-height: 1.75;
  white-space: pre-wrap;       /* wrap long lines, keep the user's line breaks */
  word-wrap: break-word;
  overflow-wrap: break-word;
  min-height: 320px;
  max-height: calc(100vh - 120px);
  overflow-y: auto;
}
/* Empty-state placeholder text (set as a class by the JS). */
.preview-box.is-empty {
  color: var(--athera-grey-light);
  font-weight: 300;
}

/* ============================================================= */
/*  Toast ("Copied!")                                            */
/* ============================================================= */
.toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--athera-navy);
  color: var(--athera-white);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 12px 24px;
  border-radius: 2px;
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 50;
}
.toast.is-visible { opacity: 1; }

/* ============================================================= */
/*  Mobile "Jump to your prompt" link — hidden on desktop        */
/* ============================================================= */
.jump-link {
  display: none;
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--lovable-gradient);
  color: var(--athera-white);
  font-family: var(--athera-sans);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 12px 22px;
  border-radius: 999px;
  box-shadow: 0 8px 22px -6px rgba(248, 87, 166, 0.5);
  z-index: 40;
}

/* ============================================================= */
/*  Responsive: stack to one column on smaller screens           */
/* ============================================================= */
@media (max-width: 880px) {
  .site-header,
  .intro,
  .workspace {
    padding-left: 24px;
    padding-right: 24px;
  }

  .intro { padding-top: 40px; }

  .workspace {
    grid-template-columns: 1fr;   /* form, then preview below it */
    gap: 48px;
    padding-top: 48px;
  }

  /* Preview no longer sticks — it sits below the form. */
  .preview-column {
    position: static;
    top: auto;
  }
  .preview-box { max-height: none; }

  /* Show the floating shortcut to the preview. */
  .jump-link { display: inline-block; }
}

@media (max-width: 520px) {
  .site-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
}
