/* =========================================================
   TimerFor main stylesheet
   File: /assets/css/main.css
   ========================================================= */


/* =========================================================
   1. Design tokens / global variables
   ========================================================= */

:root {
  --bg: #f8fafc;
  --surface: #fff;
  --surface-2: #eef2ff;
  --text: #0f172a;
  --muted: #475569;
  --line: #dbe3ef;

  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --soft: #e8efff;

  --shadow: 0 22px 60px rgba(15, 23, 42, 0.12);
  --radius: 24px;
  --max: 1120px;
}


/* =========================================================
   2. Base styles
   ========================================================= */

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

.container {
  width: min(100% - 32px, var(--max));
  margin-inline: auto;
}


/* =========================================================
   3. Accessibility
   ========================================================= */

.skip-link {
  position: absolute;
  left: -999px;
  top: 8px;
  background: #fff;
  padding: 10px 14px;
  border-radius: 10px;
  z-index: 20;
}

.skip-link:focus {
  left: 8px;
}


/* =========================================================
   4. Header and navigation
   ========================================================= */

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(248, 250, 252, 0.9);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(219, 227, 239, 0.9);
}

.site-header__inner {
  width: min(100% - 32px, var(--max));
  margin-inline: auto;
  min-height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}


.site-logo img {
  display: block;
  width: 40px;
  height: 40px;
  object-fit: contain;
}
.brand-text {
  color: #0f172a;
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.02em;
  white-space: nowrap;
}

.site-logo {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  color: inherit;
  text-decoration: none;
}

.site-logo:hover .brand-text {
  color: #2563eb;
}


/* Brand */

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
  font-weight: 900;
  letter-spacing: -0.03em;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 13px;
  background: var(--text);
  color: #fff;
}

.brand-text {
  font-size: 1.08rem;
}


/* Main navigation */

.top-nav {
  display: flex;
  align-items: center;
  gap: 6px;
}

.top-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 8px 12px;
  border-radius: 999px;
  color: var(--muted);
  text-decoration: none;
  font-weight: 800;
}

.top-nav a:hover,
.top-nav a[aria-current="page"] {
  background: #fff;
  color: var(--text);
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.06);
}


/* Dropdown navigation */

.nav-group {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.nav-parent::after {
  content: "";
  width: 0;
  height: 0;
  margin-left: 8px;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid currentColor;
}

.sub-nav {
  position: absolute;
  right: 0;
  top: 100%;
  min-width: 220px;
  padding: 8px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow);
  display: none;
}

.nav-group:hover .sub-nav,
.nav-group:focus-within .sub-nav {
  display: grid;
}

.sub-nav a {
  width: 100%;
  justify-content: flex-start;
  border-radius: 12px;
  white-space: nowrap;
}


/* Mobile menu button */

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  gap: 4px;
  flex-direction: column;
}

.menu-toggle span {
  display: block;
  width: 19px;
  height: 2px;
  border-radius: 999px;
  background: var(--text);
}


/* =========================================================
   5. Hero sections
   ========================================================= */

.hero {
  padding: clamp(36px, 8vw, 92px) 0;
}

.hero--compact {
  padding-bottom: 34px;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 440px);
  gap: clamp(24px, 6vw, 56px);
  align-items: center;
}

.hero-copy {
  min-width: 0;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--primary);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.78rem;
}

h1,
h2 {
  line-height: 1.08;
  margin: 0 0 16px;
}

h1 {
  font-size: clamp(2.45rem, 9vw, 5.6rem);
  letter-spacing: -0.06em;
}

h2 {
  font-size: clamp(1.5rem, 4vw, 2.2rem);
  letter-spacing: -0.035em;
}

.lead {
  font-size: clamp(1.07rem, 2.2vw, 1.35rem);
  color: var(--muted);
  max-width: 720px;
  margin: 0 0 24px;
}


/* =========================================================
   6. Buttons and action rows
   ========================================================= */

.hero-actions,
.timer-controls,
.share-row,
.pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 12px 16px;
  border-radius: 999px;
  border: 1px solid transparent;
  font: inherit;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
}

.button--primary {
  background: var(--primary);
  color: #fff;
}

.button--primary:hover {
  background: var(--primary-dark);
}

.button--ghost {
  background: #fff;
  color: var(--text);
  border-color: var(--line);
}

.button--soft {
  background: var(--soft);
  color: var(--primary-dark);
  border-color: #dbe7ff;
}

.button.is-active {
  background: #16a34a;
  color: #fff;
  border-color: #16a34a;
}


/* =========================================================
   7. Countdown timer card
   ========================================================= */

.timer-card {
  background: linear-gradient(160deg, #0f172a, #1e293b);
  color: #fff;
  border-radius: calc(var(--radius) + 10px);
  box-shadow: var(--shadow);
  padding: clamp(18px, 5vw, 30px);
  scroll-margin-top: 90px;
}

.timer-card__top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: #cbd5e1;
  font-weight: 800;
  font-size: 0.9rem;
}


/* Countdown numbers */

.digits {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 24px 0;
}

.digits div {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 20px;
  padding: 14px 8px;
  text-align: center;
}

.digits strong {
  display: block;
  font-size: clamp(2rem, 10vw, 4.2rem);
  line-height: 1;
  letter-spacing: -0.06em;
}

.digits span {
  display: block;
  margin-top: 8px;
  color: #cbd5e1;
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.timer-note,
.support-note {
  color: #cbd5e1;
  margin: 12px 0 0;
}


/* =========================================================
   8. Timer settings: vibration and sound
   ========================================================= */

.timer-settings {
  display: grid;
  gap: 14px;
  margin-top: 16px;
}

.control-block {
  display: grid;
  gap: 10px;
}

.timer-settings .button {
  width: 100%;
}

.timer-settings .support-note {
  margin: 0;
}


/* Sound dropdown */

.sound-control span {
  color: #fff;
  font-weight: 850;
}

.sound-control select {
  width: 100%;
  min-height: 48px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  font: inherit;
  font-weight: 850;
  padding: 0 14px;
}

.sound-control select option {
  color: #0f172a;
  background: #fff;
}

.sound-control small {
  color: #cbd5e1;
  font-weight: 700;
}


/* =========================================================
   9. Main page sections
   ========================================================= */

.section {
  padding: clamp(34px, 7vw, 74px) 0;
}

.section--muted {
  background: #eef2f7;
}

.two-col {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 420px);
  gap: 28px;
  align-items: start;
}


/* Check list */

.check-list {
  padding: 0;
  margin: 0;
  list-style: none;
}

.check-list li {
  position: relative;
  padding: 12px 0 12px 34px;
  border-bottom: 1px solid var(--line);
  font-weight: 650;
}

.check-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 12px;
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #dcfce7;
  color: #166534;
  font-weight: 900;
}


/* Cards */

.share-card,
.content-card,
.tool-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
}

.content-stack {
  display: grid;
  gap: 16px;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}

.tool-card {
  display: grid;
  gap: 8px;
  text-decoration: none;
  color: var(--text);
}

.tool-card__eyebrow {
  color: var(--primary);
  font-weight: 850;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}


/* Copy/share feedback */

.copy-feedback {
  min-height: 1.5em;
  color: var(--primary-dark);
  font-weight: 800;
}


/* FAQ */

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

details {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 16px 18px;
}

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


/* Pill links */

.pill-link {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 10px 14px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--line);
  color: var(--text);
  text-decoration: none;
  font-weight: 800;
}


/* =========================================================
   10. Previous / next countdown navigation
   ========================================================= */

.countdown-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 18px;
}

.countdown-nav__link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 64px;
  padding: 14px 16px;
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 18px;
  background: darkslategrey;
  color: #fff;
  text-decoration: none;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.06);
}

.countdown-nav__link:hover,
.countdown-nav__link:focus-visible {
  border-color: rgba(37, 99, 235, 0.45);
  transform: translateY(-1px);
}

.countdown-nav__link--next {
  text-align: right;
}

.countdown-nav__small {
  display: block;
  margin-bottom: 2px;
  font-size: 0.76rem;
  font-weight: 600;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.countdown-nav__arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 34px;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  background: #eff6ff;
  color: #2563eb;
  font-size: 1.25rem;
  font-weight: 800;
}


/* =========================================================
   11. AdSense / ad placeholder
   ========================================================= */

.ad-section {
  padding: 18px 0;
}

.ad-label {
  margin-bottom: 8px;
  font-size: 0.72rem;
  color: #64748b;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.ad-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 120px;
  border: 1px dashed rgba(100, 116, 139, 0.45);
  border-radius: 18px;
  background: rgba(248, 250, 252, 0.75);
  color: #64748b;
  font-size: 0.9rem;
}

.adsbygoogle {
  min-height: 120px;
}

/* =========================================================
   Pomodoro timer
   ========================================================= */

.pomodoro-card {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: #fff;
  box-shadow: var(--shadow);
}

.pomodoro-modes {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 24px;
}

.pomodoro-mode {
  min-height: 42px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--muted);
  font: inherit;
  font-size: 0.9rem;
  font-weight: 800;
  cursor: pointer;
}

.pomodoro-mode:hover {
  border-color: var(--text);
  color: var(--text);
}

.pomodoro-mode.is-active {
  border-color: #2563eb;
  background: #2563eb;
  color: #fff;
}

.pomodoro-display {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 16px 0 8px;
  color: var(--text);
  font-size: clamp(4rem, 14vw, 7.5rem);
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.07em;
  line-height: 1;
}

.pomodoro-status {
  min-height: 24px;
  margin: 0;
  color: var(--muted);
  text-align: center;
  font-weight: 700;
}

.pomodoro-progress {
  height: 8px;
  margin: 22px 0;
  overflow: hidden;
  border-radius: 999px;
  background: #e2e8f0;
}

.pomodoro-progress span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: #2563eb;
  transition: width 0.25s linear;
}

.pomodoro-controls {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

.pomodoro-session-count {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 8px;
  margin-top: 18px;
  color: var(--muted);
  font-size: 0.92rem;
}

.pomodoro-session-count strong {
  color: var(--text);
  font-size: 1.25rem;
}

.pomodoro-settings {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.pomodoro-settings summary {
  color: var(--text);
  font-weight: 800;
  cursor: pointer;
}

.pomodoro-settings__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin: 18px 0;
}

.pomodoro-settings__grid label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
}

.pomodoro-settings__grid input {
  width: 100%;
  min-height: 44px;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--text);
  font: inherit;
}

.pomodoro-settings__grid input:focus {
  border-color: #2563eb;
  outline: 3px solid rgba(37, 99, 235, 0.16);
}

.pomodoro-options {
  display: grid;
  gap: 10px;
  margin-bottom: 18px;
}

.timer-option {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-weight: 700;
  cursor: pointer;
}

.timer-option input {
  width: 18px;
  height: 18px;
}

.content-list {
  padding-left: 1.4rem;
}

.content-list li + li {
  margin-top: 0.55rem;
}

@media (max-width: 600px) {
  .pomodoro-card {
    padding: 18px;
    border-radius: 18px;
  }

  .pomodoro-modes {
    grid-template-columns: 1fr;
  }

  .pomodoro-display {
    font-size: clamp(3.8rem, 20vw, 6rem);
  }

  .pomodoro-settings__grid {
    grid-template-columns: 1fr;
  }

  .pomodoro-controls .button {
    flex: 1 1 calc(50% - 10px);
  }

  .pomodoro-controls .button:first-child {
    flex-basis: 100%;
  }
}

/* =========================================================
   12. Footer
   ========================================================= */

.footer-ad {
  padding: 24px 0;
  background: #fff;
}

.site-footer {
  padding: 48px 0 24px;
  border-top: 1px solid var(--line);
  background: #0f172a;
  color: #cbd5e1;
}

.site-footer__inner {
  width: min(100% - 32px, var(--max));
  margin-inline: auto;
}

.footer-about {
  max-width: 620px;
  margin-bottom: 32px;
}

.footer-brand {
  display: inline-flex;
  margin-bottom: 12px;
  color: #fff;
  font-size: 1.4rem;
  font-weight: 900;
  line-height: 1;
  text-decoration: none;
}

.footer-brand:hover,
.footer-brand:focus-visible {
  color: #fff;
  text-decoration: underline;
}

.footer-about p {
  margin: 0;
  color: #cbd5e1;
  line-height: 1.7;
}

.footer-navigation {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 32px;
  padding: 32px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.footer-link-group {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
}

.footer-heading {
  margin: 0 0 6px;
  color: #fff;
  font-size: 1rem;
  font-weight: 800;
}

.footer-link-group a {
  color: #cbd5e1;
  font-weight: 700;
  text-decoration: none;
}

.footer-link-group a:hover,
.footer-link-group a:focus-visible {
  color: #fff;
  text-decoration: underline;
}

.footer-small {
  margin: 24px 0 0;
  color: #94a3b8;
  font-size: 0.875rem;
  line-height: 1.6;
}

@media (max-width: 767px) {
  .footer-ad {
    padding: 18px 0;
  }

  .site-footer {
    padding: 36px 0 20px;
  }

  .footer-about {
    margin-bottom: 24px;
  }

  .footer-navigation {
    grid-template-columns: 1fr;
    gap: 24px;
    padding: 24px 0;
  }

  .footer-small {
    margin-top: 20px;
  }
}
/* =========================================================
   13. Responsive styles
   ========================================================= */

@media (min-width: 640px) {
  .timer-settings {
    grid-template-columns: 1fr 1fr;
    align-items: start;
  }

  .control-block {
    align-content: start;
  }
}


@media (max-width: 820px) {
  .site-header__inner {
    min-height: 64px;
    position: relative;
  }

  .menu-toggle {
    display: flex;
  }

  .top-nav {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + 8px);
    padding: 10px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 18px;
    box-shadow: var(--shadow);
    align-items: stretch;
    flex-direction: column;
  }

  .site-header.is-menu-open .top-nav {
    display: flex;
  }

  .top-nav a {
    border-radius: 14px;
    padding: 12px 14px;
  }

  .nav-group {
    display: grid;
    align-items: stretch;
  }

  .nav-parent::after {
    margin-left: auto;
  }

  .sub-nav {
    position: static;
    display: grid;
    min-width: 0;
    box-shadow: none;
    border: 0;
    border-left: 2px solid var(--line);
    border-radius: 0;
    margin: 0 0 0 14px;
    padding: 4px 0 4px 8px;
    background: transparent;
  }

  .sub-nav a {
    white-space: normal;
  }

  .hero-grid,
  .two-col {
    grid-template-columns: 1fr;
  }

  .digits {
    grid-template-columns: repeat(3, 1fr);
  }

  .button {
    width: 100%;
  }

  .hero-actions .button,
  .share-row .button,
  .share-row a {
    width: 100%;
  }

  .site-footer__inner {
    grid-template-columns: 1fr;
  }

  .footer-links {
    justify-content: flex-start;
    flex-direction: column;
  }

  .footer-links a {
    padding: 8px 0;
  }
}


@media (max-width: 760px) {
  .countdown-nav {
    margin-bottom: 18px;
  }
}


@media (max-width: 520px) {
  .countdown-nav {
    gap: 10px;
  }

  .countdown-nav__link {
    min-height: 58px;
    padding: 12px;
    border-radius: 16px;
  }

  .countdown-nav__arrow {
    width: 30px;
    height: 30px;
    flex-basis: 30px;
    font-size: 1.1rem;
  }
}


/* =========================================================
   14. Reduced motion
   ========================================================= */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  * {
    transition: none !important;
  }
}

@media (max-width: 820px) {
  .site-header__inner {
    min-height: 64px;
    position: relative;
  }

  .menu-toggle {
    display: flex;
  }

  .top-nav {
    display: none;
    position: fixed;
    left: 16px;
    right: 16px;
    top: 76px;
    max-height: calc(100vh - 96px);
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    padding: 10px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 18px;
    box-shadow: var(--shadow);
    align-items: stretch;
    flex-direction: column;
    z-index: 999;
  }

  .site-header.is-menu-open .top-nav {
    display: flex;
  }

  .top-nav a {
    border-radius: 14px;
    padding: 12px 14px;
  }

  .nav-group {
    display: grid;
    align-items: stretch;
    padding-bottom: 0;
    margin-bottom: 0;
  }

  .nav-parent::after {
    margin-left: auto;
  }

  .sub-nav {
    position: static;
    display: grid;
    min-width: 0;
    max-height: none;
    overflow: visible;
    box-shadow: none;
    border: 0;
    border-left: 2px solid var(--line);
    border-radius: 0;
    margin: 0 0 0 14px;
    padding: 4px 0 4px 8px;
    background: transparent;
  }

  .sub-nav a {
    white-space: normal;
  }

  body.menu-open {
    overflow: hidden;
  }
}