*{
  box-sizing:border-box;
}

:root{
  --bg:#f5f5f2;
  --card:#ffffff;
  --text:#17202a;
  --muted:#667085;
  --line:#e7e7e2;
  --accent:#ff5a5f;
  --accent-dark:#e14b50;
  --navy:#122033;
  --green:#16a34a;
  --yellow:#c58a00;
  --shadow:0 12px 35px rgba(17,24,39,0.08);
  --radius-xl:28px;
  --radius-lg:20px;
  --radius-md:14px;
  --container:1200px;
}

html{
  scroll-behavior:smooth;
}

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

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

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

button,
select{
  font:inherit;
}

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

/* HEADER */

.site-header{
  position:sticky;
  top:0;
  z-index:1000;
  background:rgba(245,245,242,0.92);
  backdrop-filter:blur(12px);
  border-bottom:1px solid rgba(23,32,42,0.05);
}

.header-inner{
  min-height:82px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:24px;
}

.logo a,
.footer-logo a{
  display:inline-flex;
  align-items:center;
  gap:10px;
}

.logo-icon{
  font-size:1.25rem;
  line-height:1;
}

.logo-text{
  font-size:1rem;
  font-weight:700;
  color:var(--navy);
  letter-spacing:-0.02em;
}

.main-nav{
  margin-left:auto;
}

.nav-list{
  list-style:none;
  display:flex;
  align-items:center;
  gap:28px;
  margin:0;
  padding:0;
}

.nav-list a{
  color:var(--navy);
  font-size:0.95rem;
  font-weight:600;
}

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

.mobile-menu-toggle{
  display:none;
  font-size:1.6rem;
  line-height:1;
  color:var(--navy);
}

/* MAIN */

.site-main{
  overflow:hidden;
}

.section{
  padding:36px 0 28px;
}

/* HERO */

.hero{
  padding:54px 0 28px;
}

.hero-inner{
  display:grid;
  gap:28px;
}

.hero-copy{
  max-width:760px;
}

.eyebrow{
  margin:0 0 10px;
  font-size:0.9rem;
  font-weight:700;
  color:var(--accent);
  letter-spacing:0.02em;
  text-transform:uppercase;
}

.hero h1{
  margin:0 0 14px;
  font-size:clamp(2.5rem, 5vw, 4.6rem);
  line-height:1.02;
  letter-spacing:-0.04em;
  color:var(--navy);
  max-width:820px;
}

.hero-text{
  margin:0;
  max-width:700px;
  font-size:1.08rem;
  color:var(--muted);
}

/* SEARCH CARD */

.search-card{
  background:var(--card);
  border-radius:var(--radius-xl);
  box-shadow:var(--shadow);
  border:1px solid rgba(18,32,51,0.05);
  padding:20px;
}

.search-form{
  display:grid;
  grid-template-columns:1.2fr auto 1.2fr 0.9fr 0.9fr;
  gap:14px;
  align-items:start;
}

.search-field{
  min-width:0;
}

.search-field label{
  display:block;
  margin:0 0 8px;
  font-size:0.9rem;
  font-weight:700;
  color:var(--navy);
}

.search-field select{
  width:100%;
  height:58px;
  border:1px solid var(--line);
  border-radius:16px;
  background:#fff;
  color:var(--text);
  padding:0 16px;
  outline:none;
}

.search-field select:focus{
  border-color:rgba(255,90,95,0.45);
  box-shadow:0 0 0 4px rgba(255,90,95,0.08);
}

.field-help{
  margin:8px 0 0;
  font-size:0.82rem;
  color:var(--muted);
}

.swap-wrap{
  display:flex;
  align-items:flex-end;
  justify-content:center;
  height:100%;
  padding-bottom:24px;
}

.swap-button{
  width:52px;
  height:52px;
  border:none;
  border-radius:999px;
  background:#f8f8f7;
  color:var(--navy);
  font-size:1.35rem;
  font-weight:700;
  cursor:pointer;
  box-shadow:0 6px 18px rgba(17,24,39,0.08);
}

.swap-button:hover{
  background:#fff1f2;
  color:var(--accent);
}

.search-submit{
  display:flex;
  align-items:flex-end;
  height:100%;
}

.search-button{
  width:100%;
  min-width:220px;
  height:58px;
  border:none;
  border-radius:18px;
  background:var(--accent);
  color:#fff;
  font-size:1rem;
  font-weight:700;
  cursor:pointer;
  box-shadow:0 10px 20px rgba(255,90,95,0.22);
  display:flex;
  align-items:center;
  justify-content:center;
  line-height:1;
}

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

/* SECTION HEADINGS */

.section-heading{
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:18px;
  margin-bottom:20px;
}

.section-label{
  margin:0 0 6px;
  font-size:0.82rem;
  font-weight:700;
  color:var(--accent);
  letter-spacing:0.03em;
  text-transform:uppercase;
}

.section-heading h2{
  margin:0;
  font-size:clamp(1.6rem, 2.2vw, 2.2rem);
  line-height:1.1;
  letter-spacing:-0.03em;
  color:var(--navy);
}

/* CURRENT TIME */

.current-time-box{
  display:inline-flex;
  align-items:center;
  gap:10px;
  background:#fff;
  border:1px solid var(--line);
  border-radius:999px;
  padding:10px 16px;
  color:var(--navy);
  font-size:0.94rem;
  font-weight:600;
  white-space:nowrap;
}

.status-dot{
  width:10px;
  height:10px;
  border-radius:50%;
  background:var(--green);
  display:inline-block;
}

/* UPCOMING */

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

.ferry-card{
  background:#fff;
  border:1px solid var(--line);
  border-radius:var(--radius-lg);
  padding:20px;
  box-shadow:0 8px 24px rgba(17,24,39,0.05);
}

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

.ferry-badge{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:30px;
  padding:6px 12px;
  border-radius:999px;
  font-size:0.78rem;
  font-weight:700;
  text-transform:uppercase;
  letter-spacing:0.03em;
}

.ferry-badge.upcoming{
  background:#ecfdf3;
  color:#027a48;
}

.ferry-time{
  font-size:0.95rem;
  font-weight:700;
  color:var(--navy);
}

.ferry-card h3{
  margin:0 0 8px;
  font-size:1.2rem;
  line-height:1.2;
  letter-spacing:-0.02em;
  color:var(--navy);
}

.operator,
.terminal{
  margin:0 0 6px;
  color:var(--muted);
  font-size:0.96rem;
}

.countdown{
  margin:14px 0 0;
  font-weight:700;
  color:var(--navy);
}

/* POPULAR ROUTES */

.popular-routes-grid{
  display:grid;
  grid-template-columns:repeat(2, minmax(0, 1fr));
  gap:18px;
}

.route-column{
  background:#fff;
  border:1px solid var(--line);
  border-radius:var(--radius-lg);
  padding:22px;
  box-shadow:0 8px 24px rgba(17,24,39,0.05);
}

.route-column h3{
  margin:0 0 14px;
  font-size:1.15rem;
  color:var(--navy);
  letter-spacing:-0.02em;
}

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

.route-list li + li{
  margin-top:10px;
}

.route-list a{
  display:block;
  padding:14px 16px;
  border:1px solid var(--line);
  border-radius:14px;
  background:#fafafa;
  font-weight:600;
  color:var(--navy);
}

.route-list a:hover{
  border-color:rgba(255,90,95,0.25);
  background:#fff5f5;
  color:var(--accent);
}

/* ROUTE PAGE NEXT FERRY */

.next-ferry{
  background:#e8f7ee;
  border:1px solid #bde5c8;
  padding:12px 14px;
  border-radius:10px;
  margin-bottom:15px;
  font-size:14px;
}

.next-label{
  font-size:12px;
  color:#555;
  margin-bottom:4px;
}

.next-time{
  font-size:20px;
  font-weight:600;
  margin-bottom:4px;
}

.departed-time{
  opacity:0.45;
}

/* TRAVEL TIPS */

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

.tip-card{
  background:#fff;
  border:1px solid var(--line);
  border-radius:var(--radius-lg);
  padding:22px;
  box-shadow:0 8px 24px rgba(17,24,39,0.05);
}

.tip-card h3{
  margin:0 0 10px;
  font-size:1.08rem;
  line-height:1.25;
  letter-spacing:-0.02em;
  color:var(--navy);
}

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

/* AD */

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

.ad-container{
  position:relative;
  overflow:hidden;
  background:#fff;
  border:1px solid var(--line);
  border-radius:22px;
  box-shadow:0 8px 24px rgba(17,24,39,0.05);
}

.ad-link{
  display:block;
  position:relative;
}

.ad-image{
  width:100%;
  height:auto;
  aspect-ratio:6 / 1;
  object-fit:cover;
}

.ad-label{
  position:absolute;
  top:14px;
  right:14px;
  background:rgba(18,32,51,0.78);
  color:#fff;
  border-radius:999px;
  padding:6px 12px;
  font-size:0.78rem;
  font-weight:700;
  letter-spacing:0.03em;
  text-transform:uppercase;
}

/* FOOTER */

.site-footer{
  background:#fff;
  border-top:1px solid var(--line);
  margin-top:6px;
}

.footer-grid{
  display:grid;
  grid-template-columns:1.3fr 1fr 1fr 0.8fr;
  gap:28px;
  padding:48px 0 28px;
}

.footer-description{
  margin:14px 0 0;
  max-width:360px;
  color:var(--muted);
  font-size:0.96rem;
}

.footer-column h3{
  margin:0 0 14px;
  font-size:1rem;
  color:var(--navy);
}

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

.footer-links li + li{
  margin-top:10px;
}

.footer-links a,
.social-links a{
  color:var(--muted);
  font-size:0.95rem;
}

.footer-links a:hover,
.social-links a:hover{
  color:var(--accent);
}

.social-links{
  display:flex;
  flex-direction:column;
  gap:10px;
}

.footer-bottom{
  border-top:1px solid var(--line);
}

.footer-bottom-inner{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:20px;
  padding:16px 0 24px;
}

.footer-bottom p{
  margin:0;
  color:var(--muted);
  font-size:0.9rem;
}

/* RESPONSIVE */

@media (max-width: 1100px){

  .search-form{
    grid-template-columns:1fr 64px 1fr;
  }

  .field-date{
    grid-column:1 / 3;
  }

  .search-submit{
    grid-column:3 / 4;
  }

  .swap-wrap{
    padding-bottom:30px;
  }
}

@media (max-width: 920px){

  .main-nav{
    display:none;
  }

  .mobile-menu-toggle{
    display:block;
  }

  .upcoming-grid,
  .popular-routes-grid,
  .tips-grid,
  .footer-grid{
    grid-template-columns:1fr;
  }

  .footer-bottom-inner{
    flex-direction:column;
    align-items:flex-start;
  }
}

@media (max-width: 768px){

  .hero{
    padding:34px 0 18px;
  }

  .section{
    padding:28px 0 22px;
  }

  .search-card{
    padding:16px;
    border-radius:22px;
  }

  .search-form{
    grid-template-columns:1fr;
    gap:12px;
  }

  .field-date,
  .search-submit{
    grid-column:auto;
  }

  .swap-wrap{
    padding:0;
    justify-content:flex-start;
  }

  .swap-button{
    width:48px;
    height:48px;
  }

  .section-heading{
    flex-direction:column;
    align-items:flex-start;
  }

  .current-time-box{
    white-space:normal;
  }

  .route-column,
  .tip-card,
  .ferry-card{
    padding:18px;
  }

  .ad-image{
    aspect-ratio:3 / 1;
  }
}

@media (max-width: 560px){

  .container{
    width:min(var(--container), calc(100% - 20px));
  }

  .header-inner{
    min-height:72px;
  }

  .logo-text{
    font-size:0.96rem;
  }

  .hero h1{
    font-size:2.25rem;
  }

  .hero-text{
    font-size:1rem;
  }

  .search-field select,
  .search-button{
    height:54px;
  }

  .ferry-card h3{
    font-size:1.08rem;
  }
}