:root {
  --ink: #10383a;
  --ink-deep: #062f31;
  --cream: #f4efe4;
  --paper: #fffdf8;
  --mint: #b9dfc2;
  --mint-bright: #dff3df;
  --gold: #d8b15f;
  --gold-soft: #f5e7bc;
  --line: rgba(6, 47, 49, 0.16);
  --muted: #5f706f;
  --danger: #9a3f34;
  --shadow: 0 30px 80px rgba(6, 47, 49, 0.14);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-width: 320px;
  background:
    radial-gradient(circle at 8% 16%, rgba(185, 223, 194, 0.42), transparent 27rem),
    linear-gradient(135deg, var(--cream), #f8f5ec 48%, #edf4e9);
  color: var(--ink-deep);
  font-family: "Manrope", sans-serif;
  font-size: 16px;
  line-height: 1.6;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image: radial-gradient(rgba(6, 47, 49, 0.13) 0.7px, transparent 0.7px);
  background-size: 17px 17px;
  content: "";
  opacity: 0.25;
  pointer-events: none;
}

a { color: inherit; }

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 20;
  padding: 9px 13px;
  border-radius: 8px;
  background: var(--paper);
  transform: translateY(-160%);
}

.skip-link:focus { transform: none; }

.invite-header,
.invite-footer {
  width: min(1240px, calc(100% - 48px));
  margin: 0 auto;
}

.invite-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 92px;
}

.invite-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.025em;
  text-decoration: none;
}

.invite-brand-mark {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 11px;
  background: var(--ink-deep);
  box-shadow: 0 8px 22px rgba(6, 47, 49, 0.18);
}

.invite-brand-mark img {
  display: block;
  filter: brightness(0) invert(1);
}

.private-mark {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.private-mark span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 0 5px rgba(216, 177, 95, 0.18);
}

.invite-main {
  width: min(1240px, calc(100% - 48px));
  margin: 18px auto 0;
}

.invite-shell {
  display: grid;
  grid-template-columns: minmax(0, 1.06fr) minmax(390px, 0.94fr);
  gap: clamp(44px, 6vw, 90px);
  align-items: center;
  min-height: 610px;
  padding: clamp(36px, 5.5vw, 74px);
  overflow: hidden;
  border: 1px solid rgba(6, 47, 49, 0.12);
  border-radius: 32px;
  background: rgba(255, 253, 248, 0.88);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.invite-copy { max-width: 660px; }

.invite-kicker {
  margin: 0 0 18px;
  color: #7a5b19;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

h1 {
  max-width: 12ch;
  margin: 0;
  font-family: "Fraunces", Georgia, serif;
  font-size: clamp(47px, 5.3vw, 76px);
  font-weight: 600;
  letter-spacing: -0.055em;
  line-height: 0.98;
}

h1 em { color: #26715a; font-weight: 500; }

.invite-lede {
  max-width: 63ch;
  margin: 26px 0 0;
  color: #405d5d;
  font-size: clamp(16px, 1.5vw, 19px);
  line-height: 1.7;
}

.expiry-ribbon {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  margin: 30px 0 0;
  padding: 18px 20px;
  overflow: hidden;
  border: 1px solid rgba(146, 103, 16, 0.22);
  border-radius: 16px;
  background: linear-gradient(100deg, var(--gold-soft), #fbf6e8);
}

.expiry-ribbon[hidden] { display: none; }

.expiry-ribbon::before {
  width: 5px;
  align-self: stretch;
  border-radius: 4px;
  background: var(--gold);
  content: "";
}

.expiry-ribbon > div:first-of-type { flex: 1; }

.expiry-label {
  display: block;
  color: #806321;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.expiry-ribbon > div > strong {
  display: block;
  margin-top: 2px;
  color: #4e3a0f;
  font-size: 14px;
}

.countdown { display: flex; gap: 7px; }

.countdown span {
  display: grid;
  min-width: 48px;
  padding: 7px 8px 6px;
  border: 1px solid rgba(99, 72, 14, 0.13);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.57);
  text-align: center;
}

.countdown strong { font-size: 16px; line-height: 1; }
.countdown small { margin-top: 3px; color: #806321; font-size: 8px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; }

.invite-action { margin-top: 24px; }

.invite-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 54px;
  padding: 14px 24px;
  border-radius: 12px;
  background: var(--ink-deep);
  box-shadow: 0 13px 28px rgba(6, 47, 49, 0.19);
  color: #fff;
  font-size: 15px;
  font-weight: 800;
  text-decoration: none;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.invite-button::after { margin-left: 18px; content: "→"; font-size: 19px; }
.invite-button:hover { background: #0b4447; box-shadow: 0 16px 36px rgba(6, 47, 49, 0.24); transform: translateY(-2px); }
.invite-button:focus-visible { outline: 3px solid var(--gold); outline-offset: 4px; }
.invite-button.is-disabled { box-shadow: none; opacity: 0.55; pointer-events: none; }
.invite-action p { margin: 10px 0 0; color: var(--muted); font-size: 12px; }

.invite-status {
  margin-top: 22px;
  padding: 16px 18px;
  border: 1px solid rgba(154, 63, 52, 0.2);
  border-radius: 12px;
  background: #fff1ed;
  color: var(--danger);
}

.invite-status p { margin: 3px 0 0; font-size: 13px; }

.workflow-card {
  position: relative;
  min-width: 0;
  padding: 20px;
  border: 1px solid rgba(185, 223, 194, 0.24);
  border-radius: 24px;
  background: var(--ink-deep);
  box-shadow: 0 26px 60px rgba(6, 47, 49, 0.25);
  color: white;
  transform: rotate(1.1deg);
}

.workflow-card::after {
  position: absolute;
  right: -42px;
  bottom: -52px;
  width: 180px;
  height: 180px;
  border: 35px solid rgba(185, 223, 194, 0.08);
  border-radius: 50%;
  content: "";
  pointer-events: none;
}

.workflow-topline,
.draft-heading,
.draft-footer,
.workflow-output {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.workflow-topline { margin: 0 2px 18px; color: rgba(255,255,255,.56); font-size: 10px; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; }
.workflow-live { display: inline-flex; align-items: center; gap: 6px; }
.workflow-live i { width: 6px; height: 6px; border-radius: 50%; background: #8de09d; box-shadow: 0 0 0 4px rgba(141, 224, 157, .12); }

.workflow-context {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 14px;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 13px;
  background: rgba(255,255,255,.055);
}

.context-mark { display: grid; width: 34px; height: 34px; place-items: center; border-radius: 9px; background: var(--mint); color: var(--ink-deep); font-size: 10px; font-weight: 800; }
.workflow-context small { display: block; color: rgba(255,255,255,.5); font-size: 9px; text-transform: uppercase; }
.workflow-context strong { display: block; margin-top: 2px; font-size: 11px; line-height: 1.35; }
.context-state { color: #98e7a7; font-size: 10px; font-weight: 700; }
.workflow-arrow { display: flex; justify-content: center; height: 30px; }
.workflow-arrow span { width: 1px; background: linear-gradient(var(--mint), rgba(185,223,194,.1)); }

.draft-card { position: relative; z-index: 1; padding: 19px; border-radius: 16px; background: var(--paper); color: var(--ink-deep); box-shadow: 0 14px 35px rgba(0,0,0,.17); }
.draft-heading { font-size: 11px; font-weight: 800; }
.review-pill { padding: 4px 7px; border-radius: 999px; background: var(--gold-soft); color: #765a18; font-size: 8px; letter-spacing: .05em; text-transform: uppercase; }
.draft-card p { margin: 16px 0; color: #355354; font-family: "Fraunces", Georgia, serif; font-size: 16px; line-height: 1.45; }
.draft-lines { display: grid; gap: 5px; }
.draft-lines span { height: 4px; border-radius: 3px; background: #e5e9e2; }
.draft-lines span:nth-child(2) { width: 88%; }
.draft-lines span:nth-child(3) { width: 61%; }
.draft-footer { justify-content: flex-start; margin-top: 15px; color: #56716f; font-size: 8px; font-weight: 700; text-transform: uppercase; }
.draft-footer span::before { color: #3c9560; content: "✓ "; }
.workflow-output { position: relative; z-index: 1; margin-top: 14px; padding: 13px 4px 2px; }
.workflow-output > div { flex: 1; }
.workflow-output small { display: block; color: rgba(255,255,255,.48); font-size: 8px; letter-spacing: .06em; text-transform: uppercase; }
.workflow-output strong { display: block; margin-top: 2px; font-size: 12px; }

.invite-details {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  margin-top: 30px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--line);
}

.invite-details article { display: grid; grid-template-columns: auto 1fr; gap: 15px; padding: 25px; background: rgba(255,253,248,.82); }
.invite-details article > span { display: grid; width: 31px; height: 31px; place-items: center; border-radius: 50%; background: var(--mint-bright); color: #26715a; font-size: 11px; font-weight: 800; }
.invite-details strong { font-size: 14px; }
.invite-details p { margin: 5px 0 0; color: var(--muted); font-size: 12px; line-height: 1.55; }

.invite-footer { display: flex; justify-content: space-between; gap: 20px; padding: 36px 0 42px; color: var(--muted); font-size: 11px; }
.invite-footer > span:last-child { display: flex; gap: 18px; }
.invite-footer a { text-decoration: none; }
.invite-footer a:hover { color: var(--ink-deep); }

@media (max-width: 930px) {
  .invite-shell { grid-template-columns: 1fr; }
  .workflow-card { width: min(540px, 100%); margin: 0 auto; transform: none; }
  .invite-copy { max-width: none; }
  h1 { max-width: 14ch; }
}

@media (max-width: 680px) {
  .invite-header,
  .invite-main,
  .invite-footer { width: min(100% - 28px, 1240px); }
  .invite-header { min-height: 76px; }
  .private-mark { font-size: 9px; }
  .invite-shell { gap: 38px; min-height: 0; padding: 29px 20px 22px; border-radius: 22px; }
  h1 { font-size: clamp(41px, 13.5vw, 58px); }
  .invite-lede { margin-top: 21px; font-size: 15px; }
  .expiry-ribbon { align-items: stretch; flex-direction: column; gap: 12px; }
  .expiry-ribbon::before { position: absolute; inset: 0 auto 0 0; width: 5px; }
  .countdown { align-self: stretch; }
  .countdown span { flex: 1; }
  .invite-button { width: 100%; }
  .workflow-card { padding: 15px; border-radius: 18px; }
  .draft-card { padding: 16px; }
  .draft-card p { font-size: 14px; }
  .invite-details { grid-template-columns: 1fr; }
  .invite-footer { align-items: flex-start; flex-direction: column; }
}

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