@import url("/templates/_shared/tokens.css");

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--fg); font: 15px/1.5 var(--font); min-height: 100vh; -webkit-font-smoothing: antialiased; display: flex; flex-direction: column; }
a { color: inherit; }
.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: 8px 24px 72px; flex: 1; }
.muted { color: var(--muted); }
.mono { font-family: var(--mono); font-size: 12px; }
.status { font-size: 13px; color: var(--muted); min-height: 1em; }

/* ---- navigation ---- */
.nav-bar {
  position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--bg) 78%, transparent); -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid transparent;
}
.nav-in { max-width: 1120px; margin: 0 auto; padding: 0 24px; height: 52px; display: flex; align-items: center; gap: 4px; }
.brand { font: 500 17px var(--font-display); letter-spacing: -.01em; text-decoration: none; margin-right: 16px; }
.nav-in a.nl { text-decoration: none; padding: 6px 12px; border-radius: 99px; color: var(--muted); font-size: 14px; font-weight: 500; }
.nav-in a.nl:hover { color: var(--fg); }
.nav-in a.nl.on { color: var(--fg); background: var(--fill); }
.nav-in .sp { flex: 1; }
.linkbtn { background: none; border: 0; color: var(--muted); cursor: pointer; font: inherit; font-size: 13px; padding: 6px 8px; border-radius: var(--r-s); }
.linkbtn:hover { color: var(--fg); background: var(--fill); }
.foot { max-width: 1120px; margin: 0 auto; width: 100%; padding: 28px 24px 40px; display: flex; gap: 18px; flex-wrap: wrap; color: var(--muted); font-size: 13px; border-top: 1px solid var(--line); }
.foot a { text-decoration: none; }
.foot a:hover { color: var(--fg); }
.foot .sp { flex: 1; }

/* ---- page heads ---- */
.hero { padding: 56px 0 36px; max-width: 720px; }
.hero h1 { margin: 0 0 12px; font: 500 clamp(32px, 5vw, 48px)/1.08 var(--font-display); letter-spacing: -.025em; }
.hero p { margin: 0; font-size: 19px; color: var(--muted); line-height: 1.45; }
.head { display: flex; align-items: center; gap: 12px; padding: 44px 0 28px; flex-wrap: wrap; }
.head h1 { margin: 0; font: 500 clamp(32px, 4vw, 44px)/1.08 var(--font-display); letter-spacing: var(--track-display); }
.head .sp { flex: 1; }
.crumb { display: inline-block; padding-top: 22px; color: var(--accent); text-decoration: none; font-size: 14px; font-weight: 500; }
.crumb:hover { text-decoration: underline; }

/* ---- home: hero card with kinetic words and the bloom ---- */
.hero-card {
  position: relative; margin: 20px 0 88px; border-radius: 40px; overflow: hidden; min-height: min(680px, 82vh);
  background: var(--panel); box-shadow: var(--shadow-m), inset 0 0 0 1px var(--line);
  display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr);
}
/* the bloom sits under the text column and is densest where the white headline is */
.hero-card::before { content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(115% 100% at 26% 122%, var(--bloom-deep) 0%, #1890ff 34%, var(--bloom-mid) 50%, color-mix(in srgb, var(--bloom-soft) 65%, transparent) 68%, transparent 86%); }
.hero-copy { position: relative; display: grid; grid-template-rows: 1fr auto; gap: 40px; padding: 64px 0 56px 64px; }
.hero-copy .rotator { --rot-size: clamp(44px, 5.6vw, 72px); align-self: center; color: var(--fg); }
.hero-bottom { color: #fff; display: grid; gap: 16px; justify-items: start; }
.hero-bottom h1 { text-shadow: 0 1px 24px rgba(0, 50, 160, .25); margin: 6px 0 0; font: 500 clamp(36px, 4.6vw, 56px)/1.02 var(--font-display); letter-spacing: var(--track-display); }
.hero-bottom p { margin: 0; color: rgba(255, 255, 255, .78); font-size: 16px; line-height: 1.5; max-width: 420px; }
.hero-bottom .ctas { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 12px; }
.hero-device { position: relative; display: grid; place-items: center; padding: 48px 48px 48px 0; }
.phone { width: min(300px, 100%); aspect-ratio: 9 / 19.5; border-radius: 50px; background: #0b0b0c; padding: 9px; box-shadow: 0 40px 90px rgba(0, 40, 120, .35), 0 10px 30px rgba(0, 0, 0, .2); }
/* the screen is 282×632 at full size; hero videos are rendered for exactly that shape (platform/hero/*.mp4, 564×1264) */
.phone .screen { position: relative; width: 100%; height: 100%; border-radius: 42px; overflow: hidden; background: #111; }
.phone video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; opacity: 0; transition: opacity .7s ease; }
.phone video.on { opacity: 1; }

.section-head { display: grid; gap: 6px; margin: 0 0 28px; scroll-margin-top: 80px; }
.section-head h2 { margin: 0; font: 500 clamp(30px, 3.6vw, 40px)/1.1 var(--font-display); letter-spacing: var(--track-display); }
.section-head p { margin: 0; color: var(--muted); font-size: 17px; }

/* ---- template gallery ---- */
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 36px 28px; }
.tcard { display: grid; gap: 18px; text-decoration: none; color: inherit; align-content: start; }
.tcard .preview { position: relative; aspect-ratio: 9 / 15; border-radius: var(--r-xl); overflow: hidden; background: #111; box-shadow: var(--shadow-m); transition: transform .5s var(--ease), box-shadow .5s var(--ease); }
.tcard:hover .preview { transform: translateY(-6px); box-shadow: var(--shadow-l); }
.tcard .preview video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.tcard .preview .soon { position: absolute; inset: 0; display: grid; place-items: center; color: #aaa; font-size: 13px; }
.tcard .preview .open { position: absolute; left: 50%; bottom: 18px; transform: translate(-50%, 8px); opacity: 0; transition: .35s var(--ease); white-space: nowrap;
  background: rgba(255, 255, 255, .9); color: #0b0b0c; font-weight: 500; font-size: 14px; padding: 11px 20px; border-radius: var(--pill); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); box-shadow: 0 8px 24px rgba(0, 0, 0, .2); }
.tcard:hover .preview .open, .tcard:focus-visible .preview .open { opacity: 1; transform: translate(-50%, 0); }
.tcard .body { display: grid; gap: 8px; padding: 0 6px; }
.tcard .name { display: flex; align-items: center; gap: 12px; }
.tcard .name .tile { width: 32px; height: 32px; border-radius: 10px; font-size: 14px; }
.tcard h3 { margin: 0; font: 500 24px var(--font-display); letter-spacing: -.02em; }
.tcard p { margin: 0; color: var(--muted); font-size: 15px; line-height: 1.5; }
.linkish { color: var(--accent); font-weight: 500; font-size: 15px; cursor: pointer; justify-self: start; border-radius: 6px; }
.linkish:hover { text-decoration: underline; }
.linkish:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

@media (max-width: 900px) {
  .hero-card { grid-template-columns: 1fr; min-height: 0; border-radius: 32px; }
  .hero-copy { padding: 40px 28px 36px; gap: 56px; }
  .hero-device { display: none; }
}

/* ---- project cards ---- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 20px; }
.post-card { background: var(--panel); border-radius: var(--r-l); overflow: hidden; text-decoration: none; display: flex; flex-direction: column; box-shadow: var(--shadow-s); border: 1px solid var(--line); transition: transform .25s var(--ease), box-shadow .25s var(--ease); }
.post-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-m); }
.post-card .cover { aspect-ratio: 4 / 5; background: var(--fill); overflow: hidden; }
.post-card .cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.post-card .body { padding: 14px; display: grid; gap: 3px; }
.post-card b { font-weight: 500; font-size: 15px; }
.post-card .sub { color: var(--muted); font-size: 13px; }
.empty { color: var(--muted); padding: 56px 24px; text-align: center; background: var(--panel); border-radius: var(--r-xl); border: 1px dashed var(--line-strong); display: grid; gap: 14px; justify-items: center; }
.empty h2 { margin: 0; color: var(--fg); font: 500 20px var(--font-display); }
.empty p { margin: 0; max-width: 380px; }

/* ---- project page ---- */
.title-edit { font: 500 clamp(34px, 4.2vw, 46px)/1.08 var(--font-display); letter-spacing: var(--track-display); margin: 4px 0 0; cursor: text; border-radius: var(--r-s); padding: 2px 8px; margin-left: -8px; outline: none; }
.title-edit:hover { background: var(--fill); }
.title-edit:focus { background: var(--fill); outline: 2px solid var(--accent); }
.sec { margin: 40px 0 14px; display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.sec h2 { font: 500 26px var(--font-display); letter-spacing: -.025em; margin: 0; }
.sec .hint { color: var(--muted); font-size: 14px; }
.sec .sp { flex: 1; }
.saved { font-size: 13px; color: var(--muted); }

.videos { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 18px; }
.vcard { position: relative; display: flex; flex-direction: column; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-l); overflow: hidden; cursor: pointer; box-shadow: var(--shadow-s); transition: transform .25s var(--ease), box-shadow .25s var(--ease); }
.vcard:hover { transform: translateY(-3px); box-shadow: var(--shadow-m); }
.vcard .poster { aspect-ratio: 9 / 16; background: var(--fill); position: relative; overflow: hidden; }
.vcard .poster img { width: 100%; height: 100%; object-fit: cover; display: block; }
.vcard .poster .go { position: absolute; inset: auto 12px 12px 12px; background: var(--glass); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); color: var(--fg); font-weight: 500; font-size: 14px; text-align: center; border-radius: var(--r-m); padding: 9px; opacity: 0; transform: translateY(6px); transition: .2s; }
.vcard:hover .poster .go, .vcard:focus-visible .poster .go { opacity: 1; transform: none; }
.vcard .meta { padding: 12px 14px 14px; display: grid; gap: 2px; }
.vcard .meta b { font-weight: 500; }
.vcard .meta span { color: var(--muted); font-size: 13px; }
.vcard.add { border-style: dashed; border-color: var(--line-strong); background: transparent; box-shadow: none; align-items: center; justify-content: center; color: var(--muted); min-height: 260px; font: inherit; }
.vcard.add:hover { color: var(--fg); background: var(--panel); }
.vcard.add .plus { font-size: 36px; line-height: 1; margin-bottom: 6px; font-weight: 300; }
.vcard details { padding: 0 14px 12px; font-size: 13px; color: var(--muted); }
.vcard details a { display: block; color: var(--muted); padding: 3px 0; text-decoration: none; }
.vcard details a:hover { color: var(--accent); }
.vcard summary { cursor: pointer; }
.vcard .meta b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding-right: 30px; }
.vcard .more { position: absolute; right: 8px; bottom: 30px; width: 30px; height: 30px; display: grid; place-items: center; border: 0; border-radius: 99px; background: transparent; color: var(--muted); cursor: pointer; }
.vcard .more:hover, .vcard .more:focus-visible { background: var(--fill); color: var(--fg); }
.vcard .more .ic { width: 20px; height: 20px; }

/* small popover menu (video card actions, account) */
.card-menu { position: fixed; z-index: 60; min-width: 200px; display: grid; padding: 6px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-m); box-shadow: var(--shadow-m); animation: menu-in .14s var(--ease); }
.card-menu button, .card-menu a, .card-menu .who { text-align: left; font: inherit; font-size: 14px; color: var(--fg); background: none; border: 0; border-radius: var(--r-s); padding: 8px 10px; cursor: pointer; text-decoration: none; display: flex; gap: 8px; align-items: center; }
.card-menu .who { color: var(--muted); font-size: 13px; cursor: default; border-bottom: 1px solid var(--line); border-radius: 0; margin-bottom: 4px; padding-bottom: 10px; overflow: hidden; text-overflow: ellipsis; }
.card-menu button:hover, .card-menu button:focus-visible, .card-menu a:hover { background: var(--fill); outline: none; }
.card-menu .danger { color: var(--danger); }
.card-menu .ic { width: 16px; height: 16px; }
@keyframes menu-in { from { opacity: 0; transform: translateY(-4px); } }
.history { display: grid; gap: 2px; max-height: 50vh; overflow: auto; }
.history a { padding: 8px 10px; border-radius: var(--r-s); color: var(--fg); text-decoration: none; font-size: 14px; }
.history a:hover { background: var(--fill); }
.sheet .done { max-height: 60vh; overflow: auto; }
.nav-in .account { width: 32px; height: 32px; border-radius: 99px; border: 0; display: grid; place-items: center; background: var(--fill); color: var(--fg); cursor: pointer; font: 500 13px var(--font-ui, inherit); text-transform: uppercase; margin-left: 4px; }
.nav-in .account:hover { background: var(--fill-strong, var(--line)); }

.done { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 18px; }
.done figure { margin: 0; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-l); overflow: hidden; box-shadow: var(--shadow-s); }
.done video { width: 100%; aspect-ratio: 9 / 16; background: #000; display: block; }
.done figcaption { padding: 12px 14px; display: flex; gap: 8px; align-items: center; font-size: 13px; color: var(--muted); }
.done figcaption .sp { flex: 1; }

.panelbox { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-l); padding: 14px; box-shadow: var(--shadow-s); }
.tabs { margin-bottom: 12px; }
textarea { width: 100%; min-height: 220px; background: var(--fill); border: 0; color: var(--fg); border-radius: var(--r-m); padding: 12px 14px; font: 14px/1.6 var(--font); resize: vertical; }
textarea:focus { outline: 2px solid var(--accent); }
details.materials > summary { list-style: none; cursor: pointer; }
details.materials > summary::-webkit-details-marker { display: none; }
details.materials > summary .chev { display: inline-block; transition: transform .15s; color: var(--muted); }
details.materials[open] > summary .chev { transform: rotate(90deg); }
.assets { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 10px; }
.asset { position: relative; aspect-ratio: 9 / 16; background: var(--fill); border-radius: var(--r-m); overflow: hidden; }
.asset img, .asset video { width: 100%; height: 100%; object-fit: cover; display: block; }
.asset .cap { position: absolute; inset: auto 0 0 0; padding: 14px 7px 6px; font-size: 10px; color: #fff; background: linear-gradient(transparent, rgba(0, 0, 0, .75)); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.asset .x { position: absolute; top: 6px; right: 6px; display: none; background: rgba(0, 0, 0, .6); border: 0; color: #fff; border-radius: 6px; cursor: pointer; padding: 3px 7px; }
.asset:hover .x { display: block; }
.drop { display: block; border: 1.5px dashed var(--line-strong); border-radius: var(--r-l); padding: 20px; text-align: center; color: var(--muted); margin-bottom: 12px; cursor: pointer; font-size: 14px; }
.drop:hover, .drop.on { border-color: var(--accent); color: var(--fg); background: var(--accent-soft); }

/* template picker in sheets */
.tpl-pick { display: grid; gap: 10px; }
.tpl-opt { display: grid; grid-template-columns: auto 1fr; gap: 12px; align-items: start; border: 2px solid transparent; border-radius: var(--r-m); padding: 12px 14px; cursor: pointer; text-align: left; background: var(--panel-2); color: var(--fg); font: inherit; width: 100%; }
.tpl-opt:hover { background: var(--fill); }
.tpl-opt.on { border-color: var(--accent); background: var(--accent-soft); }
.tpl-opt input { margin-top: 3px; accent-color: var(--accent); }
.tpl-opt b { font-weight: 500; }
.tpl-opt p { margin: 2px 0 0; color: var(--muted); font-size: 13px; }

/* ---- sign in: the onboarding card (kinetic words on top, bloom with the form below) ---- */
body.auth { display: grid; place-items: center; padding: 24px 16px; background: var(--bg); }
.auth-card {
  position: relative; width: min(420px, 100%); min-height: min(720px, calc(100vh - 48px)); border-radius: 44px; overflow: hidden;
  background: var(--panel); box-shadow: var(--shadow-l), inset 0 0 0 1px var(--line);
  display: grid; grid-template-rows: 1fr auto; padding: 56px 32px 32px;
}
.auth-card::before { content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(170% 92% at 50% 118%, var(--bloom-deep) 0%, #1890ff 38%, var(--bloom-mid) 55%, color-mix(in srgb, var(--bloom-soft) 65%, transparent) 72%, transparent 88%); }
.auth-card .rotator { --rot-size: 48px; align-self: center; color: var(--fg); position: relative; margin-left: 4px; }
.auth-bottom { position: relative; display: grid; gap: 12px; color: #fff; }
.auth-bottom .tile { margin-bottom: 6px; }
.auth-bottom h1 { margin: 0; font: 500 34px/1.05 var(--font-display); letter-spacing: var(--track-display); text-shadow: 0 1px 24px rgba(0, 50, 160, .25); }
.auth-bottom p { margin: 0 0 10px; color: rgba(255, 255, 255, .75); font-size: 15px; }
.auth-bottom input {
  width: 100%; border: 0; border-radius: var(--pill); padding: 15px 20px; font: inherit; font-size: 16px; color: #fff;
  background: rgba(255, 255, 255, .18); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .28);
}
.auth-bottom input::placeholder { color: rgba(255, 255, 255, .75); }
.auth-bottom input:focus { outline: 2px solid #fff; outline-offset: 1px; }
.auth-bottom [hidden] { display: none; }
.auth-bottom .status { color: #fff; text-align: center; min-height: 1.2em; }

/* ---- pricing ---- */
.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; max-width: 760px; margin: 12px auto 0; }
.plan { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-xl); padding: 28px; display: grid; gap: 14px; align-content: start; box-shadow: var(--shadow-s); }
.plan { border-radius: 32px; padding: 32px; }
.plan.pro { position: relative; overflow: hidden; border: 0; color: #fff; box-shadow: 0 30px 80px rgba(0, 60, 180, .28);
  /* deep enough for white body text (about 4.8:1), the glow is a highlight on top */
  background: radial-gradient(110% 70% at 85% -10%, rgba(140, 210, 255, .55), transparent 60%), linear-gradient(180deg, #1470f2 0%, #0a5ce4 100%); }
.plan.pro .price small, .plan.pro .status { color: rgba(255, 255, 255, .78); }
.plan.pro li::before { color: #fff; }
.plan h2 { margin: 0; font: 500 20px var(--font-display); }
.plan .price { font: 500 40px var(--font-display); letter-spacing: -.02em; }
.plan .price small { font: 500 15px var(--font); color: var(--muted); letter-spacing: 0; }
.plan ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.plan li { display: flex; gap: 10px; font-size: 15px; }
.plan li::before { content: "✓"; color: var(--accent); font-weight: 500; flex: none; }
.plan li.no { color: var(--muted); }
.plan li.no::before { content: "–"; color: var(--muted); }
.plan .btn { min-height: 44px; font-size: 15px; }
.faq { max-width: 680px; margin: 56px auto 0; display: grid; gap: 22px; }
.faq h3 { margin: 0 0 4px; font: 500 17px var(--font-display); }
.faq p { margin: 0; color: var(--muted); }

/* ---- legal text ---- */
.legal { max-width: 720px; margin: 0 auto; padding-top: 24px; }
.legal h1 { font: 500 34px var(--font-display); letter-spacing: -.02em; margin: 24px 0 4px; }
.legal .upd { color: var(--muted); font-size: 14px; margin-bottom: 28px; }
.legal h2 { font: 500 20px var(--font-display); margin: 32px 0 8px; }
.legal p, .legal li { color: var(--fg); opacity: .88; line-height: 1.65; }
.legal ul { padding-left: 20px; }
.legal a { color: var(--accent); }

@media (max-width: 640px) {
  .wrap, .nav-in, .foot { padding-left: 16px; padding-right: 16px; }
  .hero { padding: 36px 0 24px; }
  .nav-in a.nl { padding: 6px 9px; }
  .brand { margin-right: 6px; }
  .title-edit { font-size: 26px; }
}

.brand { white-space: nowrap; }
@media (max-width: 640px) {
  .brand { font-size: 15px; }
  .nav-in { gap: 0; }
  .nav-in a.nl, .linkbtn { font-size: 13px; padding: 6px 7px; }
}
