/* Granary Software — granarysoftware.com
   One page, one stylesheet, no build step. Deep prairie-night greens, wheat gold, and a
   serif with some character. Everything scales from the phone up. */

:root {
  --night: #0f1a14;
  --night-2: #132219;
  --moss: #1b2d23;
  --moss-2: #24382d;
  --line: #2f4638;

  --cream: #f6efe0;
  --cream-muted: #c9c1ae;
  --cream-faint: #8f9a90;

  --gold: #e6b84a;
  --gold-2: #f3cf6e;
  --gold-deep: #c8922c;

  --radius: 14px;
  --radius-lg: 22px;
  --max: 1120px;
  --gutter: 20px;

  --display: "Fraunces", Georgia, "Times New Roman", serif;
  --text: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body {
  margin: 0;
  background: var(--night);
  color: var(--cream);
  font-family: var(--text);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--gold); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }

h1, h2, h3 {
  font-family: var(--display);
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: -0.015em;
  margin: 0;
}
h1 { font-size: clamp(2.6rem, 7vw, 5.4rem); font-variation-settings: "opsz" 144, "SOFT" 40; }
h2 { font-size: clamp(2rem, 4.5vw, 3.2rem); font-variation-settings: "opsz" 96, "SOFT" 30; }
h3 { font-size: 1.45rem; font-variation-settings: "opsz" 48; }
h1 em { font-style: italic; color: var(--gold); font-weight: 400; }
p { margin: 0 0 1em; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.row { display: flex; align-items: center; justify-content: space-between; gap: 16px; }

.skip {
  position: absolute; left: -999px; top: 8px;
  background: var(--gold); color: var(--night); padding: 8px 12px; border-radius: 8px; z-index: 100;
}
.skip:focus { left: 8px; }

.kicker {
  font-size: 0.8rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--gold); margin: 0 0 10px;
}
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 0.9rem; color: var(--cream-muted); margin: 0 0 22px;
}
.eyebrow .dot {
  width: 8px; height: 8px; border-radius: 50%; background: var(--gold);
  box-shadow: 0 0 0 4px rgba(230, 184, 74, 0.18);
}

/* ---- Buttons --------------------------------------------------------------- */

.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 13px 22px; border-radius: 999px;
  font-weight: 600; font-size: 1rem; line-height: 1;
  border: 1px solid transparent; white-space: nowrap;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn svg { width: 18px; height: 18px; }
.btn-gold { background: var(--gold); color: var(--night); }
.btn-gold:hover { background: var(--gold-2); }
.btn-ghost { color: var(--cream); border-color: var(--line); background: rgba(255, 255, 255, 0.02); }
.btn-ghost:hover { border-color: var(--cream-faint); }
.btn-small { padding: 10px 16px; font-size: 0.9rem; background: var(--gold); color: var(--night); }
.btn-small:hover { background: var(--gold-2); }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-top: 28px; }

/* ---- Header --------------------------------------------------------------- */

header.top {
  position: sticky; top: 0; z-index: 50;
  background: rgba(15, 26, 20, 0.82);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
header.top .row { height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 12px; color: var(--cream); }
.brand:hover { text-decoration: none; }
.mark { width: 34px; height: 34px; flex: none; }
.brand-name { font-family: var(--display); font-size: 1.25rem; font-weight: 600; letter-spacing: -0.01em; }
.brand-soft { font-weight: 400; color: var(--cream-muted); }
.nav { display: flex; align-items: center; gap: 26px; }
.nav a { color: var(--cream-muted); font-weight: 500; font-size: 0.95rem; }
.nav a:hover { color: var(--cream); text-decoration: none; }
.nav .btn { color: var(--night); }

/* ---- Hero ----------------------------------------------------------------- */

.hero {
  position: relative;
  overflow: hidden;
  padding: 96px 0 0;
  background:
    radial-gradient(1200px 600px at 80% -10%, rgba(230, 184, 74, 0.12), transparent 60%),
    linear-gradient(180deg, var(--night) 0%, var(--night-2) 100%);
}
.hero-grid {
  display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 40px; align-items: center;
  padding-bottom: 40px;
}
.lede { font-size: 1.2rem; color: var(--cream-muted); max-width: 34em; margin-top: 22px; }
.hero-art { position: relative; }
.silo { width: 100%; max-width: 420px; margin: 0 auto; display: block; }
.silo .moon { filter: drop-shadow(0 0 18px rgba(243, 207, 110, 0.55)); }

/* The wheat leans in a slow breeze. Each stalk has its own timing so the field never
   moves as one piece. Reduced-motion users get a still field. */
.wheat .stalk { transform-origin: 50% 100%; transform-box: fill-box; animation: sway 4.5s ease-in-out infinite alternate; }
.wheat .s2 { animation-delay: -0.9s; animation-duration: 5.2s; }
.wheat .s3 { animation-delay: -2.1s; animation-duration: 4.1s; }
.wheat .s4 { animation-delay: -1.4s; animation-duration: 5.8s; }
.wheat .s5 { animation-delay: -3.0s; animation-duration: 4.8s; }
.wheat .s6 { animation-delay: -0.4s; animation-duration: 5.5s; }
@keyframes sway { from { transform: rotate(-2.5deg); } to { transform: rotate(2.5deg); } }
@media (prefers-reduced-motion: reduce) { .wheat .stalk { animation: none; } }

/* A row of wheat along the bottom edge of the hero, drawn as a repeating gradient so it
   costs nothing and scales to any width. */
.hero-field {
  height: 54px;
  background:
    repeating-linear-gradient(90deg, transparent 0 22px, rgba(230, 184, 74, 0.28) 22px 24px, transparent 24px 46px),
    linear-gradient(180deg, transparent, rgba(230, 184, 74, 0.06));
  mask-image: linear-gradient(180deg, transparent, #000 70%);
  -webkit-mask-image: linear-gradient(180deg, transparent, #000 70%);
  border-bottom: 1px solid var(--line);
}

/* ---- Sections ------------------------------------------------------------- */

section { padding: 96px 0; }
.section-head { max-width: 40em; margin-bottom: 44px; }

/* ---- Work ----------------------------------------------------------------- */

.work { background: var(--night-2); }
.feature {
  display: grid; grid-template-columns: 1.1fr 1fr; gap: 48px; align-items: center;
  background: linear-gradient(160deg, var(--moss) 0%, var(--night-2) 100%);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 40px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.35);
}
.feature-media { position: relative; }
.frame {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
  transform: rotate(-1.5deg);
  transition: transform 0.4s ease;
}
.feature:hover .frame { transform: rotate(0deg); }
.app-icon {
  position: absolute; right: -14px; bottom: -18px;
  width: 90px; height: 90px; border-radius: 22px;
  border: 3px solid var(--night-2);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5);
}
.feature-copy h3 { font-size: clamp(2rem, 3.6vw, 2.6rem); margin-bottom: 8px; }
.feature-tag { font-family: var(--display); font-style: italic; font-size: 1.2rem; color: var(--gold-2); }
.facts { list-style: none; padding: 0; margin: 18px 0 0; display: grid; gap: 10px; }
.facts li { padding-left: 22px; position: relative; color: var(--cream-muted); }
.facts li::before {
  content: ""; position: absolute; left: 0; top: 0.65em;
  width: 10px; height: 10px; border-radius: 50%; background: var(--gold);
}
.facts strong { color: var(--cream); font-weight: 600; }
.soon {
  font-size: 0.9rem; color: var(--cream-faint);
  padding: 10px 14px; border: 1px dashed var(--line); border-radius: 999px;
}

/* ---- Craft ---------------------------------------------------------------- */

.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.card {
  background: var(--moss); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 28px 26px 22px;
  transition: transform 0.2s ease, border-color 0.2s ease;
}
.card:hover { transform: translateY(-3px); border-color: rgba(230, 184, 74, 0.45); }
.card-icon { width: 40px; height: 40px; color: var(--gold); margin-bottom: 16px; }
.card h3 { margin-bottom: 10px; }
.card p { color: var(--cream-muted); margin: 0; }

/* ---- About ---------------------------------------------------------------- */

.about { background: var(--night-2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.about-grid { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: 48px; }
.about-copy p { color: var(--cream-muted); font-size: 1.08rem; }
.stats {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px;
  margin: 34px 0 0; padding: 0;
}
.stats div { border-top: 2px solid var(--gold); padding-top: 12px; }
.stats dt { font-size: 0.78rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--cream-faint); }
.stats dd { margin: 4px 0 0; font-family: var(--display); font-size: 1.5rem; font-weight: 500; white-space: nowrap; }

/* ---- Contact -------------------------------------------------------------- */

.contact-card {
  display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 36px; align-items: center;
  background: linear-gradient(135deg, rgba(230, 184, 74, 0.14), rgba(230, 184, 74, 0.03));
  border: 1px solid rgba(230, 184, 74, 0.35);
  border-radius: var(--radius-lg);
  padding: 44px;
}
.contact-card p { color: var(--cream-muted); }
.contact-actions { display: flex; flex-direction: column; gap: 12px; align-items: flex-start; }
.contact-actions .btn { width: 100%; justify-content: center; }

/* ---- Footer --------------------------------------------------------------- */

.foot { padding: 34px 0 44px; border-top: 1px solid var(--line); color: var(--cream-faint); }
.foot .row { flex-wrap: wrap; }
.brand-foot .brand-name { font-size: 1.05rem; }
.fine { margin: 0; font-size: 0.9rem; }
.foot-nav { display: flex; gap: 20px; }
.foot-nav a { color: var(--cream-muted); font-size: 0.9rem; }

/* ---- Responsive ----------------------------------------------------------- */

@media (max-width: 900px) {
  .hero-grid, .feature, .about-grid, .contact-card { grid-template-columns: 1fr; }
  .hero { padding-top: 64px; }
  .hero-art { order: -1; }
  .silo { max-width: 260px; }
  .cards { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .feature { padding: 24px; }
  .frame { transform: none; }
  .app-icon { width: 64px; height: 64px; right: -6px; bottom: -12px; border-radius: 16px; }
  section { padding: 72px 0; }
}
@media (max-width: 700px) {
  .nav a:not(.btn) { display: none; }
  .brand-soft { display: none; }
  .br-wide { display: none; }
  .contact-card { padding: 28px 22px; }
  .contact-actions .btn { white-space: normal; text-align: center; }
  .foot .row { flex-direction: column; align-items: flex-start; }
}
