/* Digital Restaurant Orders homepage */

*,
*::before,
*::after {
  box-sizing: border-box;
}

:root {
  --app-accent: #3b82f6;
  --app-accent-strong: #1d4ed8;
  --app-accent-ink: #0b1220;
  --app-accent-soft: rgba(59, 130, 246, 0.18);
  --app-bg: #0f172a;
  --app-text: #e5e7eb;
  --app-muted: #94a3b8;
  --app-surface: rgba(15, 23, 42, 0.9);
  --app-surface-2: rgba(30, 41, 59, 0.8);
  --app-border: rgba(148, 163, 184, 0.2);
  --app-shadow: 0 24px 70px rgba(0, 0, 0, 0.35);
  --app-topbar: radial-gradient(circle at top left, #1d4ed8, #0f172a 55%);
  --app-font-title: 28px;
  --app-font-subtitle: 22px;
  --app-font-text: 18px;
  --app-font-error: 14px;
  --app-error: #ef4444;
}

html[data-theme="light"] {
  --app-accent-soft: #dbeafe;
  --app-bg: #f8fafc;
  --app-text: #0f172a;
  --app-muted: #475569;
  --app-surface: rgba(255, 255, 255, 0.92);
  --app-surface-2: rgba(255, 255, 255, 0.85);
  --app-border: rgba(15, 23, 42, 0.12);
  --app-shadow: 0 20px 55px rgba(15, 23, 42, 0.12);
  --app-topbar: radial-gradient(circle at top left, #93c5fd, #f8fafc 55%);
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  overflow-x: hidden;
  max-width: 100%;
}

body {
  width: 100%;
  max-width: 100%;
  margin: 0;
  overflow-x: hidden;
  position: relative;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: var(--app-font-text);
  line-height: 1.5;
  color: var(--app-text);
  overflow-wrap: break-word;
  background:
    radial-gradient(circle at top left, rgba(59, 130, 246, 0.22), transparent 34rem),
    radial-gradient(circle at 85% 10%, rgba(147, 197, 253, 0.16), transparent 28rem),
    var(--app-bg);
}

img,
svg,
video,
canvas {
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

button,
input,
select,
textarea {
  font: inherit;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 300;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 1rem;
  align-items: center;
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  padding: 0.4rem clamp(1rem, 4vw, 3rem);
  border-bottom: 1px solid var(--app-border);
  background: var(--app-topbar);
  backdrop-filter: blur(18px);
}

.logo {
  display: block;
  height: 3.35rem;
  width: min(19rem, 52vw);
  max-width: 100%;
  overflow: hidden;
  flex-shrink: 0;
  line-height: 0;
  text-decoration: none;
}

.logo img {
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  object-position: center;
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem 1.25rem;
  min-width: 0;
  max-width: 100%;
  font-size: var(--app-font-text);
  font-weight: 700;
  color: var(--app-muted);
}

.nav-links a {
  text-decoration: none;
  white-space: nowrap;
  flex: 0 1 auto;
  min-width: 0;
}

.nav-links a:hover {
  color: var(--app-accent);
}

.topbar-actions {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.lang-menu {
  position: relative;
  z-index: 320;
}

.lang-toggle,
.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.5rem;
  min-height: 2.5rem;
  padding: 0.5rem;
  border: 1px solid var(--app-border);
  border-radius: 999px;
  color: var(--app-text);
  background: var(--app-surface);
  cursor: pointer;
}

.lang-toggle:hover,
.theme-toggle:hover {
  color: var(--app-accent);
}

.lang-icon {
  display: block;
}

.lang-dropdown {
  position: absolute;
  top: calc(100% + 0.4rem);
  inset-inline-end: 0;
  z-index: 330;
  min-width: 9.5rem;
  margin: 0;
  padding: 0.35rem;
  list-style: none;
  border: 1px solid var(--app-border);
  border-radius: 0.85rem;
  background: var(--app-surface);
  box-shadow: var(--app-shadow);
}

.lang-dropdown[hidden] {
  display: none;
}

.lang-option {
  display: block;
  width: 100%;
  padding: 0.55rem 0.75rem;
  border: 0;
  border-radius: 0.6rem;
  text-align: start;
  color: var(--app-text);
  background: transparent;
  cursor: pointer;
}

.lang-option:hover,
.lang-option.is-active {
  background: var(--app-accent-soft);
  color: var(--app-accent-strong);
}

.theme-toggle {
  line-height: 1;
}

main {
  max-width: 1180px;
  width: 100%;
  min-width: 0;
  margin: 0 auto;
  padding: 0 clamp(1rem, 4vw, 3rem) 4rem;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.9fr);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
  min-width: 0;
  min-height: calc(100vh - 5rem);
  padding: clamp(4rem, 8vw, 7rem) 0;
}

.hero-content {
  max-width: 660px;
}

.eyebrow {
  margin: 0 0 0.75rem;
  font-size: var(--app-font-text);
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--app-accent-strong);
  text-transform: uppercase;
}

.hero h1,
.section h2,
.legal-page h1,
.card h3,
.screenshot-card h3,
.steps h3,
.legal-page h2 {
  margin: 0;
  color: var(--app-text);
  font-size: var(--app-font-title);
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.hero h1 {
  max-width: 14ch;
}

.hero-subtitle,
.price {
  font-size: var(--app-font-subtitle);
  line-height: 1.35;
  color: var(--app-text);
}

.hero-subtitle {
  max-width: 650px;
  margin: 1.5rem 0 0;
}

.hero-support,
.section p,
.card p,
.steps p,
.legal-page p {
  font-size: var(--app-font-text);
  color: var(--app-muted);
  line-height: 1.65;
}

.hero-support {
  max-width: 56ch;
  margin: 1rem 0 0;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-top: 2rem;
}

.cta-button,
.secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  padding: 0.85rem 1.25rem;
  border-radius: 999px;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.cta-button {
  border: 1px solid var(--app-accent-strong);
  color: #fff;
  background: linear-gradient(135deg, var(--app-accent), var(--app-accent-strong));
  box-shadow: 0 14px 26px rgba(59, 130, 246, 0.28);
}

.secondary-button {
  border: 1px solid var(--app-border);
  color: var(--app-text);
  background: var(--app-surface);
}

.cta-button:hover,
.secondary-button:hover {
  transform: translateY(-2px);
}

.hero-preview {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--app-border);
  border-radius: 2rem;
  background: linear-gradient(145deg, var(--app-surface), var(--app-surface-2));
  box-shadow: var(--app-shadow);
}

.hero-trigger {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: zoom-in;
}

.hero-image {
  display: block;
  width: 100%;
  height: auto;
  max-width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  transition: transform 180ms ease;
}

.hero-trigger:hover .hero-image,
.hero-trigger:focus-visible .hero-image {
  transform: scale(1.02);
}

.hero-trigger:focus-visible {
  outline: 2px solid var(--app-accent);
  outline-offset: 2px;
}

.card h3,
.steps h3 {
  margin-bottom: 0.8rem;
}

.section {
  padding: clamp(3rem, 7vw, 5rem) 0;
  border-top: 1px solid var(--app-border);
}

.section-heading {
  max-width: 760px;
  margin-bottom: 1.5rem;
}

.section-heading p:last-child {
  margin-top: 1rem;
}

.problem-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.tag-list span {
  padding: 0.65rem 0.85rem;
  border: 1px solid var(--app-border);
  border-radius: 999px;
  color: var(--app-text);
  background: var(--app-surface);
}

.steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.steps li,
.card,
.screenshot-card,
.price-box,
.contact-form,
.legal-page {
  border: 1px solid var(--app-border);
  border-radius: 1.25rem;
  background: var(--app-surface);
  box-shadow: var(--app-shadow);
}

.steps li {
  padding: 1.25rem;
}

.step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.4rem;
  height: 2.4rem;
  margin-bottom: 1rem;
  border-radius: 50%;
  font-weight: 900;
  color: var(--app-accent-strong);
  background: var(--app-accent-soft);
}

.benefit-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
}

.card {
  padding: 1.25rem;
}

.card p,
.steps p {
  margin: 0;
}

.screenshots .section-heading {
  margin-bottom: 2rem;
}

.screenshot-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
}

.screenshot-card {
  overflow: hidden;
  padding: 0;
}

.screenshot-trigger {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: zoom-in;
}

.screenshot-card img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  object-position: top center;
  background: var(--app-accent-soft);
  transition: transform 180ms ease;
}

.screenshot-trigger:hover img,
.screenshot-trigger:focus-visible img {
  transform: scale(1.02);
}

.screenshot-trigger:focus-visible {
  outline: 2px solid var(--app-accent);
  outline-offset: 2px;
}

.screenshot-card h3,
.screenshot-card p {
  margin: 0;
  padding-inline: 1.25rem;
}

.screenshot-card h3 {
  padding-top: 1rem;
}

.screenshot-card p {
  padding-top: 0.5rem;
  padding-bottom: 1.25rem;
  color: var(--app-muted);
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  height: 100%;
  padding: 0.75rem;
  overflow: hidden;
  overscroll-behavior: none;
}

.lightbox[hidden] {
  display: none !important;
}

.lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 12, 20, 0.82);
}

.lightbox-dialog {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  box-sizing: border-box;
  width: 100%;
  max-width: min(1100px, 100%);
  max-height: 100%;
  min-width: 0;
  min-height: 0;
}

.lightbox-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex: 0 0 auto;
  min-width: 0;
}

.lightbox-title {
  margin: 0;
  color: #fff;
  font-size: var(--app-font-subtitle);
  font-weight: 800;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lightbox-close {
  flex: 0 0 auto;
  width: 2.5rem;
  height: 2.5rem;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
}

.lightbox-close:hover,
.lightbox-close:focus-visible {
  background: rgba(255, 255, 255, 0.2);
}

.lightbox-frame {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1 1 auto;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
}

.lightbox-image {
  display: block;
  box-sizing: border-box;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: calc(100vh - 5.5rem);
  max-height: calc(100dvh - 5.5rem);
  object-fit: contain;
  border-radius: 1rem;
  background: #0b1220;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
}

html.lightbox-open,
body.lightbox-open {
  overflow: hidden;
  touch-action: none;
  overscroll-behavior: none;
}

.who > p {
  max-width: 760px;
  margin: 0 0 1.5rem;
}

.pricing-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.55fr);
  gap: 1.5rem;
  align-items: stretch;
  min-width: 0;
  max-width: 100%;
  padding: clamp(1.25rem, 4vw, 2rem);
  border: 1px solid var(--app-border);
  border-radius: 1.6rem;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.16), rgba(147, 197, 253, 0.1));
}

.pricing-card h2 {
  margin-bottom: 1rem;
}

.hardware-note {
  margin-top: 1rem;
  font-weight: 700;
}

.price-box {
  padding: 1.25rem;
}

.price {
  margin: 0;
  font-weight: 900;
}

.price-alt {
  margin: 0.35rem 0 0;
  font-size: var(--app-font-subtitle);
  font-weight: 700;
  color: var(--app-muted);
}

.price-scope {
  margin: 0.5rem 0 0;
  font-size: var(--app-font-text);
  color: var(--app-muted);
}

.price-includes {
  margin: 1.15rem 0 0.75rem;
  font-size: var(--app-font-text);
  font-weight: 800;
  color: var(--app-text);
}

.price-box ul {
  display: grid;
  gap: 0.55rem;
  margin: 0 0 1.25rem;
  padding: 0;
  list-style: none;
}

.price-box li {
  position: relative;
  padding-inline-start: 1.4rem;
  color: var(--app-muted);
}

.price-box li::before {
  content: "";
  position: absolute;
  inset-inline-start: 0;
  top: 0.55em;
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  background: var(--app-accent);
}

.full-width {
  width: 100%;
}

.contact-form {
  max-width: 920px;
  padding: clamp(1rem, 3vw, 1.5rem);
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem 1rem;
  align-items: start;
}

.contact-form label {
  display: grid;
  grid-template-rows: auto auto minmax(1.35rem, auto);
  gap: 0.45rem;
  align-content: start;
  margin-bottom: 1rem;
  font-weight: 800;
}

.contact-form input:not([type="file"]),
.contact-form select,
.contact-form textarea {
  width: 100%;
  border: 1px solid var(--app-border);
  border-radius: 0.8rem;
  padding: 0.85rem 0.95rem;
  color: var(--app-text);
  background: var(--app-surface-2);
}

.contact-form textarea {
  resize: vertical;
}

.file-field {
  display: grid;
  gap: 0.45rem;
  margin-bottom: 1rem;
  font-weight: 800;
}

.file-upload {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  border: 1px solid var(--app-border);
  border-radius: 0.8rem;
  padding: 0.55rem 0.65rem;
  background: var(--app-surface-2);
}

.file-upload-input {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.file-upload-button {
  flex: 0 0 auto;
  border: 1px solid var(--app-border);
  border-radius: 0.65rem;
  padding: 0.55rem 0.9rem;
  color: var(--app-text);
  background: var(--app-surface);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.file-upload-button:hover {
  border-color: var(--app-accent);
}

.file-upload-name {
  flex: 1 1 10rem;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 600;
  color: var(--app-muted);
}

.file-upload-name.has-file {
  color: var(--app-text);
}

.contact-form .field-error {
  margin: 0;
  min-height: 1.35rem;
  font-size: var(--app-font-error);
  font-weight: 600;
  line-height: 1.4;
  color: var(--app-error);
}

.contact-form .field-error:empty {
  visibility: hidden;
}

.contact-form .has-error input,
.contact-form .has-error select,
.contact-form .has-error textarea,
.file-field.has-error .file-upload {
  border-color: var(--app-error);
}

.form-status-error {
  margin: 0.75rem 0 0;
}

.form-status-error:empty {
  display: none;
}

.success-message {
  margin-top: 1rem;
  margin-bottom: 1rem;
  padding: 0.9rem 1rem;
  border-radius: 0.8rem;
  font-size: var(--app-font-text);
  color: #6ee7b7;
  background: rgba(16, 185, 129, 0.18);
}

footer {
  max-width: 1180px;
  margin: 0 auto;
  padding: 2rem clamp(1rem, 4vw, 3rem);
  border-top: 1px solid var(--app-border);
  color: var(--app-muted);
  text-align: center;
}

footer p {
  margin: 0 0 0.5rem;
}

footer p:last-child {
  margin-bottom: 0;
}

footer a {
  color: var(--app-accent-strong);
  font-weight: 800;
  text-decoration: none;
}

footer a:hover {
  text-decoration: underline;
}

html[data-theme="light"] .success-message {
  color: #166534;
  background: #dcfce7;
}

.legal-page {
  max-width: 860px;
  margin: 3rem auto;
  padding: clamp(1.25rem, 4vw, 2rem);
}

.legal-page .legal-updated {
  margin: 0.75rem 0 2rem;
}

.legal-page h2 {
  margin: 2rem 0 0.75rem;
}

.legal-page h2:first-of-type {
  margin-top: 0;
}

.legal-page p {
  margin: 0 0 1rem;
}

@media (max-width: 980px) {
  .topbar {
    grid-template-columns: minmax(0, 1fr) auto;
    padding-inline: 0.75rem;
  }

  main,
  footer {
    max-width: none;
    width: 100%;
    min-width: 0;
    padding-inline: 0.75rem;
    overflow-x: hidden;
  }

  .nav-links {
    grid-column: 1 / -1;
    grid-row: 2;
    justify-content: space-between;
    gap: 0.5rem 0.65rem;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
    font-size: 0.9rem;
  }

  .hero,
  .pricing-card,
  .section,
  .hero-preview,
  .contact-form,
  .screenshot-grid,
  .problem-grid,
  .benefit-grid,
  .steps {
    min-width: 0;
    max-width: 100%;
  }

  .hero,
  .pricing-card {
    grid-template-columns: minmax(0, 1fr);
  }

  .hero {
    min-height: auto;
  }

  .hero-content,
  .hero-subtitle,
  .hero-support,
  .section-heading,
  .who > p,
  .contact-form {
    max-width: none;
    width: 100%;
    min-width: 0;
  }

  .hero h1 {
    max-width: none;
  }

  .steps,
  .problem-grid,
  .benefit-grid,
  .screenshot-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .topbar {
    padding: 0.3rem 0.75rem;
  }

  main {
    padding: 0 0.75rem 3rem;
  }

  footer {
    padding: 1.5rem 0.75rem;
  }

  .logo {
    height: 2.85rem;
    width: min(11.5rem, 52vw);
  }

  .nav-links {
    gap: 0.35rem 0.4rem;
    font-size: 0.8125rem;
  }

  .hero {
    padding-top: 3rem;
  }

  .hero h1 {
    max-width: none;
  }

  .hero-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    width: 100%;
    min-width: 0;
  }

  .hero-actions a,
  .hero-preview,
  .steps,
  .problem-grid,
  .benefit-grid,
  .screenshot-grid,
  .form-grid {
    grid-template-columns: minmax(0, 1fr);
    min-width: 0;
    max-width: 100%;
  }

  .hero-actions a,
  .contact-form button {
    width: 100%;
    max-width: 100%;
  }

  .legal-page {
    margin-inline: 0;
    max-width: none;
    padding-inline: 0;
  }
}
