:root {
  --ink: #101c19;
  --ink-soft: #44554e;
  --mist: #dfece6;
  --paper: #f3f7f4;
  --leaf: #12725c;
  --leaf-deep: #0b4f41;
  --sun: #c9952e;
  --cream: #f8faf8;
  --line: rgba(16, 28, 25, 0.11);
  --shadow: 0 22px 50px rgba(16, 28, 25, 0.09);
  --radius: 20px;
  --max: 1120px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  font-family: "Sora", sans-serif;
  background:
    radial-gradient(900px 520px at 92% 0%, rgba(201, 149, 46, 0.2), transparent 58%),
    radial-gradient(780px 480px at -8% 18%, rgba(18, 114, 92, 0.18), transparent 55%),
    radial-gradient(600px 380px at 70% 85%, rgba(18, 114, 92, 0.08), transparent 60%),
    linear-gradient(165deg, #e4efe9 0%, var(--paper) 38%, #eef3f0 100%);
  min-height: 100vh;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.28;
  background-image:
    radial-gradient(rgba(16, 28, 25, 0.05) 0.7px, transparent 0.8px);
  background-size: 22px 22px;
  mask-image: linear-gradient(180deg, #000 0%, transparent 78%);
}

a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; }

.wrap {
  width: min(100% - 2rem, var(--max));
  margin-inline: auto;
  position: relative;
  z-index: 1;
}

/* —— Nav —— */
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.35rem 0 0;
  animation: rise 0.8s ease both;
}

.nav-mark {
  font-family: "Fraunces", serif;
  font-weight: 700;
  font-size: 1.2rem;
  letter-spacing: -0.03em;
  position: relative;
}
.nav-mark::after {
  content: "";
  display: inline-block;
  width: 0.42rem;
  height: 0.42rem;
  margin-left: 0.35rem;
  border-radius: 50%;
  background: var(--sun);
  transform: translateY(-0.2rem);
}

.nav a.cta-link,
.back-link {
  color: var(--leaf-deep);
  font-weight: 500;
  font-size: 0.92rem;
  padding: 0.45rem 0.75rem;
  border: 1px solid transparent;
  border-radius: 10px;
  transition: border-color 0.2s ease, background 0.2s ease;
}
.nav a.cta-link:hover,
.back-link:hover {
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.55);
}

/* —— Hero —— */
.hero {
  min-height: calc(100svh - 4.5rem);
  display: grid;
  align-content: center;
  gap: 1.35rem;
  padding: 2.75rem 0 4rem;
  position: relative;
}

.hero-brand {
  font-family: "Fraunces", serif;
  font-size: clamp(4.8rem, 15vw, 10rem);
  line-height: 0.86;
  letter-spacing: -0.045em;
  margin: 0;
  font-weight: 700;
  background: linear-gradient(120deg, var(--ink) 20%, var(--leaf-deep) 78%, var(--sun) 120%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: rise 0.9s 0.05s ease both;
}

.hero h1 {
  margin: 0;
  max-width: 15ch;
  font-family: "Fraunces", serif;
  font-weight: 500;
  font-size: clamp(1.55rem, 3.2vw, 2.35rem);
  line-height: 1.18;
  letter-spacing: -0.025em;
  animation: rise 0.9s 0.15s ease both;
}

.hero > p {
  margin: 0;
  max-width: 34ch;
  color: var(--ink-soft);
  font-size: 1.05rem;
  line-height: 1.6;
  animation: rise 0.9s 0.25s ease both;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 0.35rem;
  animation: rise 0.9s 0.35s ease both;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border: 0;
  border-radius: 12px;
  padding: 0.95rem 1.4rem;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary {
  background: linear-gradient(135deg, var(--ink), var(--leaf-deep));
  color: #f4f7f5;
  box-shadow: 0 12px 28px rgba(11, 79, 65, 0.22);
}
.btn-primary:hover { background: linear-gradient(135deg, var(--leaf-deep), var(--leaf)); }
.btn-ghost {
  background: rgba(255, 255, 255, 0.45);
  color: var(--ink);
  border: 1px solid var(--line);
  backdrop-filter: blur(6px);
}

.hero-visual {
  position: absolute;
  right: -2%;
  bottom: 10%;
  width: min(44vw, 440px);
  aspect-ratio: 1;
  border-radius: 42% 58% 48% 52% / 48% 42% 58% 52%;
  background:
    radial-gradient(circle at 32% 28%, rgba(255,255,255,0.8), transparent 40%),
    radial-gradient(circle at 72% 68%, rgba(201,149,46,0.5), transparent 46%),
    radial-gradient(circle at 42% 58%, rgba(18,114,92,0.62), #0b4f41 72%);
  animation: morph 12s ease-in-out infinite, float 8s ease-in-out infinite, rise 1.1s 0.2s ease both;
  box-shadow:
    inset 0 -34px 60px rgba(10, 77, 63, 0.28),
    0 30px 60px rgba(16, 28, 25, 0.12);
}

.hero-visual::before {
  content: "";
  position: absolute;
  inset: -8%;
  border-radius: inherit;
  border: 1px solid rgba(255,255,255,0.28);
  opacity: 0.7;
}

.hero-visual::after {
  content: "";
  position: absolute;
  inset: 22%;
  border-radius: 50%;
  border: 1px dashed rgba(255,255,255,0.4);
  animation: spin-slow 28s linear infinite;
}

@media (max-width: 820px) {
  .hero-visual {
    position: relative;
    right: auto;
    bottom: auto;
    width: min(68vw, 260px);
    margin-top: 0.5rem;
    order: -1;
  }
  .hero { align-content: start; padding-top: 1.35rem; min-height: auto; }
}

/* —— Page hero (detail) —— */
.page-hero {
  padding: 2.1rem 0 1.85rem;
  max-width: 40rem;
  animation: rise 0.8s ease both;
}
.page-hero .eyebrow {
  margin: 0 0 0.55rem;
  color: var(--leaf-deep);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.page-hero h1 {
  margin: 0 0 0.75rem;
  font-family: "Fraunces", serif;
  font-weight: 500;
  font-size: clamp(2rem, 3.6vw, 2.85rem);
  letter-spacing: -0.03em;
  line-height: 1.12;
}
.page-hero p {
  margin: 0;
  color: var(--ink-soft);
  line-height: 1.6;
  font-size: 1.02rem;
}

/* —— Tools —— */
section.tools {
  padding: 0.25rem 0 4.5rem;
}

.section-head {
  max-width: 36rem;
  margin-bottom: 1.65rem;
  animation: rise 0.8s ease both;
}
.section-head h2 {
  font-family: "Fraunces", serif;
  font-size: clamp(1.85rem, 3vw, 2.45rem);
  margin: 0 0 0.55rem;
  letter-spacing: -0.03em;
  font-weight: 500;
}
.section-head p {
  margin: 0;
  color: var(--ink-soft);
  line-height: 1.55;
}

.tool-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.1rem;
  animation: rise 0.9s 0.1s ease both;
}
@media (max-width: 720px) {
  .tool-grid { grid-template-columns: 1fr; }
}

.tool-option {
  position: relative;
  display: grid;
  gap: 0.7rem;
  align-content: start;
  padding: 1.45rem 1.45rem 1.35rem 1.55rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(165deg, rgba(255,255,255,0.82), rgba(255,255,255,0.55));
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
  overflow: hidden;
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}
.tool-option::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: linear-gradient(180deg, var(--leaf), var(--sun));
  opacity: 0.85;
}
a.tool-option:hover {
  transform: translateY(-4px);
  border-color: rgba(18, 114, 92, 0.28);
  box-shadow: 0 28px 55px rgba(16, 28, 25, 0.12);
}
.tool-option.soon {
  opacity: 0.68;
  box-shadow: none;
  background: rgba(255, 255, 255, 0.38);
}
.tool-option.soon::before {
  background: rgba(16, 28, 25, 0.18);
}

.tool-option .tool-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}
.tool-option .tag {
  display: inline-block;
  width: fit-content;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--leaf-deep);
  padding: 0.28rem 0.55rem;
  border-radius: 8px;
  background: rgba(18, 114, 92, 0.1);
}
.tool-option.soon .tag {
  color: var(--ink-soft);
  background: rgba(16, 28, 25, 0.06);
}
.tool-option .tool-num {
  font-family: "Fraunces", serif;
  font-size: 1.35rem;
  font-weight: 500;
  color: rgba(16, 28, 25, 0.18);
  letter-spacing: -0.03em;
}
.tool-option h3 {
  margin: 0;
  font-family: "Fraunces", serif;
  font-weight: 500;
  font-size: 1.5rem;
  letter-spacing: -0.025em;
}
.tool-option p {
  margin: 0;
  color: var(--ink-soft);
  line-height: 1.55;
  font-size: 0.94rem;
}
.tool-option .go {
  margin-top: 0.45rem;
  font-weight: 600;
  color: var(--leaf-deep);
  font-size: 0.92rem;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}
.tool-option .go::after {
  content: "→";
  transition: transform 0.2s ease;
}
a.tool-option:hover .go::after {
  transform: translateX(4px);
}

/* —— Simulator panel —— */
.sim {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 1.25rem;
  background: linear-gradient(165deg, rgba(255,255,255,0.8), rgba(255,255,255,0.55));
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 4px);
  padding: 1.35rem;
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
  animation: rise 0.9s 0.1s ease both;
}
@media (max-width: 900px) {
  .sim { grid-template-columns: 1fr; }
}

.sim-form, .sim-result { padding: 0.65rem; }
.sim-form h3,
.sim-result h3 {
  margin: 0 0 1rem;
  font-family: "Fraunces", serif;
  font-weight: 500;
  font-size: 1.4rem;
  letter-spacing: -0.02em;
}

.field {
  display: grid;
  gap: 0.4rem;
  margin-bottom: 1rem;
}
.field label {
  font-size: 0.9rem;
  font-weight: 500;
}
.field .hint {
  font-size: 0.8rem;
  color: var(--ink-soft);
}
.field input, .field select {
  width: 100%;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 12px;
  padding: 0.88rem 0.95rem;
  color: var(--ink);
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.field input:focus, .field select:focus {
  border-color: rgba(18, 114, 92, 0.55);
  box-shadow: 0 0 0 3px rgba(18, 114, 92, 0.12);
}

.row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem;
}
@media (max-width: 560px) {
  .row-2 { grid-template-columns: 1fr; }
}

.mode-toggle {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.4rem;
  margin-bottom: 1.1rem;
  padding: 0.3rem;
  background: rgba(16, 28, 25, 0.045);
  border-radius: 14px;
}
.mode-toggle button {
  border: 0;
  background: transparent;
  border-radius: 11px;
  padding: 0.72rem 0.5rem;
  cursor: pointer;
  color: var(--ink-soft);
  font-weight: 500;
  font-size: 0.88rem;
}
.mode-toggle button[aria-pressed="true"] {
  background: #fff;
  color: var(--ink);
  box-shadow: 0 8px 18px rgba(16, 28, 25, 0.07);
}

.metrics {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin-bottom: 1rem;
}
.metric {
  padding: 0.95rem 1rem;
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(18,114,92,0.09), rgba(18,114,92,0.02));
  border: 1px solid rgba(18, 114, 92, 0.12);
}
.metric.accent {
  grid-column: 1 / -1;
  background: linear-gradient(135deg, var(--leaf-deep), var(--leaf) 70%, #1a8a70);
  color: #f3faf7;
  border: 0;
}
.metric span {
  display: block;
  font-size: 0.76rem;
  opacity: 0.8;
  margin-bottom: 0.28rem;
}
.metric strong {
  font-family: "Fraunces", serif;
  font-size: clamp(1.35rem, 2.4vw, 1.85rem);
  font-weight: 500;
  letter-spacing: -0.02em;
}

.table-wrap {
  max-height: 320px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
}
th, td {
  padding: 0.65rem 0.75rem;
  text-align: right;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
th:first-child, td:first-child { text-align: left; }
th {
  position: sticky;
  top: 0;
  background: #eef5f1;
  font-weight: 600;
  text-align: right;
}
th:first-child { text-align: left; }
tr:last-child td { border-bottom: 0; }

.empty {
  color: var(--ink-soft);
  font-size: 0.95rem;
  line-height: 1.5;
  padding: 1.5rem 0.25rem;
}

.note {
  margin: 0.85rem 0 0;
  font-size: 0.8rem;
  color: var(--ink-soft);
  line-height: 1.45;
}

input[type="range"] {
  width: 100%;
  accent-color: var(--leaf);
}

.detail-block {
  margin: 2.5rem 0 1rem;
  padding-top: 1.75rem;
  border-top: 1px solid var(--line);
  animation: rise 0.8s ease both;
}
.detail-block h2 {
  margin: 0 0 1.1rem;
  font-family: "Fraunces", serif;
  font-weight: 500;
  font-size: 1.55rem;
  letter-spacing: -0.02em;
}
.detail-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.15rem;
}
@media (max-width: 800px) {
  .detail-grid { grid-template-columns: 1fr; }
}
.detail-grid article {
  padding: 1rem 1.05rem;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.42);
  border: 1px solid var(--line);
}
.detail-grid h3 {
  margin: 0 0 0.4rem;
  font-size: 1rem;
  font-weight: 600;
}
.detail-grid p {
  margin: 0;
  color: var(--ink-soft);
  line-height: 1.5;
  font-size: 0.92rem;
}

.other-tools {
  margin: 2.5rem 0 0;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
}
.other-tools h2 {
  margin: 0 0 0.85rem;
  font-family: "Fraunces", serif;
  font-weight: 500;
  font-size: 1.25rem;
}
.other-tools .links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}
.other-tools a {
  padding: 0.6rem 0.95rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255,255,255,0.55);
  font-size: 0.9rem;
  font-weight: 500;
  transition: background 0.2s ease, border-color 0.2s ease;
}
.other-tools a:hover {
  background: #fff;
  border-color: rgba(18, 114, 92, 0.35);
}

/* —— Footer + vistas —— */
footer {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.25rem;
  flex-wrap: wrap;
  padding: 1.75rem 0 2.75rem;
  color: var(--ink-soft);
  font-size: 0.88rem;
  border-top: 1px solid var(--line);
}

footer > p {
  margin: 0;
  max-width: 38rem;
  line-height: 1.5;
}

.visit-box {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 0.85rem 1rem;
  min-width: 11.5rem;
  padding: 1rem 1.2rem 1.05rem;
  border-radius: 18px;
  border: 1px solid rgba(18, 114, 92, 0.2);
  background:
    radial-gradient(120px 80px at 100% 0%, rgba(201, 149, 46, 0.22), transparent 70%),
    linear-gradient(145deg, rgba(255,255,255,0.9), rgba(232, 244, 238, 0.75));
  box-shadow:
    0 16px 36px rgba(16, 28, 25, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.75);
  overflow: hidden;
}

.visit-box::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 5px;
  background: linear-gradient(180deg, var(--sun), var(--leaf));
}

.visit-box-icon {
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 12px;
  background: linear-gradient(145deg, var(--leaf-deep), var(--leaf));
  box-shadow: 0 8px 16px rgba(11, 79, 65, 0.25);
  position: relative;
  grid-row: span 2;
}
.visit-box-icon::before,
.visit-box-icon::after {
  content: "";
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(255, 255, 255, 0.9);
  border-radius: 2px;
}
.visit-box-icon::before {
  top: 0.55rem;
  width: 1.05rem;
  height: 0.7rem;
  border-radius: 3px 3px 2px 2px;
  box-shadow: 0 0.85rem 0 -0.18rem rgba(255,255,255,0.55);
}
.visit-box-icon::after {
  bottom: 0.45rem;
  width: 0.55rem;
  height: 0.22rem;
  border-radius: 99px;
  opacity: 0.75;
}

.visit-box-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--leaf-deep);
  line-height: 1;
}

.visit-box-number {
  font-family: "Fraunces", serif;
  font-weight: 500;
  font-size: clamp(1.7rem, 3vw, 2.05rem);
  letter-spacing: -0.03em;
  color: var(--ink);
  line-height: 1;
  animation: count-pop 0.55s ease both;
}

@keyframes rise {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}
@keyframes morph {
  0%, 100% { border-radius: 42% 58% 48% 52% / 48% 42% 58% 52%; }
  50% { border-radius: 58% 42% 55% 45% / 42% 58% 42% 58%; }
}
@keyframes spin-slow {
  to { transform: rotate(360deg); }
}
@keyframes count-pop {
  from { opacity: 0; transform: translateY(6px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

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