@import url("/type.css");

:root {
  color-scheme: dark;
  --bg: #100f0e;
  --panel: #1b1816;
  --line: #453b36;
  --accent: #681923;
  --accent-hover: #7d242b;
  --wine: #310f16;
  --ink: #f3ece4;
  --muted: #c4b8ac;
  --soft: #cbb49b;
  --radius-large: 32px;
  --radius-panel: 24px;
  --radius-control: 12px;
  --radius-pill: 100px;
  font: 16px/1.6 Onest, Manrope, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--bg);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; }
[hidden] { display: none !important; }
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; }
button, summary { cursor: pointer; }
:focus-visible { outline: 2px solid var(--soft); outline-offset: 4px; }
p, figure { margin: 0; }
h1, h2, h3 { margin: 0; line-height: 1.12; }
.wrap { width: min(1190px, calc(100% - 88px)); margin-inline: auto; }

.skip-link { position: fixed; inset: 12px auto auto 12px; z-index: 20; transform: translateY(calc(-100% - 20px)); padding: 8px 14px; border-radius: var(--radius-pill); background: var(--ink); color: var(--bg); }
.skip-link:focus { transform: none; }
.top { min-height: 76px; display: flex; align-items: center; gap: clamp(14px, 2.5vw, 30px); border-bottom: 1px solid var(--line); }
.brand { display: inline-flex; gap: 9px; align-items: center; font-weight: 800; letter-spacing: -.05em; font-size: 1.25rem; white-space: nowrap; }
nav { margin-left: auto; display: flex; gap: clamp(17px, 2.8vw, 36px); color: var(--muted); font-size: .9rem; font-weight: 650; }
nav a:hover, .footer a:hover { color: var(--ink); }
.top button:last-child { margin-left: auto; }
.top nav + button:last-child { margin-left: 0; }
.top .cabinet-link { white-space: nowrap; margin-left: auto; }

.button {
  display: inline-flex;
  min-height: 44px;
  justify-content: center;
  align-items: center;
  border: 1px solid transparent;
  padding: 8px 20px;
  border-radius: var(--radius-pill);
  font-size: .94rem;
  font-weight: 650;
  color: var(--ink);
  background: transparent;
  text-align: center;
  transition: background-color .16s ease, color .16s ease, border-color .16s ease;
}
.button.primary { background: var(--accent); }
.button.primary:hover { background: var(--accent-hover); }
.button.paper { background: var(--ink); color: var(--wine); }
.button.paper:hover { background: var(--soft); }
.button.outline { border-color: #78635a; }
.button.outline:hover { background: #f3ece412; border-color: var(--muted); }
.button.quiet { color: var(--ink); padding-inline: 0; text-decoration: underline; text-decoration-color: #ae9b8a; text-underline-offset: .33em; }
.button.quiet:hover { color: var(--soft); }
.button:disabled { opacity: .68; cursor: wait; }

.conversation-mark { position: absolute; pointer-events: none; aspect-ratio: 1.7; }
.conversation-mark i {
  position: absolute;
  width: 68%;
  height: 61%;
  border-radius: 100px 100px 100px 30px;
  background: var(--accent);
  transform: rotate(-17deg);
}
.conversation-mark i + i {
  inset: 25% 0 auto auto;
  border-radius: 100px 100px 28px 100px;
  background: var(--accent-hover);
  transform: rotate(12deg);
}

.hero {
  background:
    linear-gradient(0deg, var(--bg) 0%, #100f0eee 11%, #100f0e55 41%, transparent 72%),
    linear-gradient(90deg, #100e0d60 0%, #100e0dc9 50%, #100e0d66 100%),
    url("/hero-night.jpg") center 44% / cover no-repeat,
    var(--bg);
}
.hero-layout { display: flex; align-items: center; justify-content: center; text-align: center; min-height: 575px; padding-block: 74px 116px; }
.hero-copy { max-width: 720px; }
.hero h1 { font-size: clamp(2.75rem, 5.3vw, 5.05rem); line-height: 1.02; letter-spacing: -.075em; font-weight: 800; }
.hero-tagline { display: block; margin-top: 15px; color: var(--ink); font-size: clamp(1.3rem, 2.65vw, 2.12rem); line-height: 1.2; font-weight: 720; letter-spacing: -.039em; }
.lede { max-width: 39ch; margin-inline: auto; margin-block: 13px 26px; color: #d7cabe; font-size: clamp(1rem, 1.5vw, 1.15rem); }
.hero-actions { display: flex; justify-content: center; gap: 22px; align-items: center; flex-wrap: wrap; }
.hero-actions .primary { min-height: 49px; padding-inline: 21px; }

.how, .pricing, .guide, .faq-section { padding-block: clamp(52px, 7vw, 96px); }
h2 { font-size: clamp(2.15rem, 4.1vw, 3.65rem); font-weight: 770; letter-spacing: -.066em; }
h3 { font-size: 1.2rem; font-weight: 750; letter-spacing: -.035em; }
.section-heading { margin-bottom: 27px; }
.section-heading p { max-width: 34ch; color: var(--muted); margin-top: 12px; }
.how, .pricing > .wrap, .guide, .faq-section { display: grid; grid-template-columns: minmax(0, .87fr) minmax(0, 1.45fr); align-items: start; gap: clamp(24px, 6vw, 90px); }
.how .section-heading, .pricing .section-heading, .guide .section-heading { margin: 0; }
.workflow, .guide-steps { list-style: none; margin: 0; padding: 0; }
.workflow > li {
  display: grid;
  grid-template-columns: 2.15rem minmax(8.5rem, .75fr) minmax(0, 1.25fr);
  gap: 12px;
  align-items: baseline;
  padding-block: 18px;
  border-top: 1px solid var(--line);
}
.workflow > li:last-child, .price:last-child, .guide-steps > li:last-child { border-bottom: 1px solid var(--line); }
.step-marker, .guide-step { color: var(--soft); font-size: .83rem; font-weight: 740; font-variant-numeric: tabular-nums; }
.workflow p { color: var(--muted); font-size: .94rem; }

.pricing { background: var(--wine); --line: #633743; }
.pricing .section-heading p { color: #d2bbb7; }
.price {
  display: grid;
  grid-template-columns: minmax(0, .8fr) minmax(0, 1fr) max-content;
  align-items: center;
  gap: 16px;
  padding-block: 17px;
  border-top: 1px solid var(--line);
}
.price .button { min-width: 9.5rem; border-color: #977475; }
.price .button:hover { border-color: var(--ink); }
.amount { font-size: clamp(1.8rem, 3.45vw, 2.8rem); line-height: 1.15; font-weight: 760; letter-spacing: -.06em; white-space: nowrap; font-variant-numeric: tabular-nums; }
.amount span { font-size: .67em; color: #d1b6ab; }

.guide-steps > li { display: grid; grid-template-columns: 2.15rem minmax(0, 1fr); gap: 10px 12px; align-items: baseline; padding-block: 19px; border-top: 1px solid var(--line); }
.guide-copy, .guide figure { grid-column: 2; }
.guide-copy p { margin-top: 7px; color: var(--muted); }
.guide figure { margin-block: 5px 0; }
.guide figure img { display: block; max-width: 100%; height: auto; border: 1px solid var(--line); }
.guide figcaption { margin-top: 8px; color: var(--muted); font-size: .86rem; }
.guide figcaption a { text-decoration: underline; text-underline-offset: .16em; }
.guide figure img[src="/guide-pin.png"] { max-width: min(100%, 470px); }

.faq-section { padding-top: 16px; }
details { border-bottom: 1px solid var(--line); padding-block: 15px; }
details:first-child { border-top: 1px solid var(--line); }
summary { font-weight: 730; }
summary::marker { color: var(--soft); }
details p { color: var(--muted); margin-top: 10px; max-width: 60ch; }
.footer { min-height: 78px; display: flex; justify-content: space-between; align-items: center; border-top: 1px solid var(--line); color: var(--muted); }

dialog { width: min(495px, calc(100% - 32px)); padding: clamp(18px, 4vw, 27px); border-radius: var(--radius-panel); background: var(--panel); color: var(--ink); border: 1px solid #78635a; }
dialog::backdrop { background: #100e0dd6; }
.dialog-top { display: flex; justify-content: space-between; align-items: start; gap: 12px; margin-bottom: 18px; }
.dialog-top h2 { font-size: 1.95rem; }
.close { padding: 0 9px; min-height: 34px; font-size: 1.5rem; line-height: 1; }
.close:hover { background: #f3ece412; }
label { display: grid; gap: 6px; margin-bottom: 12px; }
input, select { background: var(--bg); color: var(--ink); border: 1px solid #78635a; border-radius: var(--radius-control); min-width: 0; padding: 10px; }
.small, .feedback { color: var(--muted); font-size: .93rem; }
.small, #chosen-plan, #status-detail { margin-bottom: 13px; }
#status-summary { margin-bottom: 7px; font-weight: 740; }
.feedback { margin: 9px 0 0; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; }
.admin { padding-block: 42px; }
.admin h1 { font-size: clamp(2rem, 6vw, 3.4rem); letter-spacing: -.065em; margin-bottom: 24px; }
.admin #sign-in { max-width: 390px; }
.admin-settings { max-width: 650px; padding-block: 20px 26px; border-block: 1px solid var(--line); margin-bottom: 30px; }
.admin-settings h2, .orders-heading { font-size: clamp(1.4rem, 3vw, 2rem); margin-bottom: 15px; }
.setting-fields { display: grid; grid-template-columns: 1fr minmax(0, .74fr); gap: 12px; }
.admin-tools, .admin-tools form { display: flex; gap: 10px; flex-wrap: wrap; }
.admin-tools { justify-content: space-between; align-items: flex-start; }
.table-wrap { overflow-x: auto; margin-block: 18px; }
table { width: 100%; border-collapse: collapse; text-align: left; min-width: 780px; }
th, td { padding: 12px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
td .button, td select { padding: 6px 9px; }
td small { display: block; color: var(--muted); }

@media (max-width: 945px) {
  .wrap { width: calc(100% - 56px); }
  .hero-layout { min-height: 535px; }
  .workflow > li { grid-template-columns: 1.8rem minmax(0, 1fr); gap: 4px 10px; }
  .workflow p { grid-column: 2; }
}
@media (max-width: 705px) {
  .wrap { width: calc(100% - 32px); }
  .setting-fields { grid-template-columns: 1fr; gap: 0; }
  .top { min-height: 64px; gap: 9px; justify-content: space-between; }
  .top .button { min-height: 40px; }
  .top .cabinet-link { min-height: 44px; padding-inline: 12px; font-size: .83rem; }
  nav { display: none; }
  .hero {
    background-image:
      linear-gradient(0deg, var(--bg) 0%, #100f0efa 20%, #100f0ebc 47%, #100f0e1a 72%),
      linear-gradient(90deg, #100e0d59, transparent 80%),
      url("/hero-night.jpg");
    background-position: center, center, 65% top;
  }
  .hero-layout { align-items: flex-end; min-height: 530px; padding-block: 172px 43px; }
  .hero h1 { font-size: clamp(2.42rem, 9.7vw, 4.4rem); }
  .hero-tagline { margin-top: 12px; }
  .lede { margin-block: 12px 19px; }
  .hero-actions { gap: 14px; }
  .hero-actions .primary { padding-inline: 12px; min-height: 45px; }
  .how, .pricing, .guide, .faq-section { padding-block: 44px; }
  .how, .pricing > .wrap, .guide, .faq-section { grid-template-columns: 1fr; gap: 19px; }
  .price { grid-template-columns: minmax(0, 1fr) auto; gap: 9px 14px; padding-block: 14px; }
  .price .button { grid-column: 1 / -1; justify-self: start; min-width: 0; min-height: 38px; padding: 5px 10px; }
  .guide-steps > li { grid-template-columns: 1.65rem minmax(0, 1fr); gap: 8px; }
  .guide figure { grid-column: 1 / -1; }
  .faq-section { padding-top: 0; }
  .footer { min-height: 68px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .button { transition: none; }
}

.art-hero {
  position: relative; isolation: isolate;
  background:
    linear-gradient(to top, var(--bg), transparent 34%),
    radial-gradient(ellipse at 83% 37%, var(--wine), transparent 66%), var(--bg);
}
.art-hero::before {
  content: ""; position: absolute; z-index: -1; pointer-events: none;
  top: clamp(22px, 2.8vw, 44px); right: 0;
  width: min(47%, 920px); aspect-ratio: 3 / 2;
  --photo-mask-x: linear-gradient(90deg, transparent 2%, #0005 26%, #000 44%, #000 73%, #0008 90%, transparent);
  background:
    url("/hero-date-natural.jpg") right top / 100% auto no-repeat;
  mask-image: var(--photo-mask-x), linear-gradient(180deg, transparent 1%, #0008 13%, #000 27%, #000 51%, #0008 73%, transparent 96%);
  mask-composite: intersect;
}
.art-hero .hero-layout {
  min-height: clamp(540px, 76svh, 740px);
  align-items: center;
  padding-block: 56px;
}
.art-hero h1 { font-weight: 850; letter-spacing: -.055em; line-height: 1; font-size: clamp(2.65rem, 5.05vw, 5.2rem); }
.art-hero .hero-tagline { font-weight: 730; font-size: clamp(1.17rem, 2.25vw, 1.8rem); margin-top: clamp(15px, 2vw, 26px); }
.art-hero .lede { max-width: 34ch; margin: 11px auto 24px; text-wrap: pretty; }
.art-hero .hero-actions { gap: 10px; }
.art-hero .hero-actions .button { min-height: 49px; }
.hero-chat {
  position: relative;
  width: min(calc(100% - 44px), 350px);
  margin: 0 auto;
  transform: perspective(1050px) rotateY(8deg) rotateX(3deg) rotateZ(-1deg);
}
.hero-mark {
  inset: auto auto 5% 2%;
  width: 96%;
  z-index: -1;
  opacity: .22;
}
@media (prefers-reduced-motion: no-preference) {
  .hero-chat.is-floating { animation: hero-chat-float 4.6s ease-in-out; }
}
@keyframes hero-chat-float {
  0%, 100% { translate: 0 0; }
  48% { translate: 0 -7px; }
}
.hero-message {
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
  text-align: left;
  font-size: clamp(.83rem, 1.12vw, .94rem);
  font-weight: 600;
  line-height: 1.34;
  pointer-events: none;
  user-select: none;
}
.hero-message-track {
  --message-end: 12px;
  --bubble: #423330;
  display: flex;
  justify-content: flex-start;
  min-width: 0;
}
.hero-message-track.is-ai {
  --message-end: 34px;
  --bubble: var(--accent-hover);
  justify-content: flex-end;
}
.hero-message-bubble {
  position: relative;
  isolation: isolate;
  max-width: 100%;
  min-width: 0;
  padding: 7px var(--message-end) 7px 12px;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
  border-radius: 15px 15px 15px 5px;
  transform-origin: left center;
}
.hero-message-surface {
  position: absolute;
  z-index: -1;
  inset: 0;
  border-radius: inherit;
  background: var(--bubble);
  box-shadow: inset 0 1px #fff3, 0 3px 10px #08030550;
  opacity: .56;
}
.hero-message [data-message-text] { display: block; }
.is-ai .hero-message-bubble {
  border-radius: 15px 15px 5px 15px;
  transform-origin: right center;
}
.hero-message-surface::after {
  content: "";
  position: absolute;
  inset: auto auto 0 -7px;
  width: 10px;
  height: 12px;
  background: var(--bubble);
  clip-path: path("M7 0C7 6 4 10 0 11C3 13 8 12 10 9V0Z");
}
.is-ai .hero-message-surface::after {
  inset-inline: auto -7px;
  transform: scaleX(-1);
}
.hero-message-ai {
  position: absolute;
  inset: auto 8px 7px auto;
  border-radius: 4px;
  padding: 1px 3px;
  background: #ffffff19;
  color: #f0c0b9;
  font-size: .59rem;
  font-weight: 800;
  line-height: 1.5;
}
.hero-message-track[data-message-state="waiting"] .hero-message-bubble {
  opacity: 0;
  transform: scaleX(.955);
}
.hero-message-track[data-message-state="typing"] .hero-message-bubble {
  transition: opacity .22s ease-out, transform .22s ease-out;
}
.hero-message-track[data-message-state="typing"] [data-message-text] {
  clip-path: polygon(0 0, 100% 0, 100% var(--line-start, 0px), var(--typed-edge, 0px) var(--line-start, 0px), var(--typed-edge, 0px) var(--typed-height, 0px), 0 var(--typed-height, 0px));
}
.hero-message-measure {
  position: fixed;
  inset: 0 auto auto 0;
  visibility: hidden;
}
@media (min-width: 960px) {
  .hero-chat {
    position: absolute;
    top: calc(49% + 33px);
    right: calc(50% + clamp(174px, 18vw, 279px) + 16px);
    width: min(23vw, 335px);
    transform: translateY(-50%) perspective(1000px) rotateY(21deg) rotateX(7deg) rotateZ(-2.7deg);
  }
}
@media (width < 960px) {
  .art-hero { padding-bottom: 42px; }
  .art-hero .hero-layout { min-height: clamp(405px, 60svh, 580px); padding-bottom: 15px; }
  .hero-chat { margin-top: 5px; }
}
@media (max-width: 760px) {
  .art-hero::before {
    top: 10px; right: 0; left: 0; width: min(100%, 520px); margin-inline: auto;
    --photo-mask-x: linear-gradient(90deg, transparent, #0008 10%, #000 24%, #000 74%, #0008 90%, transparent);
    background-position: center top;
  }
  .art-hero .hero-layout {
    min-height: 0;
    padding-block: clamp(150px, 48vw, 259px) 0;
  }
  .art-hero h1 { font-size: clamp(2.38rem, 9.5vw, 4.1rem); }
  .art-hero .hero-tagline { margin-top: 13px; }
  .art-hero .hero-actions .button { min-height: 44px; padding-inline: 12px; font-size: .86rem; }
  .hero-chat { margin-top: 27px; }
  .hero-mark { inset-block-end: 10%; opacity: .16; }
}
