/* ==========================================================
   SR Host — "the deed" theme
   Paper ground, Harvard crimson + Yale blue (SR logo colors),
   serif display, mono for the ownership record.
   ========================================================== */

:root {
  --paper: #f5f0e6;
  --paper-2: #ece4d4;
  --ink: #16202e;
  --muted: #5b6270;
  --blue: #00356b;
  --red: #a51c30;
  --line: rgba(22, 32, 46, 0.14);
  --serif: "Instrument Serif", "Noto Serif SC", Georgia, serif;
  --sans: "Hanken Grotesk", "PingFang SC", "Noto Sans SC", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
  --wrap: min(1180px, 92vw);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 17px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
}
/* faint paper grain + ruled margin line */
body::before {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 0; opacity: .5;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.3 0 0 0 0 0.25 0 0 0 0 0.2 0 0 0 .09 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
main, .nav, .foot { position: relative; z-index: 1; }

/* ---------- language switch ---------- */
html[data-lang="en"] [lang="zh"], html[data-lang="zh"] [lang="en"] { display: none !important; }
html[data-lang="zh"] h1, html[data-lang="zh"] h2, html[data-lang="zh"] h3 { font-family: "Noto Serif SC", var(--serif); font-weight: 700; letter-spacing: 0; }
html[data-lang="zh"] h1 { font-size: clamp(2.4rem, 5.4vw, 4.4rem); line-height: 1.2; }

a { color: var(--blue); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; gap: 28px;
  padding: 14px max(4vw, calc((100vw - 1180px) / 2));
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--blue); font: 700 1.2rem var(--sans); letter-spacing: -.01em; }
.brand img { height: 26px; width: auto; }
.nav-links { display: flex; gap: 24px; margin-left: auto; }
.nav-links a { color: var(--ink); text-decoration: none; font-size: .95rem; }
.nav-links a:hover { color: var(--red); }
.nav-right { display: flex; gap: 12px; align-items: center; }
.lang { border: 1px solid var(--line); background: transparent; border-radius: 999px; padding: 6px 12px; font: 500 .85rem var(--sans); color: var(--ink); cursor: pointer; }
.lang:hover { border-color: var(--blue); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--red); color: #fff; border: 0; border-radius: 6px;
  padding: 14px 22px; font: 600 1rem var(--sans); text-decoration: none; cursor: pointer;
  box-shadow: 0 1px 0 rgba(0,0,0,.15), 0 8px 20px -10px rgba(165, 28, 48, .7);
  transition: transform .15s, background .15s;
}
.btn:hover { background: #8c1628; transform: translateY(-1px); }
.btn:disabled { opacity: .6; cursor: wait; transform: none; }
.btn-small { padding: 9px 16px; font-size: .9rem; }
.btn-ghost { background: transparent; color: var(--blue); border: 1.5px solid var(--blue); box-shadow: none; }
.btn-ghost:hover { background: var(--blue); color: #fff; }

/* ---------- sections ---------- */
section { width: var(--wrap); margin: 0 auto; padding: 96px 0; }
.eyebrow { font: 500 .78rem var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--red); margin: 0 0 14px; }
h1, h2, h3 { font-family: var(--serif); font-weight: 400; margin: 0; color: var(--blue); }
h2 { font-size: clamp(2rem, 4vw, 3.2rem); line-height: 1.08; letter-spacing: -.01em; max-width: 18ch; }
html[data-lang="zh"] h2 { font-size: clamp(1.7rem, 3.2vw, 2.5rem); line-height: 1.3; }
h3 { font-size: 1.5rem; line-height: 1.2; }
.section-head { margin-bottom: 48px; }
.fine { font-size: .88rem; color: var(--muted); }
.center { text-align: center; margin-top: 32px; }

/* ---------- hero ---------- */
.hero { display: grid; grid-template-columns: 1.15fr .85fr; gap: 64px; align-items: center; padding-top: 72px; }
h1 { font-size: clamp(3rem, 7vw, 5.8rem); line-height: .98; letter-spacing: -.02em; }
h1 em { font-style: italic; color: var(--red); }
.lede { font-size: 1.15rem; max-width: 36em; margin: 28px 0; color: #2d3644; }
.quick { display: flex; gap: 10px; max-width: 520px; }
.quick input { flex: 1; min-width: 0; }
input, select, textarea {
  font: 1rem var(--sans); color: var(--ink);
  background: #fffdf8; border: 1.5px solid var(--line); border-radius: 6px; padding: 13px 14px; width: 100%;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(0, 53, 107, .12); }

/* the deed card */
.deed {
  position: relative; background: #fffdf7; padding: 30px 30px 26px;
  border: 1px solid var(--line); border-radius: 4px;
  box-shadow: 0 1px 0 var(--line), 0 30px 60px -30px rgba(0, 53, 107, .35);
  outline: 1px solid var(--line); outline-offset: -10px;
  transform: rotate(1.2deg);
}
.deed::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 6px; background: linear-gradient(90deg, var(--red) 0 50%, var(--blue) 50% 100%); }
.deed-head { display: flex; gap: 14px; align-items: center; padding-bottom: 18px; border-bottom: 1px dashed var(--line); }
.deed-kicker { margin: 0; font: 500 .72rem var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.deed-title { margin: 2px 0 0; font: 400 1.7rem var(--serif); color: var(--blue); }
.deed-rows { margin: 8px 0 0; }
.deed-rows div { display: flex; justify-content: space-between; gap: 16px; padding: 11px 0; border-bottom: 1px solid var(--line); font-family: var(--mono); font-size: .82rem; }
.deed-rows dt { color: var(--muted); }
.deed-rows dd { margin: 0; color: var(--ink); font-weight: 500; text-align: right; }
.deed-us { border-bottom: 0 !important; }
.deed-us dd { color: var(--red); }
.deed-seal { position: absolute; right: -40px; top: -52px; width: 120px; height: 120px; animation: spin 40s linear infinite; }
.deed-seal svg { width: 100%; height: 100%; }
.deed-seal text { font: 600 9.5px var(--mono); letter-spacing: 2px; fill: var(--red); }
.deed-seal circle { fill: var(--red); }
.deed-seal path:last-child { fill: none; stroke: #fff; stroke-width: 5; stroke-linecap: round; stroke-linejoin: round; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- moving from ---------- */
.from { padding: 28px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); display: flex; gap: 28px; align-items: center; flex-wrap: wrap; }
.from p { margin: 0; font: 500 .78rem var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.from ul { display: flex; flex-wrap: wrap; gap: 10px 32px; list-style: none; margin: 0; padding: 0; }
.from li { font: italic 1.35rem var(--serif); color: var(--ink); text-decoration: line-through; text-decoration-color: var(--red); text-decoration-thickness: 1.5px; }

/* ---------- steps ---------- */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; border-top: 2px solid var(--blue); }
.steps li { padding: 28px 24px 8px 0; border-right: 1px solid var(--line); margin-right: 24px; }
.steps li:last-child { border-right: 0; margin-right: 0; }
.num { font: 400 3rem var(--serif); color: var(--red); line-height: 1; display: block; margin-bottom: 14px; }
.steps h3 { font-size: 1.35rem; margin-bottom: 10px; }
.steps p { margin: 0; color: #3a4250; font-size: .97rem; }
.chat { display: grid; gap: 8px; margin-top: 6px; }
.chat p { margin: 0; padding: 10px 13px; border-radius: 12px; font-size: .88rem; line-height: 1.45; }
.chat .me { background: var(--blue); color: #fff; border-bottom-right-radius: 3px; margin-left: 12px; }
.chat .ai { background: #fffdf7; border: 1px solid var(--line); border-bottom-left-radius: 3px; margin-right: 12px; }

/* ---------- what you get ---------- */
.get { padding-top: 40px; }
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.grid article { background: var(--paper); padding: 32px 28px; transition: background .2s; }
.grid article:hover { background: #fffdf7; }
.grid h3 { font-size: 1.4rem; margin-bottom: 10px; }
.grid h3::before { content: "§ "; color: var(--red); }
.grid p { margin: 0; color: #3a4250; font-size: .97rem; }

/* ---------- sites ---------- */
.sites { width: 100%; max-width: none; background: var(--blue); color: #e9eef5; padding-left: max(4vw, calc((100vw - 1180px) / 2)); padding-right: max(4vw, calc((100vw - 1180px) / 2)); }
.sites h2, .sites h3 { color: #fff; }
.sites .eyebrow { color: #f0a7b2; }
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.card { background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.16); border-radius: 4px; padding: 28px; display: flex; flex-direction: column; }
.card .tag { margin: 0 0 12px; font: 500 .72rem var(--mono); letter-spacing: .12em; text-transform: uppercase; color: #f0a7b2; }
.card h3 { font-size: 1.9rem; margin-bottom: 6px; }
.card .domains { font: .8rem var(--mono); color: #b9c6d8; margin: 0 0 14px; word-break: break-word; }
.card p { font-size: .96rem; }
.from-to { margin-top: auto !important; padding-top: 14px; border-top: 1px dashed rgba(255,255,255,.22); font: .78rem var(--mono); display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.from-to span.old { text-decoration: line-through; opacity: .7; }
.from-to i { font-style: normal; color: #f0a7b2; }

/* ---------- pricing ---------- */
.pricing .section-head { display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 20px; }
.pricing .section-head .eyebrow, .pricing .section-head h2 { grid-column: 1; }
.period { grid-column: 2; grid-row: 2; display: inline-flex; border: 1.5px solid var(--blue); border-radius: 999px; padding: 3px; }
.period button { border: 0; background: transparent; padding: 8px 18px; border-radius: 999px; font: 600 .9rem var(--sans); color: var(--blue); cursor: pointer; }
.period button[aria-pressed="true"] { background: var(--blue); color: #fff; }
.plans { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; max-width: 920px; }
.plan { position: relative; border: 1.5px solid var(--line); border-radius: 6px; padding: 36px 32px; background: #fffdf7; display: flex; flex-direction: column; }
.plan-member { border-color: var(--red); box-shadow: 0 30px 60px -36px rgba(165, 28, 48, .55); }
.badge { position: absolute; top: -13px; left: 30px; margin: 0; background: var(--red); color: #fff; font: 500 .72rem var(--mono); letter-spacing: .1em; text-transform: uppercase; padding: 5px 10px; border-radius: 3px; }
.price { margin: 14px 0 20px; display: flex; align-items: baseline; gap: 8px; }
.price b { font: 400 3.6rem var(--serif); color: var(--ink); line-height: 1; }
.price small { color: var(--muted); font-size: .95rem; }
.plan ul { list-style: none; padding: 0; margin: 0 0 28px; display: grid; gap: 10px; }
.plan li { padding-left: 24px; position: relative; font-size: .96rem; }
.plan li::before { content: ""; position: absolute; left: 0; top: .55em; width: 12px; height: 7px; border-left: 2px solid var(--red); border-bottom: 2px solid var(--red); transform: rotate(-45deg); }
.plan .btn { margin-top: auto; }

/* ---------- faq ---------- */
.faq { max-width: 860px; }
details { border-bottom: 1px solid var(--line); padding: 20px 0; }
details:first-of-type { border-top: 1px solid var(--line); }
summary { cursor: pointer; list-style: none; font: 400 1.4rem var(--serif); color: var(--blue); display: flex; justify-content: space-between; gap: 20px; }
html[data-lang="zh"] summary { font: 600 1.1rem var(--sans); }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; color: var(--red); font-family: var(--sans); transition: transform .2s; }
details[open] summary::after { transform: rotate(45deg); }
details p { margin: 12px 0 0; color: #3a4250; max-width: 60ch; }

/* ---------- signup ---------- */
.signup { display: grid; grid-template-columns: .9fr 1.1fr; gap: 64px; align-items: start; border-top: 2px solid var(--blue); }
.signup-copy p:last-child { color: #3a4250; max-width: 30em; }
.signup-copy h2 { margin-bottom: 20px; }
.signup-form { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; background: #fffdf7; border: 1px solid var(--line); padding: 32px; border-radius: 6px; box-shadow: 0 30px 60px -40px rgba(0, 53, 107, .45); }
.signup-form label { display: grid; gap: 6px; }
.lbl { font: 500 .76rem var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.full { grid-column: 1 / -1; }
.check { grid-column: 1 / -1; display: flex !important; align-items: center; gap: 10px; font-size: .95rem; }
.check input { width: 18px; height: 18px; accent-color: var(--red); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; }
.status { margin: 0; min-height: 1.4em; font-size: .95rem; }
.status.ok { color: #1d6b3a; font-weight: 600; }
.status.err { color: var(--red); }

/* ---------- footer ---------- */
.foot { width: var(--wrap); margin: 0 auto; padding: 40px 0 56px; border-top: 1px solid var(--line); display: flex; gap: 16px; align-items: center; flex-wrap: wrap; color: var(--muted); font-size: .9rem; }
.foot p { margin: 0; }
.foot .copy { margin-left: auto; font-family: var(--mono); font-size: .78rem; }

/* ---------- motion ---------- */
.reveal { opacity: 0; transform: translateY(14px); animation: rise .8s cubic-bezier(.2, .7, .2, 1) forwards; animation-delay: calc(var(--d) * 110ms + 80ms); }
.deed.reveal { animation-name: rise-tilt; }
@keyframes rise { to { opacity: 1; transform: none; } }
@keyframes rise-tilt { from { opacity: 0; transform: translateY(24px) rotate(4deg); } to { opacity: 1; transform: rotate(1.2deg); } }
@media (prefers-reduced-motion: reduce) {
  .reveal { animation: none; opacity: 1; transform: none; }
  .deed.reveal { transform: rotate(1.2deg); }
  .deed-seal { animation: none; }
}

/* ---------- responsive ---------- */
@media (max-width: 960px) {
  .hero, .signup { grid-template-columns: 1fr; gap: 48px; }
  .deed { max-width: 460px; }
  .steps { grid-template-columns: 1fr 1fr; row-gap: 12px; }
  .steps li:nth-child(2) { border-right: 0; margin-right: 0; }
  .grid, .cards { grid-template-columns: 1fr 1fr; }
  .nav-links { display: none; }
  .nav-right { margin-left: auto; }
}
@media (max-width: 620px) {
  body { font-size: 16px; }
  section { padding: 64px 0; }
  .steps, .grid, .cards, .plans, .signup-form { grid-template-columns: 1fr; }
  .steps li { border-right: 0; margin-right: 0; border-bottom: 1px solid var(--line); padding-bottom: 22px; }
  .quick { flex-direction: column; }
  .deed-seal { right: -6px; top: -44px; width: 88px; height: 88px; }
  .pricing .section-head { grid-template-columns: 1fr; }
  .period { grid-column: 1; grid-row: auto; justify-self: start; }
  .signup-form { padding: 22px; }
}
