/* EasyPOS — public + admin styles
   Palette: warm white base, quiet grey-green surface, deep register-green
   accent, receipt-amber for highlights. Layout borrows the vocabulary of
   a paper receipt (itemised lines, perforated dividers, tabular figures)
   since the business itself is point-of-sale software. */

:root {
  --white: #ffffff;
  --surface: #F3F5F2;
  --surface-deep: #ECEFEA;
  --ink: #16211B;
  --ink-soft: #4B564E;
  --line: #DDE3DC;
  --green: #0B6E4F;
  --green-deep: #084F39;
  --amber: #C97A2B;
  --amber-soft: #FBEEDF;
  --danger: #B3432B;

  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", "Courier New", monospace;

  --radius: 6px;
  --shadow-card: 0 1px 2px rgba(22, 33, 27, 0.06);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--white);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

a { color: inherit; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.15;
  margin: 0 0 0.5em;
  letter-spacing: -0.01em;
}

h1 { font-size: clamp(2.1rem, 4.2vw, 3.4rem); font-weight: 500; }
h2 { font-size: clamp(1.6rem, 2.8vw, 2.3rem); }
h3 { font-size: 1.25rem; }

p { margin: 0 0 1em; max-width: 62ch; color: var(--ink-soft); }

.container {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
}

.container-narrow {
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 12px 22px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}
.btn-primary { background: var(--green); color: var(--white); }
.btn-primary:hover { background: var(--green-deep); }
.btn-outline { background: transparent; border-color: var(--ink); color: var(--ink); }
.btn-outline:hover { background: var(--ink); color: var(--white); }
.btn-ghost { background: transparent; color: var(--ink-soft); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--ink); color: var(--ink); }
.btn-block { width: 100%; }
.btn-sm { padding: 8px 14px; font-size: 0.85rem; }
.btn-danger { background: var(--danger); color: var(--white); }

/* Site header */
.site-header {
  border-bottom: 1px solid var(--line);
  background: var(--white);
  position: sticky;
  top: 0;
  z-index: 30;
}
.site-header .bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--ink);
}
.brand img { height: 34px; width: auto; }
.brand .mark {
  width: 34px; height: 34px; border-radius: 8px;
  background: var(--green); color: var(--white);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-size: 1.05rem;
}
.main-nav { display: flex; align-items: center; gap: 28px; }
.main-nav a {
  text-decoration: none; color: var(--ink-soft); font-weight: 500; font-size: 0.95rem;
}
.main-nav a:hover, .main-nav a.active { color: var(--green); }
.nav-toggle { display: none; background: none; border: none; cursor: pointer; }
.nav-toggle span { display: block; width: 22px; height: 2px; background: var(--ink); margin: 5px 0; }

/* Hero */
.hero {
  padding: 72px 0 88px;
  border-bottom: 1px dashed var(--line);
  background: var(--surface);
}
.hero .grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 56px; align-items: center; }
.eyebrow-tag {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--amber-soft); color: var(--amber);
  border-radius: 999px; padding: 6px 14px; font-size: 0.85rem; font-weight: 600;
  margin-bottom: 18px;
}
.hero h1 { color: var(--ink); }
.hero .lede { font-size: 1.1rem; max-width: 46ch; }
.hero .actions { display: flex; gap: 14px; margin-top: 28px; flex-wrap: wrap; }

/* Section chrome */
.section { padding: 84px 0; }
.section-alt { background: var(--surface); }
.section-head { max-width: 620px; margin-bottom: 44px; }
.section-head p { margin-top: 10px; }
.divider {
  border: none;
  border-top: 1px dashed var(--line);
  margin: 0;
}

/* Feature grid */
.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px 32px; }
.feature {
  padding: 26px 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
}
.feature .f-icon {
  width: 40px; height: 40px; border-radius: 8px;
  background: var(--surface-deep); color: var(--green);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 16px;
}
.feature h3 { margin-bottom: 8px; }
.feature p { font-size: 0.94rem; margin: 0; }

/* Pricing — itemised, receipt-line styling rather than boxed cards */
.pricing-list { border-top: 1px solid var(--line); }
.plan-row {
  display: grid;
  grid-template-columns: 1.4fr 2fr auto;
  gap: 28px;
  align-items: start;
  padding: 32px 0;
  border-bottom: 1px solid var(--line);
}
.plan-row.featured { background: var(--amber-soft); margin: 0 -24px; padding: 32px 24px; border-radius: var(--radius); border-bottom-color: transparent; }
.plan-row .plan-name { font-family: var(--font-display); font-size: 1.3rem; }
.plan-row .plan-fee { font-family: var(--font-mono); font-size: 1.5rem; color: var(--green); white-space: nowrap; }
.plan-row .badge {
  display: inline-block; background: var(--amber); color: var(--white);
  font-size: 0.72rem; font-weight: 700; padding: 3px 9px; border-radius: 999px; margin-bottom: 8px;
}
.plan-features { list-style: none; margin: 10px 0 0; padding: 0; font-size: 0.92rem; color: var(--ink-soft); }
.plan-features li { padding: 4px 0 4px 20px; position: relative; }
.plan-features li::before { content: "—"; position: absolute; left: 0; color: var(--green); }
.plan-actions { align-self: center; text-align: right; }

/* CTA band */
.cta-band {
  background: var(--ink);
  color: var(--white);
  padding: 64px 0;
  text-align: left;
}
.cta-band h2 { color: var(--white); }
.cta-band p { color: #C7CFC9; }
.cta-band .actions { margin-top: 22px; }
.cta-band .btn-primary { background: var(--green); }
.cta-band .btn-outline { border-color: #4B564E; color: var(--white); }
.cta-band .btn-outline:hover { background: var(--white); color: var(--ink); }

/* Footer */
.site-footer { background: var(--surface); border-top: 1px dashed var(--line); padding: 48px 0 28px; }
.site-footer .grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 32px; margin-bottom: 32px; }
.site-footer h4 { font-family: var(--font-body); font-size: 0.82rem; color: var(--ink-soft); font-weight: 600; margin-bottom: 12px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 8px; }
.site-footer a { text-decoration: none; color: var(--ink-soft); font-size: 0.92rem; }
.site-footer a:hover { color: var(--green); }
.site-footer .bottom { display: flex; justify-content: space-between; align-items: center; border-top: 1px solid var(--line); padding-top: 20px; font-size: 0.82rem; color: var(--ink-soft); flex-wrap: wrap; gap: 8px; }

/* Hero / about imagery */
.hero-figure { position: relative; margin: 0; max-width: 460px; margin-left: auto; }
.hero-figure::before {
  content: "";
  position: absolute;
  inset: -14px -14px auto auto;
  width: 120px; height: 120px;
  border-radius: 50%;
  background: var(--amber);
  opacity: 0.14;
  z-index: 0;
}
.hero-figure img {
  position: relative;
  z-index: 1;
  width: 100%;
  border-radius: 14px;
  border: 1px solid var(--line);
  box-shadow: 0 26px 56px -24px rgba(22, 33, 27, 0.4);
  transition: transform .3s ease, box-shadow .3s ease;
}
.hero-figure:hover img { transform: translateY(-6px); box-shadow: 0 32px 64px -22px rgba(22, 33, 27, 0.45); }

.about-grid { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 64px; align-items: center; }
.about-media { margin: 0; }
.about-media img {
  width: 100%;
  border-radius: 14px;
  border: 1px solid var(--line);
  box-shadow: 0 26px 56px -26px rgba(22, 33, 27, 0.36);
  transition: transform .3s ease, box-shadow .3s ease;
}
.about-media:hover img { transform: translateY(-6px); box-shadow: 0 32px 64px -24px rgba(22, 33, 27, 0.42); }

/* Reveal-on-scroll */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity .65s ease, transform .65s ease;
  will-change: opacity, transform;
}
.reveal[data-reveal="left"] { transform: translateX(-30px); }
.reveal[data-reveal="right"] { transform: translateX(30px); }
.reveal.is-visible { opacity: 1; transform: none; }
.reveal-d1 { transition-delay: .08s; }
.reveal-d2 { transition-delay: .16s; }
.reveal-d3 { transition-delay: .24s; }
.reveal-d4 { transition-delay: .32s; }
.reveal-d5 { transition-delay: .4s; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal, .reveal[data-reveal] { opacity: 1; transform: none; transition: none; }
}

/* Hover interactions */
.btn { transition: background-color .15s ease, border-color .15s ease, color .15s ease, transform .15s ease; }
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }

.main-nav a { transition: color .15s ease; position: relative; }
.main-nav a::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -6px;
  height: 2px;
  border-radius: 2px;
  background: var(--green);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .22s ease;
}
.main-nav a:hover::after, .main-nav a.active::after { transform: scaleX(1); }

.feature {
  transition: opacity .65s ease, transform .3s ease, box-shadow .3s ease, border-color .3s ease;
}
.feature:hover {
  transform: translateY(-4px);
  border-color: #C9D5CD;
  box-shadow: 0 16px 32px -18px rgba(22, 33, 27, 0.3);
}
.feature .f-icon { transition: transform .25s ease, background-color .25s ease, color .25s ease; }
.feature:hover .f-icon { transform: rotate(-6deg) scale(1.08); background: var(--green); color: var(--white); }

.plan-row { transition: opacity .65s ease, transform .35s ease, background-color .3s ease, box-shadow .3s ease; }
.plan-row:not(.featured):hover { background: var(--surface); transform: translateX(4px); }
.plan-row.featured { transition: opacity .65s ease, transform .35s ease, box-shadow .3s ease; }
.plan-row.featured:hover { box-shadow: 0 18px 36px -20px rgba(201, 122, 43, 0.5); }

.stat-card { transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease; }
.stat-card:hover { transform: translateY(-3px); border-color: #C9D5CD; box-shadow: 0 14px 30px -18px rgba(22, 33, 27, 0.28); }

.cta-band { position: relative; overflow: hidden; }
.cta-band .container { position: relative; z-index: 1; }
.cta-band.has-img::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(14, 22, 17, 0.74);
}

/* Forms */
.field { margin-bottom: 20px; }
.field label { display: block; font-size: 0.88rem; font-weight: 600; margin-bottom: 6px; }
.field .hint { font-size: 0.78rem; color: var(--ink-soft); margin-top: 4px; }
.field input[type=text], .field input[type=email], .field input[type=tel], .field input[type=password], .field input[type=file], .field input[type=number], .field textarea, .field select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 11px 14px;
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--ink);
  background: var(--white);
}
.field textarea { resize: vertical; min-height: 130px; }
.field input:focus, .field textarea:focus, .field select:focus {
  outline: none;
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(11,110,79,0.12);
}
.field .error { color: var(--danger); font-size: 0.8rem; margin-top: 5px; }
.checkbox-row { display: flex; align-items: center; gap: 8px; font-size: 0.9rem; }

.alert { padding: 14px 18px; border-radius: var(--radius); font-size: 0.92rem; margin-bottom: 24px; }
.alert-success { background: #E6F3EC; color: var(--green-deep); border: 1px solid #BEE1CE; }
.alert-error { background: #FBEAE6; color: var(--danger); border: 1px solid #F2C7BC; }

/* Contact page layout */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: start; }
.contact-info .item { display: flex; gap: 14px; padding: 16px 0; border-bottom: 1px dashed var(--line); }
.contact-info .item:last-child { border-bottom: none; }
.contact-info .item .ic { color: var(--green); font-weight: 700; width: 22px; }
.contact-info h4 { margin-bottom: 2px; font-size: 0.85rem; color: var(--ink-soft); font-weight: 600; }
.contact-info .val { font-size: 0.98rem; }

/* ===== Admin ===== */
.admin-shell { display: flex; min-height: 100vh; background: var(--surface); }
.admin-sidebar {
  width: 236px; flex-shrink: 0; background: var(--ink); color: #DCE3DE;
  padding: 24px 18px; position: sticky; top: 0; height: 100vh;
}
.admin-sidebar .brand { color: var(--white); margin-bottom: 32px; font-size: 1.15rem; }
.admin-sidebar nav a {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: var(--radius);
  color: #B7C2BB; text-decoration: none; font-size: 0.92rem; margin-bottom: 2px;
}
.admin-sidebar nav a:hover { color: var(--white); background: rgba(255,255,255,0.06); }
.admin-sidebar nav a.active { color: var(--white); background: var(--green-deep); }
.admin-sidebar .view-site { margin-top: 28px; display: block; font-size: 0.85rem; color: #8FA096; text-decoration: none; }
.admin-sidebar form { margin-top: 6px; }
.admin-sidebar .logout-btn { background: none; border: none; color: #8FA096; font-size: 0.85rem; cursor: pointer; padding: 0; }
.admin-main { flex: 1; padding: 36px 40px; min-width: 0; }
.admin-topbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 28px; flex-wrap: wrap; gap: 12px; }
.admin-topbar h1 { font-size: 1.5rem; margin: 0; }

.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-bottom: 36px; }
.stat-card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.stat-card .num { font-family: var(--font-display); font-size: 1.9rem; }
.stat-card .label { font-size: 0.85rem; color: var(--ink-soft); }

.panel { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; margin-bottom: 28px; }
.panel .panel-head { padding: 18px 22px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; }
.panel .panel-head h3 { margin: 0; font-size: 1.05rem; }
.panel .panel-body { padding: 22px; }

table.admin-table { width: 100%; border-collapse: collapse; }
table.admin-table th { text-align: left; font-size: 0.78rem; text-transform: none; color: var(--ink-soft); font-weight: 600; padding: 12px 22px; border-bottom: 1px solid var(--line); }
table.admin-table td { padding: 14px 22px; border-bottom: 1px solid var(--line); font-size: 0.92rem; vertical-align: top; }
table.admin-table tr:last-child td { border-bottom: none; }
.unread-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--amber); margin-right: 8px; }
.pill { display: inline-block; font-size: 0.75rem; padding: 3px 10px; border-radius: 999px; background: var(--surface-deep); color: var(--ink-soft); }
.pill-active { background: #E6F3EC; color: var(--green-deep); }
.pill-inactive { background: #F3E7E4; color: var(--danger); }

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 24px; }
.form-grid .field-full { grid-column: 1 / -1; }

/* Divides a long form into labelled groups, e.g. plan details vs. demo link */
.form-subhead {
  grid-column: 1 / -1;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--ink);
  border-top: 1px solid var(--line);
  padding-top: 18px;
  margin: 6px 0 16px;
}
.form-subhead .hint {
  display: block;
  font-weight: 400;
  font-size: 0.78rem;
  color: var(--ink-soft);
  margin-top: 6px;
  max-width: 760px;
}

.login-shell { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: var(--surface); padding: 24px; }
.login-card { width: 100%; max-width: 380px; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 36px 32px; box-shadow: var(--shadow-card); }
.login-card .brand { justify-content: center; margin-bottom: 22px; }
.login-card h1 { font-size: 1.4rem; text-align: center; margin-bottom: 6px; }
.login-card .sub { text-align: center; font-size: 0.88rem; margin-bottom: 24px; }

.empty-state { text-align: center; padding: 48px 24px; color: var(--ink-soft); }

/* Mobile */
@media (max-width: 880px) {
  .hero .grid { grid-template-columns: 1fr; }
  .hero-figure { max-width: 380px; margin: 0 auto; }
  .about-grid { grid-template-columns: 1fr; gap: 40px; }
  .feature-grid { grid-template-columns: 1fr 1fr; }
  .contact-grid { grid-template-columns: 1fr; gap: 36px; }
  .site-footer .grid { grid-template-columns: 1fr 1fr; }
  .stat-grid { grid-template-columns: 1fr 1fr; }
  .admin-main { padding: 26px 20px; }
}
@media (max-width: 680px) {
  .main-nav { position: fixed; inset: 64px 0 0 0; background: var(--white); flex-direction: column; align-items: flex-start; padding: 24px; gap: 4px; transform: translateY(-8px); opacity: 0; pointer-events: none; transition: opacity .15s ease, transform .15s ease; }
  .main-nav.open { opacity: 1; transform: translateY(0); pointer-events: auto; }
  .main-nav a { padding: 12px 0; width: 100%; border-bottom: 1px solid var(--line); }
  .nav-toggle { display: block; }
  .feature-grid { grid-template-columns: 1fr; }
  .plan-row { grid-template-columns: 1fr; }
  .plan-actions { text-align: left; }
  .site-footer .grid { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .admin-shell { flex-direction: column; }
  .admin-sidebar { width: 100%; height: auto; position: relative; display: flex; align-items: center; justify-content: space-between; }
  .admin-sidebar nav { display: flex; gap: 4px; overflow-x: auto; }
  .stat-grid { grid-template-columns: 1fr 1fr; }
}
