@charset "utf-8";
@import url("https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;700&family=Fraunces:opsz,wght@9..144,400;9..144,600&display=swap");

:root {
  --bg: #f3f6f8;
  --ink: #142630;
  --muted: #506770;
  --line: #d6e2e8;
  --surface: #ffffff;
  --accent: #146b80;
  --accent-2: #cf5b2f;
  --footer: #132b35;
  --radius: 18px;
  --shadow: 0 16px 38px rgba(20, 38, 48, 0.12);
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  font-family: "Space Grotesk", "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.55;
  text-align: center;
  color: var(--ink);
  background:
    radial-gradient(1200px 420px at 88% -10%, rgba(20, 107, 128, 0.18), transparent),
    radial-gradient(900px 360px at 4% -18%, rgba(207, 91, 47, 0.15), transparent),
    var(--bg);
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 180ms ease;
}

a:hover {
  color: var(--accent-2);
}

/* ── Skip to content ── */

.skip-to-content {
  position: absolute;
  top: -100%;
  left: 0;
  background: var(--accent);
  color: #fff;
  padding: 0.5rem 1.2rem;
  z-index: 200;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  border-radius: 0 0 8px 0;
  transition: top 180ms ease;
}

.skip-to-content:focus {
  top: 0;
}

/* ── Header ── */

header {
  position: sticky;
  top: 0;
  z-index: 50;
  width: 100%;
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(9px);
  background: rgba(243, 246, 248, 0.88);
  transition: background 250ms ease, border-color 250ms ease;
}

header .content,
.content {
  position: relative;
  margin: 0 auto;
  width: min(1120px, calc(100% - 2.4rem));
}

header .content {
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

header .logo {
  display: inline-block;
  width: 168px;
  height: 38px;
  background: url(images/zerodistance_logo.svg) no-repeat center center;
  background-size: contain;
  text-indent: -9999px;
  overflow: hidden;
  flex-shrink: 0;
  transition: opacity 180ms ease;
}

header .logo:hover {
  opacity: 0.8;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

/* Theme toggle */
#theme-toggle {
  width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--surface);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  transition: background 180ms ease, border-color 180ms ease, color 180ms ease;
  padding: 0;
  flex-shrink: 0;
}

#theme-toggle:hover {
  border-color: var(--accent);
  color: var(--accent);
}

#theme-toggle:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

#theme-toggle svg {
  width: 17px;
  height: 17px;
}

/* Icon visibility: default = light mode, show moon */
.icon-sun  { display: none; }
.icon-moon { display: block; }

/* Dark mode via JS toggle */
html[data-theme="dark"] .icon-sun  { display: block; }
html[data-theme="dark"] .icon-moon { display: none; }

/* Dark mode via OS preference */
@media (prefers-color-scheme: dark) {
  html:not([data-theme="light"]) .icon-sun  { display: block; }
  html:not([data-theme="light"]) .icon-moon { display: none; }
}

#navtoggle {
  display: none;
  width: 48px;
  height: 48px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='14' viewBox='0 0 20 14'%3E%3Crect x='0' y='0' width='20' height='2' rx='1' fill='%23506770'/%3E%3Crect x='0' y='6' width='20' height='2' rx='1' fill='%23506770'/%3E%3Crect x='0' y='12' width='20' height='2' rx='1' fill='%23506770'/%3E%3C/svg%3E") 50% 50% no-repeat;
  cursor: pointer;
  flex-shrink: 0;
}

nav {
  display: block;
}

nav ul {
  margin: 0;
  padding: 0;
}

nav li {
  display: inline-block;
  margin-left: 0.9rem;
  font-size: 0.98rem;
  font-weight: 500;
}

nav li a {
  color: var(--ink);
  border-bottom: 2px solid transparent;
  padding-bottom: 0.15rem;
  transition: border-color 180ms ease, color 180ms ease;
}

nav li.act a,
nav li a:hover {
  color: var(--accent);
  border-color: var(--accent);
}

/* ── Hero ── */

.outer {
  padding: 1.2rem 0;
}

#front1.outer {
  min-height: 54vh;
  padding: 0;
  border-radius: 0 0 28px 28px;
  box-shadow: var(--shadow);
  overflow: hidden;
  background:
    linear-gradient(140deg, rgba(14, 35, 43, 0.6) 0%, rgba(20, 107, 128, 0.42) 100%),
    url(images/hero-2026.svg) center center / cover no-repeat;
}

#front1 .content {
  min-height: 54vh;
  height: 100%;
  background-color: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 4rem 1.5rem 3.5rem;
  text-align: center;
  width: 100%;
}

.front1-logo {
  width: 196px;
  height: 42px;
  background: url(images/zerodistance_logo_white.svg) no-repeat center center;
  background-size: contain;
  margin-bottom: 1.8rem;
}

.hero-headline {
  font-family: "Fraunces", Georgia, serif;
  font-size: clamp(2rem, 3.8vw, 3.2rem);
  font-weight: 600;
  color: #ffffff;
  line-height: 1.1;
  margin: 0 0 1rem;
  text-shadow: 0 2px 16px rgba(0, 0, 0, 0.35);
}

.hero-sub {
  font-size: clamp(0.97rem, 1.5vw, 1.12rem);
  color: rgba(255, 255, 255, 0.88);
  max-width: 520px;
  margin: 0 0 2rem;
  line-height: 1.5;
}

.hero-cta {
  display: inline-block;
  background: var(--accent-2);
  color: #fff;
  font-weight: 700;
  font-size: 1rem;
  padding: 0.82rem 2.3rem;
  border-radius: 50px;
  text-decoration: none;
  letter-spacing: 0.015em;
  transition: background 180ms ease, transform 180ms ease, box-shadow 180ms ease;
  box-shadow: 0 4px 18px rgba(207, 91, 47, 0.44);
  cursor: pointer;
}

.hero-cta:hover {
  background: #b84d24;
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 7px 24px rgba(207, 91, 47, 0.55);
}

.hero-cta:focus-visible {
  outline: 3px solid #fff;
  outline-offset: 3px;
}

/* ── Section headings ── */

.subtitle {
  margin: 2.4rem auto 0.9rem;
  width: min(760px, 100%);
  font-family: "Fraunces", Georgia, serif;
  font-size: clamp(1.55rem, 2.5vw, 2.4rem);
  font-weight: 600;
  line-height: 1.14;
  text-align: center;
  color: var(--ink);
}

.summary {
  margin: 0 auto 1rem;
  width: min(780px, 100%);
  font-size: clamp(0.97rem, 1.28vw, 1.08rem);
  font-weight: 400;
  line-height: 1.5;
  text-align: center;
  color: var(--muted);
}

.section-link {
  color: var(--ink);
  border-bottom: 2px solid transparent;
  transition: border-color 180ms ease, color 180ms ease;
}

.section-link:hover {
  color: var(--accent);
  border-color: var(--accent);
}

/* ── Service & notice cards ── */

.service-card-link,
.notice-card-link {
  color: inherit;
  text-decoration: none;
  display: inline-block;
  vertical-align: top;
  width: min(32%, 340px);
  margin: 0.55rem;
}

.col-1-of-3,
.current-item {
  min-height: 100px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  padding: 1.15rem 1.2rem 1.3rem;
  text-align: left;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
  cursor: pointer;
  height: 100%;
}

.col-1-of-3:hover,
.current-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 20px 42px rgba(20, 38, 48, 0.16);
  border-color: rgba(20, 107, 128, 0.3);
}

.service-card-link:focus-visible .col-1-of-3,
.notice-card-link:focus-visible .current-item {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.card-icon {
  width: 44px;
  height: 44px;
  background: rgba(20, 107, 128, 0.1);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.8rem;
  color: var(--accent);
}

.card-icon svg {
  width: 22px;
  height: 22px;
}

.col-1-of-3 h3 {
  margin: 0 0 0.35rem;
  font-size: 1.06rem;
  font-weight: 700;
  color: var(--ink);
}

.card-desc {
  margin: 0;
  font-size: 0.875rem;
  color: var(--muted);
  line-height: 1.48;
}

.current-item b {
  display: block;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.35;
}

.current-item h4 {
  margin: 0.45rem 0 0;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--muted);
}

/* ── Inner pages ── */

#leftcol {
  width: 290px;
  float: left;
  text-align: left;
  padding: 1.6rem 1rem;
}

#leftcol h1 {
  margin: 0;
  padding: 0 0 0.8rem;
  font-family: "Fraunces", Georgia, serif;
  font-size: 2rem;
  font-weight: 600;
  color: var(--ink);
  border-bottom: 2px solid var(--line);
}

#leftcol h2 {
  margin: 1.1rem 0 0;
  font-size: 1.2rem;
  color: var(--ink);
}

#leftcol p {
  margin: 0.9rem 0 0;
  font-size: 0.96rem;
  line-height: 1.55;
  color: var(--muted);
}

.subnav ul {
  margin: 1rem 0 0;
  padding: 0;
  list-style: none;
}

.subnav li {
  margin: 0 0 0.3rem;
  padding: 0.48rem 0.55rem;
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--muted);
  list-style: none;
  transition: background 150ms ease, color 150ms ease;
}

.subnav li:hover {
  background: rgba(20, 107, 128, 0.07);
  color: var(--ink);
}

.subnav li.act {
  background: rgba(20, 107, 128, 0.12);
  color: var(--accent);
}

.subnav li .arrow {
  float: left;
  color: var(--accent);
}

.subnav li .title {
  display: block;
  margin-left: 16px;
}

.subnav li a {
  color: inherit;
}

#content {
  max-width: 920px;
  margin-left: 286px;
  text-align: left;
  padding: 1.6rem 1.6rem 2.5rem;
}

#content.home {
  max-width: 1120px;
  margin-left: 0;
}

#content h1,
#content h2 {
  margin: 0.8rem 0;
  font-family: "Fraunces", Georgia, serif;
  font-size: clamp(1.6rem, 2.4vw, 2.3rem);
  font-weight: 600;
  color: var(--ink);
}

#content h3 {
  margin: 1.2rem 0 0.4rem;
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--ink);
}

#content h4 {
  margin: 0;
  padding: 0;
  font-size: 1rem;
  font-weight: 500;
  color: var(--muted);
}

#content p,
#content li {
  font-size: 0.97rem;
  line-height: 1.6;
  color: var(--ink);
}

#content p {
  margin: 0.7rem 0;
  padding: 0;
}

#content ul,
#content ol {
  margin-left: 1.4rem;
}

#content ul li {
  list-style: disc;
  margin-bottom: 5px;
}

#content ol li {
  list-style: decimal;
  margin-bottom: 5px;
}

#content table {
  border-collapse: collapse;
}

#content td,
#content th {
  border: 1px solid var(--line);
  padding: 7px 10px;
  text-align: left;
}

#content td p,
#content th p {
  margin: 0;
}

#content th p {
  font-weight: 700;
}

.notice-date {
  margin: 0.2rem 0 1rem;
  font-size: 0.88rem;
  color: var(--muted);
}

#content .faq-header {
  cursor: pointer;
  font-size: 1.04rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--line);
  transition: color 150ms ease;
}

#content .faq-header:hover {
  color: var(--accent);
}

#content .faq-item {
  display: none;
}

#content .faq-item p:first-child {
  margin-top: 4px;
}

#content .order .phase,
#content .field {
  clear: left;
}

#content .order fieldset {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.9rem;
  margin-bottom: 1rem;
}

#content .order fieldset legend {
  font-size: 1rem;
  font-weight: 700;
  color: var(--ink);
}

#content .order h2 {
  margin: 0;
  padding: 0.8rem 0;
  display: block;
  clear: left;
}

#content label {
  display: inline-block;
  float: left;
  width: 160px;
  line-height: 1.6;
  padding-top: 0.35rem;
  font-size: 0.92rem;
  color: var(--muted);
}

#content .wider {
  width: 250px;
}

#content .input {
  margin-left: 160px;
}

#content input,
#content select,
#content textarea {
  display: block;
  margin-bottom: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.42rem 0.55rem;
  font-size: 0.96rem;
  font-family: inherit;
  background: var(--surface);
  color: var(--ink);
  transition: border-color 150ms ease, box-shadow 150ms ease;
}

#content input:focus,
#content select:focus,
#content textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(20, 107, 128, 0.30);
}

#content input[type="checkbox"],
#content input[type="radio"] {
  margin-top: 3px;
  display: inline-block;
  line-height: 40px;
  vertical-align: baseline;
}

#content input[type="text"],
#content textarea {
  width: 280px;
}

#content textarea {
  min-height: 110px;
  resize: vertical;
}

#content input.narrower {
  width: 170px;
}

#phase_confirm input[type="submit"] {
  margin-left: 210px;
  background: var(--accent);
  color: #fff;
  border: none;
  padding: 0.65rem 2rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.98rem;
  cursor: pointer;
  transition: background 180ms ease;
}

#phase_confirm input[type="submit"]:hover {
  background: #0f5466;
}

.align_left  { float: left;  margin: 0 1em 0.25em 0; }
.align_right { float: right; margin: 0 0 0.25em 1em; }
.align_center { display: block; margin-left: auto; margin-right: auto; }

/* ── Footer ── */

footer {
  margin: 3rem auto 0;
  width: 100%;
  clear: both;
  color: #f7fafc;
  background: linear-gradient(90deg, var(--footer) 0%, #1c4352 100%);
  transition: background 250ms ease;
}

footer .content {
  text-align: left;
  min-height: 140px;
  padding: 2.1rem 0;
}

footer .logo {
  display: inline-block;
  width: 148px;
  height: 30px;
  background: url(images/zerodistance_logo_white.svg) no-repeat;
  background-size: contain;
  text-indent: -9999px;
  overflow: hidden;
  margin-bottom: 0.4rem;
}

footer .copyr {
  margin-top: 0.4rem;
  font-size: 0.88rem;
  color: #a8c5cf;
}

footer .footer-ficora {
  margin-top: 0.35rem;
  font-size: 0.82rem;
  color: #7aa4b0;
}

.footer-cols {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 2rem;
  flex-wrap: wrap;
}

.footer-col--right {
  text-align: right;
}

.footer-contact {
  font-size: 0.92rem;
  margin-bottom: 0.55rem;
}

.footer-contact a {
  color: #a8c5cf;
  transition: color 180ms ease;
}

.footer-contact a:hover {
  color: #fff;
}

.footer-legal {
  font-size: 0.8rem;
  color: #7aa4b0;
  line-height: 1.6;
}

.WireFatalError {
  background: #a30000;
  color: #fff;
  padding: 1em;
  position: relative;
  z-index: 9999;
}

/* ── Dark mode ── */

html[data-theme="dark"] {
  --bg: #0d1d25;
  --ink: #e2eef3;
  --muted: #7aa4b0;
  --line: #1c3644;
  --surface: #142431;
  --accent: #3ec5de;
  --accent-2: #e87a50;
  --footer: #07111a;
  --shadow: 0 16px 38px rgba(0, 0, 0, 0.45);
}

html[data-theme="dark"] header {
  background: rgba(13, 29, 37, 0.94);
}

html[data-theme="dark"] footer {
  background: linear-gradient(90deg, var(--footer) 0%, #0f2535 100%);
}

html[data-theme="dark"] nav {
  background: var(--surface);
}

html[data-theme="dark"] #navtoggle {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='14' viewBox='0 0 20 14'%3E%3Crect x='0' y='0' width='20' height='2' rx='1' fill='%237aa4b0'/%3E%3Crect x='0' y='6' width='20' height='2' rx='1' fill='%237aa4b0'/%3E%3Crect x='0' y='12' width='20' height='2' rx='1' fill='%237aa4b0'/%3E%3C/svg%3E");
}

html[data-theme="dark"] .col-1-of-3:hover,
html[data-theme="dark"] .current-item:hover {
  box-shadow: 0 20px 42px rgba(0, 0, 0, 0.4);
}

/* Same rules for auto dark via OS preference */
@media (prefers-color-scheme: dark) {
  html:not([data-theme="light"]) {
    --bg: #0d1d25;
    --ink: #e2eef3;
    --muted: #7aa4b0;
    --line: #1c3644;
    --surface: #142431;
    --accent: #3ec5de;
    --accent-2: #e87a50;
    --footer: #07111a;
    --shadow: 0 16px 38px rgba(0, 0, 0, 0.45);
  }

  html:not([data-theme="light"]) header {
    background: rgba(13, 29, 37, 0.94);
  }

  html:not([data-theme="light"]) footer {
    background: linear-gradient(90deg, var(--footer) 0%, #0f2535 100%);
  }

  html:not([data-theme="light"]) nav {
    background: var(--surface);
  }
}

/* ── Responsive ── */

@media (min-width: 600px) and (max-width: 999px) {
  .service-card-link,
  .notice-card-link {
    width: calc(50% - 1.1rem);
  }
}

@media (max-width: 999px) {
  header .content {
    height: 64px;
  }

  header .logo {
    width: 140px;
    height: 32px;
  }

  #navtoggle {
    display: flex;
    align-items: center;
    justify-content: center;
  }

  nav {
    display: none;
    position: absolute;
    top: 60px;
    left: 0.8rem;
    right: 0.8rem;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 16px;
    box-shadow: 0 12px 36px rgba(20, 38, 48, 0.14);
    padding: 0.5rem;
    z-index: 49;
  }

  nav.open {
    display: block;
  }

  nav li {
    display: block;
    margin: 0;
    text-align: left;
    border-bottom: 1px solid var(--line);
    padding: 0;
  }

  nav li:last-child {
    border-bottom: 0;
  }

  nav li a {
    display: block;
    padding: 0.65rem 0.75rem;
    border-bottom: none;
  }

  #leftcol,
  #content {
    float: none;
    width: 100%;
    max-width: 100%;
    margin-left: 0;
    padding: 1rem;
    text-align: left;
  }

  .subtitle,
  .summary {
    width: 100%;
  }

  .service-card-link,
  .notice-card-link {
    width: calc(100% - 1rem);
    margin: 0.45rem;
  }

  #front1.outer,
  #front1 .content {
    min-height: 60vh;
  }

  .hero-headline {
    font-size: 1.85rem;
  }
}

@media (max-width: 599px) {
  .footer-cols {
    flex-direction: column;
    gap: 1.2rem;
  }

  .footer-col--right {
    text-align: left;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition: none !important;
    animation: none !important;
  }
}
