/*
Theme Name: Textuary Coming Soon
Theme URI: https://textuary.app
Author: Textuary
Author URI: https://textuary.app
Description: Minimal coming-soon / pre-sale landing theme for Textuary — offline study desk for the books you own.
Version: 1.1.2
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: textuary
Tags: coming-soon, landing-page, custom-logo, one-column
*/

/* Design tokens */
:root {
  --tx-bg0: #1a1714;
  --tx-bg1: #241f1a;
  --tx-parchment: #f3ead8;
  --tx-parchment-dim: #e4d7c0;
  --tx-ink: #1c1915;
  --tx-ink-soft: rgba(28, 25, 21, 0.72);
  --tx-terracotta: #a85a3a;
  --tx-terracotta-deep: #8a452c;
  --tx-moss: #4a5c48;
  --tx-glow: rgba(243, 234, 216, 0.08);
  --tx-radius: 2px;
  --font-display: "Fraunces", "Iowan Old Style", "Palatino Linotype", Palatino, serif;
  --font-body: "Source Serif 4", "Iowan Old Style", Georgia, serif;
  --font-ui: "DM Sans", "Avenir Next", "Segoe UI", sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

body.textuary-body {
  margin: 0;
  min-height: 100vh;
  color: var(--tx-parchment);
  font-family: var(--font-body);
  font-size: 1.125rem;
  line-height: 1.55;
  background: var(--tx-bg0);
  -webkit-font-smoothing: antialiased;
}

.tx-page {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* Atmospheric ground — edge-to-edge, not a flat slab */
.tx-atmosphere {
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(ellipse 90% 70% at 18% 12%, rgba(168, 90, 58, 0.22), transparent 55%),
    radial-gradient(ellipse 70% 60% at 88% 78%, rgba(74, 92, 72, 0.18), transparent 50%),
    linear-gradient(165deg, var(--tx-bg1) 0%, var(--tx-bg0) 48%, #120f0d 100%);
  pointer-events: none;
}

.tx-atmosphere::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.35;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.55'/%3E%3C/svg%3E");
  mix-blend-mode: overlay;
  pointer-events: none;
}

.tx-grain-sheen {
  position: absolute;
  inset: -20%;
  z-index: 0;
  background: radial-gradient(circle at 50% 40%, var(--tx-glow), transparent 45%);
  animation: tx-breathe 12s ease-in-out infinite;
  pointer-events: none;
}

@keyframes tx-breathe {
  0%,
  100% {
    opacity: 0.55;
    transform: scale(1);
  }
  50% {
    opacity: 1;
    transform: scale(1.04);
  }
}

.tx-shell {
  position: relative;
  z-index: 1;
  flex: 1;
  display: flex;
  flex-direction: column;
  width: min(1120px, 100%);
  margin: 0 auto;
  padding: clamp(1.25rem, 4vw, 2.5rem);
}

/* Hero: one composition — brand dominates */
.tx-hero {
  flex: 1;
  display: grid;
  align-items: end;
  min-height: min(88vh, 920px);
  padding-bottom: clamp(1.5rem, 5vh, 3rem);
}

.tx-hero-inner {
  display: grid;
  gap: clamp(1.25rem, 3vw, 2rem);
  max-width: 38rem;
  animation: tx-rise 1.1s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes tx-rise {
  from {
    opacity: 0;
    transform: translateY(28px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.tx-brand {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  text-decoration: none;
  color: inherit;
}

.tx-brand img {
  width: clamp(52px, 8vw, 72px);
  height: clamp(52px, 8vw, 72px);
  border-radius: 18%;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
}

.tx-brand-name {
  font-family: var(--font-display);
  font-size: clamp(2.75rem, 9vw, 5.5rem);
  font-weight: 550;
  font-variation-settings: "SOFT" 40, "WONK" 0.4;
  letter-spacing: -0.03em;
  line-height: 0.95;
  color: var(--tx-parchment);
}

.tx-headline {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.45rem, 3.4vw, 2.15rem);
  font-weight: 450;
  line-height: 1.25;
  letter-spacing: -0.015em;
  color: var(--tx-parchment-dim);
  max-width: 22ch;
}

.tx-lede {
  margin: 0;
  font-size: clamp(1.05rem, 2vw, 1.2rem);
  color: rgba(243, 234, 216, 0.72);
  max-width: 36ch;
}

.tx-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem 1.25rem;
  align-items: baseline;
  font-family: var(--font-ui);
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(243, 234, 216, 0.55);
}

.tx-meta strong {
  color: var(--tx-parchment);
  font-weight: 600;
}

.tx-price {
  color: var(--tx-terracotta);
  font-weight: 650;
}

/* CTA group */
.tx-cta {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  margin-top: 0.35rem;
  max-width: 26rem;
}

.tx-form {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: stretch;
}

/* Honeypot — off-screen, not display:none (some bots skip those). */
.tx-hp {
  position: absolute;
  left: -10000px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.tx-form label {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

.tx-form input[type="email"] {
  flex: 1 1 12rem;
  min-width: 0;
  border: 1px solid rgba(243, 234, 216, 0.22);
  background: rgba(18, 15, 13, 0.55);
  color: var(--tx-parchment);
  font-family: var(--font-ui);
  font-size: 1rem;
  padding: 0.85rem 1rem;
  border-radius: var(--tx-radius);
  outline: none;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.tx-form input[type="email"]::placeholder {
  color: rgba(243, 234, 216, 0.4);
}

.tx-form input[type="email"]:focus {
  border-color: rgba(168, 90, 58, 0.85);
  background: rgba(18, 15, 13, 0.75);
}

.tx-btn {
  appearance: none;
  border: 0;
  cursor: pointer;
  font-family: var(--font-ui);
  font-size: 0.95rem;
  font-weight: 650;
  letter-spacing: 0.02em;
  padding: 0.85rem 1.35rem;
  border-radius: var(--tx-radius);
  background: var(--tx-terracotta);
  color: #fff8f0;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease, transform 0.2s ease;
}

.tx-btn:hover,
.tx-btn:focus-visible {
  background: var(--tx-terracotta-deep);
  transform: translateY(-1px);
}

.tx-btn--ghost {
  background: transparent;
  color: var(--tx-parchment-dim);
  border: 1px solid rgba(243, 234, 216, 0.28);
  padding: 0.75rem 1.1rem;
  font-weight: 500;
}

.tx-btn--ghost:hover {
  background: rgba(243, 234, 216, 0.06);
  border-color: rgba(243, 234, 216, 0.45);
}

.tx-form-note {
  margin: 0;
  font-family: var(--font-ui);
  font-size: 0.78rem;
  color: rgba(243, 234, 216, 0.45);
}

.tx-form-status {
  margin: 0;
  font-family: var(--font-ui);
  font-size: 0.9rem;
  min-height: 1.25em;
}

.tx-form-status.is-ok {
  color: #9cba96;
}

.tx-form-status.is-err {
  color: #e0a090;
}

/* Secondary strip — one job: clarify what ships */
.tx-strip {
  position: relative;
  z-index: 1;
  border-top: 1px solid rgba(243, 234, 216, 0.1);
  background: rgba(12, 10, 8, 0.35);
  backdrop-filter: blur(8px);
}

.tx-strip-inner {
  width: min(1120px, 100%);
  margin: 0 auto;
  padding: 1.35rem clamp(1.25rem, 4vw, 2.5rem);
  display: grid;
  gap: 0.35rem;
}

.tx-strip h2 {
  margin: 0;
  font-family: var(--font-ui);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(243, 234, 216, 0.45);
}

.tx-strip p {
  margin: 0;
  font-size: 1.02rem;
  color: rgba(243, 234, 216, 0.78);
  max-width: 52ch;
}

.tx-footer {
  position: relative;
  z-index: 1;
  padding: 1.25rem clamp(1.25rem, 4vw, 2.5rem) 1.75rem;
  font-family: var(--font-ui);
  font-size: 0.75rem;
  color: rgba(243, 234, 216, 0.38);
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
  justify-content: space-between;
  width: min(1120px, 100%);
  margin: 0 auto;
}

.tx-footer a {
  color: rgba(243, 234, 216, 0.55);
  text-decoration: none;
}

.tx-footer a:hover {
  color: var(--tx-parchment);
}

/* Floating mark on large screens — visual anchor, not a card */
.tx-mark {
  position: absolute;
  right: clamp(-2%, 4vw, 8%);
  top: 18%;
  width: min(42vw, 420px);
  aspect-ratio: 1;
  z-index: 1;
  opacity: 0;
  animation: tx-mark-in 1.4s 0.25s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  pointer-events: none;
}

.tx-mark img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 30px 60px rgba(0, 0, 0, 0.45));
  border-radius: 22%;
}

@keyframes tx-mark-in {
  from {
    opacity: 0;
    transform: translateY(24px) rotate(-4deg);
  }
  to {
    opacity: 0.92;
    transform: translateY(0) rotate(-2deg);
  }
}

@media (max-width: 820px) {
  .tx-mark {
    display: none;
  }

  .tx-hero {
    align-items: center;
    min-height: 78vh;
  }
}

@media (prefers-reduced-motion: reduce) {
  .tx-grain-sheen,
  .tx-hero-inner,
  .tx-mark {
    animation: none !important;
  }

  .tx-hero-inner,
  .tx-mark {
    opacity: 1;
    transform: none;
  }
}
