:root {
  color-scheme: light;
  --bg: linear-gradient(135deg, #f7fafc 0%, #e3e8f0 50%, #cbd5e1 100%);
  --panel: rgba(255, 255, 255, 0.92);
  --text: #12202f;
  --muted: #5d6978;
  --line: #d9e2ec;
  --accent: #0f766e;
  --accent-2: #1d4ed8;
  --warn: #b45309;
  --shadow: 0 20px 55px rgba(15, 23, 42, .1);
  --sun: #f59e0b;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  min-height: 100vh;
  background: var(--bg);
  background-repeat: no-repeat;
  background-size: cover;
  color: var(--text);
  line-height: 1.55;
}

a {
  color: inherit;
  text-decoration: none;
}

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

button,
input,
select {
  font: inherit;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 20px;
  padding: 14px clamp(16px, 4vw, 56px);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
  will-change: transform;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-weight: 800;
  letter-spacing: 0;
}

.brand span,
.brand b {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.brand b {
  background: var(--accent);
  color: #fff;
}

nav {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
}

nav a,
.icon-button {
  min-height: 40px;
  padding: 8px 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--text);
}

.switchers {
  display: flex;
  gap: 8px;
  align-items: center;
}

.icon-button {
  width: 42px;
}

main {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.hero {
  min-height: 82vh;
  display: grid;
  grid-template-columns: 1fr minmax(320px, 460px);
  align-items: center;
  gap: clamp(24px, 6vw, 72px);
  padding: 44px 0 24px;
}

.hero-copy h1 {
  margin: 8px 0 16px;
  font-size: clamp(2.45rem, 7vw, 5.8rem);
  line-height: .96;
  letter-spacing: 0;
  max-width: 9ch;
}

.hero-copy p {
  max-width: 62ch;
  color: var(--muted);
  font-size: clamp(1.05rem, 2.2vw, 1.35rem);
}

.hero-visual {
  margin: 28px 0 0;
  max-width: 560px;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 16px 40px rgba(15, 23, 42, .08);
}

.hero-visual img {
  width: 100%;
  background: var(--panel);
}

.eyebrow {
  color: var(--accent);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .08em;
  font-size: .82rem;
}

.converter {
  padding: 16px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.converter-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.converter-head>div {
  display: flex;
  align-items: center;
  gap: 10px;
}

.step {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: .9rem;
  font-weight: 900;
}

.swap-button {
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--bg);
  color: var(--text);
  cursor: pointer;
  font-size: 1.35rem;
}

.mode-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 14px;
}

.mode-tabs button,
.controls button,
#copy,
.preset-row button {
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg);
  color: var(--text);
  cursor: pointer;
}

.mode-tabs button {
  display: grid;
  gap: 1px;
  justify-items: start;
  padding: 10px 12px;
  text-align: start;
}

.mode-tabs span,
.mode-tabs small {
  color: var(--muted);
  font-size: .76rem;
}

.mode-tabs b {
  font-size: 1.05rem;
}

.mode-tabs button.active,
#copy {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.mode-tabs button.active span,
.mode-tabs button.active small {
  color: color-mix(in srgb, #fff 82%, transparent);
}

.converter label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-weight: 700;
}

.datetime-label span {
  color: var(--text);
  font-size: 1.02rem;
}

input[type="datetime-local"] {
  width: 100%;
  min-height: 64px;
  padding: 12px 14px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--text);
  font-size: 1.12rem;
}

.controls {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  margin: 14px 0;
}

.toggle {
  grid-auto-flow: column;
  align-items: center;
  white-space: nowrap;
}

.answer-card {
  display: grid;
  gap: 12px;
  padding: 14px;
  margin: 12px 0;
  border: 1px solid color-mix(in srgb, var(--accent) 40%, var(--line));
  border-radius: 8px;
  background: color-mix(in srgb, var(--accent) 9%, var(--panel));
}

.answer-grid {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 10px;
}

.answer-grid>div:not(.arrow) {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.answer-grid span {
  color: var(--muted);
  font-size: .78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.answer-grid strong,
.result {
  overflow-wrap: anywhere;
}

.answer-grid .arrow {
  color: var(--accent);
  font-size: 1.45rem;
  font-weight: 900;
}

.result {
  display: block;
  min-height: 0;
  padding: 0;
  margin: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  font-size: clamp(1.25rem, 3.5vw, 1.85rem);
  font-weight: 850;
}

.result-actions {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
}

.offset-badge {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--accent);
  font-size: .9rem;
}

#copy {
  padding: 0 18px;
}

.result.pulse {
  animation: pulse .28s ease-out;
}

@keyframes pulse {
  from {
    transform: scale(.985);
    opacity: .72;
  }

  to {
    transform: scale(1);
    opacity: 1;
  }
}

.difference {
  margin: 12px 0 0;
  color: var(--muted);
}

section {
  padding: 44px 0;
}

.faq,
.use-cases,
.content,
.map {
  content-visibility: auto;
  contain-intrinsic-size: auto 500px;
}

section h2 {
  margin: 0 0 18px;
  font-size: clamp(1.6rem, 4vw, 2.5rem);
  line-height: 1.08;
}

.clock-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.visual-lab {
  display: grid;
  grid-template-columns: 1.2fr repeat(3, 1fr);
  gap: 12px;
  align-items: stretch;
  padding-top: 20px;
}

.visual-lab>div:first-child {
  display: grid;
  align-content: center;
  min-height: 220px;
}

.motion-card {
  position: relative;
  overflow: hidden;
  min-height: 220px;
  padding: 16px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease;
}

.motion-card:hover {
  transform: translateY(-4px);
  border-color: color-mix(in srgb, var(--accent) 60%, var(--line));
  box-shadow: var(--shadow);
}

.motion-card h3 {
  margin: 18px 0 8px;
}

.motion-card p {
  margin: 0;
  color: var(--muted);
}

.orbit-visual {
  position: relative;
  width: 136px;
  height: 136px;
  border: 1px dashed color-mix(in srgb, var(--accent-2) 55%, var(--line));
  border-radius: 999px;
}

.planet {
  position: absolute;
  inset: 30px;
  border-radius: 999px;
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--accent-2) 28%, var(--panel)) 0 48%, color-mix(in srgb, var(--text) 18%, var(--panel)) 48% 100%),
    var(--panel);
  border: 1px solid var(--line);
}

.orbit-dot {
  position: absolute;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background: var(--sun);
  box-shadow: 0 0 22px color-mix(in srgb, var(--sun) 60%, transparent);
  animation: orbit 8s linear infinite;
  transform-origin: 68px 68px;
}

.dot-a {
  left: 59px;
  top: -9px;
}

.dot-b {
  left: 59px;
  top: -9px;
  animation-delay: -4s;
  background: var(--accent);
}

@keyframes orbit {
  to {
    transform: rotate(360deg);
  }
}

.wave-visual {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  align-items: end;
  gap: 8px;
  width: 150px;
  height: 118px;
}

.wave-visual span {
  display: block;
  border-radius: 8px 8px 0 0;
  background: linear-gradient(180deg, var(--accent-2), var(--accent));
  animation: wave 2.2s ease-in-out infinite;
}

.wave-visual span:nth-child(1) {
  height: 48%;
}

.wave-visual span:nth-child(2) {
  height: 76%;
  animation-delay: .16s;
}

.wave-visual span:nth-child(3) {
  height: 58%;
  animation-delay: .32s;
}

.wave-visual span:nth-child(4) {
  height: 88%;
  animation-delay: .48s;
}

@keyframes wave {

  0%,
  100% {
    transform: scaleY(.78);
    opacity: .72;
  }

  50% {
    transform: scaleY(1);
    opacity: 1;
  }
}

.blocks-visual {
  display: grid;
  grid-template-columns: repeat(6, 22px);
  grid-auto-rows: 22px;
  gap: 7px;
  width: max-content;
  padding-top: 8px;
}

.blocks-visual span {
  border-radius: 6px;
  background: color-mix(in srgb, var(--accent) 18%, var(--panel));
  border: 1px solid var(--line);
  animation: blockGlow 3.8s ease-in-out infinite;
  animation-delay: calc(var(--i) * .12s);
}

.blocks-visual span:nth-child(n+5):nth-child(-n+9) {
  background: color-mix(in srgb, var(--accent) 58%, var(--panel));
  border-color: var(--accent);
}

@keyframes blockGlow {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-5px);
  }
}

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .55s ease, transform .55s ease;
}

.reveal.in-view {
  opacity: 1;
  transform: translateY(0);
}

.clock-grid h2 {
  grid-column: 1 / -1;
}

.clock-card {
  display: grid;
  gap: 6px;
  padding: 18px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.clock-card strong {
  font-size: clamp(2rem, 8vw, 4.2rem);
  line-height: 1;
}

.clock-card em {
  color: var(--accent);
  font-style: normal;
  font-weight: 800;
}

.band {
  display: grid;
  grid-template-columns: .8fr 1fr;
  gap: 24px;
  align-items: center;
}

.preset-row {
  display: grid;
  gap: 10px;
}

.preset-row button {
  text-align: start;
  padding: 0 14px;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
}

table {
  width: 100%;
  border-collapse: collapse;
  background: var(--panel);
}

th,
td {
  padding: 12px;
  border-bottom: 1px solid var(--line);
  text-align: start;
}

th {
  color: var(--muted);
  font-size: .9rem;
}

.time-strip {
  display: grid;
  grid-template-columns: repeat(24, minmax(42px, 1fr));
  gap: 4px;
  overflow-x: auto;
}

.time-strip span {
  min-height: 76px;
  display: grid;
  align-content: center;
  justify-items: center;
  padding: 8px 4px;
  border-radius: 8px;
  background: var(--panel);
  border: 1px solid var(--line);
  font-size: .78rem;
}

.time-strip .overlap {
  background: color-mix(in srgb, var(--accent) 22%, var(--panel));
  border-color: var(--accent);
}

.use-cases {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
}

.use-cases h2 {
  grid-column: 1 / -1;
}

.use-cases article,
.content article,
.faq details {
  padding: 16px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.use-cases h3,
.content h3 {
  margin: 0 0 8px;
}

.use-cases p,
.content p {
  margin: 0;
  color: var(--muted);
}

.content {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.content h2 {
  grid-column: 1 / -1;
}

.faq {
  display: grid;
  gap: 10px;
}

summary {
  cursor: pointer;
  font-weight: 800;
}

.map {
  margin: 0 0 48px;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

footer {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: center;
  padding: 32px 16px 44px;
  color: var(--muted);
  border-top: 1px solid var(--line);
}

[dir="rtl"] .preset-row button,
[dir="rtl"] th,
[dir="rtl"] td {
  text-align: right;
}

@media (max-width: 860px) {
  .topbar {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  nav {
    justify-content: start;
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 2px;
  }

  .switchers {
    justify-content: space-between;
  }

  .hero,
  .band,
  .clock-grid,
  .content,
  .visual-lab {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
    padding-top: 30px;
  }

  .hero-copy h1 {
    max-width: 12ch;
  }

  .controls {
    display: grid;
  }

  .answer-grid {
    grid-template-columns: 1fr;
  }

  .answer-grid .arrow {
    transform: rotate(90deg);
    justify-self: start;
  }

  .result-actions {
    grid-template-columns: 1fr;
  }

  .use-cases {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {

  *,
  *::before,
  *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: .001ms !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}

/* Back to Top Button */
.back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 50px;
  height: 50px;
  background: #0ea5e9;
  border: none;
  border-radius: 50%;
  color: white;
  font-size: 1.5rem;
  font-weight: bold;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 1000;
  box-shadow: 0 4px 12px rgba(14, 165, 233, 0.3);
}

.back-to-top.show {
  opacity: 1;
  visibility: visible;
}

.back-to-top:hover {
  background: #0284c7;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(14, 165, 233, 0.4);
}

/* ─── Informational Sections ─── */

.content-section {
  padding: 44px 0;
  content-visibility: auto;
  contain-intrinsic-size: auto 600px;
}

.content-section h2 {
  margin: 0 0 12px;
  font-size: clamp(1.6rem, 4vw, 2.5rem);
  line-height: 1.08;
}

.content-section .section-intro {
  max-width: 72ch;
  margin: 0 0 24px;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.65;
}

/* Trust / Feature Grid */
.trust-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.trust-card {
  padding: 20px 16px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  transition: transform .25s ease, box-shadow .25s ease;
}

.trust-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}

.trust-icon {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  margin-bottom: 12px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 12%, var(--panel));
  color: var(--accent);
  font-size: 1.25rem;
}

.trust-card h3 {
  margin: 0 0 6px;
  font-size: 1.02rem;
}

.trust-card p {
  margin: 0;
  color: var(--muted);
  font-size: .92rem;
}

/* Audience Grid */
.audience-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.audience-card {
  padding: 16px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  transition: transform .25s ease, box-shadow .25s ease;
}

.audience-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}

.audience-card h3 {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 8px;
  font-size: 1rem;
}

.audience-card p {
  margin: 0;
  color: var(--muted);
  font-size: .92rem;
}

/* Mistake Items */
.mistakes-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.mistake-item {
  padding: 16px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.mistake-item h3 {
  margin: 0 0 8px;
  font-size: .98rem;
}

.mistake-label {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  background: color-mix(in srgb, var(--warn) 14%, var(--panel));
  color: var(--warn);
  font-size: .76rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .04em;
  margin-bottom: 6px;
}

.solution-label {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  background: color-mix(in srgb, var(--accent) 14%, var(--panel));
  color: var(--accent);
  font-size: .76rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .04em;
  margin-top: 10px;
  margin-bottom: 4px;
}

.mistake-item p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: .92rem;
}

/* Industry / Professional Grid */
.industry-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.industry-card {
  padding: 16px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  transition: transform .25s ease, box-shadow .25s ease;
}

.industry-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}

.industry-card h3 {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 8px;
  font-size: 1rem;
}

.industry-card p {
  margin: 0;
  color: var(--muted);
  font-size: .92rem;
}

/* Code Blocks */
.code-block {
  margin: 16px 0;
  padding: 16px;
  background: color-mix(in srgb, var(--text) 5%, var(--panel));
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow-x: auto;
  font-family: ui-monospace, "SF Mono", "Cascadia Code", Consolas, monospace;
  font-size: .86rem;
  line-height: 1.55;
  color: var(--text);
  white-space: pre;
}

.code-block code {
  font-family: inherit;
}

/* Tip Boxes */
.tip-box {
  padding: 14px 16px;
  margin: 16px 0;
  background: color-mix(in srgb, var(--accent) 8%, var(--panel));
  border: 1px solid color-mix(in srgb, var(--accent) 30%, var(--line));
  border-radius: 8px;
  color: var(--text);
  font-size: .94rem;
}

.tip-box strong {
  color: var(--accent);
}

/* Section Articles (2-col) */
.content-section .section-articles {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.content-section .section-articles article {
  padding: 16px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  transition: transform .25s ease, box-shadow .25s ease;
}

.content-section .section-articles article:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}

.content-section .section-articles h3 {
  margin: 0 0 8px;
}

.content-section .section-articles p {
  margin: 0;
  color: var(--muted);
  font-size: .92rem;
}

/* Dev Section Code Label */
.code-label {
  display: inline-block;
  padding: 2px 8px;
  margin-bottom: 8px;
  border-radius: 4px;
  background: color-mix(in srgb, var(--accent-2) 14%, var(--panel));
  color: var(--accent-2);
  font-size: .76rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .04em;
}

/* Responsive for new sections */
@media (max-width: 860px) {
  .trust-grid,
  .audience-grid,
  .industry-grid,
  .mistakes-list,
  .content-section .section-articles {
    grid-template-columns: 1fr;
  }
}