projectb/css/main.scss
2023-06-25 15:50:33 +05:30

761 lines
14 KiB
SCSS

* {
padding: 0;
margin: 0;
box-sizing: border-box;
font-family: "Roboto", sans-serif;
}
:root {
font-size: clamp(1rem, 1.2vmax, 1.2rem);
}
html,
body {
height: 100%;
}
body {
--accent-color: #3d5afe;
--secondary-color: #ffac2e;
--text-color: 20, 20, 20;
--foreground-color: 252, 253, 255;
--background-color: 241, 243, 248;
--danger-color: rgb(255, 75, 75);
--green: #1cad59;
--yellow: rgb(220, 165, 0);
--inline-padding: max(1rem, 6vw);
background-color: rgba(var(--background-color), 1);
}
body[data-theme="dark"] {
--accent-color: #6d83ff;
--secondary-color: #d60739;
--text-color: 220, 220, 220;
--foreground-color: 27, 28, 29;
--background-color: 21, 22, 22;
--danger-color: rgb(255, 106, 106);
--green: #00e676;
--yellow: rgb(255, 213, 5);
}
p,
strong {
font-size: 1rem;
max-width: 70ch;
line-height: 1.6;
color: rgba(var(--text-color), 0.9);
}
img {
width: 100%;
height: 100%;
object-fit: cover;
}
h1 {
font-size: max(1.8rem, 4vw);
}
h2 {
font-size: max(1.5rem, 3vw);
}
h3 {
font-size: max(1.2rem, 2vw);
}
h4 {
font-size: max(1rem, 1.3vw);
}
img {
object-fit: contain;
}
ul {
list-style: none;
}
ol {
padding-left: 1rem;
li {
color: rgba(var(--text-color), 0.9);
&:not(:last-child) {
margin-bottom: 0.5rem;
}
}
}
.icon {
width: 1.2rem;
height: 1.2rem;
fill: rgba(var(--text-color), 0.9);
}
.flex {
display: flex;
}
.align-items-center {
align-items: center;
}
.justify-content-center {
justify-content: center;
}
.justify-content-center {
justify-content: center;
}
.justify-self-start {
justify-self: start;
}
.justify-self-end {
justify-self: end;
}
.justify-self-center {
justify-self: center;
}
.align-self-start {
align-self: start;
}
.align-self-end {
align-self: end;
}
.align-self-center {
align-self: center;
}
.flex-direction-column {
flex-direction: column;
}
.flex-1 {
flex: 1;
}
.grid {
display: grid;
}
.gap-0-3 {
gap: 0.3rem;
}
.gap-0-5 {
gap: 0.5rem;
}
.gap-1 {
gap: 1rem;
}
.gap-1-5 {
gap: 1.5rem;
}
.gap-2 {
gap: 2rem;
}
.gap-3 {
gap: 3rem;
}
.gap-4 {
gap: 4rem;
}
.text-center {
text-align: center;
}
article {
padding-top: 4rem;
& > * {
padding: max(1rem, 2vw) var(--inline-padding);
}
}
#main_header {
display: flex;
align-items: center;
justify-content: space-between;
position: fixed;
left: 0;
right: 0;
top: 0;
background-color: rgba(var(--foreground-color), 0.5);
z-index: 10;
backdrop-filter: blur(1rem);
padding: max(1rem, 2vw) var(--inline-padding);
a {
color: rgba(var(--text-color), 0.9);
text-decoration: none;
}
ul {
list-style: none;
display: flex;
gap: 0.8rem;
a {
font-weight: 500;
font-size: 0.9rem;
&::after {
content: "";
display: block;
width: 0;
height: 0.15rem;
background: var(--accent-color);
transition: width 0.3s;
margin: auto;
}
&.active {
&::after {
width: 1rem;
}
}
}
.icon {
display: flex;
}
}
}
#above_fold {
h2 {
max-width: 46rem;
justify-self: center;
text-align: center;
margin-bottom: 3rem;
}
ol {
display: block;
columns: 2 24rem;
column-gap: 2rem;
li {
page-break-inside: avoid;
break-inside: avoid;
margin-bottom: 3rem;
}
}
}
#hero_illustration {
margin: auto;
margin-top: 4rem;
width: min(100%, 26rem);
}
section {
display: grid;
position: relative;
align-content: center;
padding-bottom: 6rem;
min-height: 40vmax;
&:nth-of-type(2) {
overflow: hidden;
}
}
.section-header {
display: flex;
flex-direction: column;
text-align: center;
margin-bottom: 3rem;
&::after {
content: "•••";
line-height: 0.5;
}
}
#payment_section {
min-height: 80vh;
}
#bitcoin_lineart {
position: absolute;
opacity: 0.2;
height: 80vh;
width: auto;
align-self: center;
right: 0;
}
#el_salvador_section {
position: relative;
overflow: hidden;
min-height: 60vmax;
}
#el_salvador_map {
position: absolute;
opacity: 0.06;
top: 0;
width: max(100vh, 90vw);
height: auto;
left: 50%;
transform: translateX(-50%);
}
.carousel {
display: flex;
overflow-x: auto;
border-radius: 0.5rem;
margin-top: 1.5rem;
scroll-snap-type: x mandatory;
scroll-padding: 0 calc(1 * var(--inline-padding));
margin: 3rem calc(-1 * var(--inline-padding));
padding: 1rem calc(1 * var(--inline-padding));
scrollbar-width: none;
&::-webkit-scrollbar {
display: none;
}
}
.milestone {
position: relative;
display: flex;
flex-direction: column;
gap: 1rem;
width: min(calc(100% - 1rem), 28rem);
flex-shrink: 0;
scroll-snap-align: start;
padding-right: 3rem;
&:last-of-type {
padding-right: 0;
.milestone__label {
&::before {
display: none;
}
}
}
&__label {
display: flex;
align-items: center;
background-color: rgba(var(--text-color), 1);
color: rgba(var(--foreground-color), 1);
padding: 0.4rem 0.5rem;
align-self: flex-start;
border-radius: 0.3rem;
font-size: 0.9rem;
&::before {
position: absolute;
content: "";
display: block;
width: 100%;
height: 0.1rem;
background-color: rgba(var(--text-color), 0.3);
z-index: -1;
}
}
&__title {
margin-top: 1rem;
}
}
.carousel-control {
display: flex;
border: none;
background: none;
padding: 0.7rem;
border: solid thin rgba(var(--text-color), 0.5);
border-radius: 50%;
cursor: pointer;
}
.carousel:has(.project) {
padding-bottom: 3rem;
}
#projects_section {
h2 {
margin-bottom: 3rem;
}
}
.project {
display: grid;
width: 100%;
border-radius: 0.8rem;
border: solid thin rgba(var(--text-color), 0.1);
background-color: rgba(var(--foreground-color), 1);
box-shadow: 0 0.5rem 1rem rgba(var(--text-color), 0.1);
&__images {
display: flex;
gap: 1rem;
flex-direction: column;
flex: 1;
overflow-x: hidden;
padding: 1rem;
}
&__image {
display: flex;
flex: 1;
aspect-ratio: 4/3;
min-width: 12rem;
height: 30vmax;
img {
min-height: 30vmax;
width: 100%;
object-fit: cover;
border-radius: 0.5rem;
}
}
&__images-wrapper {
display: flex;
overflow-x: auto;
gap: 0.5rem;
}
.thumbnail-button {
width: 5rem;
aspect-ratio: 4/3;
border-radius: 0.5rem;
overflow: hidden;
cursor: pointer;
border: none;
flex-shrink: 0;
transition: transform 0.2s;
&.active {
transform: scale(0.9);
}
}
.thumbnail {
object-fit: cover;
}
&__content {
padding: max(1rem, 2vw);
text-align: left;
display: flex;
flex-direction: column;
gap: 1rem;
flex: 1;
}
&__button {
font-size: 0.8rem;
font-weight: 700;
text-decoration: none;
text-transform: uppercase;
color: rgba(var(--text-color), 1);
background-color: rgba(var(--text-color), 0.1);
padding: 0.5rem 1rem;
border-radius: 1rem;
letter-spacing: 0.05em;
align-self: flex-end;
border: none;
cursor: pointer;
}
.project__hidden-details {
grid-column: 1/-1;
padding: 1rem;
border-top: solid thin rgba(var(--text-color), 0.5);
overflow: hidden;
}
}
.badge {
background-color: rgba(var(--text-color), 1);
color: rgba(var(--foreground-color), 1);
padding: 0.4rem 0.5rem;
align-self: flex-start;
border-radius: 0.3rem;
font-size: 0.9rem;
font-weight: 500;
}
#poc_stats {
list-style: none;
display: flex;
gap: 1rem;
margin: 1rem 0;
padding: 1rem;
background-color: rgba(var(--text-color), 0.06);
border-radius: 0.5rem;
.stat {
display: flex;
flex-direction: column;
gap: 0.5rem;
flex: 1;
&__number {
font-size: max(1.2rem, 1.8vmax);
font-weight: 700;
}
&__title {
font-size: 0.9rem;
}
}
}
#methodology_wrapper {
display: flex;
flex-direction: column;
margin-top: 3rem;
.milestone {
display: grid;
max-width: 42rem;
width: auto;
gap: 1rem 2rem;
grid-template-areas: "label title" "label description";
align-items: center;
padding-right: 0;
&:not(:last-child) {
padding-bottom: 3rem;
}
&__label {
align-items: flex-start;
justify-content: center;
grid-area: label;
&::before {
width: 0.1rem;
height: 100%;
}
}
&__title {
grid-area: title;
margin-top: -0.1em;
}
&__description {
grid-area: description;
}
}
}
#economic_framework {
h2 {
margin-bottom: 3rem;
}
ul {
columns: 3 16rem;
column-gap: 0.5rem;
li {
display: grid;
gap: 0.5rem;
align-items: flex-start;
align-content: flex-start;
background-color: rgba(var(--text-color), 0.06);
border-radius: 0.5rem;
padding: max(1rem, 2vw);
page-break-inside: avoid;
break-inside: avoid;
margin-bottom: 0.5rem;
}
}
}
#team_members {
display: grid;
gap: 1rem;
margin-top: 3rem;
}
.team-member {
display: grid;
grid-template-columns: min(10rem, 50vw) 1fr;
background-color: rgba(var(--foreground-color), 1);
border-radius: 0.5rem;
overflow: hidden;
cursor: pointer;
img {
object-fit: cover;
aspect-ratio: 3/3.5;
width: 100%;
}
.flex {
padding: 1rem;
align-items: flex-start;
gap: 0.5rem;
}
&__name {
font-weight: 700;
font-size: 1rem;
line-height: 1.2;
}
&__title {
line-height: normal;
font-weight: 500;
font-size: 0.9rem;
}
}
#partners {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr));
gap: 1rem;
margin-top: 3rem;
a,
li:not(li:has(a)) {
display: flex;
gap: 0.8rem;
padding: 1rem;
text-decoration: none;
width: 100%;
align-items: center;
background-color: rgba(var(--text-color), 0.06);
border-radius: 0.5rem;
.icon {
width: 2rem;
height: 2rem;
}
}
img {
height: 2rem;
}
span {
font-weight: 500;
color: rgba(var(--text-color), 0.9);
width: 100%;
}
}
#media_coverage_section {
.masonry {
margin-top: 3rem;
display: flex;
flex-wrap: wrap;
gap: 1rem;
iframe {
display: flex;
flex: 1 1 15rem;
border-radius: 0.5rem;
max-width: max(100vw - 2.5rem);
}
}
}
#socials_section {
}
#social_links {
display: flex;
flex-wrap: wrap;
gap: 0.5rem;
justify-items: center;
width: 100%;
margin-top: 3rem;
grid-template-columns: repeat(auto-fill, minmax(8rem, 1fr));
li {
width: 100%;
justify-content: center;
box-shadow: 0 0 0 0 rgba(var(--text-color), 1);
transition: box-shadow 0.1s ease;
flex: 1 1 8rem;
border-radius: 0.5rem;
&:hover {
box-shadow: 0 0 0 0.1rem rgba(var(--text-color), 1);
}
}
a {
display: flex;
width: 100%;
gap: 0.5rem;
text-decoration: none;
color: rgba(var(--text-color), 0.9);
padding: 1rem;
justify-content: center;
border-radius: inherit;
background-color: rgba(var(--text-color), 0.06);
font-weight: 500;
}
}
#services_section {
ul {
display: flex;
flex-wrap: wrap;
gap: 1rem;
margin-top: 3rem;
}
li {
display: flex;
flex: 1 1 20rem;
gap: 1rem;
align-items: center;
padding: max(1rem, 2vw);
border: solid thin rgba(var(--text-color), 0.2);
border-radius: 0.5rem;
font-weight: 500;
animation: slide-up 0.5s ease var(--delay) forwards;
opacity: 0;
}
.icon {
height: 2.5rem;
width: 2.5rem;
}
}
#news_list {
display: grid;
gap: 0.5rem;
li {
container: news-item / inline-size;
}
}
.news-item {
display: grid;
grid-template-columns: auto 1fr;
grid-template-areas: " icon ." "icon ." "icon ." "icon .";
gap: 0.5rem 1rem;
border: solid thin rgba(var(--text-color), 0.5);
border-radius: 0.5rem;
padding: max(1rem, 2vw);
text-decoration: none;
color: rgba(var(--text-color), 0.9);
animation: slide-up 0.5s ease var(--delay) forwards;
opacity: 0;
&__icon {
grid-area: icon;
.icon {
height: 2rem;
width: 2rem;
}
}
&__date {
background-color: rgba(var(--text-color), 0.1);
margin-right: auto;
padding: 0.1rem 0.5rem;
border-radius: 0.3rem;
font-weight: 500;
font-size: 0.8rem;
}
}
@keyframes slide-up {
from {
opacity: 0;
transform: translateY(100%);
}
to {
opacity: 1;
transform: translateY(0);
}
}
@container news-item (max-width: 400px) {
.news-item {
grid-template-areas: none;
grid-template-columns: 1fr;
&__icon {
grid-area: unset;
}
}
}
@media screen and (max-width: 768px) {
#poc_images {
.poc-wrapper {
&:nth-of-type(5) {
grid-area: 3/2/4/3;
}
}
}
.hide-on-small {
display: none !important;
}
}
@media screen and (min-width: 768px) {
body {
--inline-padding: max(1rem, 12vw);
}
#bitcoin_lineart {
opacity: 0.6;
left: calc(100% - 50vw);
}
.project {
grid-template-columns: 1fr 1fr;
}
#team_members {
grid-template-columns: repeat(auto-fill, minmax(20rem, 1fr));
}
.hide-on-large {
display: none !important;
}
}
@media screen and (any-hover: none) {
.carousel-controls {
display: none;
}
}
@media screen and (any-hover: hover) {
::-webkit-scrollbar {
width: 0.5rem;
height: 0.5rem;
}
::-webkit-scrollbar-thumb {
background: rgba(var(--text-color), 0.3);
border-radius: 1rem;
&:hover {
background: rgba(var(--text-color), 0.5);
}
}
#main_header {
ul {
a:hover {
&::after {
width: 1rem;
}
}
}
}
.team-member {
transition: box-shadow 0.2s ease;
box-shadow: 0 0 0 0 rgba(var(--text-color), 1);
&:hover {
box-shadow: 0 0 0 0.1rem rgba(var(--text-color), 1);
}
}
}
.hidden {
display: none;
}