:root {
  --ink: #13211e;
  --ink-soft: #2a3f39;
  --muted: #5d7169;
  --paper: #eef2ec;
  --paper-2: #e4ebe3;
  --surface: #f8faf7;
  --forest: #14352f;
  --forest-2: #1f4d44;
  --amber: #e8a54b;
  --amber-deep: #c9842a;
  --line: rgba(20, 53, 47, 0.14);
  --shadow: 0 24px 60px rgba(19, 33, 30, 0.14);
  --radius: 18px;
  --display: "Fraunces", Georgia, serif;
  --sans: "Sora", system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--sans);
  color: var(--ink);
  background:
    radial-gradient(1200px 600px at 10% -10%, rgba(232, 165, 75, 0.14), transparent 55%),
    radial-gradient(900px 500px at 90% 0%, rgba(31, 77, 68, 0.14), transparent 50%),
    linear-gradient(180deg, #e7eee8 0%, var(--paper) 40%, #dfe8e1 100%);
  min-height: 100vh;
  line-height: 1.55;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }

.shell {
  width: min(1120px, calc(100% - 2rem));
  margin-inline: auto;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(14px);
  background: rgba(238, 242, 236, 0.82);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
}

.brand img {
  width: 2.35rem;
  height: 2.35rem;
  border-radius: 0.7rem;
  box-shadow: 0 8px 20px rgba(20, 53, 47, 0.22);
}

.brand-text {
  font-family: var(--display);
  font-weight: 650;
  font-size: 1.35rem;
  letter-spacing: -0.03em;
}

.brand-text em {
  font-style: normal;
  color: var(--forest-2);
}

.nav {
  display: flex;
  align-items: center;
  gap: 0.45rem 0.75rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.nav > a:not(.btn) {
  font-size: 0.92rem;
  color: var(--ink-soft);
  font-weight: 500;
}

.nav > a:not(.btn):hover { color: var(--forest); }

.nav .btn {
  white-space: nowrap;
  flex-shrink: 0;
}

.nav .btn-primary {
  background: var(--forest);
  color: #f7f3ea !important;
  box-shadow: 0 10px 24px rgba(20, 53, 47, 0.28);
}

.nav .btn-primary:hover {
  background: var(--forest-2);
  color: #fff !important;
}

.nav .btn-ghost {
  background: #fff;
  border-color: rgba(20, 53, 47, 0.22);
  color: var(--forest) !important;
}

.nav .btn-ghost:hover {
  background: rgba(20, 53, 47, 0.08);
  color: var(--forest) !important;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  border-radius: 999px;
  padding: 0.72rem 1.2rem;
  border: 1px solid transparent;
  font-weight: 600;
  font-size: 0.92rem;
  transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn-primary {
  background: var(--forest);
  color: #f7f3ea;
  box-shadow: 0 12px 28px rgba(20, 53, 47, 0.28);
}

.btn-primary:hover { background: var(--forest-2); }

.btn-amber {
  background: var(--amber);
  color: var(--ink);
  box-shadow: 0 12px 28px rgba(232, 165, 75, 0.35);
}

.btn-amber:hover { background: var(--amber-deep); color: #fff; }

.btn-ghost {
  background: transparent;
  border-color: var(--line);
  color: var(--forest);
}

.btn-ghost:hover { background: rgba(20, 53, 47, 0.06); }

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

/* Hero */
.hero {
  position: relative;
  min-height: min(92vh, 820px);
  display: grid;
  align-items: end;
  overflow: hidden;
  padding: 2.5rem 0 3.5rem;
}

.hero-stage {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.hero-stage::before {
  content: "";
  position: absolute;
  inset: 8% 6% auto auto;
  width: min(58vw, 620px);
  height: min(58vw, 620px);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(232, 165, 75, 0.22), transparent 68%);
  animation: drift 12s ease-in-out infinite alternate;
}

.hero-stage::after {
  content: "";
  position: absolute;
  inset: auto auto 0 0;
  width: 100%;
  height: 42%;
  background: linear-gradient(180deg, transparent, rgba(20, 53, 47, 0.06));
}

.doc-stack {
  position: absolute;
  right: max(4%, calc(50% - 520px));
  top: 12%;
  width: min(46vw, 420px);
  aspect-ratio: 4 / 5;
  transform-style: preserve-3d;
}

.doc {
  position: absolute;
  inset: 0;
  border-radius: 14px;
  background: linear-gradient(160deg, #fffdf8 0%, #f0e8d6 100%);
  border: 1px solid rgba(20, 53, 47, 0.12);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.doc::before {
  content: "";
  position: absolute;
  left: 12%;
  right: 12%;
  top: 18%;
  height: 10px;
  border-radius: 999px;
  background: rgba(20, 53, 47, 0.12);
  box-shadow:
    0 28px 0 rgba(20, 53, 47, 0.08),
    0 56px 0 rgba(20, 53, 47, 0.08),
    0 84px 0 rgba(20, 53, 47, 0.08),
    0 112px 0 rgba(20, 53, 47, 0.08);
}

.doc-a {
  transform: rotate(-8deg) translate(-8%, 4%);
  animation: floatA 7s ease-in-out infinite;
}

.doc-b {
  transform: rotate(3deg) translate(4%, -2%);
  animation: floatB 8s ease-in-out infinite;
}

.doc-c {
  transform: rotate(9deg) translate(10%, 8%);
  background:
    linear-gradient(135deg, transparent 55%, rgba(232, 165, 75, 0.28) 55.5%, rgba(232, 165, 75, 0.28) 72%, transparent 72.5%),
    linear-gradient(160deg, #fffdf8 0%, #f0e8d6 100%);
  animation: floatC 6.5s ease-in-out infinite;
}

.doc-c .mark {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-family: var(--display);
  font-size: clamp(1.4rem, 3vw, 2rem);
  color: rgba(20, 53, 47, 0.35);
  font-weight: 700;
  letter-spacing: 0.08em;
  transform: rotate(-28deg);
}

.hero-copy {
  position: relative;
  z-index: 2;
  max-width: 34rem;
}

.brand-mega {
  margin: 0 0 0.85rem;
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(3.2rem, 9vw, 5.6rem);
  letter-spacing: -0.045em;
  line-height: 0.95;
  color: var(--forest);
  animation: rise 0.8s ease both;
}

.brand-mega span {
  display: inline-block;
  color: var(--amber-deep);
}

.hero-line {
  margin: 0 0 0.85rem;
  font-size: clamp(1.25rem, 2.6vw, 1.7rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--ink);
  animation: rise 0.8s ease 0.08s both;
}

.hero-lead {
  margin: 0 0 1.4rem;
  color: var(--muted);
  max-width: 34ch;
  font-size: 1.02rem;
  animation: rise 0.8s ease 0.14s both;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  animation: rise 0.8s ease 0.2s both;
}

.plan-pill {
  margin-top: 1.1rem;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.82rem;
  color: var(--muted);
  font-family: var(--mono);
  animation: rise 0.8s ease 0.26s both;
}

.plan-pill i {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: #2f9e6e;
  display: inline-block;
}

/* Ads */
.ad-slot {
  margin: 1.25rem auto;
  width: min(1120px, calc(100% - 2rem));
  min-height: 90px;
  border: 1px dashed rgba(20, 53, 47, 0.22);
  border-radius: 12px;
  background: rgba(255, 253, 248, 0.65);
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-family: var(--mono);
}

.ad-slot.compact { min-height: 70px; }

.ad-slot.hidden,
.is-pro .ad-slot { display: none; }

/* Tools */
.tools {
  padding: 1rem 0 4rem;
}

.tools-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  align-items: end;
  margin-bottom: 1.25rem;
}

.tools-head h2 {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(1.8rem, 3.5vw, 2.4rem);
  letter-spacing: -0.03em;
  color: var(--forest);
}

.tools-head p {
  margin: 0.35rem 0 0;
  color: var(--muted);
  max-width: 42ch;
}

.tool-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-bottom: 1rem;
}

.tool-tab {
  border: 1px solid var(--line);
  background: rgba(255, 253, 248, 0.7);
  color: var(--ink-soft);
  border-radius: 999px;
  padding: 0.55rem 0.95rem;
  font-weight: 600;
  font-size: 0.88rem;
}

.tool-tab[aria-selected="true"] {
  background: var(--forest);
  color: #f7f3ea;
  border-color: var(--forest);
}

.workspace {
  display: grid;
  grid-template-columns: 1.35fr 0.9fr;
  gap: 1rem;
  align-items: start;
}

.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.15rem 1.2rem 1.3rem;
  box-shadow: 0 10px 30px rgba(19, 33, 30, 0.05);
}

.panel h3 {
  margin: 0 0 0.35rem;
  font-family: var(--display);
  font-size: 1.35rem;
  letter-spacing: -0.02em;
}

.panel .hint {
  margin: 0 0 1rem;
  color: var(--muted);
  font-size: 0.92rem;
}

.dropzone {
  border: 1.5px dashed rgba(20, 53, 47, 0.28);
  border-radius: 14px;
  padding: 1.6rem 1rem;
  text-align: center;
  background:
    linear-gradient(180deg, rgba(232, 165, 75, 0.08), transparent 60%),
    #fbf8f1;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.dropzone.dragover {
  border-color: var(--forest);
  background: rgba(31, 77, 68, 0.08);
}

.dropzone strong {
  display: block;
  margin-bottom: 0.25rem;
  font-size: 1.02rem;
}

.dropzone span {
  color: var(--muted);
  font-size: 0.88rem;
}

.dropzone .browse {
  margin-top: 0.9rem;
}

.file-list {
  list-style: none;
  margin: 1rem 0 0;
  padding: 0;
  display: grid;
  gap: 0.55rem;
}

.file-list li {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.7rem;
  align-items: center;
  padding: 0.7rem 0.8rem;
  border-radius: 12px;
  background: #f4efe4;
  border: 1px solid rgba(20, 53, 47, 0.08);
}

.file-list .ord {
  width: 1.7rem;
  height: 1.7rem;
  border-radius: 8px;
  background: var(--forest);
  color: #f7f3ea;
  display: grid;
  place-items: center;
  font-size: 0.75rem;
  font-family: var(--mono);
}

.file-meta strong {
  display: block;
  font-size: 0.9rem;
  word-break: break-all;
}

.file-meta span {
  font-size: 0.78rem;
  color: var(--muted);
  font-family: var(--mono);
}

.file-actions {
  display: flex;
  gap: 0.25rem;
}

.icon-btn {
  width: 2rem;
  height: 2rem;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #fffdf8;
  color: var(--ink-soft);
  display: grid;
  place-items: center;
  font-size: 0.85rem;
}

.icon-btn:hover { background: rgba(20, 53, 47, 0.08); }

.controls {
  display: grid;
  gap: 0.85rem;
  margin-top: 1rem;
}

.field label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 0.35rem;
  color: var(--ink-soft);
}

.field input[type="text"],
.field input[type="number"],
.field select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.65rem 0.75rem;
  background: #fff;
  color: var(--ink);
}

.field input[type="range"] { width: 100%; }

.row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.actions-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 0.4rem;
}

.status {
  margin-top: 0.9rem;
  min-height: 1.3rem;
  font-size: 0.88rem;
  color: var(--muted);
}

.status.error { color: #a33b2c; }
.status.ok { color: #1f6b4a; }

.progress {
  height: 6px;
  border-radius: 999px;
  background: rgba(20, 53, 47, 0.1);
  overflow: hidden;
  margin-top: 0.65rem;
  display: none;
}

.progress.on { display: block; }

.progress > span {
  display: block;
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--forest), var(--amber));
  transition: width 0.25s ease;
}

.side-stack { display: grid; gap: 1rem; }

.limit-box {
  border-radius: 14px;
  padding: 1rem 1.05rem;
  background: linear-gradient(160deg, #163d36, #1f4d44);
  color: #f4efe6;
}

.limit-box h4 {
  margin: 0 0 0.35rem;
  font-family: var(--display);
  font-size: 1.15rem;
}

.limit-box p {
  margin: 0 0 0.85rem;
  opacity: 0.88;
  font-size: 0.9rem;
}

.limit-box ul {
  margin: 0 0 1rem;
  padding-left: 1.1rem;
  font-size: 0.86rem;
  opacity: 0.9;
}

.limit-meter {
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  overflow: hidden;
  margin-bottom: 0.55rem;
}

.limit-meter > span {
  display: block;
  height: 100%;
  width: 0%;
  background: var(--amber);
}

.limit-meta {
  font-family: var(--mono);
  font-size: 0.75rem;
  opacity: 0.8;
}

.limit-box .btn {
  width: 100%;
}

.contact-note {
  margin: 0.75rem 0 0;
  font-size: 0.8rem;
  opacity: 0.9;
  line-height: 1.45;
}

.contact-note a {
  color: #f4efe6;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.price .contact-block {
  margin: 0 0 1rem;
  padding: 0.85rem 0.9rem;
  border-radius: 12px;
  background: rgba(255, 253, 248, 0.12);
  font-size: 0.88rem;
  display: grid;
  gap: 0.35rem;
}

.price.featured .contact-block a {
  color: #f7f3ea;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.price:not(.featured) .contact-block {
  background: rgba(20, 53, 47, 0.05);
}

.privacy {
  font-size: 0.88rem;
  color: var(--muted);
}

.privacy strong { color: var(--forest); }

/* Pricing */
.pricing {
  padding: 1rem 0 4rem;
}

.pricing .shell > header {
  margin-bottom: 1.4rem;
}

.pricing h2 {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(1.8rem, 3.5vw, 2.4rem);
  letter-spacing: -0.03em;
  color: var(--forest);
}

.pricing header p {
  margin: 0.4rem 0 0;
  color: var(--muted);
  max-width: 40ch;
}

.price-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.price {
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--surface);
  padding: 1.35rem 1.3rem 1.5rem;
}

.price.featured {
  background: var(--forest);
  color: #f7f3ea;
  border-color: var(--forest);
  box-shadow: var(--shadow);
}

.price .tag {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.75;
}

.price h3 {
  margin: 0.35rem 0 0.2rem;
  font-family: var(--display);
  font-size: 1.6rem;
}

.price .amount {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  margin: 0.5rem 0 0.9rem;
}

.price .amount small {
  font-size: 0.95rem;
  font-weight: 500;
  opacity: 0.75;
}

.price ul {
  margin: 0 0 1.2rem;
  padding-left: 1.1rem;
  display: grid;
  gap: 0.4rem;
  font-size: 0.92rem;
}

.price.featured .btn-primary {
  background: var(--amber);
  color: var(--ink);
}

.price.featured .btn-primary:hover {
  background: #f0b45d;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 1.5rem 0 2rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.8rem;
}

.site-footer a { text-decoration: underline; text-underline-offset: 3px; }

.tool-panel { display: none; }
.tool-panel.active { display: block; }

.toast {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 60;
  background: var(--forest);
  color: #f7f3ea;
  padding: 0.85rem 1rem;
  border-radius: 12px;
  box-shadow: var(--shadow);
  transform: translateY(120%);
  opacity: 0;
  transition: transform 0.3s ease, opacity 0.3s ease;
  max-width: min(90vw, 320px);
  font-size: 0.9rem;
}

.toast.show {
  transform: translateY(0);
  opacity: 1;
}

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

@keyframes floatA {
  0%, 100% { transform: rotate(-8deg) translate(-8%, 4%); }
  50% { transform: rotate(-6deg) translate(-10%, 0%); }
}

@keyframes floatB {
  0%, 100% { transform: rotate(3deg) translate(4%, -2%); }
  50% { transform: rotate(5deg) translate(2%, 2%); }
}

@keyframes floatC {
  0%, 100% { transform: rotate(9deg) translate(10%, 8%); }
  50% { transform: rotate(7deg) translate(12%, 4%); }
}

@keyframes drift {
  from { transform: translate(0, 0) scale(1); }
  to { transform: translate(-4%, 6%) scale(1.06); }
}

@media (max-width: 900px) {
  .doc-stack {
    position: relative;
    right: auto;
    top: auto;
    width: min(70vw, 280px);
    margin: 0 0 1.5rem auto;
    min-height: 220px;
  }

  .hero {
    min-height: auto;
    align-items: start;
    padding-top: 1.5rem;
  }

  .hero-copy { max-width: none; }

  .workspace,
  .price-grid,
  .row-2 { grid-template-columns: 1fr; }

  .nav .hide-sm { display: none; }

  .nav .btn {
    padding: 0.62rem 0.95rem;
    font-size: 0.85rem;
  }

  .brand-text { font-size: 1.15rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
}
