:root {
  --ivory: #fbf7ee;
  --ivory-soft: #f8f1e2;
  --olive: #394214;
  --gold: #b6892d;
  --gold-soft: #d4b36a;
  --brown: #7a6247;
  --brown-soft: rgba(122, 98, 71, 0.62);
  --brown-faint: rgba(122, 98, 71, 0.42);
  --line: rgba(185, 143, 58, 0.22);
  --mx: 0px;
  --my: 0px;
}

* { box-sizing: border-box; }

html {
  width: 100%;
  scroll-behavior: smooth;
  background: var(--ivory);
  -webkit-text-size-adjust: 100%;
}

body {
  width: 100%;
  min-height: 100%;
  margin: 0;
  color: var(--brown);
  font-family: Georgia, "Times New Roman", serif;
  background:
    radial-gradient(circle at 50% 22%, rgba(255,255,255,.82) 0 14%, transparent 36%),
    radial-gradient(circle at 14% 18%, rgba(226, 194, 123, .14), transparent 34%),
    radial-gradient(circle at 86% 78%, rgba(101, 119, 64, .07), transparent 36%),
    linear-gradient(180deg, #fffdf7 0%, var(--ivory) 50%, #f6ecda 100%);
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: .22;
  mix-blend-mode: multiply;
  background-image:
    linear-gradient(rgba(106, 89, 61, .045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(106, 89, 61, .035) 1px, transparent 1px);
  background-size: 96px 96px;
  mask-image: radial-gradient(circle at center, black 0 42%, transparent 78%);
  z-index: 0;
}

/* ===== Preloader (gentle) ===== */

.preloader {
  position: fixed;
  inset: 0;
  z-index: 99;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 50% 50%, rgba(255,255,255,.92), transparent 36%),
    linear-gradient(135deg, #fffdf7, #f6ecda);
  transition: opacity .9s ease, visibility .9s ease;
}

.preloader.is-hidden {
  opacity: 0;
  visibility: hidden;
}

.loader-mark {
  position: relative;
  width: 64px;
  height: 64px;
}

.loader-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1px solid rgba(182, 137, 45, .22);
  border-top-color: rgba(57, 66, 20, .55);
  animation: spin 1.6s linear infinite;
}

/* ===== Page ===== */

.page {
  position: relative;
  min-height: 100svh;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  padding: 0 clamp(20px, 4vw, 56px);
  opacity: 0;
  transition: opacity 1.1s ease;
}

body.is-ready .page { opacity: 1; }

.grain-canvas {
  position: fixed;
  inset: 0;
  z-index: -4;
  width: 100%;
  height: 100%;
  opacity: .32;
  pointer-events: none;
}

.ambient {
  position: fixed;
  z-index: -3;
  border-radius: 50%;
  pointer-events: none;
  filter: blur(8px);
}

.orb-one {
  width: 42vw;
  height: 42vw;
  left: -14vw;
  top: -10vw;
  background: radial-gradient(circle, rgba(213, 178, 102, .22), transparent 64%);
  animation: driftOne 18s ease-in-out infinite;
}

.orb-two {
  width: 38vw;
  height: 38vw;
  right: -12vw;
  bottom: -14vw;
  background: radial-gradient(circle, rgba(82, 98, 48, .10), transparent 64%);
  animation: driftTwo 22s ease-in-out infinite;
}

.silk-line {
  position: fixed;
  z-index: -2;
  width: min(560px, 64vw);
  height: auto;
  opacity: .24;
  pointer-events: none;
}

.silk-line path {
  fill: none;
  stroke: rgba(181, 146, 77, .26);
  stroke-width: 1;
  stroke-linecap: round;
  stroke-dasharray: 720;
  stroke-dashoffset: 720;
  animation: drawLine 6s ease forwards, lineBreath 9s ease-in-out infinite;
}

.silk-left {
  left: -10vw;
  bottom: 6vh;
  transform: translate(calc(var(--mx) * -0.01), calc(var(--my) * -0.008));
}

.silk-right {
  right: -10vw;
  top: 4vh;
  transform: translate(calc(var(--mx) * 0.01), calc(var(--my) * 0.008));
}

/* ===== Hero ===== */

.hero {
  position: relative;
  flex: 1;
  width: min(720px, 100%);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: clamp(96px, 16vh, 140px) clamp(8px, 2vw, 24px) clamp(48px, 8vh, 72px);
  transform: translate(calc(var(--mx) * -0.003), calc(var(--my) * -0.002));
}

.logo-card {
  width: min(540px, 80vw);
  margin: 0 auto 44px;
  filter: drop-shadow(0 16px 32px rgba(83, 60, 24, .05));
}

.logo {
  display: block;
  width: 100%;
  height: auto;
  user-select: none;
  -webkit-user-drag: none;
}

.breathe {
  animation: logoBreath 6.5s ease-in-out infinite;
}

.divider {
  display: grid;
  grid-template-columns: minmax(32px, 80px) 14px minmax(32px, 80px);
  align-items: center;
  gap: 14px;
  margin-bottom: 28px;
  opacity: .55;
}

.divider span {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(175, 136, 65, .5), transparent);
}

.divider i {
  width: 10px;
  height: 14px;
  border-radius: 100% 0 100% 0;
  background: linear-gradient(135deg, rgba(72, 82, 34, .55), rgba(187, 143, 45, .55));
  transform: rotate(-38deg);
  animation: miniLeaf 3.2s ease-in-out infinite;
}

h1 {
  margin: 0;
  color: rgba(72, 56, 36, .88);
  font-weight: 400;
  font-size: clamp(26px, 3.4vw, 38px);
  letter-spacing: .015em;
  line-height: 1.18;
}

.subtitle {
  margin: 18px auto 0;
  max-width: 38ch;
  color: var(--brown-soft);
  font-size: clamp(15px, 1.35vw, 17px);
  line-height: 1.75;
  letter-spacing: .015em;
}

.contact {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 48px;
  padding: 9px 18px;
  border-radius: 999px;
  color: var(--brown-soft);
  font-size: 15px;
  letter-spacing: .02em;
  text-decoration: none;
  background: rgba(255, 255, 255, .3);
  border: 1px solid rgba(186, 147, 73, .14);
  transition: transform .4s ease, color .4s ease, background .4s ease, border-color .4s ease;
}

.contact:hover {
  transform: translateY(-1px);
  color: rgba(57, 66, 20, .92);
  background: rgba(255,255,255,.5);
  border-color: rgba(184, 139, 45, .28);
}

.mail-icon {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 1px solid rgba(185, 139, 45, .5);
  position: relative;
}

.mail-icon::before,
.mail-icon::after {
  content: "";
  position: absolute;
  width: 6px;
  height: 1px;
  left: 4px;
  top: 8px;
  background: rgba(185, 139, 45, .6);
  transform: rotate(32deg);
  transform-origin: left center;
}

.mail-icon::after {
  left: auto;
  right: 4px;
  transform: rotate(-32deg);
  transform-origin: right center;
}

/* ===== Footer ===== */

.footer {
  position: relative;
  z-index: 2;
  padding: 24px 0 28px;
  text-align: center;
  font-size: 12px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--brown-faint);
}

/* ===== Floating seeds ===== */

.floating-seed {
  position: fixed;
  width: 7px;
  height: 13px;
  border-radius: 100% 0 100% 0;
  background: linear-gradient(135deg, rgba(63, 73, 24, .22), rgba(184, 139, 45, .2));
  pointer-events: none;
  z-index: -1;
  opacity: 0;
  animation: seedFloat var(--d, 12s) ease-in-out var(--delay, 0s) infinite;
}

/* ===== Animations ===== */

@keyframes spin { to { transform: rotate(360deg); } }

@keyframes logoBreath {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-6px) scale(1.008); }
}

@keyframes miniLeaf {
  0%, 100% { transform: rotate(-38deg) scale(1); opacity: .55; }
  50% { transform: rotate(-31deg) scale(1.1); opacity: .85; }
}

@keyframes driftOne {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  50% { transform: translate3d(3vw, 2vh, 0) scale(1.05); }
}

@keyframes driftTwo {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  50% { transform: translate3d(-2vw, -3vh, 0) scale(1.06); }
}

@keyframes drawLine { to { stroke-dashoffset: 0; } }

@keyframes lineBreath {
  0%, 100% { opacity: .22; }
  50% { opacity: .42; }
}

@keyframes seedFloat {
  0%   { opacity: 0; transform: translate3d(0, 14px, 0) rotate(0deg) scale(.7); }
  18%  { opacity: .45; }
  60%  { opacity: .22; }
  100% { opacity: 0; transform: translate3d(var(--x, 50px), -90px, 0) rotate(140deg) scale(1.1); }
}

/* ===== Responsive ===== */

@media (max-width: 760px) {
  .page { padding: 0 16px; }

  .hero {
    padding-top: clamp(80px, 14vh, 120px);
    padding-bottom: clamp(40px, 8vh, 64px);
  }

  .logo-card {
    width: min(360px, 86vw);
    margin-bottom: 32px;
  }

  .divider { margin-bottom: 22px; gap: 12px; }

  h1 { font-size: clamp(22px, 6vw, 28px); }
  .subtitle { font-size: 14.5px; }

  .contact { margin-top: 36px; font-size: 14px; }

  .silk-left, .silk-right { width: 70vw; opacity: .18; }
  .grain-canvas { opacity: .26; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
  }

  .grain-canvas,
  .floating-seed {
    display: none;
  }
}
