/* Fancy Text — OverPress Tools */

:root {
  --primary: #066aab;
  --primary-dark: #054f80;
  --primary-light: #e6f1f9;
  --primary-tint: rgba(6, 106, 171, 0.06);
  --accent: #ed0a71;
  --accent-dark: #c20860;
  --accent-light: #fde6f1;
  --text: #14161b;
  --text-soft: #4a4a55;
  --text-dim: #8b8b95;
  --border: #ececef;
  --border-strong: #d6d6dd;
  --bg: #ffffff;
  --bg-soft: #fafafb;
  --bg-tint: #f4f5f7;
  --success: #00ab6b;
  --radius: 10px;
  --radius-lg: 16px;
  --shadow-sm: 0 1px 2px rgba(20, 22, 27, 0.04), 0 1px 3px rgba(20, 22, 27, 0.06);
  --ease: cubic-bezier(.2, .8, .2, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }

[hidden] { display: none !important; }

body {
  font-family: 'Roboto', -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(ellipse 80% 60% at 50% -10%, var(--primary-tint) 0%, transparent 60%),
    var(--bg);
  background-attachment: fixed;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

h1, h2, h3 {
  font-family: 'Montserrat', sans-serif;
  letter-spacing: -0.015em;
  line-height: 1.15;
}

a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-dark); }
button { font-family: inherit; }

/* Header */
.site-header {
  display: grid;
  grid-template-columns: 44px 1fr 44px;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  position: sticky;
  top: 0;
  z-index: 50;
}

.back, .header-spacer { width: 44px; height: 44px; }

.back {
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--text-soft);
  transition: background 0.15s var(--ease), color 0.15s var(--ease);
}

.back:hover, .back:active {
  background: var(--bg-tint);
  color: var(--text);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  justify-self: center;
  color: var(--text);
}

.brand:hover { color: var(--text); }

.brand-logo {
  height: 24px !important;
  width: auto;
  max-width: 220px;
  display: block;
}

.brand-suffix {
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  font-size: 0.62rem;
  color: var(--text-dim);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  padding: 3px 8px;
  border: 1px solid var(--border);
  border-radius: 999px;
  line-height: 1;
}

@media (min-width: 720px) {
  .brand-logo { height: 28px !important; }
  .brand-suffix { font-size: 0.66rem; padding: 4px 10px; }
}

/* Stage */
.stage {
  max-width: 720px;
  margin: 0 auto;
  padding: 24px 18px 80px;
}

@media (min-width: 720px) {
  .stage { padding: 32px 24px 80px; }
}

@media (min-width: 1024px) {
  .stage { max-width: 920px; padding: 40px 32px 80px; }
}

/* Hero */
.hero { margin-bottom: 22px; }

.kicker {
  display: inline-flex;
  align-items: center;
  background: var(--primary-light);
  color: var(--primary);
  padding: 5px 12px;
  border-radius: 999px;
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.hero h1 {
  font-size: clamp(2rem, 7vw, 2.6rem);
  font-weight: 800;
  margin-bottom: 8px;
}

.hero .lead {
  font-size: 1rem;
  color: var(--text-soft);
  max-width: 540px;
}

/* Input */
.input-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 20px;
}

.input-label {
  font-family: 'Montserrat', sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-dim);
  margin-bottom: 8px;
  display: block;
}

#input-text {
  width: 100%;
  border: none;
  outline: none;
  resize: vertical;
  font-family: 'Roboto', sans-serif;
  font-size: 1.05rem;
  line-height: 1.45;
  color: var(--text);
  background: transparent;
  min-height: 72px;
  max-height: 240px;
  padding: 0;
}

#input-text::placeholder { color: var(--text-dim); }

.input-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed var(--border);
  color: var(--text-dim);
  font-size: 0.8rem;
}

.link-btn {
  background: transparent;
  border: none;
  color: var(--primary);
  cursor: pointer;
  font-weight: 600;
  font-size: 0.85rem;
  padding: 4px 6px;
}

.link-btn:hover { color: var(--primary-dark); }

/* Styles list */
.styles-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.style-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 14px 14px 12px;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.15s var(--ease);
}

.style-card:focus-within {
  border-color: var(--primary);
}

.style-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
  gap: 12px;
}

.style-label {
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-dim);
  flex: 1;
  min-width: 0;
}

.copy-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  border: 1.5px solid var(--border);
  color: var(--text-soft);
  padding: 7px 14px;
  border-radius: 999px;
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  font-size: 0.78rem;
  cursor: pointer;
  transition: all 0.15s var(--ease);
  flex: 0 0 auto;
  min-height: 36px;
}

.copy-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-light);
}

.copy-btn:active { transform: scale(0.97); }

.copy-btn.copied {
  background: var(--success);
  border-color: var(--success);
  color: #fff;
}

.copy-btn svg { width: 14px; height: 14px; }

.style-output {
  width: 100%;
  font-size: 1.08rem;
  line-height: 1.45;
  color: var(--text);
  word-break: break-word;
  min-height: 1.45em;
  cursor: text;
  -webkit-user-select: text;
  user-select: text;
  padding: 6px 0 2px;
}

.style-output.placeholder {
  color: var(--text-dim);
  font-style: italic;
}

/* Footer */
.site-footer {
  padding: 22px;
  text-align: center;
  color: var(--text-dim);
  font-size: 0.78rem;
  border-top: 1px solid var(--border);
  background: var(--bg-soft);
}

.site-footer a {
  color: var(--text-soft);
  border-bottom: 1px dotted var(--text-dim);
}

/* Toast */
.toast {
  position: fixed;
  left: 50%;
  bottom: max(24px, env(safe-area-inset-bottom, 24px));
  transform: translateX(-50%) translateY(120%);
  background: var(--text);
  color: #fff;
  padding: 10px 18px 10px 14px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 500;
  font-size: 0.9rem;
  box-shadow: 0 16px 40px -12px rgba(20, 22, 27, 0.25);
  z-index: 100;
  transition: transform 0.35s var(--ease);
  max-width: calc(100vw - 32px);
}

.toast.show { transform: translateX(-50%) translateY(0); }

.toast-icon {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--success);
  color: #fff;
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
}

/* Desktop */
@media (min-width: 720px) {
  .style-card { padding: 16px 18px 14px; }
  .style-output { font-size: 1.15rem; }
}
